diff --git a/packages/components b/packages/components
index 0a8d7ab..a857afb 160000
--- a/packages/components
+++ b/packages/components
@@ -1 +1 @@
-Subproject commit 0a8d7abf9a78bce528e31741d4643e017812616d
+Subproject commit a857afbb2c8f5b5f98771824e875dfffd23b6ad2
diff --git a/packages/resources/src/pages/App.tsx b/packages/resources/src/pages/App.tsx
index 0f55091..9bbf625 100644
--- a/packages/resources/src/pages/App.tsx
+++ b/packages/resources/src/pages/App.tsx
@@ -12,7 +12,6 @@ import 'dayjs/locale/zh-cn';
import zhCN from 'antd/locale/zh_CN';
import ConfigProvider from 'antd/es/config-provider';
-dayjs.locale('zh-cn');
export const AntdConfigProvider = ({ children }: { children: React.ReactNode }) => {
const theme = useTheme();
const primaryColor = theme.palette.primary.main;
@@ -49,6 +48,7 @@ export const InitProvider = ({ children }: { children: React.ReactNode }) => {
const { setPrefix, init: initResource } = useResourceStore();
useEffect(() => {
init();
+ dayjs.locale('zh-cn');
initResource();
}, []);
useEffect(() => {
diff --git a/packages/resources/src/pages/upload/index.tsx b/packages/resources/src/pages/upload/index.tsx
index ac96a90..9715831 100644
--- a/packages/resources/src/pages/upload/index.tsx
+++ b/packages/resources/src/pages/upload/index.tsx
@@ -7,6 +7,7 @@ import { filterFiles } from './utils/filter-files';
import { IconButton } from '@kevisual/components/button/index.tsx';
import { uploadChunkV2 } from './v2/upload-chunk';
import { uploadFilesV2 } from './v2/upload';
+import dayjs from 'dayjs';
type UploadButtonProps = {
/**
@@ -83,10 +84,11 @@ export const UploadButton = (props: UploadButtonProps) => {
export const Upload = ({ uploadDirectory = false }: { uploadDirectory?: boolean }) => {
const onDrop = async (acceptedFiles) => {
acceptedFiles = filterFiles(acceptedFiles);
+ const directory = dayjs().format('YYYY-MM-DD');
if (acceptedFiles.length > 1) {
- const res = await uploadFilesV2(acceptedFiles, {});
+ const res = await uploadFilesV2(acceptedFiles, { directory });
} else if (acceptedFiles.length === 1) {
- const res = await uploadChunkV2(acceptedFiles[0], {});
+ const res = await uploadChunkV2(acceptedFiles[0], { directory });
}
};
diff --git a/src/App.tsx b/src/App.tsx
index 0b797b1..0008ce0 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -71,10 +71,9 @@ export const App = () => {
- } />
+ } />
} />
} />
- } />
} />
} />
} />
diff --git a/src/assets/qrcode-8x8.jpg b/src/assets/qrcode-8x8.jpg
new file mode 100644
index 0000000..b770e44
Binary files /dev/null and b/src/assets/qrcode-8x8.jpg differ
diff --git a/src/modules/layout/LayoutUser.tsx b/src/modules/layout/LayoutUser.tsx
index 8158c0b..a61bcd4 100644
--- a/src/modules/layout/LayoutUser.tsx
+++ b/src/modules/layout/LayoutUser.tsx
@@ -95,7 +95,7 @@ export const LayoutUser = () => {
onClick={() => {
setOpen(false);
}}>
-
+
{t('User')}:
{store.me?.username}
diff --git a/src/modules/layout/Menu.tsx b/src/modules/layout/Menu.tsx
index 0b70a6a..e2792b0 100644
--- a/src/modules/layout/Menu.tsx
+++ b/src/modules/layout/Menu.tsx
@@ -45,13 +45,13 @@ export const LayoutMenu = () => {
const { open, setOpen } = useLayoutStore(useShallow((state) => ({ open: state.open, setOpen: state.setOpen })));
const navigate = useNewNavigate();
return (
-
+
{
setOpen(false);
}}>
-
+
Envision Center
diff --git a/src/modules/layout/index.tsx b/src/modules/layout/index.tsx
index 266b215..5ba48bd 100644
--- a/src/modules/layout/index.tsx
+++ b/src/modules/layout/index.tsx
@@ -7,13 +7,14 @@ import { useShallow } from 'zustand/react/shallow';
import { useEffect, useLayoutEffect, useState } from 'react';
import { LayoutUser } from './LayoutUser';
import PandaPNG from '@/assets/panda.png';
+import QRCodePNG from '@/assets/qrcode-8x8.jpg';
import { Panel, PanelGroup } from 'react-resizable-panels';
import clsx from 'clsx';
import { Button, Menu, MenuItem } from '@mui/material';
import i18n from 'i18next';
import { IconButton } from '@kevisual/components/button/index.tsx';
-import { Languages } from 'lucide-react';
+import { Languages, QrCode } from 'lucide-react';
import { useTranslation } from 'react-i18next';
import { toast } from 'react-toastify';
@@ -89,6 +90,15 @@ export const LayoutMain = (props: LayoutMainProps) => {
{props.title}
+
+
+
+
+
+

+
逸闻设计
+
+
@@ -154,7 +164,7 @@ export const LayoutMain = (props: LayoutMainProps) => {
-
diff --git a/src/pages/app/edit/List.tsx b/src/pages/app/edit/List.tsx
index 4251c6f..00a699d 100644
--- a/src/pages/app/edit/List.tsx
+++ b/src/pages/app/edit/List.tsx
@@ -252,7 +252,7 @@ export const List = () => {
userAppStore.getList();
}, []);
return (
-
+
{
const hasDescription = !!item.description;
const content = marked.parse(item.description);
return (
-
+
{}}>
{item.title}
@@ -330,7 +330,8 @@ export const List = () => {
-
-
Loading... }>
+ }>
diff --git a/src/pages/map/index.tsx b/src/pages/map/index.tsx
index 82f8f00..b9f0487 100644
--- a/src/pages/map/index.tsx
+++ b/src/pages/map/index.tsx
@@ -28,7 +28,7 @@ const ServerPath = () => {
},
];
return (
-
+
{t('Site Map')}
diff --git a/src/pages/org/edit/UserList.tsx b/src/pages/org/edit/UserList.tsx
index f9d355b..1b6e0a1 100644
--- a/src/pages/org/edit/UserList.tsx
+++ b/src/pages/org/edit/UserList.tsx
@@ -136,7 +136,7 @@ export const UserList = () => {
};
}, []);
return (
-
+
{
diff --git a/src/pages/user/edit/Profile.tsx b/src/pages/user/edit/Profile.tsx
index c0f2413..227e2a2 100644
--- a/src/pages/user/edit/Profile.tsx
+++ b/src/pages/user/edit/Profile.tsx
@@ -73,7 +73,7 @@ export const Profile = () => {
}
};
return (
-
+
{t('Profile')}
{t('Edit your profile')}
diff --git a/src/pages/user/login/Login.tsx b/src/pages/user/login/Login.tsx
index 029a9f0..ead2e54 100644
--- a/src/pages/user/login/Login.tsx
+++ b/src/pages/user/login/Login.tsx
@@ -25,7 +25,7 @@ export const Login = () => {
};
return (
-
+
{t('Login')}
diff --git a/vite.config.ts b/vite.config.ts
index 0e32b46..0eb9f43 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -60,6 +60,11 @@ export default defineConfig({
if (chunkInfo.names?.includes('panda.png')) {
return '[name].[ext]';
}
+ const qrcode = ['qrcode-8x8.jpg'];
+ const names = chunkInfo.names || [];
+ if (qrcode.some((name) => names.includes(name))) {
+ return '[name].[ext]';
+ }
return '[name].[hash].[ext]';
},
},