+
+
table.getColumn('filename')?.setFilterValue(event.target.value)}
- className="w-full border-border-light placeholder:text-text-secondary"
+ aria-label={localize('com_files_filter')}
/>
-
-
-
- {table.getHeaderGroups().map((headerGroup, index) => (
-
- {headerGroup.headers.map((header) => {
- return (
+
+
+
+
+
+ {table.getHeaderGroups().map((headerGroup) => (
+
+ {headerGroup.headers.map((header, index) => (
- {header.isPlaceholder
- ? null
- : flexRender(header.column.columnDef.header, header.getContext())}
+
+ {header.isPlaceholder
+ ? null
+ : flexRender(header.column.columnDef.header, header.getContext())}
+
- );
- })}
-
- ))}
-
-
- {table.getRowModel().rows.length ? (
- table.getRowModel().rows.map((row) => (
-
- {row.getVisibleCells().map((cell) => (
- ).meta
- .size,
- }}
- >
- {flexRender(cell.column.columnDef.cell, cell.getContext())}
-
))}
- ))
- ) : (
-
-
- {localize('com_files_no_results')}
-
-
- )}
-
-
-
-
-
-
+ ))}
+
+
+ {table.getRowModel().rows.length ? (
+ table.getRowModel().rows.map((row) => (
+
+ {row.getVisibleCells().map((cell) => {
+ const isFilenameCell = cell.column.id === 'filename';
+
+ return (
+ {
+ if (isFilenameCell) {
+ const clickedElement = e.target as HTMLElement;
+ // Check if clicked element is within cell and not a button/link
+ if (
+ clickedElement.closest('td') &&
+ !clickedElement.closest('button, a')
+ ) {
+ e.preventDefault();
+ e.stopPropagation();
+ handleFileClick(row.original as TFile);
+ }
+ }
+ }}
+ onKeyDown={(e) => {
+ if (isFilenameCell && (e.key === 'Enter' || e.key === ' ')) {
+ const clickedElement = e.target as HTMLElement;
+ if (
+ clickedElement.closest('td') &&
+ !clickedElement.closest('button, a')
+ ) {
+ e.preventDefault();
+ e.stopPropagation();
+ handleFileClick(row.original as TFile);
+ }
+ }
+ }}
+ >
+ {flexRender(cell.column.columnDef.cell, cell.getContext())}
+
+ );
+ })}
+
+ ))
+ ) : (
+
+
+ {localize('com_files_no_results')}
+
+
+ )}
+
+
-
+
+
+
+
+
+
+
+ {`${pageIndex + 1} / ${table.getPageCount()}`}
+
- >
+
);
}
diff --git a/client/src/components/ui/Button.tsx b/client/src/components/ui/Button.tsx
index e86c261ac8..7ebe99e7ca 100644
--- a/client/src/components/ui/Button.tsx
+++ b/client/src/components/ui/Button.tsx
@@ -4,14 +4,14 @@ import { cva, type VariantProps } from 'class-variance-authority';
import { cn } from '~/utils';
const buttonVariants = cva(
- 'inline-flex items-center justify-center whitespace-nowrap rounded-lg text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50',
+ 'inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-lg text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50',
{
variants: {
variant: {
default: 'bg-primary text-primary-foreground hover:bg-primary/90',
destructive: 'bg-destructive text-destructive-foreground hover:bg-destructive/80',
outline:
- 'text-text-primary border border-input bg-background hover:bg-accent hover:text-accent-foreground',
+ 'text-text-primary border border-border-light bg-background hover:bg-accent hover:text-accent-foreground',
secondary: 'bg-secondary text-secondary-foreground hover:bg-secondary/80',
ghost: 'hover:bg-accent hover:text-accent-foreground',
link: 'text-primary underline-offset-4 hover:underline',
@@ -19,8 +19,8 @@ const buttonVariants = cva(
},
size: {
default: 'h-10 px-4 py-2',
- sm: 'h-9 rounded-md px-3',
- lg: 'h-11 rounded-md px-8',
+ sm: 'h-9 rounded-lg px-3',
+ lg: 'h-11 rounded-lg px-8',
icon: 'size-10',
},
},
diff --git a/client/src/localization/languages/Eng.ts b/client/src/localization/languages/Eng.ts
index 15e8c18070..3b309af9fd 100644
--- a/client/src/localization/languages/Eng.ts
+++ b/client/src/localization/languages/Eng.ts
@@ -438,6 +438,7 @@ export default {
com_ui_no_conversation_id: 'No conversation ID found',
com_ui_add_multi_conversation: 'Add multi-conversation',
com_ui_duplicate_agent_confirm: 'Are you sure you want to duplicate this agent?',
+ com_ui_page: 'Page',
com_auth_error_login:
'Unable to login with the information provided. Please check your credentials and try again.',
com_auth_error_login_rl:
diff --git a/package-lock.json b/package-lock.json
index 7d6d252f43..34437fbf57 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -34920,9 +34920,10 @@
"integrity": "sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ=="
},
"node_modules/use-callback-ref": {
- "version": "1.3.1",
- "resolved": "https://registry.npmjs.org/use-callback-ref/-/use-callback-ref-1.3.1.tgz",
- "integrity": "sha512-Lg4Vx1XZQauB42Hw3kK7JM6yjVjgFmFC5/Ab797s79aARomD2nEErc4mCgM8EZrARLmmbWpi5DGCadmK50DcAQ==",
+ "version": "1.3.3",
+ "resolved": "https://registry.npmjs.org/use-callback-ref/-/use-callback-ref-1.3.3.tgz",
+ "integrity": "sha512-jQL3lRnocaFtu3V00JToYz/4QkNWswxijDaCVNZRiRTO3HQDLsdu1ZtmIUvV4yPp+rvWm5j0y0TG/S61cuijTg==",
+ "license": "MIT",
"dependencies": {
"tslib": "^2.0.0"
},
@@ -34930,8 +34931,8 @@
"node": ">=10"
},
"peerDependencies": {
- "@types/react": "^16.8.0 || ^17.0.0 || ^18.0.0",
- "react": "^16.8.0 || ^17.0.0 || ^18.0.0"
+ "@types/react": "*",
+ "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc"
},
"peerDependenciesMeta": {
"@types/react": {