mirror of
https://github.com/soybeanjs/soybean-admin.git
synced 2025-10-15 14:23:41 +08:00
Compare commits
1 Commits
tauri-v.1.
...
tauri-v1.1
Author | SHA1 | Date | |
---|---|---|---|
|
6d75343b41 |
16
CHANGELOG.md
16
CHANGELOG.md
@@ -1,22 +1,6 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
|
||||||
## [v1.2.0](https://github.com/soybeanjs/soybean-admin/compare/v1.1.5...v1.2.0) (2024-06-06)
|
|
||||||
|
|
||||||
### 🚀 Features
|
|
||||||
|
|
||||||
- **projects**:
|
|
||||||
- support system new version update notification. close #420 - by @soybeanjs in https://github.com/soybeanjs/soybean-admin/issues/420 [<samp>(584cd)</samp>](https://github.com/soybeanjs/soybean-admin/commit/584cd54)
|
|
||||||
- get user info in router guard and remove in localStorage. close #459 - by @soybeanjs in https://github.com/soybeanjs/soybean-admin/issues/459 [<samp>(5531a)</samp>](https://github.com/soybeanjs/soybean-admin/commit/5531a68)
|
|
||||||
|
|
||||||
### 📖 Documentation
|
|
||||||
|
|
||||||
- **projects**: update CHANGELOG - by @soybeanjs [<samp>(2bec8)</samp>](https://github.com/soybeanjs/soybean-admin/commit/2bec899)
|
|
||||||
|
|
||||||
### ❤️ Contributors
|
|
||||||
|
|
||||||
[](https://github.com/soybeanjs)
|
|
||||||
|
|
||||||
## [v1.1.5](https://github.com/soybeanjs/soybean-admin/compare/v1.1.4...v1.1.5) (2024-06-06)
|
## [v1.1.5](https://github.com/soybeanjs/soybean-admin/compare/v1.1.4...v1.1.5) (2024-06-06)
|
||||||
|
|
||||||
### 🐞 Bug Fixes
|
### 🐞 Bug Fixes
|
||||||
|
@@ -1,67 +1,5 @@
|
|||||||
# 更新日志
|
# 更新日志
|
||||||
|
|
||||||
|
|
||||||
## [v1.2.0](https://github.com/soybeanjs/soybean-admin/compare/v1.1.5...v1.2.0) (2024-06-06)
|
|
||||||
|
|
||||||
### 🚀 功能
|
|
||||||
|
|
||||||
- **项目**:
|
|
||||||
- 支持系统新版本更新通知。关闭 #420 - 由 @soybeanjs 在 https://github.com/soybeanjs/soybean-admin/issues/420 [<samp>(584cd)</samp>](https://github.com/soybeanjs/soybean-admin/commit/584cd54)
|
|
||||||
- 在路由守卫中获取用户信息并从localStorage中移除。关闭 #459 - 由 @soybeanjs 在 https://github.com/soybeanjs/soybean-admin/issues/459 [<samp>(5531a)</samp>](https://github.com/soybeanjs/soybean-admin/commit/5531a68)
|
|
||||||
|
|
||||||
### 📖 文档
|
|
||||||
|
|
||||||
- **项目**: 更新CHANGELOG - 由 @soybeanjs [<samp>(2bec8)</samp>](https://github.com/soybeanjs/soybean-admin/commit/2bec899)
|
|
||||||
|
|
||||||
### ❤️ 贡献者
|
|
||||||
|
|
||||||
[](https://github.com/soybeanjs)
|
|
||||||
|
|
||||||
## [v1.1.5](https://github.com/soybeanjs/soybean-admin/compare/v1.1.4...v1.1.5) (2024-06-06)
|
|
||||||
|
|
||||||
### 🐞 错误修复
|
|
||||||
|
|
||||||
- **项目**: 修复注册组件名,CodeLogin => Register - 由 @m-xlsea 在 https://github.com/soybeanjs/soybean-admin/issues/478 [<samp>(ddf38)</samp>](https://github.com/soybeanjs/soybean-admin/commit/ddf3823)
|
|
||||||
|
|
||||||
### 🏡 杂务
|
|
||||||
|
|
||||||
- **依赖**: 更新依赖 - 由 @soybeanjs [<samp>(060c0)</samp>](https://github.com/soybeanjs/soybean-admin/commit/060c0a9)
|
|
||||||
- **项目**: 更新 vscode 设置: vue 官方 - 由 @soybeanjs [<samp>(76649)</samp>](https://github.com/soybeanjs/soybean-admin/commit/76649e2)
|
|
||||||
|
|
||||||
### ❤️ 贡献者
|
|
||||||
|
|
||||||
[](https://github.com/soybeanjs) [](https://github.com/m-xlsea)
|
|
||||||
|
|
||||||
## [v1.1.4](https://github.com/honghuangdc/soybean-admin/compare/v1.1.3...v1.1.4) (2024-06-06)
|
|
||||||
|
|
||||||
### 🐞 错误修复
|
|
||||||
|
|
||||||
- **utils**: 修复了按esc键时modalLogout的错误 - 由 @sigma-plus 在 https://github.com/honghuangdc/soybean-admin/issues/470 中提出 [<samp>(bd69c)</samp>](https://github.com/honghuangdc/soybean-admin/commit/bd69c00)
|
|
||||||
|
|
||||||
### 🛠 优化
|
|
||||||
|
|
||||||
- **projects**: 优化了RouteMeta的备注 - 由 @soybeanjs 提出 [<samp>(ffb48)</samp>](https://github.com/honghuangdc/soybean-admin/commit/ffb48b1)
|
|
||||||
|
|
||||||
### 📖 文档
|
|
||||||
|
|
||||||
- **projects**:
|
|
||||||
- 更新了CHANGELOG - 由 @soybeanjs 提出 [<samp>(756f8)</samp>](https://github.com/honghuangdc/soybean-admin/commit/756f84a)
|
|
||||||
- 更新了Node&pnpm版本 - 由 @Azir-11 在 https://github.com/honghuangdc/soybean-admin/issues/472 中提出 [<samp>(9b05d)</samp>](https://github.com/honghuangdc/soybean-admin/commit/9b05d73)
|
|
||||||
|
|
||||||
### 🏡 杂项
|
|
||||||
|
|
||||||
- **deps**:
|
|
||||||
- 更新了依赖 - 由 @soybeanjs 提出 [<samp>(d0380)</samp>](https://github.com/honghuangdc/soybean-admin/commit/d0380ce)
|
|
||||||
- 更新了依赖 - 由 @soybeanjs 提出 [<samp>(1f464)</samp>](https://github.com/honghuangdc/soybean-admin/commit/1f4647b)
|
|
||||||
- **projects**:
|
|
||||||
- 关闭了http代理 - 由 @soybeanjs 提出 [<samp>(d08a3)</samp>](https://github.com/honghuangdc/soybean-admin/commit/d08a381)
|
|
||||||
- 更新了mock url - 由 @soybeanjs 提出 [<samp>(e6086)</samp>](https://github.com/honghuangdc/soybean-admin/commit/e6086f0)
|
|
||||||
- 更新了vscode设置 - 由 @soybeanjs 提出 [<samp>(910df)</samp>](https://github.com/honghuangdc/soybean-admin/commit/910dfca)
|
|
||||||
|
|
||||||
### ❤️ 贡献者
|
|
||||||
|
|
||||||
[](https://github.com/soybeanjs) [](https://github.com/Azir-11) [](https://github.com/sigma-plus)
|
|
||||||
|
|
||||||
## [v1.1.3](https://github.com/soybeanjs/soybean-admin/compare/v1.1.2...v1.1.3) (2024-06-02)
|
## [v1.1.3](https://github.com/soybeanjs/soybean-admin/compare/v1.1.2...v1.1.3) (2024-06-02)
|
||||||
|
|
||||||
### 🐞 错误修复
|
### 🐞 错误修复
|
||||||
|
@@ -1,13 +0,0 @@
|
|||||||
import type { Plugin } from 'vite';
|
|
||||||
|
|
||||||
export function setupHtmlPlugin(buildTime: string) {
|
|
||||||
const plugin: Plugin = {
|
|
||||||
name: 'html-plugin',
|
|
||||||
apply: 'build',
|
|
||||||
transformIndexHtml(html) {
|
|
||||||
return html.replace('<head>', `<head>\n <meta name="buildTime" content="${buildTime}">`);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
return plugin;
|
|
||||||
}
|
|
@@ -6,9 +6,8 @@ import progress from 'vite-plugin-progress';
|
|||||||
import { setupElegantRouter } from './router';
|
import { setupElegantRouter } from './router';
|
||||||
import { setupUnocss } from './unocss';
|
import { setupUnocss } from './unocss';
|
||||||
import { setupUnplugin } from './unplugin';
|
import { setupUnplugin } from './unplugin';
|
||||||
import { setupHtmlPlugin } from './html';
|
|
||||||
|
|
||||||
export function setupVitePlugins(viteEnv: Env.ImportMeta, buildTime: string) {
|
export function setupVitePlugins(viteEnv: Env.ImportMeta) {
|
||||||
const plugins: PluginOption = [
|
const plugins: PluginOption = [
|
||||||
vue({
|
vue({
|
||||||
script: {
|
script: {
|
||||||
@@ -20,8 +19,7 @@ export function setupVitePlugins(viteEnv: Env.ImportMeta, buildTime: string) {
|
|||||||
setupElegantRouter(),
|
setupElegantRouter(),
|
||||||
setupUnocss(viteEnv),
|
setupUnocss(viteEnv),
|
||||||
...setupUnplugin(viteEnv),
|
...setupUnplugin(viteEnv),
|
||||||
progress(),
|
progress()
|
||||||
setupHtmlPlugin(buildTime)
|
|
||||||
];
|
];
|
||||||
|
|
||||||
return plugins;
|
return plugins;
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "soybean-admin",
|
"name": "soybean-admin",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "1.2.0",
|
"version": "1.1.5",
|
||||||
"description": "A fresh and elegant admin template, based on Vue3、Vite3、TypeScript、NaiveUI and UnoCSS. 一个基于Vue3、Vite3、TypeScript、NaiveUI and UnoCSS的清新优雅的中后台模版。",
|
"description": "A fresh and elegant admin template, based on Vue3、Vite3、TypeScript、NaiveUI and UnoCSS. 一个基于Vue3、Vite3、TypeScript、NaiveUI and UnoCSS的清新优雅的中后台模版。",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Soybean",
|
"name": "Soybean",
|
||||||
@@ -76,7 +76,7 @@
|
|||||||
"@sa/scripts": "workspace:*",
|
"@sa/scripts": "workspace:*",
|
||||||
"@sa/uno-preset": "workspace:*",
|
"@sa/uno-preset": "workspace:*",
|
||||||
"@soybeanjs/eslint-config": "1.3.6",
|
"@soybeanjs/eslint-config": "1.3.6",
|
||||||
"@tauri-apps/cli": "1.5.14",
|
"@tauri-apps/cli": "1.5.11",
|
||||||
"@types/lodash-es": "4.17.12",
|
"@types/lodash-es": "4.17.12",
|
||||||
"@types/node": "20.14.2",
|
"@types/node": "20.14.2",
|
||||||
"@types/nprogress": "0.2.3",
|
"@types/nprogress": "0.2.3",
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@sa/axios",
|
"name": "@sa/axios",
|
||||||
"version": "1.2.0",
|
"version": "1.1.5",
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./src/index.ts"
|
".": "./src/index.ts"
|
||||||
},
|
},
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@sa/color",
|
"name": "@sa/color",
|
||||||
"version": "1.2.0",
|
"version": "1.1.5",
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./src/index.ts"
|
".": "./src/index.ts"
|
||||||
},
|
},
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@sa/hooks",
|
"name": "@sa/hooks",
|
||||||
"version": "1.2.0",
|
"version": "1.1.5",
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./src/index.ts"
|
".": "./src/index.ts"
|
||||||
},
|
},
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@sa/materials",
|
"name": "@sa/materials",
|
||||||
"version": "1.2.0",
|
"version": "1.1.5",
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./src/index.ts"
|
".": "./src/index.ts"
|
||||||
},
|
},
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@sa/fetch",
|
"name": "@sa/fetch",
|
||||||
"version": "1.2.0",
|
"version": "1.1.5",
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./src/index.ts"
|
".": "./src/index.ts"
|
||||||
},
|
},
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@sa/scripts",
|
"name": "@sa/scripts",
|
||||||
"version": "1.2.0",
|
"version": "1.1.5",
|
||||||
"bin": {
|
"bin": {
|
||||||
"sa": "./bin.ts"
|
"sa": "./bin.ts"
|
||||||
},
|
},
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@sa/uno-preset",
|
"name": "@sa/uno-preset",
|
||||||
"version": "1.2.0",
|
"version": "1.1.5",
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./src/index.ts"
|
".": "./src/index.ts"
|
||||||
},
|
},
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@sa/utils",
|
"name": "@sa/utils",
|
||||||
"version": "1.2.0",
|
"version": "1.1.5",
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./src/index.ts"
|
".": "./src/index.ts"
|
||||||
},
|
},
|
||||||
|
90
pnpm-lock.yaml
generated
90
pnpm-lock.yaml
generated
@@ -85,8 +85,8 @@ importers:
|
|||||||
specifier: 1.3.6
|
specifier: 1.3.6
|
||||||
version: 1.3.6(@unocss/eslint-config@0.60.4(eslint@9.4.0)(typescript@5.4.5))(eslint-plugin-vue@9.26.0(eslint@9.4.0))(eslint@9.4.0)(typescript@5.4.5)(vue-eslint-parser@9.4.3(eslint@9.4.0))
|
version: 1.3.6(@unocss/eslint-config@0.60.4(eslint@9.4.0)(typescript@5.4.5))(eslint-plugin-vue@9.26.0(eslint@9.4.0))(eslint@9.4.0)(typescript@5.4.5)(vue-eslint-parser@9.4.3(eslint@9.4.0))
|
||||||
'@tauri-apps/cli':
|
'@tauri-apps/cli':
|
||||||
specifier: 1.5.14
|
specifier: 1.5.11
|
||||||
version: 1.5.14
|
version: 1.5.11
|
||||||
'@types/lodash-es':
|
'@types/lodash-es':
|
||||||
specifier: 4.17.12
|
specifier: 4.17.12
|
||||||
version: 4.17.12
|
version: 4.17.12
|
||||||
@@ -970,72 +970,72 @@ packages:
|
|||||||
resolution: {integrity: sha512-+PmQX0PiAYPMeVYe237LJAYvOMYW1j2rH5YROyS3b4CTVJum34HfRvKvAzozHAQG0TnHNdUfY9nCeUyRAs//cw==}
|
resolution: {integrity: sha512-+PmQX0PiAYPMeVYe237LJAYvOMYW1j2rH5YROyS3b4CTVJum34HfRvKvAzozHAQG0TnHNdUfY9nCeUyRAs//cw==}
|
||||||
engines: {node: '>=14.16'}
|
engines: {node: '>=14.16'}
|
||||||
|
|
||||||
'@tauri-apps/cli-darwin-arm64@1.5.14':
|
'@tauri-apps/cli-darwin-arm64@1.5.11':
|
||||||
resolution: {integrity: sha512-lxoSOp3KKSqzHJa7iT32dukPGMlfsTuja1xXSgwR8o/fqzpYJY7FY/3ZxesP8HR66FcK+vtqa//HNqeOQ0mHkA==}
|
resolution: {integrity: sha512-2NLSglDb5VfvTbMtmOKWyD+oaL/e8Z/ZZGovHtUFyUSFRabdXc6cZOlcD1BhFvYkHqm+TqGaz5qtPR5UbqDs8A==}
|
||||||
engines: {node: '>= 10'}
|
engines: {node: '>= 10'}
|
||||||
cpu: [arm64]
|
cpu: [arm64]
|
||||||
os: [darwin]
|
os: [darwin]
|
||||||
|
|
||||||
'@tauri-apps/cli-darwin-x64@1.5.14':
|
'@tauri-apps/cli-darwin-x64@1.5.11':
|
||||||
resolution: {integrity: sha512-EXSwN1n5spfG8FoXuyc90ACtmDJXzaZ1gxyENaq9xEpQoo7j/Q1vb6qXxmr6azKr8zmqY4h08ZFbv3exh93xJg==}
|
resolution: {integrity: sha512-/RQllHiJRH2fJOCudtZlaUIjofkHzP3zZgxi71ZUm7Fy80smU5TDfwpwOvB0wSVh0g/ciDjMArCSTo0MRvL+ag==}
|
||||||
engines: {node: '>= 10'}
|
engines: {node: '>= 10'}
|
||||||
cpu: [x64]
|
cpu: [x64]
|
||||||
os: [darwin]
|
os: [darwin]
|
||||||
|
|
||||||
'@tauri-apps/cli-linux-arm-gnueabihf@1.5.14':
|
'@tauri-apps/cli-linux-arm-gnueabihf@1.5.11':
|
||||||
resolution: {integrity: sha512-Yb8BH/KYR7Tl+de40sZPfrqbhcU3Jlu+UPIrnXt05sjn48xqIps74Xjz8zzVp0TuHxUp8FmIGtCVhQgsbrsvvg==}
|
resolution: {integrity: sha512-IlBuBPKmMm+a5LLUEK6a21UGr9ZYd6zKuKLq6IGM4tVweQa8Sf2kP2Nqs74dMGIUrLmMs0vuqdURpykQg+z4NQ==}
|
||||||
engines: {node: '>= 10'}
|
engines: {node: '>= 10'}
|
||||||
cpu: [arm]
|
cpu: [arm]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
|
|
||||||
'@tauri-apps/cli-linux-arm64-gnu@1.5.14':
|
'@tauri-apps/cli-linux-arm64-gnu@1.5.11':
|
||||||
resolution: {integrity: sha512-QrKHP4gRaHiup478rPBZ+BmNd88yze9jMmheoNy9mN1K/aECRmTHO+tWhsxv5moFHZzRhO0QDWxxvTtiaPXaGg==}
|
resolution: {integrity: sha512-w+k1bNHCU/GbmXshtAhyTwqosThUDmCEFLU4Zkin1vl2fuAtQry2RN7thfcJFepblUGL/J7yh3Q/0+BCjtspKQ==}
|
||||||
engines: {node: '>= 10'}
|
engines: {node: '>= 10'}
|
||||||
cpu: [arm64]
|
cpu: [arm64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
libc: [glibc]
|
libc: [glibc]
|
||||||
|
|
||||||
'@tauri-apps/cli-linux-arm64-musl@1.5.14':
|
'@tauri-apps/cli-linux-arm64-musl@1.5.11':
|
||||||
resolution: {integrity: sha512-Hb1C1VMxmUcyGjW/K/INKF87zzzgLEVRmWZZnQd7M1P4uue4xPyIwUELSdX12Z2jREPgmLW4AXPD0m6wsNu7iw==}
|
resolution: {integrity: sha512-PN6/dl+OfYQ/qrAy4HRAfksJ2AyWQYn2IA/2Wwpaa7SDRz2+hzwTQkvajuvy0sQ5L2WCG7ymFYRYMbpC6Hk9Pg==}
|
||||||
engines: {node: '>= 10'}
|
engines: {node: '>= 10'}
|
||||||
cpu: [arm64]
|
cpu: [arm64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
libc: [musl]
|
libc: [musl]
|
||||||
|
|
||||||
'@tauri-apps/cli-linux-x64-gnu@1.5.14':
|
'@tauri-apps/cli-linux-x64-gnu@1.5.11':
|
||||||
resolution: {integrity: sha512-kD9v/UwPDuhIgq2TJj/s2/7rqk+vmExVV6xHPKI8vVbIvlNAOZqmx3fpxjej1241vhJ/piGd/m6q6YMWGsL0oQ==}
|
resolution: {integrity: sha512-MTVXLi89Nj7Apcvjezw92m7ZqIDKT5SFKZtVPCg6RoLUBTzko/BQoXYIRWmdoz2pgkHDUHgO2OMJ8oKzzddXbw==}
|
||||||
engines: {node: '>= 10'}
|
engines: {node: '>= 10'}
|
||||||
cpu: [x64]
|
cpu: [x64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
libc: [glibc]
|
libc: [glibc]
|
||||||
|
|
||||||
'@tauri-apps/cli-linux-x64-musl@1.5.14':
|
'@tauri-apps/cli-linux-x64-musl@1.5.11':
|
||||||
resolution: {integrity: sha512-204Drgg9Zx0+THKndqASz4+iPCwqA3gQVF9C0CDIArNXrjPyJjVvW8VP5CHiZYaTNWxlz/ltyxluM6UFWbXNFw==}
|
resolution: {integrity: sha512-kwzAjqFpz7rvTs7WGZLy/a5nS5t15QKr3E9FG95MNF0exTl3d29YoAUAe1Mn0mOSrTJ9Z+vYYAcI/QdcsGBP+w==}
|
||||||
engines: {node: '>= 10'}
|
engines: {node: '>= 10'}
|
||||||
cpu: [x64]
|
cpu: [x64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
libc: [musl]
|
libc: [musl]
|
||||||
|
|
||||||
'@tauri-apps/cli-win32-arm64-msvc@1.5.14':
|
'@tauri-apps/cli-win32-arm64-msvc@1.5.11':
|
||||||
resolution: {integrity: sha512-sqPSni2MnWNCm+8YZnLdWCclxfSHaYqKuPFSz8q7Tn1G1m/cA9gyPoC1G0esHftY7bu/ZM5lB4kM3I4U0KlLiA==}
|
resolution: {integrity: sha512-L+5NZ/rHrSUrMxjj6YpFYCXp6wHnq8c8SfDTBOX8dO8x+5283/vftb4vvuGIsLS4UwUFXFnLt3XQr44n84E67Q==}
|
||||||
engines: {node: '>= 10'}
|
engines: {node: '>= 10'}
|
||||||
cpu: [arm64]
|
cpu: [arm64]
|
||||||
os: [win32]
|
os: [win32]
|
||||||
|
|
||||||
'@tauri-apps/cli-win32-ia32-msvc@1.5.14':
|
'@tauri-apps/cli-win32-ia32-msvc@1.5.11':
|
||||||
resolution: {integrity: sha512-8xN8W0zTs8oFsQmvYLxHFeqhzVI7oTaPK1xQMc5gbpFP45jN41c21aCXfjnvzT+h90EfCHUF9EWj2HTEJSb7Iw==}
|
resolution: {integrity: sha512-oVlD9IVewrY0lZzTdb71kNXkjdgMqFq+ohb67YsJb4Rf7o8A9DTlFds1XLCe3joqLMm4M+gvBKD7YnGIdxQ9vA==}
|
||||||
engines: {node: '>= 10'}
|
engines: {node: '>= 10'}
|
||||||
cpu: [ia32]
|
cpu: [ia32]
|
||||||
os: [win32]
|
os: [win32]
|
||||||
|
|
||||||
'@tauri-apps/cli-win32-x64-msvc@1.5.14':
|
'@tauri-apps/cli-win32-x64-msvc@1.5.11':
|
||||||
resolution: {integrity: sha512-U0slee5tNM2PYECBpPHavLSwkT3szGMZ+qhcikQQbDan84bQdLn/kHWjyXOgLJs4KSve4+KxcrN+AVqj0VyHnw==}
|
resolution: {integrity: sha512-1CexcqUFCis5ypUIMOKllxUBrna09McbftWENgvVXMfA+SP+yPDPAVb8fIvUcdTIwR/yHJwcIucmTB4anww4vg==}
|
||||||
engines: {node: '>= 10'}
|
engines: {node: '>= 10'}
|
||||||
cpu: [x64]
|
cpu: [x64]
|
||||||
os: [win32]
|
os: [win32]
|
||||||
|
|
||||||
'@tauri-apps/cli@1.5.14':
|
'@tauri-apps/cli@1.5.11':
|
||||||
resolution: {integrity: sha512-JOSMKymlg116UdEXSj69eg5p1OtZnQkUE0qIGbtNDO1sk3X/KgBN6+oHBW0BzPStp/W0AjBgrMWCqjHPwEpOug==}
|
resolution: {integrity: sha512-B475D7phZrq5sZ3kDABH4g2mEoUIHtnIO+r4ZGAAfsjMbZCwXxR/jlMGTEL+VO3YzjpF7gQe38IzB4vLBbVppw==}
|
||||||
engines: {node: '>= 10'}
|
engines: {node: '>= 10'}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
|
|
||||||
@@ -5427,48 +5427,48 @@ snapshots:
|
|||||||
dependencies:
|
dependencies:
|
||||||
defer-to-connect: 2.0.1
|
defer-to-connect: 2.0.1
|
||||||
|
|
||||||
'@tauri-apps/cli-darwin-arm64@1.5.14':
|
'@tauri-apps/cli-darwin-arm64@1.5.11':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@tauri-apps/cli-darwin-x64@1.5.14':
|
'@tauri-apps/cli-darwin-x64@1.5.11':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@tauri-apps/cli-linux-arm-gnueabihf@1.5.14':
|
'@tauri-apps/cli-linux-arm-gnueabihf@1.5.11':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@tauri-apps/cli-linux-arm64-gnu@1.5.14':
|
'@tauri-apps/cli-linux-arm64-gnu@1.5.11':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@tauri-apps/cli-linux-arm64-musl@1.5.14':
|
'@tauri-apps/cli-linux-arm64-musl@1.5.11':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@tauri-apps/cli-linux-x64-gnu@1.5.14':
|
'@tauri-apps/cli-linux-x64-gnu@1.5.11':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@tauri-apps/cli-linux-x64-musl@1.5.14':
|
'@tauri-apps/cli-linux-x64-musl@1.5.11':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@tauri-apps/cli-win32-arm64-msvc@1.5.14':
|
'@tauri-apps/cli-win32-arm64-msvc@1.5.11':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@tauri-apps/cli-win32-ia32-msvc@1.5.14':
|
'@tauri-apps/cli-win32-ia32-msvc@1.5.11':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@tauri-apps/cli-win32-x64-msvc@1.5.14':
|
'@tauri-apps/cli-win32-x64-msvc@1.5.11':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@tauri-apps/cli@1.5.14':
|
'@tauri-apps/cli@1.5.11':
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
'@tauri-apps/cli-darwin-arm64': 1.5.14
|
'@tauri-apps/cli-darwin-arm64': 1.5.11
|
||||||
'@tauri-apps/cli-darwin-x64': 1.5.14
|
'@tauri-apps/cli-darwin-x64': 1.5.11
|
||||||
'@tauri-apps/cli-linux-arm-gnueabihf': 1.5.14
|
'@tauri-apps/cli-linux-arm-gnueabihf': 1.5.11
|
||||||
'@tauri-apps/cli-linux-arm64-gnu': 1.5.14
|
'@tauri-apps/cli-linux-arm64-gnu': 1.5.11
|
||||||
'@tauri-apps/cli-linux-arm64-musl': 1.5.14
|
'@tauri-apps/cli-linux-arm64-musl': 1.5.11
|
||||||
'@tauri-apps/cli-linux-x64-gnu': 1.5.14
|
'@tauri-apps/cli-linux-x64-gnu': 1.5.11
|
||||||
'@tauri-apps/cli-linux-x64-musl': 1.5.14
|
'@tauri-apps/cli-linux-x64-musl': 1.5.11
|
||||||
'@tauri-apps/cli-win32-arm64-msvc': 1.5.14
|
'@tauri-apps/cli-win32-arm64-msvc': 1.5.11
|
||||||
'@tauri-apps/cli-win32-ia32-msvc': 1.5.14
|
'@tauri-apps/cli-win32-ia32-msvc': 1.5.11
|
||||||
'@tauri-apps/cli-win32-x64-msvc': 1.5.14
|
'@tauri-apps/cli-win32-x64-msvc': 1.5.11
|
||||||
|
|
||||||
'@tootallnate/once@2.0.0': {}
|
'@tootallnate/once@2.0.0': {}
|
||||||
|
|
||||||
|
@@ -1,10 +1,6 @@
|
|||||||
const local: App.I18n.Schema = {
|
const local: App.I18n.Schema = {
|
||||||
system: {
|
system: {
|
||||||
title: 'SoybeanAdmin',
|
title: 'SoybeanAdmin'
|
||||||
updateTitle: 'System Version Update Notification',
|
|
||||||
updateContent: 'A new version of the system has been detected. Do you want to refresh the page immediately?',
|
|
||||||
updateConfirm: 'Refresh immediately',
|
|
||||||
updateCancel: 'Later'
|
|
||||||
},
|
},
|
||||||
common: {
|
common: {
|
||||||
action: 'Action',
|
action: 'Action',
|
||||||
|
@@ -1,10 +1,6 @@
|
|||||||
const local: App.I18n.Schema = {
|
const local: App.I18n.Schema = {
|
||||||
system: {
|
system: {
|
||||||
title: 'Soybean 管理系统',
|
title: 'Soybean 管理系统'
|
||||||
updateTitle: '系统版本更新通知',
|
|
||||||
updateContent: '检测到系统有新版本发布,是否立即刷新页面?',
|
|
||||||
updateConfirm: '立即刷新',
|
|
||||||
updateCancel: '稍后再说'
|
|
||||||
},
|
},
|
||||||
common: {
|
common: {
|
||||||
action: '操作',
|
action: '操作',
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
import { createApp } from 'vue';
|
import { createApp } from 'vue';
|
||||||
import './plugins/assets';
|
import './plugins/assets';
|
||||||
import { setupAppVersionNotification, setupDayjs, setupIconifyOffline, setupLoading, setupNProgress } from './plugins';
|
import { setupDayjs, setupIconifyOffline, setupLoading, setupNProgress } from './plugins';
|
||||||
import { setupStore } from './store';
|
import { setupStore } from './store';
|
||||||
import { setupRouter } from './router';
|
import { setupRouter } from './router';
|
||||||
import { setupI18n } from './locales';
|
import { setupI18n } from './locales';
|
||||||
@@ -23,8 +23,6 @@ async function setupApp() {
|
|||||||
|
|
||||||
setupI18n(app);
|
setupI18n(app);
|
||||||
|
|
||||||
setupAppVersionNotification();
|
|
||||||
|
|
||||||
app.mount('#app');
|
app.mount('#app');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,53 +0,0 @@
|
|||||||
import { h } from 'vue';
|
|
||||||
import { NButton } from 'naive-ui';
|
|
||||||
import { $t } from '../locales';
|
|
||||||
|
|
||||||
export function setupAppVersionNotification() {
|
|
||||||
document.addEventListener('visibilitychange', async () => {
|
|
||||||
const buildTime = await getHtmlBuildTime();
|
|
||||||
|
|
||||||
if (buildTime !== BUILD_TIME && document.visibilityState === 'visible') {
|
|
||||||
const n = window.$notification?.create({
|
|
||||||
title: $t('system.updateTitle'),
|
|
||||||
content: $t('system.updateContent'),
|
|
||||||
action() {
|
|
||||||
return h('div', { style: { display: 'flex', justifyContent: 'end', gap: '12px', width: '325px' } }, [
|
|
||||||
h(
|
|
||||||
NButton,
|
|
||||||
{
|
|
||||||
onClick() {
|
|
||||||
n?.destroy();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
$t('system.updateCancel')
|
|
||||||
),
|
|
||||||
h(
|
|
||||||
NButton,
|
|
||||||
{
|
|
||||||
type: 'primary',
|
|
||||||
onClick() {
|
|
||||||
location.reload();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
$t('system.updateConfirm')
|
|
||||||
)
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
async function getHtmlBuildTime() {
|
|
||||||
const baseURL = import.meta.env.VITE_BASE_URL;
|
|
||||||
|
|
||||||
const res = await fetch(`${baseURL}index.html`);
|
|
||||||
|
|
||||||
const html = await res.text();
|
|
||||||
|
|
||||||
const match = html.match(/<meta name="buildTime" content="(.*)">/);
|
|
||||||
|
|
||||||
const buildTime = match?.[1] || '';
|
|
||||||
|
|
||||||
return buildTime;
|
|
||||||
}
|
|
@@ -2,4 +2,3 @@ export * from './loading';
|
|||||||
export * from './nprogress';
|
export * from './nprogress';
|
||||||
export * from './iconify';
|
export * from './iconify';
|
||||||
export * from './dayjs';
|
export * from './dayjs';
|
||||||
export * from './app';
|
|
||||||
|
@@ -92,7 +92,6 @@ export function createRouteGuard(router: Router) {
|
|||||||
* @param to to route
|
* @param to to route
|
||||||
*/
|
*/
|
||||||
async function initRoute(to: RouteLocationNormalized): Promise<RouteLocationRaw | null> {
|
async function initRoute(to: RouteLocationNormalized): Promise<RouteLocationRaw | null> {
|
||||||
const authStore = useAuthStore();
|
|
||||||
const routeStore = useRouteStore();
|
const routeStore = useRouteStore();
|
||||||
|
|
||||||
const notFoundRoute: RouteKey = 'not-found';
|
const notFoundRoute: RouteKey = 'not-found';
|
||||||
@@ -126,9 +125,6 @@ async function initRoute(to: RouteLocationNormalized): Promise<RouteLocationRaw
|
|||||||
// the auth route is initialized
|
// the auth route is initialized
|
||||||
// it is not the "not-found" route, then it is allowed to access
|
// it is not the "not-found" route, then it is allowed to access
|
||||||
if (routeStore.isInitAuthRoute && !isNotFoundRoute) {
|
if (routeStore.isInitAuthRoute && !isNotFoundRoute) {
|
||||||
// update user info
|
|
||||||
await authStore.updateUserInfo();
|
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
// it is captured by the "not-found" route, then check whether the route exists
|
// it is captured by the "not-found" route, then check whether the route exists
|
||||||
|
@@ -8,7 +8,7 @@ import { fetchGetUserInfo, fetchLogin } from '@/service/api';
|
|||||||
import { localStg } from '@/utils/storage';
|
import { localStg } from '@/utils/storage';
|
||||||
import { $t } from '@/locales';
|
import { $t } from '@/locales';
|
||||||
import { useRouteStore } from '../route';
|
import { useRouteStore } from '../route';
|
||||||
import { clearAuthStorage, getToken } from './shared';
|
import { clearAuthStorage, getToken, getUserInfo } from './shared';
|
||||||
|
|
||||||
export const useAuthStore = defineStore(SetupStoreId.Auth, () => {
|
export const useAuthStore = defineStore(SetupStoreId.Auth, () => {
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
@@ -18,12 +18,7 @@ export const useAuthStore = defineStore(SetupStoreId.Auth, () => {
|
|||||||
|
|
||||||
const token = ref(getToken());
|
const token = ref(getToken());
|
||||||
|
|
||||||
const userInfo: Api.Auth.UserInfo = reactive({
|
const userInfo: Api.Auth.UserInfo = reactive(getUserInfo());
|
||||||
userId: '',
|
|
||||||
userName: '',
|
|
||||||
roles: [],
|
|
||||||
buttons: []
|
|
||||||
});
|
|
||||||
|
|
||||||
/** is super role in static route */
|
/** is super role in static route */
|
||||||
const isStaticSuper = computed(() => {
|
const isStaticSuper = computed(() => {
|
||||||
@@ -92,23 +87,14 @@ export const useAuthStore = defineStore(SetupStoreId.Auth, () => {
|
|||||||
localStg.set('token', loginToken.token);
|
localStg.set('token', loginToken.token);
|
||||||
localStg.set('refreshToken', loginToken.refreshToken);
|
localStg.set('refreshToken', loginToken.refreshToken);
|
||||||
|
|
||||||
// 2. get user info and update store
|
|
||||||
const pass = await updateUserInfo();
|
|
||||||
|
|
||||||
if (pass) {
|
|
||||||
token.value = loginToken.token;
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
async function updateUserInfo() {
|
|
||||||
const { data: info, error } = await fetchGetUserInfo();
|
const { data: info, error } = await fetchGetUserInfo();
|
||||||
|
|
||||||
if (!error) {
|
if (!error) {
|
||||||
// update store
|
// 2. store user info
|
||||||
|
localStg.set('userInfo', info);
|
||||||
|
|
||||||
|
// 3. update store
|
||||||
|
token.value = loginToken.token;
|
||||||
Object.assign(userInfo, info);
|
Object.assign(userInfo, info);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@@ -124,7 +110,6 @@ export const useAuthStore = defineStore(SetupStoreId.Auth, () => {
|
|||||||
isLogin,
|
isLogin,
|
||||||
loginLoading,
|
loginLoading,
|
||||||
resetStore,
|
resetStore,
|
||||||
login,
|
login
|
||||||
updateUserInfo
|
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
@@ -5,8 +5,27 @@ export function getToken() {
|
|||||||
return localStg.get('token') || '';
|
return localStg.get('token') || '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Get user info */
|
||||||
|
export function getUserInfo() {
|
||||||
|
const emptyInfo: Api.Auth.UserInfo = {
|
||||||
|
userId: '',
|
||||||
|
userName: '',
|
||||||
|
roles: [],
|
||||||
|
buttons: []
|
||||||
|
};
|
||||||
|
const userInfo = localStg.get('userInfo') || emptyInfo;
|
||||||
|
|
||||||
|
// fix new property: buttons, this will be removed in the next version `1.1.0`
|
||||||
|
if (!userInfo.buttons) {
|
||||||
|
userInfo.buttons = [];
|
||||||
|
}
|
||||||
|
|
||||||
|
return userInfo;
|
||||||
|
}
|
||||||
|
|
||||||
/** Clear auth storage */
|
/** Clear auth storage */
|
||||||
export function clearAuthStorage() {
|
export function clearAuthStorage() {
|
||||||
localStg.remove('token');
|
localStg.remove('token');
|
||||||
localStg.remove('refreshToken');
|
localStg.remove('refreshToken');
|
||||||
|
localStg.remove('userInfo');
|
||||||
}
|
}
|
||||||
|
4
src/typings/app.d.ts
vendored
4
src/typings/app.d.ts
vendored
@@ -251,10 +251,6 @@ declare namespace App {
|
|||||||
type Schema = {
|
type Schema = {
|
||||||
system: {
|
system: {
|
||||||
title: string;
|
title: string;
|
||||||
updateTitle: string;
|
|
||||||
updateContent: string;
|
|
||||||
updateConfirm: string;
|
|
||||||
updateCancel: string;
|
|
||||||
};
|
};
|
||||||
common: {
|
common: {
|
||||||
action: string;
|
action: string;
|
||||||
|
2
src/typings/storage.d.ts
vendored
2
src/typings/storage.d.ts
vendored
@@ -18,6 +18,8 @@ declare namespace StorageType {
|
|||||||
mixSiderFixed: CommonType.YesOrNo;
|
mixSiderFixed: CommonType.YesOrNo;
|
||||||
/** The refresh token */
|
/** The refresh token */
|
||||||
refreshToken: string;
|
refreshToken: string;
|
||||||
|
/** The user info */
|
||||||
|
userInfo: Api.Auth.UserInfo;
|
||||||
/** The theme color */
|
/** The theme color */
|
||||||
themeColor: string;
|
themeColor: string;
|
||||||
/** The theme settings */
|
/** The theme settings */
|
||||||
|
@@ -25,7 +25,7 @@ export default defineConfig(configEnv => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
plugins: setupVitePlugins(viteEnv, buildTime),
|
plugins: setupVitePlugins(viteEnv),
|
||||||
define: {
|
define: {
|
||||||
BUILD_TIME: JSON.stringify(buildTime)
|
BUILD_TIME: JSON.stringify(buildTime)
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user