feat: implement logout on 401 response and update query handling

refactor: replace Button with div for consistent styling in AIEditorLink

refactor: update navigation handling in AppVersionList and remove LayoutMain wrapper

refactor: remove unused LayoutMain imports and components across various pages

fix: ensure user app list is set correctly in useUserAppStore

fix: update login URL format in AuthProvider

fix: adjust layout styles in EnvPage and other pages for better responsiveness

chore: update route definitions and create new routes for apps, config, domain, flowme, org, remote, token, user, and users

style: replace Button with div for delete confirmation in various components

fix: ensure correct handling of user profile image source
This commit is contained in:
2026-02-22 03:24:14 +08:00
parent f3c269dd83
commit 66ee0d7f60
44 changed files with 740 additions and 761 deletions

View File

@@ -1,2 +1,2 @@
NODE_ENV=
API_URL=https://kevisual.xiongxiao.me
VITE_API_URL=https://kevisual.xiongxiao.me

View File

@@ -7,7 +7,7 @@
"build": "vite build",
"preview": "vite preview",
"ui": "bunx shadcn@latest add ",
"pub": "envision deploy ./dist -k vite-react -v 0.2.1 -y y -u"
"pub": "envision deploy ./dist -k center -v 0.2.1 -y y -u"
},
"dependencies": {
"@ant-design/icons": "^6.1.0",
@@ -16,6 +16,7 @@
"@kevisual/api": "^0.0.59",
"@kevisual/cache": "^0.0.5",
"@kevisual/context": "^0.0.8",
"@kevisual/remote-app": "^0.0.4",
"@kevisual/router": "^0.0.83",
"@tanstack/react-router": "^1.161.4",
"@tanstack/react-table": "^8.21.3",
@@ -61,6 +62,6 @@
"tailwindcss": "^4.2.0",
"tw-animate-css": "^1.4.0",
"typescript": "^5.9.3",
"vite": "v7.3.1"
"vite": "v8.0.0-beta.15"
}
}

416
pnpm-lock.yaml generated
View File

