-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ui): support browsing different git tree in code browser (#2332)
* feat(ui): support browsing different git tree in code browser * update * encode/decode rev * expand keys * repositorySearch * key * navigate * viewmode * fetch entries * format * error view * update * update * using '/-/{viewMode}' as separator * [autofix.ci] apply automated fixes * encodeURIComponentIgnoringSlash * update --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
- Loading branch information
1 parent
6f46ac0
commit 8cb326d
Showing
15 changed files
with
981 additions
and
679 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import React from 'react' | ||
|
||
import { cn } from '@/lib/utils' | ||
import { IconFileSearch } from '@/components/ui/icons' | ||
|
||
import { Errors } from './utils' | ||
|
||
interface ErrorViewProps extends React.HTMLAttributes<HTMLDivElement> { | ||
error: Error | undefined | ||
} | ||
|
||
export const ErrorView: React.FC<ErrorViewProps> = ({ className, error }) => { | ||
const isEmptyRepository = error?.message === Errors?.EMPTY_REPOSITORY | ||
|
||
let errorMessge = 'Not found' | ||
if (isEmptyRepository) { | ||
errorMessge = 'Empty repository' | ||
} | ||
|
||
return ( | ||
<div | ||
className={cn('flex min-h-[30vh] items-center justify-center', className)} | ||
> | ||
<div className="flex flex-col items-center"> | ||
<IconFileSearch className="mb-2 h-10 w-10" /> | ||
<div className="text-2xl font-semibold">{errorMessge}</div> | ||
</div> | ||
</div> | ||
) | ||
} |
83 changes: 54 additions & 29 deletions
83
ee/tabby-ui/app/files/components/file-directory-breadcrumb.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.