Skip to content

Commit 9d0d361

Browse files
committed
chore: update rsw
1 parent 7155c5b commit 9d0d361

File tree

11 files changed

+221
-180
lines changed

11 files changed

+221
-180
lines changed

locales/dashboard/en.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,7 @@
22
"tools": "Tools",
33
"video": "Video",
44
"game": "Game",
5-
"other": "Other"
5+
"other": "Other",
6+
"editor": "Editor",
7+
"mdhub": "MdHub"
68
}

locales/dashboard/zh_CN.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,7 @@
33
"video": "视频",
44
"game": "游戏",
55
"other": "其他",
6-
"canvas": "画板"
6+
"canvas": "画板",
7+
"editor": "Editor",
8+
"mdhub": "MdHub"
79
}

locales/dashboard/zh_HK.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,7 @@
33
"video": "視頻",
44
"game": "遊戲",
55
"other": "其他",
6-
"canvas": "畫板"
6+
"canvas": "畫板",
7+
"editor": "Editor",
8+
"mdhub": "MdHub"
79
}

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@
3838
"@types/react-dom": "^18.0.0",
3939
"@types/uuid": "^8.3.4",
4040
"@vitejs/plugin-react": "^1.3.0",
41-
"sass": "^1.51.0",
41+
"sass": "^1.53.0",
4242
"typescript": "^4.6.3",
4343
"unocss": "^0.33.2",
4444
"vite": "^2.9.9",
45-
"vite-plugin-rsw": "^2.0.7",
46-
"vite-tsconfig-paths": "^3.4.1"
45+
"vite-plugin-rsw": "^2.0.8",
46+
"vite-tsconfig-paths": "^3.5.0"
4747
}
4848
}

src/routes.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import DashboardView from '@/views/dashboard';
66
import CanvasView from '@/views/canvas';
77
import CanvasPaperView from '@/views/canvas/paper';
88
import GameOfLifeView from '@/views/game_of_life';
9+
import MdHub from '@/views/mdhub';
910

1011
const routes: RouteObject[] = [
1112
{
@@ -24,6 +25,10 @@ const routes: RouteObject[] = [
2425
path: 'game/game-of-life',
2526
element: <GameOfLifeView />,
2627
},
28+
{
29+
path: 'mdhub',
30+
element: <MdHub />,
31+
},
2732
];
2833

2934
export default () => {

src/views/dashboard/index.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import OmbCard, { OmbItem } from '@/components/OmbCard';
22
import SwitchLang from '@/components/SwitchLang';
33

44
import useI18n from '@/hooks/useI18n';
5-
import ohmyboxIcon from '@/oh-my-box.svg';
5+
// import ohmyboxIcon from '@/oh-my-box.svg';
66

77
export default function DashboardView() {
88
const t = useI18n(['dashboard', 'tools', 'game']);
@@ -16,6 +16,9 @@ export default function DashboardView() {
1616
<OmbCard title={t('dashboard:game')}>
1717
<OmbItem to="/game/game-of-life">{t('game:game-of-life')}</OmbItem>
1818
</OmbCard>
19+
<OmbCard title={t('dashboard:editor')}>
20+
<OmbItem to="/mdhub">{t('game:mdhub')}</OmbItem>
21+
</OmbCard>
1922
{/* <OmbCard title={t('dashboard:video')}></OmbCard>
2023
<OmbCard title={t('dashboard:other')}></OmbCard> */}
2124
</div>

src/views/game_of_life/index.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
// .game-of-life {}
1+
// .game-of-life-view {}

src/views/game_of_life/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export default function GameOfLifePage() {
1616
}, []);
1717

1818
return (
19-
<FullScreen className="game-of-life h-screen hv-center flex-col">
19+
<FullScreen className="game-of-life-view h-screen hv-center flex-col">
2020
<canvas id="game-of-life-canvas" />
2121
<div className="op mt-4">
2222
<button id="play-pause-btn" title="play-pause">

src/views/mdhub/index.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import FullScreen from '@/layouts/FullSreen';
2+
3+
export default function MdHubView() {
4+
return (
5+
<FullScreen className="mdhub-view">
6+
<div className="p-5">MdHub</div>
7+
</FullScreen>
8+
);
9+
}

vite.config.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,17 @@ export default defineConfig({
1414
tsconfigPaths(),
1515
react(),
1616
],
17+
build: {
18+
rollupOptions: {
19+
output: {
20+
manualChunks: {
21+
utils: ['lodash', 'uuid', 'dayjs', 'clsx'],
22+
react: ['react', 'react-dom', 'react-router-dom'],
23+
i18next: ['i18next', 'react-i18next'],
24+
}
25+
}
26+
}
27+
},
1728
esbuild: {
1829
// [vite] warning: Top-level "this" will be replaced with undefined since this file is an ECMAScript module
1930
// https://github.com/vitejs/vite/issues/8644

0 commit comments

Comments
 (0)