Skip to content

Commit

Permalink
feat(admin-next): custom admin header and footer
Browse files Browse the repository at this point in the history
  • Loading branch information
moonrailgun committed May 25, 2023
1 parent 5177066 commit 7f08f54
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 14 deletions.
2 changes: 1 addition & 1 deletion server/admin-next/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/logo.svg" />
<link rel="icon" type="image/svg+xml" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Tailchat Admin</title>
</head>
Expand Down
2 changes: 1 addition & 1 deletion server/admin-next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"tailchat-server-sdk": "workspace:^",
"tushan": "^0.2.9",
"tushan": "^0.2.10",
"vite-express": "0.8.0"
},
"devDependencies": {
Expand Down
Binary file added server/admin-next/public/favicon.ico
Binary file not shown.
10 changes: 0 additions & 10 deletions server/admin-next/public/logo.svg

This file was deleted.

2 changes: 2 additions & 0 deletions server/admin-next/src/client/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ function App() {
return (
<Tushan
basename="/admin"
header={'Tailchat Admin'}
footer={'Build with MsgByte'}
dashboard={<Dashboard />}
dataProvider={dataProvider}
authProvider={authProvider}
Expand Down
10 changes: 8 additions & 2 deletions server/admin-next/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@ import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';

// https://vitejs.dev/config/
export default defineConfig({
export default defineConfig(({ mode }) => ({
base: '/admin',
plugins: [react()],
});
server: {
// just for link tushan
fs: {
strict: mode === 'development' ? false : true,
},
},
}));

0 comments on commit 7f08f54

Please sign in to comment.