diff --git a/apps/nestjs-backend/src/features/notification/notification.service.ts b/apps/nestjs-backend/src/features/notification/notification.service.ts
index b476be280..c218ed9f5 100644
--- a/apps/nestjs-backend/src/features/notification/notification.service.ts
+++ b/apps/nestjs-backend/src/features/notification/notification.service.ts
@@ -200,7 +200,7 @@ export class NotificationService {
case NotificationTypeEnum.CollaboratorMultiRowTag: {
const { baseId, tableId, recordId } = urlMeta || {};
- return `${origin}/base/${baseId}/${tableId}/${recordId ? recordId : ''}`;
+ return `${origin}/base/${baseId}/${tableId}/${recordId ? `default/${recordId}` : ''}`;
}
}
}
diff --git a/apps/nextjs-app/src/features/app/blocks/base/base-side-bar/BaseSideBar.tsx b/apps/nextjs-app/src/features/app/blocks/base/base-side-bar/BaseSideBar.tsx
index 05d62fb93..e0fbe232f 100644
--- a/apps/nextjs-app/src/features/app/blocks/base/base-side-bar/BaseSideBar.tsx
+++ b/apps/nextjs-app/src/features/app/blocks/base/base-side-bar/BaseSideBar.tsx
@@ -3,7 +3,7 @@ import { cn } from '@teable-group/ui-lib/shadcn';
import { Button } from '@teable-group/ui-lib/shadcn/ui/button';
import Link from 'next/link';
import { useRouter } from 'next/router';
-import { useTranslation } from 'react-i18next';
+import { useTranslation } from 'next-i18next';
import { tableConfig } from '@/features/i18n/table.config';
import { TableList } from '../../table-list/TableList';
import { QuickAction } from './QuickAction';
diff --git a/apps/nextjs-app/src/features/app/blocks/base/base-side-bar/QuickAction.tsx b/apps/nextjs-app/src/features/app/blocks/base/base-side-bar/QuickAction.tsx
index e324deebb..f0eaec7c0 100644
--- a/apps/nextjs-app/src/features/app/blocks/base/base-side-bar/QuickAction.tsx
+++ b/apps/nextjs-app/src/features/app/blocks/base/base-side-bar/QuickAction.tsx
@@ -13,9 +13,9 @@ import {
Button,
} from '@teable-group/ui-lib/shadcn';
import { useRouter } from 'next/router';
+import { useTranslation } from 'next-i18next';
import { useState } from 'react';
import { useHotkeys } from 'react-hotkeys-hook';
-import { useTranslation } from 'react-i18next';
import { useSettingStore } from '@/features/app/components/setting/useSettingStore';
import { tableConfig } from '@/features/i18n/table.config';
diff --git a/apps/nextjs-app/src/features/app/blocks/db-connection/Panel.tsx b/apps/nextjs-app/src/features/app/blocks/db-connection/Panel.tsx
index b515902a3..a2044f3b2 100644
--- a/apps/nextjs-app/src/features/app/blocks/db-connection/Panel.tsx
+++ b/apps/nextjs-app/src/features/app/blocks/db-connection/Panel.tsx
@@ -88,9 +88,13 @@ export const DbConnectionPanel: React.FC = () => {
{data?.data ? (
-
+
) : (
-
+
)}
>
diff --git a/apps/nextjs-app/src/features/app/blocks/design/Design.tsx b/apps/nextjs-app/src/features/app/blocks/design/Design.tsx
index f80593b4a..51160daf1 100644
--- a/apps/nextjs-app/src/features/app/blocks/design/Design.tsx
+++ b/apps/nextjs-app/src/features/app/blocks/design/Design.tsx
@@ -6,7 +6,7 @@ import { FieldProvider, useTable, useTablePermission } from '@teable-group/sdk';
import { Button, cn } from '@teable-group/ui-lib/shadcn';
import Link from 'next/link';
import { useRouter } from 'next/router';
-import { useTranslation } from 'react-i18next';
+import { useTranslation } from 'next-i18next';
import { useTitle } from 'react-use';
import { tableConfig } from '@/features/i18n/table.config';
import { Emoji } from '../../components/emoji/Emoji';
diff --git a/apps/nextjs-app/src/features/app/blocks/design/card/TableDetail.tsx b/apps/nextjs-app/src/features/app/blocks/design/card/TableDetail.tsx
index b19d67598..8306258fc 100644
--- a/apps/nextjs-app/src/features/app/blocks/design/card/TableDetail.tsx
+++ b/apps/nextjs-app/src/features/app/blocks/design/card/TableDetail.tsx
@@ -10,7 +10,7 @@ import {
} from '@teable-group/ui-lib/shadcn';
import dayjs from 'dayjs';
import relativeTime from 'dayjs/plugin/relativeTime';
-import { useTranslation } from 'react-i18next';
+import { useTranslation } from 'next-i18next';
import { DbTableName } from '../components/DbTableName';
import { TableDescription } from '../components/TableDescription';
import { TableName } from '../components/TableName';
diff --git a/apps/nextjs-app/src/features/app/blocks/design/components/Actions.tsx b/apps/nextjs-app/src/features/app/blocks/design/components/Actions.tsx
index 4c72deff3..6e0d8e418 100644
--- a/apps/nextjs-app/src/features/app/blocks/design/components/Actions.tsx
+++ b/apps/nextjs-app/src/features/app/blocks/design/components/Actions.tsx
@@ -7,7 +7,7 @@ import {
DropdownMenuContent,
DropdownMenuItem,
} from '@teable-group/ui-lib/shadcn';
-import { useTranslation } from 'react-i18next';
+import { useTranslation } from 'next-i18next';
import { FieldOperator } from '@/features/app/components/field-setting';
import { useFieldSettingStore } from '../../view/field/useFieldSettingStore';
diff --git a/apps/nextjs-app/src/features/app/blocks/design/components/DbTableName.tsx b/apps/nextjs-app/src/features/app/blocks/design/components/DbTableName.tsx
index 1f4c193d5..05ebe65a7 100644
--- a/apps/nextjs-app/src/features/app/blocks/design/components/DbTableName.tsx
+++ b/apps/nextjs-app/src/features/app/blocks/design/components/DbTableName.tsx
@@ -2,8 +2,8 @@ import { useTable, useTablePermission } from '@teable-group/sdk/hooks';
import type { Table } from '@teable-group/sdk/model';
import { Button, Input, Label } from '@teable-group/ui-lib/shadcn';
import { toast } from '@teable-group/ui-lib/shadcn/ui/sonner';
+import { useTranslation } from 'next-i18next';
import { useState } from 'react';
-import { useTranslation } from 'react-i18next';
export const DbTableName = () => {
const table = useTable() as Table;
diff --git a/apps/nextjs-app/src/features/app/blocks/design/components/FieldPropertyEditor.tsx b/apps/nextjs-app/src/features/app/blocks/design/components/FieldPropertyEditor.tsx
index c1b407d84..e913d9dfd 100644
--- a/apps/nextjs-app/src/features/app/blocks/design/components/FieldPropertyEditor.tsx
+++ b/apps/nextjs-app/src/features/app/blocks/design/components/FieldPropertyEditor.tsx
@@ -2,8 +2,8 @@ import { Edit } from '@teable-group/icons';
import { useField, useTablePermission } from '@teable-group/sdk/hooks';
import { Button, Input } from '@teable-group/ui-lib/shadcn';
import { toast } from '@teable-group/ui-lib/shadcn/ui/sonner';
+import { useTranslation } from 'next-i18next';
import { useState } from 'react';
-import { useTranslation } from 'react-i18next';
import { tableConfig } from '@/features/i18n/table.config';
export const FieldPropertyEditor = ({
diff --git a/apps/nextjs-app/src/features/app/blocks/design/components/TableDescription.tsx b/apps/nextjs-app/src/features/app/blocks/design/components/TableDescription.tsx
index ccd51cd0e..2815b4750 100644
--- a/apps/nextjs-app/src/features/app/blocks/design/components/TableDescription.tsx
+++ b/apps/nextjs-app/src/features/app/blocks/design/components/TableDescription.tsx
@@ -2,8 +2,8 @@ import { useTable, useTablePermission } from '@teable-group/sdk/hooks';
import type { Table } from '@teable-group/sdk/model';
import { Button, Label, Textarea } from '@teable-group/ui-lib/shadcn';
import { toast } from '@teable-group/ui-lib/shadcn/ui/sonner';
+import { useTranslation } from 'next-i18next';
import { useState } from 'react';
-import { useTranslation } from 'react-i18next';
export const TableDescription = () => {
const table = useTable() as Table;
diff --git a/apps/nextjs-app/src/features/app/blocks/design/components/TableName.tsx b/apps/nextjs-app/src/features/app/blocks/design/components/TableName.tsx
index f623992f7..1ae00ad0a 100644
--- a/apps/nextjs-app/src/features/app/blocks/design/components/TableName.tsx
+++ b/apps/nextjs-app/src/features/app/blocks/design/components/TableName.tsx
@@ -2,8 +2,8 @@ import { useTable, useTablePermission } from '@teable-group/sdk/hooks';
import type { Table } from '@teable-group/sdk/model';
import { Button, Input, Label } from '@teable-group/ui-lib/shadcn';
import { toast } from '@teable-group/ui-lib/shadcn/ui/sonner';
+import { useTranslation } from 'next-i18next';
import { useState } from 'react';
-import { useTranslation } from 'react-i18next';
export const TableName = () => {
const table = useTable() as Table;
diff --git a/apps/nextjs-app/src/features/app/blocks/design/data-table/DataTable.tsx b/apps/nextjs-app/src/features/app/blocks/design/data-table/DataTable.tsx
index a48a4977a..db5c14850 100644
--- a/apps/nextjs-app/src/features/app/blocks/design/data-table/DataTable.tsx
+++ b/apps/nextjs-app/src/features/app/blocks/design/data-table/DataTable.tsx
@@ -24,8 +24,8 @@ import {
TableHeader,
TableRow,
} from '@teable-group/ui-lib/shadcn';
+import { useTranslation } from 'next-i18next';
import * as React from 'react';
-import { useTranslation } from 'react-i18next';
interface DataTableProps {
columns: ColumnDef[];
diff --git a/apps/nextjs-app/src/features/app/blocks/space/space-side-bar/SpaceSideBar.tsx b/apps/nextjs-app/src/features/app/blocks/space/space-side-bar/SpaceSideBar.tsx
index 6c143a9cb..59e6bab51 100644
--- a/apps/nextjs-app/src/features/app/blocks/space/space-side-bar/SpaceSideBar.tsx
+++ b/apps/nextjs-app/src/features/app/blocks/space/space-side-bar/SpaceSideBar.tsx
@@ -11,13 +11,11 @@ export const SpaceSideBar = () => {
const pageRoutes: {
href: string;
text: string;
- shortCutKey: string;
Icon: React.FC<{ className?: string }>;
}[] = [
{
href: '/space',
text: 'All spaces',
- shortCutKey: '⌘H',
Icon: Home,
},
];
@@ -25,7 +23,7 @@ export const SpaceSideBar = () => {
<>
- {pageRoutes.map(({ href, text, shortCutKey, Icon }) => {
+ {pageRoutes.map(({ href, text, Icon }) => {
return (
-
diff --git a/apps/nextjs-app/src/features/app/blocks/view/grid/components/FieldMenu.tsx b/apps/nextjs-app/src/features/app/blocks/view/grid/components/FieldMenu.tsx
index 10347882d..eef4c1505 100644
--- a/apps/nextjs-app/src/features/app/blocks/view/grid/components/FieldMenu.tsx
+++ b/apps/nextjs-app/src/features/app/blocks/view/grid/components/FieldMenu.tsx
@@ -14,8 +14,8 @@ import {
SheetHeader,
} from '@teable-group/ui-lib/shadcn';
import classNames from 'classnames';
+import { useTranslation } from 'next-i18next';
import { useRef } from 'react';
-import { useTranslation } from 'react-i18next';
import { useClickAway } from 'react-use';
import { FieldOperator } from '@/features/app/components/field-setting/type';
import { tableConfig } from '@/features/i18n/table.config';
diff --git a/apps/nextjs-app/src/features/app/blocks/view/grid/components/PrefillingRowContainer.tsx b/apps/nextjs-app/src/features/app/blocks/view/grid/components/PrefillingRowContainer.tsx
index 33c13df7b..fbee9d49a 100644
--- a/apps/nextjs-app/src/features/app/blocks/view/grid/components/PrefillingRowContainer.tsx
+++ b/apps/nextjs-app/src/features/app/blocks/view/grid/components/PrefillingRowContainer.tsx
@@ -5,8 +5,8 @@ import {
TooltipProvider,
TooltipTrigger,
} from '@teable-group/ui-lib/shadcn';
+import { useTranslation } from 'next-i18next';
import { useRef } from 'react';
-import { useTranslation } from 'react-i18next';
import { useClickAway } from 'react-use';
import { tableConfig } from '@/features/i18n/table.config';
diff --git a/apps/nextjs-app/src/features/app/blocks/view/grid/components/RecordMenu.tsx b/apps/nextjs-app/src/features/app/blocks/view/grid/components/RecordMenu.tsx
index 7b3131a50..37dd4c3b6 100644
--- a/apps/nextjs-app/src/features/app/blocks/view/grid/components/RecordMenu.tsx
+++ b/apps/nextjs-app/src/features/app/blocks/view/grid/components/RecordMenu.tsx
@@ -12,8 +12,8 @@ import {
CommandSeparator,
} from '@teable-group/ui-lib/shadcn';
import classNames from 'classnames';
+import { useTranslation } from 'next-i18next';
import { useRef } from 'react';
-import { useTranslation } from 'react-i18next';
import { useClickAway } from 'react-use';
import { tableConfig } from '@/features/i18n/table.config';
import { useSelectionOperation } from '../hooks/useSelectionOperation';
diff --git a/apps/nextjs-app/src/features/app/blocks/view/tool-bar/ViewOperators.tsx b/apps/nextjs-app/src/features/app/blocks/view/tool-bar/ViewOperators.tsx
index dcacdf500..e2920e5d4 100644
--- a/apps/nextjs-app/src/features/app/blocks/view/tool-bar/ViewOperators.tsx
+++ b/apps/nextjs-app/src/features/app/blocks/view/tool-bar/ViewOperators.tsx
@@ -9,8 +9,14 @@ import {
} from '@teable-group/icons';
import { Filter, HideFields, RowHeight, useFields, Sort, Group } from '@teable-group/sdk';
import { useView } from '@teable-group/sdk/hooks/use-view';
-import { cn } from '@teable-group/ui-lib/shadcn';
-import { useTranslation } from 'react-i18next';
+import {
+ Tooltip,
+ TooltipContent,
+ TooltipProvider,
+ TooltipTrigger,
+ cn,
+} from '@teable-group/ui-lib/shadcn';
+import { useTranslation } from 'next-i18next';
import { tableConfig } from '@/features/i18n/table.config';
import { useToolbarChange } from '../hooks/useToolbarChange';
import { ToolBarButton } from './ToolBarButton';
@@ -94,9 +100,19 @@ export const ViewOperators: React.FC<{ disabled?: boolean }> = (props) => {
)}
-
-
-
+
+
+
+
+
+
+
+
+ Coming soon
+
+
+
+
{
diff --git a/apps/nextjs-app/src/features/app/components/setting/Account.tsx b/apps/nextjs-app/src/features/app/components/setting/Account.tsx
index 7ac8ab056..e4bce7f3a 100644
--- a/apps/nextjs-app/src/features/app/components/setting/Account.tsx
+++ b/apps/nextjs-app/src/features/app/components/setting/Account.tsx
@@ -16,8 +16,8 @@ import {
TooltipTrigger,
} from '@teable-group/ui-lib/shadcn';
import { useRouter } from 'next/router';
+import { useTranslation } from 'next-i18next';
import React from 'react';
-import { useTranslation } from 'react-i18next';
import { ChangePasswordDialog } from './account/ChangePasswordDialog';
export const Account: React.FC = () => {
diff --git a/apps/nextjs-app/src/features/app/components/setting/Notifications.tsx b/apps/nextjs-app/src/features/app/components/setting/Notifications.tsx
index 3a896d668..465c48590 100644
--- a/apps/nextjs-app/src/features/app/components/setting/Notifications.tsx
+++ b/apps/nextjs-app/src/features/app/components/setting/Notifications.tsx
@@ -1,7 +1,7 @@
import { updateUserNotifyMeta } from '@teable-group/openapi';
import { useSession } from '@teable-group/sdk';
import { Label, Separator, Switch } from '@teable-group/ui-lib/shadcn';
-import { useTranslation } from 'react-i18next';
+import { useTranslation } from 'next-i18next';
export const Notifications: React.FC = () => {
const { t } = useTranslation('common');
diff --git a/apps/nextjs-app/src/features/app/components/setting/SettingDialog.tsx b/apps/nextjs-app/src/features/app/components/setting/SettingDialog.tsx
index 0284e6418..e48b877dc 100644
--- a/apps/nextjs-app/src/features/app/components/setting/SettingDialog.tsx
+++ b/apps/nextjs-app/src/features/app/components/setting/SettingDialog.tsx
@@ -7,7 +7,7 @@ import {
TabsList,
TabsTrigger,
} from '@teable-group/ui-lib/shadcn';
-import { useTranslation } from 'react-i18next';
+import { useTranslation } from 'next-i18next';
import { System } from '@/features/app/components/setting/System';
import { Account } from './Account';
import { Notifications } from './Notifications';
diff --git a/apps/nextjs-app/src/features/app/components/setting/System.tsx b/apps/nextjs-app/src/features/app/components/setting/System.tsx
index ddc32e9a5..86adcbfe5 100644
--- a/apps/nextjs-app/src/features/app/components/setting/System.tsx
+++ b/apps/nextjs-app/src/features/app/components/setting/System.tsx
@@ -1,6 +1,6 @@
import { ThemeKey, useTheme } from '@teable-group/sdk';
import { Label, RadioGroup, RadioGroupItem, Separator } from '@teable-group/ui-lib/shadcn';
-import { useTranslation } from 'react-i18next';
+import { useTranslation } from 'next-i18next';
export const System: React.FC = () => {
const { t } = useTranslation('common');
diff --git a/apps/nextjs-app/src/features/app/components/setting/account/ChangePasswordDialog.tsx b/apps/nextjs-app/src/features/app/components/setting/account/ChangePasswordDialog.tsx
index 11eacdc91..a6210e1ef 100644
--- a/apps/nextjs-app/src/features/app/components/setting/account/ChangePasswordDialog.tsx
+++ b/apps/nextjs-app/src/features/app/components/setting/account/ChangePasswordDialog.tsx
@@ -17,8 +17,8 @@ import {
useToast,
} from '@teable-group/ui-lib/shadcn';
import { useRouter } from 'next/router';
+import { useTranslation } from 'next-i18next';
import { useState } from 'react';
-import { useTranslation } from 'react-i18next';
import { fromZodError } from 'zod-validation-error';
interface IChangePasswordDialogProps {
diff --git a/apps/nextjs-app/src/features/app/components/space/SpaceActionBar.tsx b/apps/nextjs-app/src/features/app/components/space/SpaceActionBar.tsx
index d614115d5..5d65f7506 100644
--- a/apps/nextjs-app/src/features/app/components/space/SpaceActionBar.tsx
+++ b/apps/nextjs-app/src/features/app/components/space/SpaceActionBar.tsx
@@ -5,7 +5,9 @@ import type { IGetSpaceVo } from '@teable-group/openapi';
import { createBase } from '@teable-group/openapi';
import type { ButtonProps } from '@teable-group/ui-lib';
import { Button } from '@teable-group/ui-lib';
+import { useTranslation } from 'next-i18next';
import React from 'react';
+import { spaceConfig } from '@/features/i18n/space.config';
import { SpaceActionTrigger } from '../../blocks/space/component/SpaceActionTrigger';
import { SpaceCollaboratorModalTrigger } from '../collaborator-manage/space/SpaceCollaboratorModalTrigger';
@@ -21,6 +23,7 @@ interface ActionBarProps {
export const SpaceActionBar: React.FC = (props) => {
const { space, invQueryFilters, className, buttonSize = 'default', onRename, onDelete } = props;
const queryClient = useQueryClient();
+ const { t } = useTranslation(spaceConfig.i18nNamespaces);
const { mutate: createBaseMutator, isLoading: createBaseLoading } = useMutation({
mutationFn: createBase,
@@ -36,12 +39,12 @@ export const SpaceActionBar: React.FC = (props) => {
disabled={createBaseLoading}
onClick={() => createBaseMutator({ spaceId: space.id })}
>
- Create Base
+ {t('space:action.createBase')}
)}
(
- LocalStorageKeys.DashboardKey + base.id
- );
-
- const existTable = useMemo(
- () => tables.find((t) => t.id === anchor?.tableId),
- [anchor?.tableId, tables]
- );
-
- useEffect(() => {
- if (!existTable) {
- setAnchor({});
- }
- }, [existTable, setAnchor, tables]);
-
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
- const { viewId, tableId } = existTable && anchor ? anchor : ({} as any);
+ const { t } = useTranslation(dashboardConfig.i18nNamespaces);
+ const [anchor, setAnchor] = useState<{ tableId?: string; viewId?: string }>({});
+ const { viewId, tableId } = anchor;
return (
-
Dashboard
-
+
{t('common:noun.dashboard')}
-
-
- Overview
-
- Analytics
-
-
- Reports
-
-
- Notifications
-
-
+
+
+
+ 🏗️ Coming soon
+
+
+ The feature is under development, you can try the demo below
+
+
+
+
diff --git a/apps/nextjs-app/src/features/system/pages/NotFoundPage.tsx b/apps/nextjs-app/src/features/system/pages/NotFoundPage.tsx
index 859491e7f..910961780 100644
--- a/apps/nextjs-app/src/features/system/pages/NotFoundPage.tsx
+++ b/apps/nextjs-app/src/features/system/pages/NotFoundPage.tsx
@@ -1,3 +1,4 @@
+import { Button } from '@teable-group/ui-lib/shadcn';
import Head from 'next/head';
import { useTranslation } from 'next-i18next';
import type { FC } from 'react';
@@ -18,13 +19,13 @@ export const NotFoundPage: FC
= (props) => {
{title}
-
+
>
);
diff --git a/apps/nextjs-app/src/pages/base/[baseId]/[tableId]/[viewId]/[recordId].tsx b/apps/nextjs-app/src/pages/base/[baseId]/[tableId]/[viewId]/[recordId].tsx
index 0e0164a32..9a8fd7a60 100644
--- a/apps/nextjs-app/src/pages/base/[baseId]/[tableId]/[viewId]/[recordId].tsx
+++ b/apps/nextjs-app/src/pages/base/[baseId]/[tableId]/[viewId]/[recordId].tsx
@@ -37,7 +37,24 @@ export const getServerSideProps: GetServerSideProps
=
const { baseId, tableId, viewId, recordId } = context.query;
try {
const api = ssrApi;
+
+ // jump to record in default view
+ if (viewId === 'default') {
+ const { id: defaultViewId } = await api.getDefaultViewId(
+ baseId as string,
+ tableId as string
+ );
+
+ return {
+ redirect: {
+ destination: `/base/${baseId}/${tableId}/${defaultViewId}/${recordId}`,
+ permanent: false,
+ },
+ };
+ }
+
const recordServerData = await api.getRecord(tableId as string, recordId as string);
+
if (!recordServerData) {
return {
redirect: {
diff --git a/packages/common-i18n/src/locales/en/sdk.json b/packages/common-i18n/src/locales/en/sdk.json
index c3f8af007..cacc6cee5 100644
--- a/packages/common-i18n/src/locales/en/sdk.json
+++ b/packages/common-i18n/src/locales/en/sdk.json
@@ -23,8 +23,8 @@
},
"editor": {
"attachment": {
- "uploadDragOver": "Paste or drag and drop to upload here",
- "uploadDragDefault": "Release to upload file"
+ "uploadDragOver": "Release to upload file",
+ "uploadDragDefault": "Paste or drag and drop to upload here"
},
"date": {
"placeholder": "Pick a date"
diff --git a/packages/common-i18n/src/locales/en/space.json b/packages/common-i18n/src/locales/en/space.json
index 235c6c1a4..aca853f3a 100644
--- a/packages/common-i18n/src/locales/en/space.json
+++ b/packages/common-i18n/src/locales/en/space.json
@@ -5,5 +5,10 @@
"quickAction": {
"title": "Quick Actions...",
"placeHolder": "Type a command or search..."
+ },
+ "action": {
+ "createBase": "Create a base",
+ "createSpace": "Create a space",
+ "invite": "Invite"
}
}
diff --git a/packages/common-i18n/src/locales/zh/sdk.json b/packages/common-i18n/src/locales/zh/sdk.json
index 9bdb360c8..051551ba3 100644
--- a/packages/common-i18n/src/locales/zh/sdk.json
+++ b/packages/common-i18n/src/locales/zh/sdk.json
@@ -15,8 +15,8 @@
},
"editor": {
"attachment": {
- "uploadDragOver": "粘贴或拖放文件到此处上传",
- "uploadDragDefault": "释放以上传文件"
+ "uploadDragOver": "释放以上传文件",
+ "uploadDragDefault": "粘贴或拖放文件到此处上传"
},
"date": {
"placeholder": "选择日期"
diff --git a/packages/common-i18n/src/locales/zh/space.json b/packages/common-i18n/src/locales/zh/space.json
index 130cb9157..5b71ca44e 100644
--- a/packages/common-i18n/src/locales/zh/space.json
+++ b/packages/common-i18n/src/locales/zh/space.json
@@ -5,5 +5,10 @@
"quickAction": {
"title": "快捷搜索...",
"placeHolder": "输入命令或进行搜索..."
+ },
+ "action": {
+ "createBase": "创建数据库",
+ "createSpace": "创建空间",
+ "invite": "邀请"
}
}
diff --git a/packages/sdk/src/components/grid-enhancements/hooks/use-grid-column-resize.ts b/packages/sdk/src/components/grid-enhancements/hooks/use-grid-column-resize.ts
index d3c226a54..d2b95dd9f 100644
--- a/packages/sdk/src/components/grid-enhancements/hooks/use-grid-column-resize.ts
+++ b/packages/sdk/src/components/grid-enhancements/hooks/use-grid-column-resize.ts
@@ -18,7 +18,7 @@ export function useGridColumnResize(_columns: T[]) {
useDebounce(
() => {
if (!view) {
- throw new Error("Can't find view");
+ return;
}
if (index == null || newSize == null) {
diff --git a/packages/sdk/src/components/row-height/RowHeightBase.tsx b/packages/sdk/src/components/row-height/RowHeightBase.tsx
index 1ae4c23e3..6cc57fb28 100644
--- a/packages/sdk/src/components/row-height/RowHeightBase.tsx
+++ b/packages/sdk/src/components/row-height/RowHeightBase.tsx
@@ -1,9 +1,11 @@
-/* eslint-disable jsx-a11y/no-static-element-interactions */
-/* eslint-disable jsx-a11y/click-events-have-key-events */
import { RowHeightLevel } from '@teable-group/core';
import { DivideSquare, Menu, Square, StretchHorizontal } from '@teable-group/icons';
-import { Popover, PopoverTrigger, PopoverContent } from '@teable-group/ui-lib';
-import classNames from 'classnames';
+import {
+ DropdownMenu,
+ DropdownMenuContent,
+ DropdownMenuItem,
+ DropdownMenuTrigger,
+} from '@teable-group/ui-lib';
import React from 'react';
// eslint-disable-next-line @typescript-eslint/naming-convention
@@ -37,28 +39,23 @@ interface IRowHeightBaseProps {
}
export const RowHeightBase = (props: IRowHeightBaseProps) => {
- const { value, onChange, children } = props;
+ const { onChange, children } = props;
return (
-
- {children}
-
-
- {ROW_HEIGHT_MENU_ITEMS.map(({ label, value: valueInner, Icon }) => (
-
onChange?.(valueInner)}
- >
-
- {label}
-
- ))}
-
-
-
+
+ {children}
+
+ {ROW_HEIGHT_MENU_ITEMS.map(({ label, value: valueInner, Icon }) => (
+ onChange?.(valueInner)}
+ >
+
+ {label}
+
+ ))}
+
+
);
};