mirror of
https://github.com/soybeanjs/soybean-admin.git
synced 2025-09-23 03:56:37 +08:00
Merge branch 'main' into example
This commit is contained in:
commit
69788d0134
30
CHANGELOG.md
30
CHANGELOG.md
@ -1,6 +1,36 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
|
||||||
|
## [v1.3.11](https://github.com/soybeanjs/soybean-admin/compare/v1.3.10...v1.3.11) (2025-01-19)
|
||||||
|
|
||||||
|
### 🚀 Features
|
||||||
|
|
||||||
|
- **projects**: multi language buttons support hiding. - by @Azir-11 in https://github.com/soybeanjs/soybean-admin/issues/683 [<samp>(d7aeb)</samp>](https://github.com/soybeanjs/soybean-admin/commit/d7aebb7)
|
||||||
|
|
||||||
|
### 🐞 Bug Fixes
|
||||||
|
|
||||||
|
- **hooks**:
|
||||||
|
- The total number before assigning a value to the table is incorrect. - by @Azir-11 in https://github.com/soybeanjs/soybean-admin/issues/687 [<samp>(56760)</samp>](https://github.com/soybeanjs/soybean-admin/commit/5676024)
|
||||||
|
- **projects**:
|
||||||
|
- fix login success notification. fixed #688 - by @soybeanjs in https://github.com/soybeanjs/soybean-admin/issues/688 [<samp>(60dd2)</samp>](https://github.com/soybeanjs/soybean-admin/commit/60dd226)
|
||||||
|
- fix update notifications. fixed #691, fixed #692 - by @soybeanjs in https://github.com/soybeanjs/soybean-admin/issues/691 and https://github.com/soybeanjs/soybean-admin/issues/692 [<samp>(ac862)</samp>](https://github.com/soybeanjs/soybean-admin/commit/ac86247)
|
||||||
|
|
||||||
|
### 🛠 Optimizations
|
||||||
|
|
||||||
|
- **projects**: optimize code - by @soybeanjs [<samp>(6489e)</samp>](https://github.com/soybeanjs/soybean-admin/commit/6489ec4)
|
||||||
|
|
||||||
|
### 📖 Documentation
|
||||||
|
|
||||||
|
- **projects**: update README - by @soybeanjs [<samp>(21434)</samp>](https://github.com/soybeanjs/soybean-admin/commit/214341e)
|
||||||
|
|
||||||
|
### 🏡 Chore
|
||||||
|
|
||||||
|
- **deps**: update deps - by @soybeanjs [<samp>(c9433)</samp>](https://github.com/soybeanjs/soybean-admin/commit/c9433e1)
|
||||||
|
|
||||||
|
### ❤️ Contributors
|
||||||
|
|
||||||
|
[](https://github.com/soybeanjs) [](https://github.com/Azir-11)
|
||||||
|
|
||||||
## [v1.3.10](https://github.com/honghuangdc/soybean-admin/compare/v1.3.9...v1.3.10) (2024-12-16)
|
## [v1.3.10](https://github.com/honghuangdc/soybean-admin/compare/v1.3.9...v1.3.10) (2024-12-16)
|
||||||
|
|
||||||
### 🚀 Features
|
### 🚀 Features
|
||||||
|
@ -49,7 +49,7 @@
|
|||||||
- [Github Repository](https://github.com/soybeanjs/soybean-admin-antd)
|
- [Github Repository](https://github.com/soybeanjs/soybean-admin-antd)
|
||||||
- [Gitee Repository](https://gitee.com/honghuangdc/soybean-admin-antd)
|
- [Gitee Repository](https://gitee.com/honghuangdc/soybean-admin-antd)
|
||||||
|
|
||||||
- **ElementPlusVue Version:**
|
- **ElementPlus Version:**
|
||||||
- [Preview Link](https://elp.soybeanjs.cn/)
|
- [Preview Link](https://elp.soybeanjs.cn/)
|
||||||
- [Github Repository](https://github.com/soybeanjs/soybean-admin-element-plus)
|
- [Github Repository](https://github.com/soybeanjs/soybean-admin-element-plus)
|
||||||
|
|
||||||
@ -113,6 +113,10 @@ pnpm dev
|
|||||||
pnpm build
|
pnpm build
|
||||||
```
|
```
|
||||||
|
|
||||||
|
**Code Synchronization**
|
||||||
|
|
||||||
|
Refer to the [Code Synchronization](https://docs.soybeanjs.cn/guide/sync) document.
|
||||||
|
|
||||||
## Ecosystem
|
## Ecosystem
|
||||||
|
|
||||||
- [react-soybean-admin](https://github.com/mufeng889/react-soybean-admin): SoybeanAdmin based version of React.
|
- [react-soybean-admin](https://github.com/mufeng889/react-soybean-admin): SoybeanAdmin based version of React.
|
||||||
|
@ -45,7 +45,7 @@
|
|||||||
- [预览地址](https://antd.soybeanjs.cn/)
|
- [预览地址](https://antd.soybeanjs.cn/)
|
||||||
- [Github 仓库](https://github.com/soybeanjs/soybean-admin-antd)
|
- [Github 仓库](https://github.com/soybeanjs/soybean-admin-antd)
|
||||||
- [Gitee 仓库](https://gitee.com/honghuangdc/soybean-admin-antd)
|
- [Gitee 仓库](https://gitee.com/honghuangdc/soybean-admin-antd)
|
||||||
- **ElementPlusVue 版本:**
|
- **ElementPlus 版本:**
|
||||||
- [预览地址](https://elp.soybeanjs.cn/)
|
- [预览地址](https://elp.soybeanjs.cn/)
|
||||||
- [Github 仓库](https://github.com/soybeanjs/soybean-admin-element-plus)
|
- [Github 仓库](https://github.com/soybeanjs/soybean-admin-element-plus)
|
||||||
- **旧版:**
|
- **旧版:**
|
||||||
@ -138,6 +138,10 @@ pnpm dev
|
|||||||
pnpm build
|
pnpm build
|
||||||
```
|
```
|
||||||
|
|
||||||
|
**代码同步**
|
||||||
|
|
||||||
|
参考 [代码同步](https://docs.soybeanjs.cn/zh/guide/sync) 文档。
|
||||||
|
|
||||||
## 周边生态
|
## 周边生态
|
||||||
|
|
||||||
- [react-soybean-admin](https://github.com/mufeng889/react-soybean-admin): 基于SoybeanAdmin的React版本.
|
- [react-soybean-admin](https://github.com/mufeng889/react-soybean-admin): 基于SoybeanAdmin的React版本.
|
||||||
|
48
package.json
48
package.json
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "soybean-admin",
|
"name": "soybean-admin",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "1.3.10",
|
"version": "1.3.11",
|
||||||
"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",
|
||||||
@ -51,7 +51,7 @@
|
|||||||
"@antv/g2": "5.2.10",
|
"@antv/g2": "5.2.10",
|
||||||
"@antv/g6": "5.0.35",
|
"@antv/g6": "5.0.35",
|
||||||
"@better-scroll/core": "2.5.1",
|
"@better-scroll/core": "2.5.1",
|
||||||
"@iconify/vue": "4.2.0",
|
"@iconify/vue": "4.3.0",
|
||||||
"@sa/alova": "workspace:*",
|
"@sa/alova": "workspace:*",
|
||||||
"@sa/axios": "workspace:*",
|
"@sa/axios": "workspace:*",
|
||||||
"@sa/color": "workspace:*",
|
"@sa/color": "workspace:*",
|
||||||
@ -64,27 +64,27 @@
|
|||||||
"@visactor/vtable-gantt": "1.13.1",
|
"@visactor/vtable-gantt": "1.13.1",
|
||||||
"@visactor/vue-vtable": "1.13.1",
|
"@visactor/vue-vtable": "1.13.1",
|
||||||
"@vueuse/components": "12.0.0",
|
"@vueuse/components": "12.0.0",
|
||||||
"@vueuse/core": "12.0.0",
|
"@vueuse/core": "12.4.0",
|
||||||
"clipboard": "2.0.11",
|
"clipboard": "2.0.11",
|
||||||
"dayjs": "1.11.13",
|
"dayjs": "1.11.13",
|
||||||
"defu": "6.1.4",
|
"defu": "6.1.4",
|
||||||
"dhtmlx-gantt": "9.0.3",
|
"dhtmlx-gantt": "9.0.3",
|
||||||
"dompurify": "3.2.3",
|
"dompurify": "3.2.3",
|
||||||
"echarts": "5.5.1",
|
"echarts": "5.6.0",
|
||||||
"jsbarcode": "3.11.6",
|
"jsbarcode": "3.11.6",
|
||||||
"json5": "2.2.3",
|
"json5": "2.2.3",
|
||||||
"naive-ui": "2.40.3",
|
"naive-ui": "2.41.0",
|
||||||
"nprogress": "0.2.0",
|
"nprogress": "0.2.0",
|
||||||
"pinia": "2.3.0",
|
"pinia": "2.3.0",
|
||||||
"pinyin-pro": "3.26.0",
|
"pinyin-pro": "3.26.0",
|
||||||
"print-js": "1.6.0",
|
"print-js": "1.6.0",
|
||||||
"swiper": "11.1.15",
|
"swiper": "11.1.15",
|
||||||
"tailwind-merge": "2.5.5",
|
"tailwind-merge": "2.6.0",
|
||||||
"typeit": "8.8.7",
|
"typeit": "8.8.7",
|
||||||
"vditor": "3.10.8",
|
"vditor": "3.10.8",
|
||||||
"vue": "3.5.13",
|
"vue": "3.5.13",
|
||||||
"vue-draggable-plus": "0.6.0",
|
"vue-draggable-plus": "0.6.0",
|
||||||
"vue-i18n": "10.0.5",
|
"vue-i18n": "11.0.1",
|
||||||
"vue-pdf-embed": "2.1.1",
|
"vue-pdf-embed": "2.1.1",
|
||||||
"vue-router": "4.5.0",
|
"vue-router": "4.5.0",
|
||||||
"wangeditor": "4.7.15",
|
"wangeditor": "4.7.15",
|
||||||
@ -94,37 +94,37 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@amap/amap-jsapi-types": "0.0.15",
|
"@amap/amap-jsapi-types": "0.0.15",
|
||||||
"@elegant-router/vue": "0.3.8",
|
"@elegant-router/vue": "0.3.8",
|
||||||
"@iconify/json": "2.2.283",
|
"@iconify/json": "2.2.297",
|
||||||
"@sa/scripts": "workspace:*",
|
"@sa/scripts": "workspace:*",
|
||||||
"@sa/uno-preset": "workspace:*",
|
"@sa/uno-preset": "workspace:*",
|
||||||
"@soybeanjs/eslint-config": "1.4.4",
|
"@soybeanjs/eslint-config": "1.4.4",
|
||||||
"@types/bmapgl": "0.0.7",
|
"@types/bmapgl": "0.0.7",
|
||||||
"@types/dompurify": "3.2.0",
|
"@types/dompurify": "3.2.0",
|
||||||
"@types/node": "22.10.2",
|
"@types/node": "22.10.7",
|
||||||
"@types/nprogress": "0.2.3",
|
"@types/nprogress": "0.2.3",
|
||||||
"@unocss/eslint-config": "0.65.1",
|
"@unocss/eslint-config": "65.4.2",
|
||||||
"@unocss/preset-icons": "0.65.1",
|
"@unocss/preset-icons": "65.4.2",
|
||||||
"@unocss/preset-uno": "0.65.1",
|
"@unocss/preset-uno": "65.4.2",
|
||||||
"@unocss/transformer-directives": "0.65.1",
|
"@unocss/transformer-directives": "65.4.2",
|
||||||
"@unocss/transformer-variant-group": "0.65.1",
|
"@unocss/transformer-variant-group": "65.4.2",
|
||||||
"@unocss/vite": "0.65.1",
|
"@unocss/vite": "65.4.2",
|
||||||
"@vitejs/plugin-vue": "5.2.1",
|
"@vitejs/plugin-vue": "5.2.1",
|
||||||
"@vitejs/plugin-vue-jsx": "4.1.1",
|
"@vitejs/plugin-vue-jsx": "4.1.1",
|
||||||
"eslint": "9.17.0",
|
"eslint": "9.18.0",
|
||||||
"eslint-plugin-vue": "9.32.0",
|
"eslint-plugin-vue": "9.32.0",
|
||||||
"lint-staged": "15.2.11",
|
"lint-staged": "15.4.1",
|
||||||
"sass": "1.83.0",
|
"sass": "1.83.4",
|
||||||
"simple-git-hooks": "2.11.1",
|
"simple-git-hooks": "2.11.1",
|
||||||
"tsx": "4.19.2",
|
"tsx": "4.19.2",
|
||||||
"typescript": "5.7.2",
|
"typescript": "5.7.3",
|
||||||
"unplugin-icons": "0.21.0",
|
"unplugin-icons": "22.0.0",
|
||||||
"unplugin-vue-components": "0.28.0",
|
"unplugin-vue-components": "28.0.0",
|
||||||
"vite": "6.0.3",
|
"vite": "6.0.7",
|
||||||
"vite-plugin-progress": "0.0.7",
|
"vite-plugin-progress": "0.0.7",
|
||||||
"vite-plugin-svg-icons": "2.0.1",
|
"vite-plugin-svg-icons": "2.0.1",
|
||||||
"vite-plugin-vue-devtools": "7.6.8",
|
"vite-plugin-vue-devtools": "7.7.0",
|
||||||
"vue-eslint-parser": "9.4.3",
|
"vue-eslint-parser": "9.4.3",
|
||||||
"vue-tsc": "2.1.10"
|
"vue-tsc": "2.2.0"
|
||||||
},
|
},
|
||||||
"simple-git-hooks": {
|
"simple-git-hooks": {
|
||||||
"commit-msg": "pnpm sa git-commit-verify",
|
"commit-msg": "pnpm sa git-commit-verify",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@sa/alova",
|
"name": "@sa/alova",
|
||||||
"version": "1.3.10",
|
"version": "1.3.11",
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./src/index.ts",
|
".": "./src/index.ts",
|
||||||
"./fetch": "./src/fetch.ts",
|
"./fetch": "./src/fetch.ts",
|
||||||
@ -13,8 +13,8 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@alova/mock": "2.0.10",
|
"@alova/mock": "2.0.11",
|
||||||
"@sa/utils": "workspace:*",
|
"@sa/utils": "workspace:*",
|
||||||
"alova": "3.2.6"
|
"alova": "3.2.8"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@sa/axios",
|
"name": "@sa/axios",
|
||||||
"version": "1.3.10",
|
"version": "1.3.11",
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./src/index.ts"
|
".": "./src/index.ts"
|
||||||
},
|
},
|
||||||
@ -13,9 +13,9 @@
|
|||||||
"@sa/utils": "workspace:*",
|
"@sa/utils": "workspace:*",
|
||||||
"axios": "1.7.9",
|
"axios": "1.7.9",
|
||||||
"axios-retry": "4.5.0",
|
"axios-retry": "4.5.0",
|
||||||
"qs": "6.13.1"
|
"qs": "6.14.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/qs": "6.9.17"
|
"@types/qs": "6.9.18"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@sa/color",
|
"name": "@sa/color",
|
||||||
"version": "1.3.10",
|
"version": "1.3.11",
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./src/index.ts"
|
".": "./src/index.ts"
|
||||||
},
|
},
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@sa/hooks",
|
"name": "@sa/hooks",
|
||||||
"version": "1.3.10",
|
"version": "1.3.11",
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./src/index.ts"
|
".": "./src/index.ts"
|
||||||
},
|
},
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@sa/materials",
|
"name": "@sa/materials",
|
||||||
"version": "1.3.10",
|
"version": "1.3.11",
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./src/index.ts"
|
".": "./src/index.ts"
|
||||||
},
|
},
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@sa/fetch",
|
"name": "@sa/fetch",
|
||||||
"version": "1.3.10",
|
"version": "1.3.11",
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./src/index.ts"
|
".": "./src/index.ts"
|
||||||
},
|
},
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@sa/scripts",
|
"name": "@sa/scripts",
|
||||||
"version": "1.3.10",
|
"version": "1.3.11",
|
||||||
"bin": {
|
"bin": {
|
||||||
"sa": "./bin.ts"
|
"sa": "./bin.ts"
|
||||||
},
|
},
|
||||||
@ -14,14 +14,14 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@soybeanjs/changelog": "0.3.24",
|
"@soybeanjs/changelog": "0.3.24",
|
||||||
"bumpp": "9.9.1",
|
"bumpp": "9.10.1",
|
||||||
"c12": "2.0.1",
|
"c12": "2.0.1",
|
||||||
"cac": "6.7.14",
|
"cac": "6.7.14",
|
||||||
"consola": "3.2.3",
|
"consola": "3.4.0",
|
||||||
"enquirer": "2.4.1",
|
"enquirer": "2.4.1",
|
||||||
"execa": "9.5.2",
|
"execa": "9.5.2",
|
||||||
"kolorist": "1.8.0",
|
"kolorist": "1.8.0",
|
||||||
"npm-check-updates": "17.1.11",
|
"npm-check-updates": "17.1.14",
|
||||||
"rimraf": "6.0.1"
|
"rimraf": "6.0.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@sa/uno-preset",
|
"name": "@sa/uno-preset",
|
||||||
"version": "1.3.10",
|
"version": "1.3.11",
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./src/index.ts"
|
".": "./src/index.ts"
|
||||||
},
|
},
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@sa/utils",
|
"name": "@sa/utils",
|
||||||
"version": "1.3.10",
|
"version": "1.3.11",
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./src/index.ts"
|
".": "./src/index.ts"
|
||||||
},
|
},
|
||||||
|
2624
pnpm-lock.yaml
2624
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
@ -102,9 +102,9 @@ export function useRouterPush(inSetup = true) {
|
|||||||
const redirect = route.value.query?.redirect as string;
|
const redirect = route.value.query?.redirect as string;
|
||||||
|
|
||||||
if (needRedirect && redirect) {
|
if (needRedirect && redirect) {
|
||||||
routerPush(redirect);
|
await routerPush(redirect);
|
||||||
} else {
|
} else {
|
||||||
toHome();
|
await toHome();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -119,6 +119,7 @@ export function useTable<A extends NaiveUI.TableApiFn>(config: NaiveUI.NaiveTabl
|
|||||||
page: 1,
|
page: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
showSizePicker: true,
|
showSizePicker: true,
|
||||||
|
itemCount: 0,
|
||||||
pageSizes: [10, 15, 20, 25, 30],
|
pageSizes: [10, 15, 20, 25, 30],
|
||||||
onUpdatePage: async (page: number) => {
|
onUpdatePage: async (page: number) => {
|
||||||
pagination.page = page;
|
pagination.page = page;
|
||||||
|
@ -40,7 +40,12 @@ const { isFullscreen, toggle } = useFullscreen();
|
|||||||
<div class="h-full flex-y-center justify-end">
|
<div class="h-full flex-y-center justify-end">
|
||||||
<GlobalSearch />
|
<GlobalSearch />
|
||||||
<FullScreen v-if="!appStore.isMobile" :full="isFullscreen" @click="toggle" />
|
<FullScreen v-if="!appStore.isMobile" :full="isFullscreen" @click="toggle" />
|
||||||
<LangSwitch :lang="appStore.locale" :lang-options="appStore.localeOptions" @change-lang="appStore.changeLocale" />
|
<LangSwitch
|
||||||
|
v-if="themeStore.header.multilingual.visible"
|
||||||
|
:lang="appStore.locale"
|
||||||
|
:lang-options="appStore.localeOptions"
|
||||||
|
@change-lang="appStore.changeLocale"
|
||||||
|
/>
|
||||||
<ThemeSchemaSwitch
|
<ThemeSchemaSwitch
|
||||||
:theme-schema="themeStore.themeScheme"
|
:theme-schema="themeStore.themeScheme"
|
||||||
:is-dark="themeStore.darkMode"
|
:is-dark="themeStore.darkMode"
|
||||||
|
@ -127,6 +127,9 @@ const isWrapperScrollMode = computed(() => themeStore.layout.scrollMode === 'wra
|
|||||||
placeholder="SoybeanAdmin"
|
placeholder="SoybeanAdmin"
|
||||||
/>
|
/>
|
||||||
</SettingItem>
|
</SettingItem>
|
||||||
|
<SettingItem key="9" :label="$t('theme.header.multilingual.visible')">
|
||||||
|
<NSwitch v-model:value="themeStore.header.multilingual.visible" />
|
||||||
|
</SettingItem>
|
||||||
</TransitionGroup>
|
</TransitionGroup>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -109,6 +109,9 @@ const local: App.I18n.Schema = {
|
|||||||
breadcrumb: {
|
breadcrumb: {
|
||||||
visible: 'Breadcrumb Visible',
|
visible: 'Breadcrumb Visible',
|
||||||
showIcon: 'Breadcrumb Icon Visible'
|
showIcon: 'Breadcrumb Icon Visible'
|
||||||
|
},
|
||||||
|
multilingual: {
|
||||||
|
visible: 'Display multilingual button'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
tab: {
|
tab: {
|
||||||
|
@ -109,6 +109,9 @@ const local: App.I18n.Schema = {
|
|||||||
breadcrumb: {
|
breadcrumb: {
|
||||||
visible: '显示面包屑',
|
visible: '显示面包屑',
|
||||||
showIcon: '显示面包屑图标'
|
showIcon: '显示面包屑图标'
|
||||||
|
},
|
||||||
|
multilingual: {
|
||||||
|
visible: '显示多语言按钮'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
tab: {
|
tab: {
|
||||||
|
@ -10,22 +10,18 @@ export function setupAppErrorHandle(app: App) {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update check interval in milliseconds
|
|
||||||
const UPDATE_CHECK_INTERVAL = 3 * 60 * 1000;
|
|
||||||
|
|
||||||
export function setupAppVersionNotification() {
|
export function setupAppVersionNotification() {
|
||||||
const canAutoUpdateApp = import.meta.env.VITE_AUTOMATICALLY_DETECT_UPDATE === 'Y';
|
// Update check interval in milliseconds
|
||||||
|
const UPDATE_CHECK_INTERVAL = 3 * 60 * 1000;
|
||||||
|
|
||||||
|
const canAutoUpdateApp = import.meta.env.VITE_AUTOMATICALLY_DETECT_UPDATE === 'Y' && import.meta.env.PROD;
|
||||||
if (!canAutoUpdateApp) return;
|
if (!canAutoUpdateApp) return;
|
||||||
|
|
||||||
let isShow = false;
|
let isShow = false;
|
||||||
let updateInterval: ReturnType<typeof setInterval> | undefined;
|
let updateInterval: ReturnType<typeof setInterval> | undefined;
|
||||||
|
|
||||||
// Check if updates should be checked
|
|
||||||
const shouldCheckForUpdates = [!isShow, document.visibilityState === 'visible', !import.meta.env.DEV].every(Boolean);
|
|
||||||
|
|
||||||
const checkForUpdates = async () => {
|
const checkForUpdates = async () => {
|
||||||
if (!shouldCheckForUpdates) return;
|
if (isShow) return;
|
||||||
|
|
||||||
const buildTime = await getHtmlBuildTime();
|
const buildTime = await getHtmlBuildTime();
|
||||||
|
|
||||||
@ -47,6 +43,7 @@ export function setupAppVersionNotification() {
|
|||||||
{
|
{
|
||||||
onClick() {
|
onClick() {
|
||||||
n?.destroy();
|
n?.destroy();
|
||||||
|
isShow = false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
() => $t('system.updateCancel')
|
() => $t('system.updateCancel')
|
||||||
@ -77,7 +74,7 @@ export function setupAppVersionNotification() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// If updates should be checked, set up the visibility change listener and start the update interval
|
// If updates should be checked, set up the visibility change listener and start the update interval
|
||||||
if (shouldCheckForUpdates) {
|
if (!isShow && document.visibilityState === 'visible') {
|
||||||
// Check for updates when the document is visible
|
// Check for updates when the document is visible
|
||||||
document.addEventListener('visibilitychange', () => {
|
document.addEventListener('visibilitychange', () => {
|
||||||
if (document.visibilityState === 'visible') {
|
if (document.visibilityState === 'visible') {
|
||||||
|
@ -71,13 +71,11 @@ export const useAuthStore = defineStore(SetupStoreId.Auth, () => {
|
|||||||
if (pass) {
|
if (pass) {
|
||||||
await redirectFromLogin(redirect);
|
await redirectFromLogin(redirect);
|
||||||
|
|
||||||
if (routeStore.isInitAuthRoute) {
|
window.$notification?.success({
|
||||||
window.$notification?.success({
|
title: $t('page.login.common.loginSuccess'),
|
||||||
title: $t('page.login.common.loginSuccess'),
|
content: $t('page.login.common.welcomeBack', { userName: userInfo.userName }),
|
||||||
content: $t('page.login.common.welcomeBack', { userName: userInfo.userName }),
|
duration: 4500
|
||||||
duration: 4500
|
});
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
resetStore();
|
resetStore();
|
||||||
|
@ -27,6 +27,9 @@ export const themeSettings: App.Theme.ThemeSetting = {
|
|||||||
breadcrumb: {
|
breadcrumb: {
|
||||||
visible: true,
|
visible: true,
|
||||||
showIcon: true
|
showIcon: true
|
||||||
|
},
|
||||||
|
multilingual: {
|
||||||
|
visible: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
tab: {
|
tab: {
|
||||||
|
8
src/typings/app.d.ts
vendored
8
src/typings/app.d.ts
vendored
@ -53,6 +53,11 @@ declare namespace App {
|
|||||||
/** Whether to show the breadcrumb icon */
|
/** Whether to show the breadcrumb icon */
|
||||||
showIcon: boolean;
|
showIcon: boolean;
|
||||||
};
|
};
|
||||||
|
/** Multilingual */
|
||||||
|
multilingual: {
|
||||||
|
/** Whether to show the multilingual */
|
||||||
|
visible: boolean;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
/** Tab */
|
/** Tab */
|
||||||
tab: {
|
tab: {
|
||||||
@ -363,6 +368,9 @@ declare namespace App {
|
|||||||
visible: string;
|
visible: string;
|
||||||
showIcon: string;
|
showIcon: string;
|
||||||
};
|
};
|
||||||
|
multilingual: {
|
||||||
|
visible: string;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
tab: {
|
tab: {
|
||||||
visible: string;
|
visible: string;
|
||||||
|
Loading…
Reference in New Issue
Block a user