@@ -26,6 +26,9 @@ importers:
'@kevisual/context':
specifier: ^0.0.8
version: 0.0.8
'@kevisual/remote-app':
specifier: ^0.0.4
version: 0.0.4
'@kevisual/router':
specifier: ^0.0.83
version: 0.0.83
@@ -122,13 +125,13 @@ importers:
version: 1.0.30(dotenv@17.3.1)
'@tailwindcss/vite':
specifier: ^4.2.0
version: 4.2.0(vite@7.3.1(@types/node@25.3.0)(jiti@2.6.1)(lightningcss@1.31.1)(tsx@4.21.0))
version: 4.2.0(vite@8.0.0-beta.15(@types/node@25.3.0)(esbuild@0.27.3)(jiti@2.6.1)(tsx@4.21.0))
'@tanstack/react-router-devtools':
specifier: ^1.161.4
version: 1.161.4(@tanstack/react-router@1.161.4(react-dom@19.2.4(react@19.2.4))(react@19.2.4))(@tanstack/router-core@1.161.4)(csstype@3.2.3)(react-dom@19.2.4(react@19.2.4))(react@19.2.4)
'@tanstack/router-plugin':
specifier: ^1.161.4
version: 1.161.4(@tanstack/react-router@1.161.4(react-dom@19.2.4(react@19.2.4))(react@19.2.4))(vite@7.3.1(@types/node@25.3.0)(jiti@2.6.1)(lightningcss@1.31.1)(tsx@4.21.0))
version: 1.161.4(@tanstack/react-router@1.161.4(react-dom@19.2.4(react@19.2.4))(react@19.2.4))(vite@8.0.0-beta.15(@types/node@25.3.0)(esbuild@0.27.3)(jiti@2.6.1)(tsx@4.21.0))
'@types/node':
specifier: ^25.3.0
version: 25.3.0
@@ -140,7 +143,7 @@ importers:
version: 19.2.3(@types/react@19.2.14)
'@vitejs/plugin-react':
specifier: ^5.1.4
version: 5.1.4(vite@7.3.1(@types/node@25.3.0)(jiti@2.6.1)(lightningcss@1.31.1)(tsx@4.21.0))
version: 5.1.4(vite@8.0.0-beta.15(@types/node@25.3.0)(esbuild@0.27.3)(jiti@2.6.1)(tsx@4.21.0))
dotenv:
specifier: ^17.3.1
version: 17.3.1
@@ -157,8 +160,8 @@ importers:
specifier: ^5.9.3
version: 5.9.3
vite:
specifier: v7.3.1
version: 7.3.1(@types/node@25.3.0)(jiti@2.6.1)(lightningcss@1.31.1)(tsx@4.21.0)
specifier: v8.0.0-beta.15
version: 8.0.0-beta.15(@types/node@25.3.0)(esbuild@0.27.3)(jiti@2.6.1)(tsx@4.21.0)
packages:
@@ -347,9 +350,15 @@ packages:
'@date-fns/tz@1.4.1':
resolution: {integrity: sha512-P5LUNhtbj6YfI3iJjw5EL9eUAG6OitD0W3fWQcpQjDRc/QIsL0tRNuO1PcDvPccWL1fSTXXdE1ds+l95DV/OFA==}
'@emnapi/core@1.8.1':
resolution: {integrity: sha512-AvT9QFpxK0Zd8J0jopedNm+w/2fIzvtPKPjqyw9jwvBaReTTqPBk9Hixaz7KbjimP+QNz605/XnjFcDAL2pqBg==}
'@emnapi/runtime@1.8.1':
resolution: {integrity: sha512-mehfKSMWjjNol8659Z8KxEMrdSJDDot5SXMq00dM8BN4o+CLNXQ0xH2V7EchNHV4RmbZLmmPdEaXZc5H2FXmDg==}
'@emnapi/wasi-threads@1.1.0':
resolution: {integrity: sha512-WI0DdZ8xFSbgMjR1sFsKABJ/C5OnRrjT06JXbZKexJGrDuPTzZdDYfFlsgcCXCyf+suG5QU2e/y1Wo2V/OapLQ==}
'@emotion/hash@0.8.0':
resolution: {integrity: sha512-kBJtf7PH6aWwZ6fka3zQ0p6SBYzx4fl1LoZXE2RrnYST9Xljm7WfKJrU4g/Xr3Beg72MLrp1AWNUmuYJTL7Cow==}
@@ -714,6 +723,9 @@ packages:
'@kevisual/query@0.0.49':
resolution: {integrity: sha512-GrWW+QlBO5lkiqvb7PjOstNtpTQVSR74EHHWjm7YoL9UdT1wuPQXGUApZHmMBSh3NIWCf0AL2G1hPWZMC7YeOQ==}
'@kevisual/remote-app@0.0.4':
resolution: {integrity: sha512-2yIlWY98pLCcxG+DJsqXXkd5YYEgymuOsyElH+31AoEPb7mlNREnYS81zN0KM9nvdSmU2G51vV4UVirJlYBZCQ==}
'@kevisual/router@0.0.83':
resolution: {integrity: sha512-CVazzM1rXVyvU7QcMQr0/EuqacRNEGalThDDLGQcvKEVHyduJ9yWddn6kezgWFCpNlPKhzSCKkIFuZVixNVxDQ==}
@@ -740,6 +752,9 @@ packages:
'@marijn/find-cluster-break@1.0.2':
resolution: {integrity: sha512-l0h88YhZFyKdXIFNfSWpyjStDjGHwZ/U7iobcK1cQQD8sejsONdQtTVU+1wVN1PBw40PiiHB1vA5S7VTfQiP9g==}
'@napi-rs/wasm-runtime@1.1.1':
resolution: {integrity: sha512-p64ah1M1ld8xjWv3qbvFwHiFVWrq1yFvV4f7w+mzaqiR4IlSgkqhcRdHwsGgomwzBH51sRY4NEowLxnaBjcW/A==}
'@next/env@16.1.6':
resolution: {integrity: sha512-N1ySLuZjnAtN3kFnwhAwPvZah8RJxKasD7x1f8shFqhncnWZn4JMfg37diLNuoHsLAlrDfM3g4mawVdtAG8XLQ==}
@@ -799,6 +814,13 @@ packages:
resolution: {integrity: sha512-XlOlEbQcE9fmuXxrVTXCTlG2nlRXa9Rj3rr5Ue/+tX+nmkgbX720YHh0VR3hBF9xDvwnb8D2shVGOwNx+ulArw==}
engines: {node: '>= 20.19.0'}
'@oxc-project/runtime@0.114.0':
resolution: {integrity: sha512-mVGQvr/uFJGQ3hsvgQ1sJfh79t5owyZZZtw+VaH+WhtvsmtgjT6imznB9sz2Q67Q0/4obM9mOOtQscU4aJteSg==}
engines: {node: ^20.19.0 || >=22.12.0}
'@oxc-project/types@0.114.0':
resolution: {integrity: sha512-//nBfbzHQHvJs8oFIjv6coZ6uxQ4alLfiPe6D5vit6c4pmxATHHlVwgB1k+Hv4yoAMyncdxgRBF5K4BYWUCzvA==}
'@paralleldrive/cuid2@3.3.0':
resolution: {integrity: sha512-OqiFvSOF0dBSesELYY2CAMa4YINvlLpvKOz/rv6NeZEqiyttlHgv98Juwv4Ch+GrEV7IZ8jfI2VcEoYUjXXCjw==}
hasBin: true
@@ -1279,146 +1301,92 @@ packages:
react: '>=16.9.0'
react-dom: '>=16.9.0'
'@rolldown/pluginutils@1.0.0-rc.3':
resolution: {integrity: sha512-eybk3TjzzzV97Dlj5c+XrBFW57eTNhzod66y9HrBlzJ6NsCrWCp/2kaPS3K9wJmurBC0Tdw4yPjXKZqlznim3Q==}
'@rollup/rollup-android-arm-eabi@4.58.0':
resolution: {integrity: sha512-mr0tmS/4FoVk1cnaeN244A/wjvGDNItZKR8hRhnmCzygyRXYtKF5jVDSIILR1U97CTzAYmbgIj/Dukg62ggG5w==}
cpu: [arm]
os: [android]
'@rollup/rollup-android-arm64@4.58.0':
resolution: {integrity: sha512-+s++dbp+/RTte62mQD9wLSbiMTV+xr/PeRJEc/sFZFSBRlHPNPVaf5FXlzAL77Mr8FtSfQqCN+I598M8U41ccQ==}
'@rolldown/binding-android-arm64@1.0.0-rc.5':
resolution: {integrity: sha512-zCEmUrt1bggwgBgeKLxNj217J1OrChrp3jJt24VK9jAharSTeVaHODNL+LpcQVhRz+FktYWfT9cjo5oZ99ZLpg==}
engines: {node: ^20.19.0 || >=22.12.0}
cpu: [arm64]
os: [android]
'@rollup/rollup-darwin-arm64@4.58.0':
resolution: {integrity: sha512-MFWBwTcYs0jZbINQBXHfSrpSQJq3IUOakcKPzfeSznONop14Pxuqa0Kg19GD0rNBMPQI2tFtu3UzapZpH0Uc1Q==}
'@rolldown/binding-darwin-arm64@1.0.0-rc.5':
resolution: {integrity: sha512-ZP9xb9lPAex36pvkNWCjSEJW/Gfdm9I3ssiqOFLmpZ/vosPXgpoGxCmh+dX1Qs+/bWQE6toNFXWWL8vYoKoK9Q==}
engines: {node: ^20.19.0 || >=22.12.0}
cpu: [arm64]
os: [darwin]
'@rollup/rollup-darwin-x64@4.58.0':
resolution: {integrity: sha512-yiKJY7pj9c9JwzuKYLFaDZw5gma3fI9bkPEIyofvVfsPqjCWPglSHdpdwXpKGvDeYDms3Qal8qGMEHZ1M/4Udg==}
'@rolldown/binding-darwin-x64@1.0.0-rc.5':
resolution: {integrity: sha512-7IdrPunf6dp9mywMgTOKMMGDnMHQ6+h5gRl6LW8rhD8WK2kXX0IwzcM5Zc0B5J7xQs8QWOlKjv8BJsU/1CD3pg==}
engines: {node: ^20.19.0 || >=22.12.0}
cpu: [x64]
os: [darwin]
'@rollup/rollup-freebsd-arm64@4.58.0':
resolution: {integrity: sha512-x97kCoBh5MOevpn/CNK9W1x8BEzO238541BGWBc315uOlN0AD/ifZ1msg+ZQB05Ux+VF6EcYqpiagfLJ8U3LvQ==}
cpu: [arm64]
os: [freebsd]
'@rollup/rollup-freebsd-x64@4.58.0':
resolution: {integrity: sha512-Aa8jPoZ6IQAG2eIrcXPpjRcMjROMFxCt1UYPZZtCxRV68WkuSigYtQ/7Zwrcr2IvtNJo7T2JfDXyMLxq5L4Jlg==}
'@rolldown/binding-freebsd-x64@1.0.0-rc.5':
resolution: {integrity: sha512-o/JCk+dL0IN68EBhZ4DqfsfvxPfMeoM6cJtxORC1YYoxGHZyth2Kb2maXDb4oddw2wu8iIbnYXYPEzBtAF5CAg==}
engines: {node: ^20.19.0 || >=22.12.0}
cpu: [x64]
os: [freebsd]
'@rollup/rollup-linux-arm-gnueabihf@4.58.0':
resolution: {integrity: sha512-Ob8YgT5kD/lSIYW2Rcngs5kNB/44Q2RzBSPz9brf2WEtcGR7/f/E9HeHn1wYaAwKBni+bdXEwgHvUd0x12lQSA==}
'@rolldown/binding-linux-arm-gnueabihf@1.0.0-rc.5':
resolution: {integrity: sha512-IIBwTtA6VwxQLcEgq2mfrUgam7VvPZjhd/jxmeS1npM+edWsrrpRLHUdze+sk4rhb8/xpP3flemgcZXXUW6ukw==}
engines: {node: ^20.19.0 || >=22.12.0}
cpu: [arm]
os: [linux]
libc: [glibc]
'@rollup/rollup-linux-arm-musleabihf@4.58.0':
resolution: {integrity: sha512-K+RI5oP1ceqoadvNt1FecL17Qtw/n9BgRSzxif3rTL2QlIu88ccvY+Y9nnHe/cmT5zbH9+bpiJuG1mGHRVwF4Q==}
cpu: [arm]
os: [linux]
libc: [musl]
'@rollup/rollup-linux-arm64-gnu@4.58.0':
resolution: {integrity: sha512-T+17JAsCKUjmbopcKepJjHWHXSjeW7O5PL7lEFaeQmiVyw4kkc5/lyYKzrv6ElWRX/MrEWfPiJWqbTvfIvjM1Q==}
'@rolldown/binding-linux-arm64-gnu@1.0.0-rc.5':
resolution: {integrity: sha512-KSol1De1spMZL+Xg7K5IBWXIvRWv7+pveaxFWXpezezAG7CS6ojzRjtCGCiLxQricutTAi/LkNWKMsd2wNhMKQ==}
engines: {node: ^20.19.0 || >=22.12.0}
cpu: [arm64]
os: [linux]
libc: [glibc]
'@rollup/rollup-linux-arm64-musl@4.58.0':
resolution: {integrity: sha512-cCePktb9+6R9itIJdeCFF9txPU7pQeEHB5AbHu/MKsfH/k70ZtOeq1k4YAtBv9Z7mmKI5/wOLYjQ+B9QdxR6LA==}
'@rolldown/binding-linux-arm64-musl@1.0.0-rc.5':
resolution: {integrity: sha512-WFljyDkxtXRlWxMjxeegf7xMYXxUr8u7JdXlOEWKYgDqEgxUnSEsVDxBiNWQ1D5kQKwf8Wo4sVKEYPRhCdsjwA==}
engines: {node: ^20.19.0 || >=22.12.0}
cpu: [arm64]
os: [linux]
libc: [musl]
'@rollup/rollup-linux-loong64-gnu@4.58.0':
resolution: {integrity: sha512-iekUaLkfliAsDl4/xSdoCJ1gnnIXvoNz85C8U8+ZxknM5pBStfZjeXgB8lXobDQvvPRCN8FPmmuTtH+z95HTmg==}
cpu: [loong64]
os: [linux]
libc: [glibc]
'@rollup/rollup-linux-loong64-musl@4.58.0':
resolution: {integrity: sha512-68ofRgJNl/jYJbxFjCKE7IwhbfxOl1muPN4KbIqAIe32lm22KmU7E8OPvyy68HTNkI2iV/c8y2kSPSm2mW/Q9Q==}
cpu: [loong64]
os: [linux]
libc: [musl]
'@rollup/rollup-linux-ppc64-gnu@4.58.0':
resolution: {integrity: sha512-dpz8vT0i+JqUKuSNPCP5SYyIV2Lh0sNL1+FhM7eLC457d5B9/BC3kDPp5BBftMmTNsBarcPcoz5UGSsnCiw4XQ==}
cpu: [ppc64]
os: [linux]
libc: [glibc]
'@rollup/rollup-linux-ppc64-musl@4.58.0':
resolution: {integrity: sha512-4gdkkf9UJ7tafnweBCR/mk4jf3Jfl0cKX9Np80t5i78kjIH0ZdezUv/JDI2VtruE5lunfACqftJ8dIMGN4oHew==}
cpu: [ppc64]
os: [linux]
libc: [musl]
'@rollup/rollup-linux-riscv64-gnu@4.58.0':
resolution: {integrity: sha512-YFS4vPnOkDTD/JriUeeZurFYoJhPf9GQQEF/v4lltp3mVcBmnsAdjEWhr2cjUCZzZNzxCG0HZOvJU44UGHSdzw==}
cpu: [riscv64]
os: [linux]
libc: [glibc]
'@rollup/rollup-linux-riscv64-musl@4.58.0':
resolution: {integrity: sha512-x2xgZlFne+QVNKV8b4wwaCS8pwq3y14zedZ5DqLzjdRITvreBk//4Knbcvm7+lWmms9V9qFp60MtUd0/t/PXPw==}
cpu: [riscv64]
os: [linux]
libc: [musl]
'@rollup/rollup-linux-s390x-gnu@4.58.0':
resolution: {integrity: sha512-jIhrujyn4UnWF8S+DHSkAkDEO3hLX0cjzxJZPLF80xFyzyUIYgSMRcYQ3+uqEoyDD2beGq7Dj7edi8OnJcS/hg==}
cpu: [s390x]
os: [linux]
libc: [glibc]
'@rollup/rollup-linux-x64-gnu@4.58.0':
resolution: {integrity: sha512-+410Srdoh78MKSJxTQ+hZ/Mx+ajd6RjjPwBPNd0R3J9FtL6ZA0GqiiyNjCO9In0IzZkCNrpGymSfn+kgyPQocg==}
'@rolldown/binding-linux-x64-gnu@1.0.0-rc.5':
resolution: {integrity: sha512-CUlplTujmbDWp2gamvrqVKi2Or8lmngXT1WxsizJfts7JrvfGhZObciaY/+CbdbS9qNnskvwMZNEhTPrn7b+WA==}
engines: {node: ^20.19.0 || >=22.12.0}
cpu: [x64]
os: [linux]
libc: [glibc]
'@rollup/rollup-linux-x64-musl@4.58.0':
resolution: {integrity: sha512-ZjMyby5SICi227y1MTR3VYBpFTdZs823Rs/hpakufleBoufoOIB6jtm9FEoxn/cgO7l6PM2rCEl5Kre5vX0QrQ==}
'@rolldown/binding-linux-x64-musl@1.0.0-rc.5':
resolution: {integrity: sha512-wdf7g9NbVZCeAo2iGhsjJb7I8ZFfs6X8bumfrWg82VK+8P6AlLXwk48a1ASiJQDTS7Svq2xVzZg3sGO2aXpHRA==}
engines: {node: ^20.19.0 || >=22.12.0}
cpu: [x64]
os: [linux]
libc: [musl]
'@rollup/rollup-openbsd-x64@4.58.0':
resolution: {integrity: sha512-ds4iwfYkSQ0k1nb8LTcyXw//ToHOnNTJtceySpL3fa7tc/AsE+UpUFphW126A6fKBGJD5dhRvg8zw1rvoGFxmw==}
cpu: [x64]
os: [openbsd]
'@rollup/rollup-openharmony-arm64@4.58.0':
resolution: {integrity: sha512-fd/zpJniln4ICdPkjWFhZYeY/bpnaN9pGa6ko+5WD38I0tTqk9lXMgXZg09MNdhpARngmxiCg0B0XUamNw/5BQ==}
'@rolldown/binding-openharmony-arm64@1.0.0-rc.5':
resolution: {integrity: sha512-0CWY7ubu12nhzz+tkpHjoG3IRSTlWYe0wrfJRf4qqjqQSGtAYgoL9kwzdvlhaFdZ5ffVeyYw9qLsChcjUMEloQ==}
engines: {node: ^20.19.0 || >=22.12.0}
cpu: [arm64]
os: [openharmony]
'@rollup/rollup-win32-arm64-msvc@4.58.0':
resolution: {integrity: sha512-YpG8dUOip7DCz3nr/JUfPbIUo+2d/dy++5bFzgi4ugOGBIox+qMbbqt/JoORwvI/C9Kn2tz6+Bieoqd5+B1CjA==}
'@rolldown/binding-wasm32-wasi@1.0.0-rc.5':
resolution: {integrity: sha512-LztXnGzv6t2u830mnZrFLRVqT/DPJ9DL4ZTz/y93rqUVkeHjMMYIYaFj+BUthiYxbVH9dH0SZYufETspKY/NhA==}
engines: {node: '>=14.0.0'}
cpu: [wasm32]
'@rolldown/binding-win32-arm64-msvc@1.0.0-rc.5':
resolution: {integrity: sha512-jUct1XVeGtyjqJXEAfvdFa8xoigYZ2rge7nYEm70ppQxpfH9ze2fbIrpHmP2tNM2vL/F6Dd0CpXhpjPbC6bSxQ==}
engines: {node: ^20.19.0 || >=22.12.0}
cpu: [arm64]
os: [win32]
'@rollup/rollup-win32-ia32-msvc@4.58.0':
resolution: {integrity: sha512-b9DI8jpFQVh4hIXFr0/+N/TzLdpBIoPzjt0Rt4xJbW3mzguV3mduR9cNgiuFcuL/TeORejJhCWiAXe3E/6PxWA==}
cpu: [ia32]
os: [win32]
'@rollup/rollup-win32-x64-gnu@4.58.0':
resolution: {integrity: sha512-CSrVpmoRJFN06LL9xhkitkwUcTZtIotYAF5p6XOR2zW0Zz5mzb3IPpcoPhB02frzMHFNo1reQ9xSF5fFm3hUsQ==}
'@rolldown/binding-win32-x64-msvc@1.0.0-rc.5':
resolution: {integrity: sha512-VQ8F9ld5gw29epjnVGdrx8ugiLTe8BMqmhDYy7nGbdeDo4HAt4bgdZvLbViEhg7DZyHLpiEUlO5/jPSUrIuxRQ==}
engines: {node: ^20.19.0 || >=22.12.0}
cpu: [x64]
os: [win32]
'@rollup/rollup-win32-x64-msvc@4.58.0':
resolution: {integrity: sha512-QFsBgQNTnh5K0t/sBsjJLq24YVqEIVkGpfN2VHsnN90soZyhaiA9UUHufcctVNL4ypJY0wrwad0wslx2KJQ1/w==}
cpu: [x64]
os: [win32]
'@rolldown/pluginutils@1.0.0-rc.3':
resolution: {integrity: sha512-eybk3TjzzzV97Dlj5c+XrBFW57eTNhzod66y9HrBlzJ6NsCrWCp/2kaPS3K9wJmurBC0Tdw4yPjXKZqlznim3Q==}
'@rolldown/pluginutils@1.0.0-rc.5':
resolution: {integrity: sha512-RxlLX/DPoarZ9PtxVrQgZhPoor987YtKQqCo5zkjX+0S0yLJ7Vv515Wk6+xtTL67VONKJKxETWZwuZjss2idYw==}
'@swc/helpers@0.5.15':
resolution: {integrity: sha512-JQ5TuMi45Owi4/BIMAJBoSQoOJu12oOk/gADqlcUL9JEdHB8vyjUSsxqeNXnmXHjYKMi2WcYtezGEEhqUI/E2g==}
@@ -1607,6 +1575,9 @@ packages:
resolution: {integrity: sha512-42WoRePf8v690qG8yGRe/YOh+oHni9vUaUUfoqlS91U2scd3a5rkLtVsc6b7z60w3RogH0I00vdrC5AaeiZ18w==}
engines: {node: '>=20.19'}
'@tybys/wasm-util@0.10.1':
resolution: {integrity: sha512-9tTaPJLSiejZKx+Bmog4uSubteqTvFrVrURwkmHixBo0G4seD0zUxp98E1DzUBJxLQ3NPwXrGKDiVjwx/DpPsg==}
'@types/babel__core@7.20.5':
resolution: {integrity: sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==}
@@ -1619,9 +1590,6 @@ packages:
'@types/babel__traverse@7.28.0':
resolution: {integrity: sha512-8PvcXf70gTDZBgt9ptxJ8elBeBjcLOAcOtoO/mPJjtji1+CdGbHgm77om1GrsPxsiE+uXIpNSK64UYaIwQXd4Q==}
'@types/estree@1.0.8':
resolution: {integrity: sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==}
'@types/node@25.3.0':
resolution: {integrity: sha512-4K3bqJpXpqfg2XKGK9bpDTc6xO/xoUP/RBWS7AtRMug6zZFaRekiLzjVtAoZMquxoAbzBvy5nxQ7veS5eYzf8A==}
@@ -2156,9 +2124,9 @@ packages:
resolve-pkg-maps@1.0.0:
resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==}
rollup@4.58.0:
resolution: {integrity: sha512-wbT0mBmWbIvvq8NeEYWWvevvxnOyhKChir47S66WCxw1SXqhw7ssIYejnQEVt7XYQpsj2y8F9PM+Cr3SNEa0gw==}
engines: {node: '>=18.0.0', npm: '>=8.0.0'}
rolldown@1.0.0-rc.5:
resolution: {integrity: sha512-0AdalTs6hNTioaCYIkAa7+xsmHBfU5hCNclZnM/lp7lGGDuUOb6N4BVNtwiomybbencDjq/waKjTImqiGCs5sw==}
engines: {node: ^20.19.0 || >=22.12.0}
hasBin: true
scheduler@0.27.0:
@@ -2339,15 +2307,16 @@ packages:
react: ^16.8 || ^17.0 || ^18.0 || ^19.0.0 || ^19.0.0-rc
react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0.0 || ^19.0.0-rc
vite@7.3.1:
resolution: {integrity: sha512-w+N7Hifpc3gRjZ63vYBXA56dvvRlNWRczTdmCBBa+CotUzAPf5b7YMdMR/8CQoeYE5LX3W4wj6RYTgonm1b9DA==}
vite@8.0.0-beta.15:
resolution: {integrity: sha512-RHX7IvsJlEfjyA1rS7MY0UsmF91etdLAamslHR5lfuO3W/BXRdXm2tRE64ztpSPZbKqB4wAAZ0AwtF6QzfKZLA==}
engines: {node: ^20.19.0 || >=22.12.0}
hasBin: true
peerDependencies:
'@types/node': ^20.19.0 || >=22.12.0
'@vitejs/devtools': ^0.0.0-alpha.31
esbuild: ^0.27.0
jiti: '>=1.21.0'
less: ^4.0.0
lightningcss: ^1.21.0
sass: ^1.70.0
sass-embedded: ^1.70.0
stylus: '>=0.54.8'
@@ -2358,12 +2327,14 @@ packages:
peerDependenciesMeta:
'@types/node':
optional: true
'@vitejs/devtools':
optional: true
esbuild:
optional: true
jiti:
optional: true
less:
optional: true
lightningcss:
optional: true
sass:
optional: true
sass-embedded:
@@ -2668,11 +2639,22 @@ snapshots:
'@date-fns/tz@1.4.1': {}
'@emnapi/core@1.8.1':
dependencies:
'@emnapi/wasi-threads': 1.1.0
tslib: 2.8.1
optional: true
'@emnapi/runtime@1.8.1':
dependencies:
tslib: 2.8.1
optional: true
'@emnapi/wasi-threads@1.1.0':
dependencies:
tslib: 2.8.1
optional: true
'@emotion/hash@0.8.0': {}
'@emotion/unitless@0.7.5': {}
@@ -2925,6 +2907,8 @@ snapshots:
'@kevisual/query@0.0.49': {}
'@kevisual/remote-app@0.0.4': {}
'@kevisual/router@0.0.83':
dependencies:
es-toolkit: 1.44.0
@@ -2954,6 +2938,13 @@ snapshots:
'@marijn/find-cluster-break@1.0.2': {}
'@napi-rs/wasm-runtime@1.1.1':
dependencies:
'@emnapi/core': 1.8.1
'@emnapi/runtime': 1.8.1
'@tybys/wasm-util': 0.10.1
optional: true
'@next/env@16.1.6': {}
'@next/swc-darwin-arm64@16.1.6':
@@ -2982,6 +2973,10 @@ snapshots:
'@noble/hashes@2.0.1': {}
'@oxc-project/runtime@0.114.0': {}
'@oxc-project/types@0.114.0': {}
'@paralleldrive/cuid2@3.3.0':
dependencies:
'@noble/hashes': 2.0.1
@@ -3494,82 +3489,50 @@ snapshots:
react: 19.2.4
react-dom: 19.2.4(react@19.2.4)
'@rolldown/binding-android-arm64@1.0.0-rc.5':
optional: true
'@rolldown/binding-darwin-arm64@1.0.0-rc.5':
optional: true
'@rolldown/binding-darwin-x64@1.0.0-rc.5':
optional: true
'@rolldown/binding-freebsd-x64@1.0.0-rc.5':
optional: true
'@rolldown/binding-linux-arm-gnueabihf@1.0.0-rc.5':
optional: true
'@rolldown/binding-linux-arm64-gnu@1.0.0-rc.5':
optional: true
'@rolldown/binding-linux-arm64-musl@1.0.0-rc.5':
optional: true
'@rolldown/binding-linux-x64-gnu@1.0.0-rc.5':
optional: true
'@rolldown/binding-linux-x64-musl@1.0.0-rc.5':
optional: true
'@rolldown/binding-openharmony-arm64@1.0.0-rc.5':
optional: true
'@rolldown/binding-wasm32-wasi@1.0.0-rc.5':
dependencies:
'@napi-rs/wasm-runtime': 1.1.1
optional: true
'@rolldown/binding-win32-arm64-msvc@1.0.0-rc.5':
optional: true
'@rolldown/binding-win32-x64-msvc@1.0.0-rc.5':
optional: true
'@rolldown/pluginutils@1.0.0-rc.3': {}
'@rollup/rollup-android-arm-eabi@4.58.0':
optional: true
'@rollup/rollup-android-arm64@4.58.0':
optional: true
'@rollup/rollup-darwin-arm64@4.58.0':
optional: true
'@rollup/rollup-darwin-x64@4.58.0':
optional: true
'@rollup/rollup-freebsd-arm64@4.58.0':
optional: true
'@rollup/rollup-freebsd-x64@4.58.0':
optional: true
'@rollup/rollup-linux-arm-gnueabihf@4.58.0':
optional: true
'@rollup/rollup-linux-arm-musleabihf@4.58.0':
optional: true
'@rollup/rollup-linux-arm64-gnu@4.58.0':
optional: true
'@rollup/rollup-linux-arm64-musl@4.58.0':
optional: true
'@rollup/rollup-linux-loong64-gnu@4.58.0':
optional: true
'@rollup/rollup-linux-loong64-musl@4.58.0':
optional: true
'@rollup/rollup-linux-ppc64-gnu@4.58.0':
optional: true
'@rollup/rollup-linux-ppc64-musl@4.58.0':
optional: true
'@rollup/rollup-linux-riscv64-gnu@4.58.0':
optional: true
'@rollup/rollup-linux-riscv64-musl@4.58.0':
optional: true
'@rollup/rollup-linux-s390x-gnu@4.58.0':
optional: true
'@rollup/rollup-linux-x64-gnu@4.58.0':
optional: true
'@rollup/rollup-linux-x64-musl@4.58.0':
optional: true
'@rollup/rollup-openbsd-x64@4.58.0':
optional: true
'@rollup/rollup-openharmony-arm64@4.58.0':
optional: true
'@rollup/rollup-win32-arm64-msvc@4.58.0':
optional: true
'@rollup/rollup-win32-ia32-msvc@4.58.0':
optional: true
'@rollup/rollup-win32-x64-gnu@4.58.0':
optional: true
'@rollup/rollup-win32-x64-msvc@4.58.0':
optional: true
'@rolldown/pluginutils@1.0.0-rc.5': {}
'@swc/helpers@0.5.15':
dependencies:
@@ -3636,12 +3599,12 @@ snapshots:
'@tailwindcss/oxide-win32-arm64-msvc': 4.2.0
'@tailwindcss/oxide-win32-x64-msvc': 4.2.0
'@tailwindcss/vite@4.2.0(vite@7.3.1(@types/node@25.3.0)(jiti@2.6.1)(lightningcss@1.31.1)(tsx@4.21.0))':
'@tailwindcss/vite@4.2.0(vite@8.0.0-beta.15(@types/node@25.3.0)(esbuild@0.27.3)(jiti@2.6.1)(tsx@4.21.0))':
dependencies:
'@tailwindcss/node': 4.2.0
'@tailwindcss/oxide': 4.2.0
tailwindcss: 4.2.0
vite: 7.3.1(@types/node@25.3.0)(jiti@2.6.1)(lightningcss@1.31.1)(tsx@4.21.0)
vite: 8.0.0-beta.15(@types/node@25.3.0)(esbuild@0.27.3)(jiti@2.6.1)(tsx@4.21.0)
'@tanstack/history@1.161.4': {}
@@ -3712,7 +3675,7 @@ snapshots:
transitivePeerDependencies:
- supports-color
'@tanstack/router-plugin@1.161.4(@tanstack/react-router@1.161.4(react-dom@19.2.4(react@19.2.4))(react@19.2.4))(vite@7.3.1(@types/node@25.3.0)(jiti@2.6.1)(lightningcss@1.31.1)(tsx@4.21.0))':
'@tanstack/router-plugin@1.161.4(@tanstack/react-router@1.161.4(react-dom@19.2.4(react@19.2.4))(react@19.2.4))(vite@8.0.0-beta.15(@types/node@25.3.0)(esbuild@0.27.3)(jiti@2.6.1)(tsx@4.21.0))':
dependencies:
'@babel/core': 7.29.0
'@babel/plugin-syntax-jsx': 7.28.6(@babel/core@7.29.0)
@@ -3729,7 +3692,7 @@ snapshots:
zod: 3.25.76
optionalDependencies:
'@tanstack/react-router': 1.161.4(react-dom@19.2.4(react@19.2.4))(react@19.2.4)
vite: 7.3.1(@types/node@25.3.0)(jiti@2.6.1)(lightningcss@1.31.1)(tsx@4.21.0)
vite: 8.0.0-beta.15(@types/node@25.3.0)(esbuild@0.27.3)(jiti@2.6.1)(tsx@4.21.0)
transitivePeerDependencies:
- supports-color
@@ -3753,6 +3716,11 @@ snapshots:
'@tanstack/virtual-file-routes@1.161.4': {}
'@tybys/wasm-util@0.10.1':
dependencies:
tslib: 2.8.1
optional: true
'@types/babel__core@7.20.5':
dependencies:
'@babel/parser': 7.29.0
@@ -3774,8 +3742,6 @@ snapshots:
dependencies:
'@babel/types': 7.29.0
'@types/estree@1.0.8': {}
'@types/node@25.3.0':
dependencies:
undici-types: 7.18.2
@@ -3815,7 +3781,7 @@ snapshots:
- '@codemirror/lint'
- '@codemirror/search'
'@vitejs/plugin-react@5.1.4(vite@7.3.1(@types/node@25.3.0)(jiti@2.6.1)(lightningcss@1.31.1)(tsx@4.21.0))':
'@vitejs/plugin-react@5.1.4(vite@8.0.0-beta.15(@types/node@25.3.0)(esbuild@0.27.3)(jiti@2.6.1)(tsx@4.21.0))':
dependencies:
'@babel/core': 7.29.0
'@babel/plugin-transform-react-jsx-self': 7.27.1(@babel/core@7.29.0)
@@ -3823,7 +3789,7 @@ snapshots:
'@rolldown/pluginutils': 1.0.0-rc.3
'@types/babel__core': 7.20.5
react-refresh: 0.18.0
vite: 7.3.1(@types/node@25.3.0)(jiti@2.6.1)(lightningcss@1.31.1)(tsx@4.21.0)
vite: 8.0.0-beta.15(@types/node@25.3.0)(esbuild@0.27.3)(jiti@2.6.1)(tsx@4.21.0)
transitivePeerDependencies:
- supports-color
@@ -4306,36 +4272,24 @@ snapshots:
resolve-pkg-maps@1.0.0: {}
rollup@4.58.0:
rolldown@1.0.0-rc.5:
dependencies:
'@types/estree': 1.0.8
'@oxc-project/types': 0.114.0
'@rolldown/pluginutils': 1.0.0-rc.5
optionalDependencies:
'@rollup/rollup-android-arm-eabi': 4.58.0
'@rollup/rollup-android-arm64': 4.58.0
'@rollup/rollup-darwin-arm64': 4.58.0
'@rollup/rollup-darwin-x64': 4.58.0
'@rollup/rollup-freebsd-arm64': 4.58.0
'@rollup/rollup-freebsd-x64': 4.58.0
'@rollup/rollup-linux-arm-gnueabihf': 4.58.0
'@rollup/rollup-linux-arm-musleabihf': 4.58.0
'@rollup/rollup-linux-arm64-gnu': 4.58.0
'@rollup/rollup-linux-arm64-musl': 4.58.0
'@rollup/rollup-linux-loong64-gnu': 4.58.0
'@rollup/rollup-linux-loong64-musl': 4.58.0
'@rollup/rollup-linux-ppc64-gnu': 4.58.0
'@rollup/rollup-linux-ppc64-musl': 4.58.0
'@rollup/rollup-linux-riscv64-gnu': 4.58.0
'@rollup/rollup-linux-riscv64-musl': 4.58.0
'@rollup/rollup-linux-s390x-gnu': 4.58.0
'@rollup/rollup-linux-x64-gnu': 4.58.0
'@rollup/rollup-linux-x64-musl': 4.58.0
'@rollup/rollup-openbsd-x64': 4.58.0
'@rollup/rollup-openharmony-arm64': 4.58.0
'@rollup/rollup-win32-arm64-msvc': 4.58.0
'@rollup/rollup-win32-ia32-msvc': 4.58.0
'@rollup/rollup-win32-x64-gnu': 4.58.0
'@rollup/rollup-win32-x64-msvc': 4.58.0
fsevents: 2.3.3
'@rolldown/binding-android-arm64': 1.0.0-rc.5
'@rolldown/binding-darwin-arm64': 1.0.0-rc.5
'@rolldown/binding-darwin-x64': 1.0.0-rc.5
'@rolldown/binding-freebsd-x64': 1.0.0-rc.5
'@rolldown/binding-linux-arm-gnueabihf': 1.0.0-rc.5
'@rolldown/binding-linux-arm64-gnu': 1.0.0-rc.5
'@rolldown/binding-linux-arm64-musl': 1.0.0-rc.5
'@rolldown/binding-linux-x64-gnu': 1.0.0-rc.5
'@rolldown/binding-linux-x64-musl': 1.0.0-rc.5
'@rolldown/binding-openharmony-arm64': 1.0.0-rc.5
'@rolldown/binding-wasm32-wasi': 1.0.0-rc.5
'@rolldown/binding-win32-arm64-msvc': 1.0.0-rc.5
'@rolldown/binding-win32-x64-msvc': 1.0.0-rc.5
scheduler@0.27.0: {}
@@ -4500,19 +4454,19 @@ snapshots:
- '@types/react'
- '@types/react-dom'
vite@7.3.1(@types/node@25.3.0)(jiti@2.6.1)(lightningcss@1.31.1)(tsx@4.21.0):
vite@8.0.0-beta.15(@types/node@25.3.0)(esbuild@0.27.3)(jiti@2.6.1)(tsx@4.21.0):
dependencies:
esbuild: 0.27.3
fdir: 6.5.0(picomatch@4.0.3)
'@oxc-project/runtime': 0.114.0
lightningcss: 1.31.1
picomatch: 4.0.3
postcss: 8.5.6
rollup: 4.58.0
rolldown: 1.0.0-rc.5
tinyglobby: 0.2.15
optionalDependencies:
'@types/node': 25.3.0
esbuild: 0.27.3
fsevents: 2.3.3
jiti: 2.6.1
lightningcss: 1.31.1
tsx: 4.21.0
w3c-keyname@2.2.8: {}

View File

@@ -29,7 +29,6 @@ import {
} from "@/components/ui/select"
import { Plus, Pencil, Trash2 } from 'lucide-react';
import { LayoutUser } from '@/modules/layout/LayoutUser';
import { LayoutMain } from '@/modules/layout';
const TableList = () => {
const { list, setShowEditModal, setFormData, deleteDomain } = useDomainStore();
@@ -200,6 +199,4 @@ export const List = () => {
);
};
export default () => {
return <LayoutMain><List /></LayoutMain>;
}
export default List

View File

@@ -1,164 +0,0 @@
@import "tailwindcss";
@import "tw-animate-css";
@custom-variant dark (&:is(.dark *));
@theme inline {
--color-background: var(--background);
--color-foreground: var(--foreground);
--font-sans: var(--font-geist-sans);
--font-mono: var(--font-geist-mono);
--color-sidebar-ring: var(--sidebar-ring);
--color-sidebar-border: var(--sidebar-border);
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
--color-sidebar-accent: var(--sidebar-accent);
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
--color-sidebar-primary: var(--sidebar-primary);
--color-sidebar-foreground: var(--sidebar-foreground);
--color-sidebar: var(--sidebar);
--color-chart-5: var(--chart-5);
--color-chart-4: var(--chart-4);
--color-chart-3: var(--chart-3);
--color-chart-2: var(--chart-2);
--color-chart-1: var(--chart-1);
--color-ring: var(--ring);
--color-input: var(--input);
--color-border: var(--border);
--color-destructive: var(--destructive);
--color-accent-foreground: var(--accent-foreground);
--color-accent: var(--accent);
--color-muted-foreground: var(--muted-foreground);
--color-muted: var(--muted);
--color-secondary-foreground: var(--secondary-foreground);
--color-secondary: var(--secondary);
--color-primary-foreground: var(--primary-foreground);
--color-primary: var(--primary);
--color-popover-foreground: var(--popover-foreground);
--color-popover: var(--popover);
--color-card-foreground: var(--card-foreground);
--color-card: var(--card);
--radius-sm: calc(var(--radius) - 4px);
--radius-md: calc(var(--radius) - 2px);
--radius-lg: var(--radius);
--radius-xl: calc(var(--radius) + 4px);
--radius-2xl: calc(var(--radius) + 8px);
--radius-3xl: calc(var(--radius) + 12px);
--radius-4xl: calc(var(--radius) + 16px);
}
:root {
--radius: 0.625rem;
--card: oklch(1 0 0);
--card-foreground: oklch(0.145 0 0);
--popover: oklch(1 0 0);
--popover-foreground: oklch(0.145 0 0);
--primary: oklch(0.205 0 0);
--primary-foreground: oklch(0.985 0 0);
--secondary: oklch(0.97 0 0);
--secondary-foreground: oklch(0.205 0 0);
--muted: oklch(0.97 0 0);
--muted-foreground: oklch(0.556 0 0);
--accent: oklch(0.97 0 0);
--accent-foreground: oklch(0.205 0 0);
--destructive: oklch(0.577 0.245 27.325);
--border: oklch(0.922 0 0);
--input: oklch(0.922 0 0);
--ring: oklch(0.708 0 0);
--chart-1: oklch(0.646 0.222 41.116);
--chart-2: oklch(0.6 0.118 184.704);
--chart-3: oklch(0.398 0.07 227.392);
--chart-4: oklch(0.828 0.189 84.429);
--chart-5: oklch(0.769 0.188 70.08);
--sidebar: oklch(0.985 0 0);
--sidebar-foreground: oklch(0.145 0 0);
--sidebar-primary: oklch(0.205 0 0);
--sidebar-primary-foreground: oklch(0.985 0 0);
--sidebar-accent: oklch(0.97 0 0);
--sidebar-accent-foreground: oklch(0.205 0 0);
--sidebar-border: oklch(0.922 0 0);
--sidebar-ring: oklch(0.708 0 0);
--background: oklch(1 0 0);
--foreground: oklch(0.145 0 0);
}
.dark {
--background: oklch(0.145 0 0);
--foreground: oklch(0.985 0 0);
--card: oklch(0.205 0 0);
--card-foreground: oklch(0.985 0 0);
--popover: oklch(0.205 0 0);
--popover-foreground: oklch(0.985 0 0);
--primary: oklch(0.922 0 0);
--primary-foreground: oklch(0.205 0 0);
--secondary: oklch(0.269 0 0);
--secondary-foreground: oklch(0.985 0 0);
--muted: oklch(0.269 0 0);
--muted-foreground: oklch(0.708 0 0);
--accent: oklch(0.269 0 0);
--accent-foreground: oklch(0.985 0 0);
--destructive: oklch(0.704 0.191 22.216);
--border: oklch(1 0 0 / 10%);
--input: oklch(1 0 0 / 15%);
--ring: oklch(0.556 0 0);
--chart-1: oklch(0.488 0.243 264.376);
--chart-2: oklch(0.696 0.17 162.48);
--chart-3: oklch(0.769 0.188 70.08);
--chart-4: oklch(0.627 0.265 303.9);
--chart-5: oklch(0.645 0.246 16.439);
--sidebar: oklch(0.205 0 0);
--sidebar-foreground: oklch(0.985 0 0);
--sidebar-primary: oklch(0.488 0.243 264.376);
--sidebar-primary-foreground: oklch(0.985 0 0);
--sidebar-accent: oklch(0.269 0 0);
--sidebar-accent-foreground: oklch(0.985 0 0);
--sidebar-border: oklch(1 0 0 / 10%);
--sidebar-ring: oklch(0.556 0 0);
}
@layer base {
* {
@apply border-border outline-ring/50;
}
body {
@apply bg-background text-foreground;
}
}
html,body {
height: 100%;
overflow: hidden;
}
@utility scrollbar {
overflow: auto;
/* 整个滚动条 */
&::-webkit-scrollbar {
width: 3px;
height: 3px;
}
&::-webkit-scrollbar-track {
background-color: var(--color-scrollbar-track);
}
/* 滚动条有滑块的轨道部分 */
&::-webkit-scrollbar-track-piece {
background-color: transparent;
border-radius: 1px;
}
/* 滚动条滑块(竖向:vertical 横向:horizontal) */
&::-webkit-scrollbar-thumb {
cursor: pointer;
background-color: var(--color-scrollbar-thumb);
border-radius: 5px;
}
/* 滚动条滑块hover */
&::-webkit-scrollbar-thumb:hover {
background-color: var(--color-scrollbar-thumb-hover);
}
/* 同时有垂直和水平滚动条时交汇的部分 */
&::-webkit-scrollbar-corner {
display: block; /* 修复交汇时出现的白块 */
}
}

View File

@@ -1,44 +0,0 @@
import type { Metadata, Viewport } from "next";
import { Geist, Geist_Mono } from "next/font/google";
import "./globals.css";
import { Toaster } from 'sonner'
const geistSans = Geist({
variable: "--font-geist-sans",
subsets: ["latin"],
});
const geistMono = Geist_Mono({
variable: "--font-geist-mono",
subsets: ["latin"],
});
export const metadata: Metadata = {
title: "Light Code",
description: "直觉、高效的代码编辑",
};
export const viewport: Viewport = {
themeColor: "#000000",
width: "device-width",
initialScale: 1,
maximumScale: 1,
userScalable: false,
};
export default function RootLayout({
children,
}: Readonly<{
children: React.ReactNode;
}>) {
return (
<html lang="zh-CN" className="">
<body
className={`${geistSans.variable} ${geistMono.variable} antialiased overflow-x-hidden bg-gray-50 dark:bg-gray-900 text-gray-900 dark:text-gray-100`}
>
{children}
<Toaster></Toaster>
</body>
</html>
);
}

View File

@@ -1,14 +0,0 @@
'use client';
import { LayoutMain } from "@/modules/layout";
export default function Home() {
return (
<div className="flex min-h-screen items-center justify-center bg-zinc-50 font-sans dark:bg-black">
<LayoutMain>
<iframe src="/root/router-studio" className="w-full border-0" style={{
height: 'calc(100vh - 48px)'
}}/>
</LayoutMain>
</div>
);
}

View File

@@ -1,11 +1,10 @@
'use strict';
import { useShallow } from 'zustand/react/shallow';
import { useLayoutStore } from './store';
import clsx from 'clsx';
import { toast as message } from 'sonner';
import { useMemo } from 'react';
import { queryLogin } from '../query';
import { LogOut, Map, SquareUser, Users, X, ArrowDownLeftFromSquareIcon } from 'lucide-react';
import { LogOut, Users, X, ArrowDownLeftFromSquareIcon } from 'lucide-react';
import { Button } from '@/components/ui/button';
import {
DropdownMenu,
@@ -14,11 +13,12 @@ import {
DropdownMenuTrigger,
} from '@/components/ui/dropdown-menu';
import {
Tooltip,
TooltipContent,
TooltipProvider,
TooltipTrigger,
} from '@/components/ui/tooltip';
Drawer,
DrawerContent,
DrawerHeader,
DrawerTitle,
DrawerDescription,
} from '@/components/ui/drawer';
import { openLink } from '../basename';
export const LayoutUser = () => {
@@ -87,92 +87,82 @@ export const LayoutUser = () => {
}, [store.me]);
return (
<TooltipProvider>
<div className={clsx('w-full h-full absolute z-20 no-drag text-primary', !open && 'hidden')}>
<div
className='w-full absolute h-full opacity-60 z-0'
onClick={() => {
setOpen(false);
}}></div>
<div className='w-[400px] bg-white transition-all duration-300 h-full absolute top-0 right-0 rounded-l-lg'>
<div className='flex justify-between p-6 mt-4 font-bold items-center border-b'>
<div className='flex items-center gap-2'>
: <span className='text-primary'>{store.me?.username}</span>
</div>
<div className='flex gap-4'>
<Drawer open={open} onOpenChange={setOpen} direction="right">
<DrawerContent className="w-100">
<DrawerHeader className="border-b">
<div className="flex items-center justify-between">
<DrawerTitle className="flex items-center gap-2">
: <span className="text-primary">{store.me?.username}</span>
</DrawerTitle>
<div className="flex gap-2">
<Button
variant="ghost"
size="icon"
title="退出登录"
onClick={async () => {
const res = await queryLogin.logout();
if (res.code === 200) {
const url = new URL(location.origin);
url.pathname = '/root/login/';
openLink(url.toString(), '_self');
} else {
message.error(res.message || '退出失败');
}
}}>
<LogOut size={18} />
</Button>
{items.length > 0 && (
<Tooltip>
<TooltipTrigger>
<DropdownMenu>
<DropdownMenuTrigger>
<Button variant='ghost' size='icon'>
<Users />
</Button>
</DropdownMenuTrigger>
<DropdownMenuContent>
{items.map((item, index) => (
<DropdownMenuItem
key={index}
onClick={() => {
store.switchOrg(item.key, 'org');
}}>
<div className='mr-2'>{item.icon}</div>
<div>{item.label}</div>
</DropdownMenuItem>
))}
</DropdownMenuContent>
</DropdownMenu>
</TooltipTrigger>
<TooltipContent>
<p></p>
</TooltipContent>
</Tooltip>
<DropdownMenu>
<DropdownMenuTrigger
title="切换组织"
className="inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground h-9 w-9">
<Users size={18} />
</DropdownMenuTrigger>
<DropdownMenuContent>
{items.map((item, index) => (
<DropdownMenuItem
key={index}
onClick={() => {
store.switchOrg(item.key);
}}>
<div className="mr-2">{item.icon}</div>
<div>{item.label}</div>
</DropdownMenuItem>
))}
</DropdownMenuContent>
</DropdownMenu>
)}
<Button variant='ghost' size='icon' onClick={() => setOpen(false)}>
<X />
<Button variant="ghost" size="icon" onClick={() => setOpen(false)}>
<X size={18} />
</Button>
</div>
</div>
<div className='mt-3 font-medium'>
{menu.map((item, index) => {
return (
<div
key={index}
className='flex items-center p-4 hover:bg-secondary hover:text-white cursor-pointer'
onClick={() => {
if (item.link) {
openLink(item.link, '_self');
setOpen(false);
} else {
message.info('即将上线');
}
}}>
<div className='mr-4'>{item.icon}</div>
<div>{item.title}</div>
</div>
);
})}
</div>
<div
className='flex items-center p-4 hover:bg-secondary hover:text-white cursor-pointer'
onClick={async () => {
const res = await queryLogin.logout();
if (res.success) {
const url = new URL(location.origin);
url.pathname = '/root/login';
openLink(url.toString(), '_self');
} else {
message.error(res.message || '退出失败');
}
}}>
<div className='mr-4'>
<LogOut size={16} />
</div>
<div>退</div>
<DrawerDescription className="sr-only">
</DrawerDescription>
</DrawerHeader>
<div className="flex flex-col h-full">
<div className="flex-1">
{menu.map((item, index) => (
<div
key={index}
className="flex items-center px-4 py-3 hover:bg-secondary hover:text-secondary-foreground cursor-pointer transition-colors"
onClick={() => {
if (item.link) {
openLink(item.link, '_self');
setOpen(false);
} else {
message.info('即将上线');
}
}}>
<div className="mr-3">{item.icon}</div>
<div className="font-medium">{item.title}</div>
</div>
))}
</div>
</div>
</div>
</TooltipProvider>
</DrawerContent>
</Drawer>
);
};

View File

@@ -57,10 +57,7 @@ export const LayoutMain = (props: LayoutMainProps) => {
useLayoutEffect(() => {
platformStore.init();
}, []);
useEffect(() => {
menuStore.getMe();
console.log('menuStore', menuStore.me);
}, []);
return (
@@ -76,7 +73,6 @@ export const LayoutMain = (props: LayoutMainProps) => {
<div className='flex items-center gap-2 text-sm '>
{quickMenu.map((item, index) => {
const isActive = location.pathname === item.link;
console.log('isActive', location, item.link, isActive);
return (
<div
key={index}
@@ -114,7 +110,7 @@ export const LayoutMain = (props: LayoutMainProps) => {
<TooltipTrigger>
<IconButton
onClick={() => {
menuStore.switchOrg('', 'user');
menuStore.switchOrg('');
}}>
<SwapOutlined />
</IconButton>

View File

@@ -2,6 +2,7 @@
import { query, queryLogin } from '@/modules/query';
import { create } from 'zustand';
import { toast as message } from 'sonner';
import { useLayoutStore } from '@/pages/auth/store';
export const getIsMac = async () => {
// @ts-ignore
const userAgentData = navigator.userAgentData;
@@ -68,38 +69,4 @@ export type LayoutStore = {
setIsAdmin: (isAdmin: boolean) => void;
checkHasOrg: () => boolean;
};
export const useLayoutStore = create<LayoutStore>((set, get) => ({
open: false,
setOpen: (open) => set({ open }),
me: {},
setMe: (me) => set({ me }),
getMe: async () => {
const res = await queryLogin.getMe();
if (res.code === 200) {
set({ me: res.data });
set({ isAdmin: res.data.orgs?.includes('admin') });
}
},
openUser: false,
setOpenUser: (openUser) => set({ openUser }),
switchOrg: async (username?: string, type?: string) => {
const res = await queryLogin.switchUser(username || '');
if (res.code === 200) {
message.success('Switch success');
setTimeout(() => {
window.location.reload();
}, 1000);
} else {
message.error(res.message || 'Request failed');
}
},
isAdmin: false,
setIsAdmin: (isAdmin) => set({ isAdmin }),
checkHasOrg: () => {
const user = get().me || {};
if (!user.orgs) {
return false;
}
return user?.orgs?.length > 0;
},
}));
export { useLayoutStore }

View File

@@ -3,7 +3,15 @@ import { QueryLoginBrowser } from '@kevisual/api/query-login'
import { useContextKey } from '@kevisual/context';
export const query = useContextKey('query', new Query({
url: '/api/router',
}));
query.afterResponse = async (response, ctx) => {
if (response.code === 401) {
queryLogin.logout();
setTimeout(() => { location.reload() }, 2000);
}
return response;
}
export const queryClient = useContextKey('queryClient', new Query({
url: '/client/router',

View File

@@ -20,9 +20,8 @@ export const AIEditorLink = (props: Props) => {
return (
<Tooltip>
<TooltipTrigger>
<Button
variant='ghost'
size='icon'
<div
className='inline-flex items-center justify-center rounded-md p-2 transition-colors hover:bg-slate-100 disabled:opacity-50 disabled:pointer-events-none'
onClick={() => {
if (!layoutUser.user) {
toast.error('请先登录');
@@ -39,7 +38,7 @@ export const AIEditorLink = (props: Props) => {
openLink(openUrl, '_blank');
}}>
<Folder className='h-4 w-4' />
</Button>
</div>
</TooltipTrigger>
<TooltipContent></TooltipContent>
</Tooltip>

View File

@@ -17,8 +17,7 @@ import { Controller, useForm } from 'react-hook-form';
import { pick } from 'es-toolkit';
import { useAppDeleteModalStore, AppDeleteModal } from '../modules/AppDeleteModal';
import { AIEditorLink } from './AIEditorLink';
import { openLink } from '@/modules/basename';
import { LayoutMain } from '@/modules/layout';
import { useNavigate } from '@tanstack/react-router';
const FormModal = () => {
const { control, handleSubmit, reset } = useForm();
@@ -130,6 +129,7 @@ export const AppVersionList = () => {
}),
);
const [isUpload, setIsUpload] = useState(false);
const navigate = useNavigate();
useEffect(() => {
// fetch app version list
if (appKey) {
@@ -170,8 +170,7 @@ export const AppVersionList = () => {
variant='ghost'
size='icon'
onClick={() => {
// navigate('/app/edit/list');
history.back();
navigate({ to: '/apps' });
}}>
<ChevronLeft className='h-4 w-4' />
</Button>
@@ -236,7 +235,7 @@ export const AppVersionList = () => {
if (isRunning) {
const origin = typeof window !== 'undefined' ? window.location.origin : '';
const link = new URL(`/test/${item.id}`, origin);
openLink(link.toString(), '_blank');
window.open(link.toString(), '_blank');
} else {
message.error('The app is not running');
}
@@ -372,7 +371,5 @@ export const AppVersionFile = () => {
};
export default () => {
return <LayoutMain>
<AppVersionList />
</LayoutMain>
return <AppVersionList />
};

View File

@@ -1,7 +0,0 @@
'use client';
import { LayoutMain } from '@/modules/layout';
export const Main = () => {
return <LayoutMain title='User Apps' />;
};

View File

@@ -34,18 +34,17 @@ import {
SelectTrigger,
SelectValue,
} from '@/components/ui/select';
import { LayoutMain } from '@/modules/layout';
import { openLink } from '@/modules/basename';
import { useNavigate } from '@tanstack/react-router';
export const IconButton = (props: any) => {
return (
<button
<div
className={clsx(
'inline-flex items-center justify-center rounded-md p-2 transition-colors hover:bg-slate-100 disabled:opacity-50 disabled:pointer-events-none',
props.className,
)}
{...props}>
{props.children}
</button>
</div>
);
};
const FormModal = () => {
@@ -276,6 +275,7 @@ export const List = () => {
useEffect(() => {
userAppStore.getList();
}, []);
const navigate = useNavigate();
return (
<div className='w-full h-full flex bg-slate-100'>
<div className='p-2 h-full bg-white flex flex-col gap-2'>
@@ -301,7 +301,7 @@ export const List = () => {
padding: '8px',
}}
onClick={() => {
openLink('/domain/', '_self');
navigate({ to: '/domain' });
}}>
<LinkIcon className='h-4 w-4' />
</IconButton>
@@ -367,68 +367,59 @@ export const List = () => {
<div className='mt-4 pt-3 border-t border-slate-100 flex gap-1 absolute bottom-0 left-0 right-0 px-4 pb-4 bg-white rounded-b-lg'>
<Tooltip>
<TooltipTrigger>
<Button
variant='ghost'
size='icon'
<div
className='inline-flex items-center justify-center rounded-md p-2 transition-colors hover:bg-slate-100 disabled:opacity-50 disabled:pointer-events-none'
onClick={() => {
userAppStore.getUserApp(item.id);
userAppStore.setFormData(item);
userAppStore.setShowEdit(true);
}}>
<Edit className='h-4 w-4' />
</Button>
</div>
</TooltipTrigger>
<TooltipContent></TooltipContent>
</Tooltip>
<Tooltip>
<TooltipTrigger>
<Button
variant='ghost'
size='icon'
<div className='inline-flex items-center justify-center rounded-md p-2 transition-colors hover:bg-slate-100 disabled:opacity-50 disabled:pointer-events-none'
onClick={() => {
const url = `/apps/app?appKey=${item.key}`;
openLink(url, '_self');
navigate({
to: `/apps/app?appKey=${item.key}`,
})
}}
>
<AppWindow className='h-4 w-4' />
</Button>
</div>
</TooltipTrigger>
<TooltipContent></TooltipContent>
</Tooltip>
<Tooltip>
<TooltipTrigger>
<Button
variant='ghost'
size='icon'
<div className='inline-flex items-center justify-center rounded-md p-2 transition-colors hover:bg-slate-100 disabled:opacity-50 disabled:pointer-events-none'
onClick={() => {
userAppStore.getUserApp(item.id);
userAppStore.setFormData(item);
userAppStore.setShowShareEdit(true);
}}>
<Share2 className='h-4 w-4' />
</Button>
</div>
</TooltipTrigger>
<TooltipContent className="whitespace-pre-wrap">{iText.share.tips}</TooltipContent>
</Tooltip>
<Tooltip>
<TooltipTrigger>
<Button
variant='ghost'
size='icon'
<div className='inline-flex items-center justify-center rounded-md p-2 transition-colors hover:bg-slate-100 disabled:opacity-50 disabled:pointer-events-none'
onClick={() => {
appVersionStore.publishVersion({ appKey: item.key, version: item.version }, { showToast: true });
}}>
<RefreshCcw className='h-4 w-4' />
</Button>
</div>
</TooltipTrigger>
<TooltipContent></TooltipContent>
</Tooltip>
<Tooltip>
<TooltipTrigger>
<Button
variant='ghost'
size='icon'
<div className='inline-flex items-center justify-center rounded-md p-2 transition-colors hover:bg-slate-100 disabled:opacity-50 disabled:pointer-events-none'
onClick={() => {
if (isRunning) {
let baseUri = typeof window !== 'undefined' ? window.location.origin : '';
@@ -441,35 +432,33 @@ export const List = () => {
baseUri = new URL('https://' + item.domain).toString();
}
if (baseUri.endsWith('/')) {
openLink(baseUri, '_blank');
window.open(baseUri, '_blank');
}
console.log('baseUri', baseUri);
message.success('success');
return;
}
const link = new URL(`/${item.user}/${item.key}/`, baseUri);
openLink(link.toString(), '_blank');
window.open(link.toString(), '_blank');
} else {
message.error('应用未运行');
}
}}>
<ExternalLink className='h-4 w-4' />
</Button>
</div>
</TooltipTrigger>
<TooltipContent></TooltipContent>
</Tooltip>
<AIEditorLink pathname={item.key} />
<Tooltip>
<TooltipTrigger>
<Button
variant='ghost'
size='icon'
<div className='inline-flex items-center justify-center rounded-md p-2 transition-colors hover:bg-slate-100 disabled:opacity-50 disabled:pointer-events-none'
onClick={(e) => {
appDeleteModalStore.onClickDelete('user-app', item);
e.stopPropagation();
}}>
<Trash2 className='h-4 w-4' />
</Button>
</div>
</TooltipTrigger>
<TooltipContent></TooltipContent>
</Tooltip>

View File

@@ -43,7 +43,8 @@ export const useUserAppStore = create<UserAppStore>((set, get) => {
});
set({ loading: false });
if (res.code === 200) {
set({ list: res.data });
const list = res.data.list || [];
set({ list: list });
} else {
message.error(res.message || 'Request failed');
}

View File

@@ -15,7 +15,7 @@ export const AuthProvider = ({ children, mustLogin }: Props) => {
useEffect(() => {
store.init()
}, [])
const loginUrl = '/root/login?redirect=' + encodeURIComponent(window.location.href);
const loginUrl = '/root/login/?redirect=' + encodeURIComponent(window.location.href);
if (mustLogin && !store.me) {
return (
<div className="w-full h-full min-h-screen flex items-center justify-center bg-background">
@@ -27,13 +27,15 @@ export const AuthProvider = ({ children, mustLogin }: Props) => {
<h2 className="text-xl font-semibold text-foreground"></h2>
<p className="text-sm text-muted-foreground">访</p>
</div>
<a
href={loginUrl}
<div
className="inline-flex items-center justify-center gap-2 w-full px-6 py-2.5 rounded-lg bg-foreground text-background text-sm font-medium transition-opacity hover:opacity-80 active:opacity-70"
onClick={() => {
window.open(loginUrl, '_self')
}}
>
<LogIn className="w-4 h-4" />
</a>
</div>
</div>
</div>
)

View File

@@ -54,11 +54,12 @@ export const useLayoutStore = create<LayoutStore>((set, get) => ({
setIsAdmin: (isAdmin) => set({ isAdmin }),
init: async () => {
const token = await queryLogin.getToken()
console.log('token', token);
if (token) {
const user = await queryLogin.checkLocalUser() as UserInfo;
console.log('local user', user);
if (user) {
set({ me: user });
set({ isAdmin: user.orgs?.includes?.('admin') || false });
set({ me: user, isAdmin: user.orgs?.includes?.('admin') || false });
}
}
}

View File

@@ -208,7 +208,7 @@ export default function EnvPage() {
}
return (
<div className="h-screen flex flex-col">
<div className="h-full flex flex-col">
<div className="flex-none border-b bg-background">
<div className="container mx-auto p-6 max-w-5xl">
<div className="flex justify-between items-center">

View File

@@ -26,7 +26,6 @@ import {
PopoverTrigger,
} from '@/components/ui/popover';
import { Plus, Pencil, Trash2, Code } from 'lucide-react';
import { LayoutMain } from '@/modules/layout';
const TableList = () => {
const { list, setShowEdit, setFormData, deleteConfig, setShowDataEdit, setDataFormData } = useConfigStore();
@@ -90,12 +89,11 @@ const TableList = () => {
</Button>
<Popover>
<PopoverTrigger>
<Button
variant="destructive"
size="sm">
<div
className="flex items-center px-4 py-2 bg-destructive text-white rounded cursor-pointer">
<Trash2 className="w-4 h-4 mr-1" />
</Button>
</div>
</PopoverTrigger>
<PopoverContent className="w-48 p-2">
<div className="text-sm text-center mb-2"></div>
@@ -301,6 +299,4 @@ export const List = () => {
);
};
export default () => {
return <LayoutMain><List /></LayoutMain>;
}
export default List

View File

@@ -18,7 +18,6 @@ import {
DialogContent,
DialogHeader,
DialogTitle,
DialogTrigger,
} from '@/components/ui/dialog';
import {
Select,
@@ -29,7 +28,6 @@ import {
} from "@/components/ui/select"
import { Plus, Pencil, Trash2 } from 'lucide-react';
import { LayoutUser } from '@/modules/layout/LayoutUser';
import { LayoutMain } from '@/modules/layout';
const TableList = () => {
const { list, setShowEditModal, setFormData, deleteDomain } = useDomainStore();
@@ -181,18 +179,14 @@ export const List = () => {
return (
<div className="p-4 w-full h-full">
<div className="flex mb-4">
<Dialog>
<DialogTrigger>
<Button
onClick={() => {
setShowEditModal(true);
setFormData({});
}}>
<Plus className="w-4 h-4 mr-1" />
</Button>
</DialogTrigger>
</Dialog>
<Button
onClick={() => {
setShowEditModal(true);
setFormData({});
}}>
<Plus className="w-4 h-4 mr-1" />
</Button>
</div>
<TableList />
<FomeModal />
@@ -200,6 +194,4 @@ export const List = () => {
);
};
export default () => {
return <LayoutMain><List /></LayoutMain>;
}
export default List

View File

@@ -33,7 +33,7 @@ interface Store {
export const useDomainStore = create<Store>((set, get) => ({
getDomainList: async () => {
const res = await query.get({
path: 'app.domain.manager',
path: 'app_domain_manager',
key: 'list',
});
if (res.code === 200) {
@@ -43,7 +43,7 @@ export const useDomainStore = create<Store>((set, get) => ({
},
updateDomain: async (data: any, opts?: { refresh?: boolean }) => {
const res = await query.post({
path: 'app.domain.manager',
path: 'app_domain_manager',
key: 'update',
data,
});
@@ -61,7 +61,7 @@ export const useDomainStore = create<Store>((set, get) => ({
},
deleteDomain: async (data: any) => {
const res = await query.post({
path: 'app.domain.manager',
path: 'app_domain_manager',
key: 'delete',
data,
});
@@ -74,7 +74,7 @@ export const useDomainStore = create<Store>((set, get) => ({
},
getDomainDetail: async (data: any) => {
const res = await query.post({
path: 'app.domain.manager',
path: 'app_domain_manager',
key: 'get',
data,
});

View File

@@ -18,10 +18,8 @@ import {
DialogContent,
DialogHeader,
DialogTitle,
DialogTrigger,
} from '@/components/ui/dialog';
import { Plus, Pencil, Trash2 } from 'lucide-react';
import { LayoutMain } from '@/modules/layout';
const TableList = () => {
const { list, setShowEdit, setFormData, deleteData } = useFlowmeChannelStore();
@@ -163,18 +161,14 @@ export const List = () => {
return (
<div className="p-4 w-full h-full">
<div className="flex mb-4">
<Dialog>
<DialogTrigger>
<Button
onClick={() => {
setShowEdit(true);
setFormData({});
}}>
<Plus className="w-4 h-4 mr-1" />
</Button>
</DialogTrigger>
</Dialog>
<Button
onClick={() => {
setShowEdit(true);
setFormData({});
}}>
<Plus className="w-4 h-4 mr-1" />
</Button>
</div>
<TableList />
<FormModal />
@@ -182,6 +176,4 @@ export const List = () => {
);
};
export default () => {
return <LayoutMain><List /></LayoutMain>;
}
export default List

View File

@@ -18,10 +18,8 @@ import {
DialogContent,
DialogHeader,
DialogTitle,
DialogTrigger,
} from '@/components/ui/dialog';
import { Plus, Pencil, Trash2 } from 'lucide-react';
import { LayoutMain } from '@/modules/layout';
const TableList = () => {
const { list, setShowEdit, setFormData, deleteData } = useFlowmeStore();
@@ -172,18 +170,14 @@ export const List = () => {
return (
<div className="p-4 w-full h-full">
<div className="flex mb-4">
<Dialog>
<DialogTrigger>
<Button
onClick={() => {
setShowEdit(true);
setFormData({});
}}>
<Plus className="w-4 h-4 mr-1" />
</Button>
</DialogTrigger>
</Dialog>
<Button
onClick={() => {
setShowEdit(true);
setFormData({});
}}>
<Plus className="w-4 h-4 mr-1" />
</Button>
</div>
<TableList />
<FormModal />
@@ -191,6 +185,4 @@ export const List = () => {
);
};
export default () => {
return <LayoutMain><List /></LayoutMain>;
}
export default List

View File

@@ -24,7 +24,6 @@ import {
PopoverTrigger,
} from '@/components/ui/popover';
import { Plus, Pencil, Trash2, Users } from 'lucide-react';
import { LayoutMain } from '@/modules/layout';
import { UserDrawer } from './components/UserDrawer';
const TableList = () => {
@@ -75,12 +74,12 @@ const TableList = () => {
</Button>
<Popover>
<PopoverTrigger>
<Button
variant="destructive"
size="sm">
<div
className="flex items-center px-4 py-2 bg-destructive text-white rounded cursor-pointer"
>
<Trash2 className="w-4 h-4 mr-1" />
</Button>
</div>
</PopoverTrigger>
<PopoverContent className="w-48 p-2">
<div className="text-sm text-center mb-2"></div>
@@ -204,6 +203,4 @@ export const List = () => {
);
};
export default () => {
return <LayoutMain><List /></LayoutMain>;
}
export default List

View File

@@ -1,6 +1,6 @@
export default function Home() {
return (
<div className="flex min-h-screen items-center justify-center bg-zinc-50 font-sans dark:bg-black">
<div className="flex h-full items-center justify-center bg-zinc-50 font-sans dark:bg-black">
<iframe src="/root/router-studio" className="w-full border-0" style={{
height: 'calc(100vh - 48px)'
}} />

View File

@@ -1,5 +1,4 @@
'use client';
import { LayoutMain } from "@/modules/layout";
import { RemoteApp } from "@kevisual/remote-app";
import { useEffect } from "react";
import { QueryRouterServer } from "@kevisual/router/browser";
@@ -54,10 +53,8 @@ export default function Home() {
}
}
return (
<div className="flex min-h-screen items-center justify-center bg-zinc-50 font-sans dark:bg-black">
<LayoutMain>
<div id="remote"></div>
</LayoutMain>
<div className="flex h-full items-center justify-center bg-zinc-50 font-sans dark:bg-black">
<div id="remote"></div>
</div>
);
}

View File

@@ -6,7 +6,6 @@ import { Controller, useForm } from 'react-hook-form';
import { Plus, Pencil, Trash2, Calendar as CalendarIcon, Eye, Copy } from 'lucide-react';
import { toast } from 'sonner';
import { useConfigStore, type Item } from './store';
import { LayoutMain } from '@/modules/layout';
import { Button } from '@/components/ui/button';
import { Input } from '@/components/ui/input';
import { Label } from '@/components/ui/label';
@@ -264,6 +263,4 @@ export const List = () => {
);
};
export default () => {
return <LayoutMain><List /></LayoutMain>;
};
export default List

View File

@@ -20,7 +20,6 @@ import {
CardHeader,
CardTitle,
} from '@/components/ui/card';
import { LayoutMain } from '@/modules/layout';
import { Pencil, Key, User } from 'lucide-react';
import PandaPNG from '@/assets/panda.jpg';
@@ -53,7 +52,7 @@ const ProfileCard = () => {
/>
) : (
<img
src={PandaPNG.src}
src={PandaPNG}
alt="avatar"
className="w-full h-full object-cover"
/>
@@ -287,6 +286,4 @@ export const UserProfile = () => {
);
};
export default () => {
return <LayoutMain title="个人信息"><UserProfile /></LayoutMain>;
}
export default UserProfile

View File

@@ -25,7 +25,6 @@ import {
PopoverTrigger,
} from '@/components/ui/popover';
import { Plus, Pencil, Trash2 } from 'lucide-react';
import { LayoutMain } from '@/modules/layout';
const TableList = () => {
const { list, setShowEdit, setFormData, getList } = useUserStore();
@@ -71,13 +70,12 @@ const TableList = () => {
onOpenChange={(open) => setOpenPopover(open ? user.id : null)}
>
<PopoverTrigger>
<Button
variant="destructive"
size="sm"
<div
className="flex items-center px-4 py-2 bg-destructive text-white rounded cursor-pointer"
>
<Trash2 className="w-4 h-4 mr-1" />
</Button>
</div>
</PopoverTrigger>
<PopoverContent className="w-auto p-4" align="start">
<div className="space-y-3">
@@ -221,4 +219,4 @@ export const List = () => {
);
};
export default <List />
export default List

View File

@@ -9,12 +9,48 @@
// Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
import { Route as rootRouteImport } from './routes/__root'
import { Route as AppsRouteImport } from './routes/apps'
import { Route as UsersRouteImport } from './routes/users'
import { Route as UserRouteImport } from './routes/user'
import { Route as TokenRouteImport } from './routes/token'
import { Route as RemoteRouteImport } from './routes/remote'
import { Route as OrgRouteImport } from './routes/org'
import { Route as DomainRouteImport } from './routes/domain'
import { Route as IndexRouteImport } from './routes/index'
import { Route as FlowmeIndexRouteImport } from './routes/flowme/index'
import { Route as ConfigIndexRouteImport } from './routes/config/index'
import { Route as AppsIndexRouteImport } from './routes/apps/index'
import { Route as FlowmeChannelRouteImport } from './routes/flowme/channel'
import { Route as ConfigEnvRouteImport } from './routes/config/env'
import { Route as AppsAppRouteImport } from './routes/apps/app'
const AppsRoute = AppsRouteImport.update({
id: '/apps',
path: '/apps',
const UsersRoute = UsersRouteImport.update({
id: '/users',
path: '/users',
getParentRoute: () => rootRouteImport,
} as any)
const UserRoute = UserRouteImport.update({
id: '/user',
path: '/user',
getParentRoute: () => rootRouteImport,
} as any)
const TokenRoute = TokenRouteImport.update({
id: '/token',
path: '/token',
getParentRoute: () => rootRouteImport,
} as any)
const RemoteRoute = RemoteRouteImport.update({
id: '/remote',
path: '/remote',
getParentRoute: () => rootRouteImport,
} as any)
const OrgRoute = OrgRouteImport.update({
id: '/org',
path: '/org',
getParentRoute: () => rootRouteImport,
} as any)
const DomainRoute = DomainRouteImport.update({
id: '/domain',
path: '/domain',
getParentRoute: () => rootRouteImport,
} as any)
const IndexRoute = IndexRouteImport.update({
@@ -22,40 +58,189 @@ const IndexRoute = IndexRouteImport.update({
path: '/',
getParentRoute: () => rootRouteImport,
} as any)
const FlowmeIndexRoute = FlowmeIndexRouteImport.update({
id: '/flowme/',
path: '/flowme/',
getParentRoute: () => rootRouteImport,
} as any)
const ConfigIndexRoute = ConfigIndexRouteImport.update({
id: '/config/',
path: '/config/',
getParentRoute: () => rootRouteImport,
} as any)
const AppsIndexRoute = AppsIndexRouteImport.update({
id: '/apps/',
path: '/apps/',
getParentRoute: () => rootRouteImport,
} as any)
const FlowmeChannelRoute = FlowmeChannelRouteImport.update({
id: '/flowme/channel',
path: '/flowme/channel',
getParentRoute: () => rootRouteImport,
} as any)
const ConfigEnvRoute = ConfigEnvRouteImport.update({
id: '/config/env',
path: '/config/env',
getParentRoute: () => rootRouteImport,
} as any)
const AppsAppRoute = AppsAppRouteImport.update({
id: '/apps/app',
path: '/apps/app',
getParentRoute: () => rootRouteImport,
} as any)
export interface FileRoutesByFullPath {
'/': typeof IndexRoute
'/apps': typeof AppsRoute
'/domain': typeof DomainRoute
'/org': typeof OrgRoute
'/remote': typeof RemoteRoute
'/token': typeof TokenRoute
'/user': typeof UserRoute
'/users': typeof UsersRoute
'/apps/app': typeof AppsAppRoute
'/config/env': typeof ConfigEnvRoute
'/flowme/channel': typeof FlowmeChannelRoute
'/apps/': typeof AppsIndexRoute
'/config/': typeof ConfigIndexRoute
'/flowme/': typeof FlowmeIndexRoute
}
export interface FileRoutesByTo {
'/': typeof IndexRoute
'/apps': typeof AppsRoute
'/domain': typeof DomainRoute
'/org': typeof OrgRoute
'/remote': typeof RemoteRoute
'/token': typeof TokenRoute
'/user': typeof UserRoute
'/users': typeof UsersRoute
'/apps/app': typeof AppsAppRoute
'/config/env': typeof ConfigEnvRoute
'/flowme/channel': typeof FlowmeChannelRoute
'/apps': typeof AppsIndexRoute
'/config': typeof ConfigIndexRoute
'/flowme': typeof FlowmeIndexRoute
}
export interface FileRoutesById {
__root__: typeof rootRouteImport
'/': typeof IndexRoute
'/apps': typeof AppsRoute
'/domain': typeof DomainRoute
'/org': typeof OrgRoute
'/remote': typeof RemoteRoute
'/token': typeof TokenRoute
'/user': typeof UserRoute
'/users': typeof UsersRoute
'/apps/app': typeof AppsAppRoute
'/config/env': typeof ConfigEnvRoute
'/flowme/channel': typeof FlowmeChannelRoute
'/apps/': typeof AppsIndexRoute
'/config/': typeof ConfigIndexRoute
'/flowme/': typeof FlowmeIndexRoute
}
export interface FileRouteTypes {
fileRoutesByFullPath: FileRoutesByFullPath
fullPaths: '/' | '/apps'
fullPaths:
| '/'
| '/domain'
| '/org'
| '/remote'
| '/token'
| '/user'
| '/users'
| '/apps/app'
| '/config/env'
| '/flowme/channel'
| '/apps/'
| '/config/'
| '/flowme/'
fileRoutesByTo: FileRoutesByTo
to: '/' | '/apps'
id: '__root__' | '/' | '/apps'
to:
| '/'
| '/domain'
| '/org'
| '/remote'
| '/token'
| '/user'
| '/users'
| '/apps/app'
| '/config/env'
| '/flowme/channel'
| '/apps'
| '/config'
| '/flowme'
id:
| '__root__'
| '/'
| '/domain'
| '/org'
| '/remote'
| '/token'
| '/user'
| '/users'
| '/apps/app'
| '/config/env'
| '/flowme/channel'
| '/apps/'
| '/config/'
| '/flowme/'
fileRoutesById: FileRoutesById
}
export interface RootRouteChildren {
IndexRoute: typeof IndexRoute
AppsRoute: typeof AppsRoute
DomainRoute: typeof DomainRoute
OrgRoute: typeof OrgRoute
RemoteRoute: typeof RemoteRoute
TokenRoute: typeof TokenRoute
UserRoute: typeof UserRoute
UsersRoute: typeof UsersRoute
AppsAppRoute: typeof AppsAppRoute
ConfigEnvRoute: typeof ConfigEnvRoute
FlowmeChannelRoute: typeof FlowmeChannelRoute
AppsIndexRoute: typeof AppsIndexRoute
ConfigIndexRoute: typeof ConfigIndexRoute
FlowmeIndexRoute: typeof FlowmeIndexRoute
}
declare module '@tanstack/react-router' {
interface FileRoutesByPath {
'/apps': {
id: '/apps'
path: '/apps'
fullPath: '/apps'
preLoaderRoute: typeof AppsRouteImport
'/users': {
id: '/users'
path: '/users'
fullPath: '/users'
preLoaderRoute: typeof UsersRouteImport
parentRoute: typeof rootRouteImport
}
'/user': {
id: '/user'
path: '/user'
fullPath: '/user'
preLoaderRoute: typeof UserRouteImport
parentRoute: typeof rootRouteImport
}
'/token': {
id: '/token'
path: '/token'
fullPath: '/token'
preLoaderRoute: typeof TokenRouteImport
parentRoute: typeof rootRouteImport
}
'/remote': {
id: '/remote'
path: '/remote'
fullPath: '/remote'
preLoaderRoute: typeof RemoteRouteImport
parentRoute: typeof rootRouteImport
}
'/org': {
id: '/org'
path: '/org'
fullPath: '/org'
preLoaderRoute: typeof OrgRouteImport
parentRoute: typeof rootRouteImport
}
'/domain': {
id: '/domain'
path: '/domain'
fullPath: '/domain'
preLoaderRoute: typeof DomainRouteImport
parentRoute: typeof rootRouteImport
}
'/': {
@@ -65,12 +250,65 @@ declare module '@tanstack/react-router' {
preLoaderRoute: typeof IndexRouteImport
parentRoute: typeof rootRouteImport
}
'/flowme/': {
id: '/flowme/'
path: '/flowme'
fullPath: '/flowme/'
preLoaderRoute: typeof FlowmeIndexRouteImport
parentRoute: typeof rootRouteImport
}
'/config/': {
id: '/config/'
path: '/config'
fullPath: '/config/'
preLoaderRoute: typeof ConfigIndexRouteImport
parentRoute: typeof rootRouteImport
}
'/apps/': {
id: '/apps/'
path: '/apps'
fullPath: '/apps/'
preLoaderRoute: typeof AppsIndexRouteImport
parentRoute: typeof rootRouteImport
}
'/flowme/channel': {
id: '/flowme/channel'
path: '/flowme/channel'
fullPath: '/flowme/channel'
preLoaderRoute: typeof FlowmeChannelRouteImport
parentRoute: typeof rootRouteImport
}
'/config/env': {
id: '/config/env'
path: '/config/env'
fullPath: '/config/env'
preLoaderRoute: typeof ConfigEnvRouteImport
parentRoute: typeof rootRouteImport
}
'/apps/app': {
id: '/apps/app'
path: '/apps/app'
fullPath: '/apps/app'
preLoaderRoute: typeof AppsAppRouteImport
parentRoute: typeof rootRouteImport
}
}
}
const rootRouteChildren: RootRouteChildren = {
IndexRoute: IndexRoute,
AppsRoute: AppsRoute,
DomainRoute: DomainRoute,
OrgRoute: OrgRoute,
RemoteRoute: RemoteRoute,
TokenRoute: TokenRoute,
UserRoute: UserRoute,
UsersRoute: UsersRoute,
AppsAppRoute: AppsAppRoute,
ConfigEnvRoute: ConfigEnvRoute,
FlowmeChannelRoute: FlowmeChannelRoute,
AppsIndexRoute: AppsIndexRoute,
ConfigIndexRoute: ConfigIndexRoute,
FlowmeIndexRoute: FlowmeIndexRoute,
}
export const routeTree = rootRouteImport
._addFileChildren(rootRouteChildren)

View File

@@ -24,8 +24,8 @@ function RootComponent() {
</Link>
</div>
<hr /> */}
<LayoutMain />
<AuthProvider>
<AuthProvider mustLogin={true}>
<LayoutMain />
<TooltipProvider>
<main className='h-[calc(100%-4rem)] overflow-auto scrollbar'>
<Outlet />

10
src/routes/apps/app.tsx Normal file
View File

@@ -0,0 +1,10 @@
import { createFileRoute } from '@tanstack/react-router'
import AppDetail from '@/pages/apps/app/page'
export const Route = createFileRoute('/apps/app')({
component: RouteComponent,
})
function RouteComponent() {
return <AppDetail />
}

View File

@@ -1,6 +1,6 @@
import { createFileRoute } from '@tanstack/react-router'
import App from '@/pages/apps/page'
export const Route = createFileRoute('/apps')({
export const Route = createFileRoute('/apps/')({
component: RouteComponent,
})

10
src/routes/config/env.tsx Normal file
View File

@@ -0,0 +1,10 @@
import { createFileRoute } from '@tanstack/react-router'
import ConfigEnv from '@/pages/config/env/page'
export const Route = createFileRoute('/config/env')({
component: RouteComponent,
})
function RouteComponent() {
return <ConfigEnv />
}

View File

@@ -0,0 +1,10 @@
import { createFileRoute } from '@tanstack/react-router'
import Config from '@/pages/config/page'
export const Route = createFileRoute('/config/')({
component: RouteComponent,
})
function RouteComponent() {
return <Config />
}

10
src/routes/domain.tsx Normal file
View File

@@ -0,0 +1,10 @@
import { createFileRoute } from '@tanstack/react-router'
import Domain from '@/pages/domain/page'
export const Route = createFileRoute('/domain')({
component: RouteComponent,
})
function RouteComponent() {
return <Domain />
}

View File

@@ -0,0 +1,10 @@
import { createFileRoute } from '@tanstack/react-router'
import FlowmeChannel from '@/pages/flowme/channel/page'
export const Route = createFileRoute('/flowme/channel')({
component: RouteComponent,
})
function RouteComponent() {
return <FlowmeChannel />
}

View File

@@ -0,0 +1,10 @@
import { createFileRoute } from '@tanstack/react-router'
import Flowme from '@/pages/flowme/page'
export const Route = createFileRoute('/flowme/')({
component: RouteComponent,
})
function RouteComponent() {
return <Flowme />
}

10
src/routes/org.tsx Normal file
View File

@@ -0,0 +1,10 @@
import { createFileRoute } from '@tanstack/react-router'
import Org from '@/pages/org/page'
export const Route = createFileRoute('/org')({
component: RouteComponent,
})
function RouteComponent() {
return <Org />
}

10
src/routes/remote.tsx Normal file
View File

@@ -0,0 +1,10 @@
import { createFileRoute } from '@tanstack/react-router'
import Remote from '@/pages/remote/page'
export const Route = createFileRoute('/remote')({
component: RouteComponent,
})
function RouteComponent() {
return <Remote />
}

10
src/routes/token.tsx Normal file
View File

@@ -0,0 +1,10 @@
import { createFileRoute } from '@tanstack/react-router'
import Token from '@/pages/token/page'
export const Route = createFileRoute('/token')({
component: RouteComponent,
})
function RouteComponent() {
return <Token />
}

10
src/routes/user.tsx Normal file
View File

@@ -0,0 +1,10 @@
import { createFileRoute } from '@tanstack/react-router'
import User from '@/pages/user/page'
export const Route = createFileRoute('/user')({
component: RouteComponent,
})
function RouteComponent() {
return <User />
}

10
src/routes/users.tsx Normal file
View File

@@ -0,0 +1,10 @@
import { createFileRoute } from '@tanstack/react-router'
import Users from '@/pages/users/page'
export const Route = createFileRoute('/users')({
component: RouteComponent,
})
function RouteComponent() {
return <Users />
}