Compare commits
19 Commits
dfb647a82c
...
tauri
Author | SHA1 | Date | |
---|---|---|---|
|
9683480f6a | ||
|
87a675bf62 | ||
|
4d42dcbea8 | ||
|
276d836c87 | ||
|
7d84062e2c | ||
|
afd604212b | ||
|
fcb89883fa | ||
|
dc674ce870 | ||
|
dbd995c12c | ||
|
7b2e510a2f | ||
|
da149e5bbd | ||
|
7c3dac4212 | ||
|
39b89a1234 | ||
|
c57f88aad2 | ||
|
3e4e17abd8 | ||
|
e6044d0fc7 | ||
|
2ed0b6484c | ||
|
222187d3b0 | ||
|
75455b006c |
96
CHANGELOG.md
@@ -1,6 +1,102 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
|
||||||
|
## [v1.3.15](https://github.com/soybeanjs/soybean-admin/compare/v1.3.14...v1.3.15) (2025-06-24)
|
||||||
|
|
||||||
|
### 🚀 Features
|
||||||
|
|
||||||
|
- **projects**: add configurable user name watermark option - by @wenyuanw [<samp>(7c3da)</samp>](https://github.com/soybeanjs/soybean-admin/commit/7c3dac42)
|
||||||
|
|
||||||
|
### 🐞 Bug Fixes
|
||||||
|
|
||||||
|
- **app**: replace console.error with window.console.error for consistency - by @soybeanjs [<samp>(7d840)</samp>](https://github.com/soybeanjs/soybean-admin/commit/7d84062e)
|
||||||
|
- **projects**: ensure proper text color when themes are inverted - by @wenyuanw [<samp>(afd60)</samp>](https://github.com/soybeanjs/soybean-admin/commit/afd60421)
|
||||||
|
- **types**: The environment variable VITE_ICON_LOCAL_PREFIX has the wrong type. - by **chenziwen** [<samp>(da149)</samp>](https://github.com/soybeanjs/soybean-admin/commit/da149e5b)
|
||||||
|
|
||||||
|
### 🛠 Optimizations
|
||||||
|
|
||||||
|
- **components**: optimize spacing for lang-switch dropdown options - by @wenyuanw [<samp>(fcb89)</samp>](https://github.com/soybeanjs/soybean-admin/commit/fcb89883)
|
||||||
|
|
||||||
|
### 💅 Refactors
|
||||||
|
|
||||||
|
- **iframe-page**: remove unused lifecycle hooks and clean up script setup - by @soybeanjs [<samp>(276d8)</samp>](https://github.com/soybeanjs/soybean-admin/commit/276d836c)
|
||||||
|
|
||||||
|
### 📖 Documentation
|
||||||
|
|
||||||
|
- **other**: update docs with video tutorial link. - by **Azir** [<samp>(7b2e5)</samp>](https://github.com/soybeanjs/soybean-admin/commit/7b2e510a)
|
||||||
|
- **readme**: add warning about upcoming `V2` version and link to plan list - by @soybeanjs [<samp>(4d42d)</samp>](https://github.com/soybeanjs/soybean-admin/commit/4d42dcbe)
|
||||||
|
|
||||||
|
### 🏡 Chore
|
||||||
|
|
||||||
|
- **deps**: update deps - by @soybeanjs [<samp>(dc674)</samp>](https://github.com/soybeanjs/soybean-admin/commit/dc674ce8)
|
||||||
|
- **projects**: update deps & fix `moduleResolution` - by @soybeanjs [<samp>(dbd99)</samp>](https://github.com/soybeanjs/soybean-admin/commit/dbd995c1)
|
||||||
|
|
||||||
|
### ❤️ Contributors
|
||||||
|
|
||||||
|
[](https://github.com/soybeanjs) [](https://github.com/wenyuanw)
|
||||||
|
[Azir](mailto:2075125282@qq.com), [chenziwen](mailto:chenziwen@qesong.com)
|
||||||
|
|
||||||
|
## [v1.3.14](https://github.com/soybeanjs/soybean-admin/compare/v1.3.13...v1.3.14) (2025-06-09)
|
||||||
|
|
||||||
|
### 🚀 Features
|
||||||
|
|
||||||
|
- **docs**:
|
||||||
|
- add GitCode star badge to README files - by @soybeanjs [<samp>(05dc1)</samp>](https://github.com/soybeanjs/soybean-admin/commit/05dc11e2)
|
||||||
|
- add DartNode sponsorship badge to README files - by @soybeanjs [<samp>(2ed0b)</samp>](https://github.com/soybeanjs/soybean-admin/commit/2ed0b648)
|
||||||
|
- **projects**:
|
||||||
|
- support vite devtools specify the editor by launchEditor option. - by @Azir-11 in https://github.com/soybeanjs/soybean-admin/issues/730 [<samp>(29698)</samp>](https://github.com/soybeanjs/soybean-admin/commit/29698bef)
|
||||||
|
- clear tabs cache when switching users. - by @Azir-11 in https://github.com/soybeanjs/soybean-admin/issues/744 [<samp>(1ff4d)</samp>](https://github.com/soybeanjs/soybean-admin/commit/1ff4d82d)
|
||||||
|
- **theme**:
|
||||||
|
- global search button toggle - by **t8y2** [<samp>(75455)</samp>](https://github.com/soybeanjs/soybean-admin/commit/75455b00)
|
||||||
|
- **types**:
|
||||||
|
- enhance Option type to support customizable label types - by @WgoW and @testbrate in https://github.com/soybeanjs/soybean-admin/issues/735 [<samp>(123d2)</samp>](https://github.com/soybeanjs/soybean-admin/commit/123d2c90)
|
||||||
|
- **utils**:
|
||||||
|
- support quick generation of code templates. - by @Azir-11 in https://github.com/soybeanjs/soybean-admin/issues/733 [<samp>(8527a)</samp>](https://github.com/soybeanjs/soybean-admin/commit/8527aa80)
|
||||||
|
|
||||||
|
### 🐞 Bug Fixes
|
||||||
|
|
||||||
|
- **auth**:
|
||||||
|
- remove redundant authStore declaration in resetStore function - by @soybeanjs [<samp>(c57f8)</samp>](https://github.com/soybeanjs/soybean-admin/commit/c57f88aa)
|
||||||
|
- **hooks**:
|
||||||
|
- fixed the issue where loading was not properly closed in some cases. - by @Azir-11 in https://github.com/soybeanjs/soybean-admin/issues/737 [<samp>(85e40)</samp>](https://github.com/soybeanjs/soybean-admin/commit/85e40b19)
|
||||||
|
- refactor useCountDown hook for improved countdown logic and clarity. - by **Azir** [<samp>(dfb64)</samp>](https://github.com/soybeanjs/soybean-admin/commit/dfb647a8)
|
||||||
|
- **projects**:
|
||||||
|
- tab closure did not remove cache correctly. - by **Azir** [<samp>(7fb5c)</samp>](https://github.com/soybeanjs/soybean-admin/commit/7fb5c72f)
|
||||||
|
|
||||||
|
### 🛠 Optimizations
|
||||||
|
|
||||||
|
- **hooks**:
|
||||||
|
- remove obsolete disabling cache. - by @Azir-11 in https://github.com/soybeanjs/soybean-admin/issues/729 [<samp>(4e1b6)</samp>](https://github.com/soybeanjs/soybean-admin/commit/4e1b65b6)
|
||||||
|
- update detection function to cover the exceptions that occur when the request fails. - by **恕瑞玛的皇帝** [<samp>(22218)</samp>](https://github.com/soybeanjs/soybean-admin/commit/222187d3)
|
||||||
|
- **projects**:
|
||||||
|
- optimize tab deletion logic. closed #755 - by @wenyuanw in https://github.com/soybeanjs/soybean-admin/issues/755 [<samp>(e6044)</samp>](https://github.com/soybeanjs/soybean-admin/commit/e6044d0f)
|
||||||
|
|
||||||
|
### 📖 Documentation
|
||||||
|
|
||||||
|
- **README**:
|
||||||
|
- Add supporting ecosystem tools to the open-source repository - by @WgoW and @testbrate in https://github.com/soybeanjs/soybean-admin/issues/740 [<samp>(a013e)</samp>](https://github.com/soybeanjs/soybean-admin/commit/a013ea2c)
|
||||||
|
- **deps**:
|
||||||
|
- update the Vite version of the project description. - by @Azir-11 in https://github.com/soybeanjs/soybean-admin/issues/732 [<samp>(80486)</samp>](https://github.com/soybeanjs/soybean-admin/commit/80486099)
|
||||||
|
- **projects**:
|
||||||
|
- update README - by @xiatianYa in https://github.com/soybeanjs/soybean-admin/issues/726 [<samp>(3cbaf)</samp>](https://github.com/soybeanjs/soybean-admin/commit/3cbaf4f4)
|
||||||
|
- add gitcode link - by @soybeanjs [<samp>(f35c2)</samp>](https://github.com/soybeanjs/soybean-admin/commit/f35c250a)
|
||||||
|
|
||||||
|
### 🏡 Chore
|
||||||
|
|
||||||
|
- **deps**:
|
||||||
|
- add vscode recommend plugin close #738 - by @tu6ge in https://github.com/soybeanjs/soybean-admin/issues/739 and https://github.com/soybeanjs/soybean-admin/issues/738 [<samp>(61244)</samp>](https://github.com/soybeanjs/soybean-admin/commit/61244f0f)
|
||||||
|
- update deps - by @soybeanjs [<samp>(41b5f)</samp>](https://github.com/soybeanjs/soybean-admin/commit/41b5f493)
|
||||||
|
- update deps - by @soybeanjs [<samp>(3e4e1)</samp>](https://github.com/soybeanjs/soybean-admin/commit/3e4e17ab)
|
||||||
|
|
||||||
|
### 🤖 CI
|
||||||
|
|
||||||
|
- **hooks**: remove lint-staged in git hook. close #724 - by @Azir-11 in https://github.com/soybeanjs/soybean-admin/issues/743 and https://github.com/soybeanjs/soybean-admin/issues/724 [<samp>(c3abc)</samp>](https://github.com/soybeanjs/soybean-admin/commit/c3abc3df)
|
||||||
|
|
||||||
|
### ❤️ Contributors
|
||||||
|
|
||||||
|
[](https://github.com/soybeanjs) [](https://github.com/wenyuanw) [](https://github.com/Azir-11) [](https://github.com/WgoW) [](https://github.com/testbrate) [](https://github.com/tu6ge) [](https://github.com/xiatianYa)
|
||||||
|
[恕瑞玛的皇帝](mailto:2075125282@qq.com), [t8y2](mailto:1156263951@qq.com),
|
||||||
|
|
||||||
## [v1.3.13](https://github.com/soybeanjs/soybean-admin/compare/v1.3.12...v1.3.13) (2025-03-19)
|
## [v1.3.13](https://github.com/soybeanjs/soybean-admin/compare/v1.3.12...v1.3.13) (2025-03-19)
|
||||||
|
|
||||||
### 🐞 Bug Fixes
|
### 🐞 Bug Fixes
|
||||||
|
@@ -11,6 +11,7 @@
|
|||||||
[](https://github.com/soybeanjs/soybean-admin)
|
[](https://github.com/soybeanjs/soybean-admin)
|
||||||
[](https://gitee.com/honghuangdc/soybean-admin)
|
[](https://gitee.com/honghuangdc/soybean-admin)
|
||||||
[](https://gitcode.com/soybeanjs/soybean-admin)
|
[](https://gitcode.com/soybeanjs/soybean-admin)
|
||||||
|
[](https://dartnode.com "Powered by DartNode - Free VPS for Open Source")
|
||||||
|
|
||||||
<a href="https://hellogithub.com/repository/1298f27d5fe54959a16cf9686516ddb3" target="_blank"><img src="https://abroad.hellogithub.com/v1/widgets/recommend.svg?rid=1298f27d5fe54959a16cf9686516ddb3&claim_uid=IiDXWmP4TEntjbV" alt="Featured|HelloGitHub" style="width: 250px; height: 54px;" width="250" height="54" /></a>
|
<a href="https://hellogithub.com/repository/1298f27d5fe54959a16cf9686516ddb3" target="_blank"><img src="https://abroad.hellogithub.com/v1/widgets/recommend.svg?rid=1298f27d5fe54959a16cf9686516ddb3&claim_uid=IiDXWmP4TEntjbV" alt="Featured|HelloGitHub" style="width: 250px; height: 54px;" width="250" height="54" /></a>
|
||||||
|
|
||||||
@@ -18,6 +19,12 @@
|
|||||||
> [!NOTE]
|
> [!NOTE]
|
||||||
> If you think `SoybeanAdmin` is helpful to you, or you like our project, please give us a ⭐️ on GitHub. Your support is the driving force for us to continue to improve and add new features! Thank you for your support!
|
> If you think `SoybeanAdmin` is helpful to you, or you like our project, please give us a ⭐️ on GitHub. Your support is the driving force for us to continue to improve and add new features! Thank you for your support!
|
||||||
|
|
||||||
|
> [!NOTE]
|
||||||
|
> The `SoybeanAdmin` quick start series videos have been uploaded to [Bilibili](https://www.bilibili.com/video/BV1YKdRYXELC) Go online [click here](https://www.bilibili.com/video/BV1YKdRYXELC) Go check it out
|
||||||
|
|
||||||
|
> [!WARNING]
|
||||||
|
> `SoybeanAdmin` is planning to develop a `V2` version, see [plan list](https://github.com/soybeanjs/soybean-admin/issues/767)
|
||||||
|
|
||||||
## Introduction
|
## Introduction
|
||||||
|
|
||||||
[`SoybeanAdmin`](https://github.com/soybeanjs/soybean-admin) is a clean, elegant, beautiful and powerful admin template, based on the latest front-end technology stack, including Vue3, Vite6, TypeScript, Pinia and UnoCSS. It has built-in rich theme configuration and components, strict code specifications, and an automated file routing system. In addition, it also uses the online mock data solution based on ApiFox. `SoybeanAdmin` provides you with a one-stop admin solution, no additional configuration, and out of the box. It is also a best practice for learning cutting-edge technologies quickly.
|
[`SoybeanAdmin`](https://github.com/soybeanjs/soybean-admin) is a clean, elegant, beautiful and powerful admin template, based on the latest front-end technology stack, including Vue3, Vite6, TypeScript, Pinia and UnoCSS. It has built-in rich theme configuration and components, strict code specifications, and an automated file routing system. In addition, it also uses the online mock data solution based on ApiFox. `SoybeanAdmin` provides you with a one-stop admin solution, no additional configuration, and out of the box. It is also a best practice for learning cutting-edge technologies quickly.
|
||||||
|
@@ -11,12 +11,19 @@
|
|||||||
[](https://github.com/soybeanjs/soybean-admin)
|
[](https://github.com/soybeanjs/soybean-admin)
|
||||||
[](https://gitee.com/honghuangdc/soybean-admin)
|
[](https://gitee.com/honghuangdc/soybean-admin)
|
||||||
[](https://gitcode.com/soybeanjs/soybean-admin)
|
[](https://gitcode.com/soybeanjs/soybean-admin)
|
||||||
|
[](https://dartnode.com "Powered by DartNode - Free VPS for Open Source")
|
||||||
|
|
||||||
<a href="https://hellogithub.com/repository/1298f27d5fe54959a16cf9686516ddb3" target="_blank"><img src="https://abroad.hellogithub.com/v1/widgets/recommend.svg?rid=1298f27d5fe54959a16cf9686516ddb3&claim_uid=IiDXWmP4TEntjbV" alt="Featured|HelloGitHub" style="width: 250px; height: 54px;" width="250" height="54" /></a>
|
<a href="https://hellogithub.com/repository/1298f27d5fe54959a16cf9686516ddb3" target="_blank"><img src="https://abroad.hellogithub.com/v1/widgets/recommend.svg?rid=1298f27d5fe54959a16cf9686516ddb3&claim_uid=IiDXWmP4TEntjbV" alt="Featured|HelloGitHub" style="width: 250px; height: 54px;" width="250" height="54" /></a>
|
||||||
|
|
||||||
> [!NOTE]
|
> [!NOTE]
|
||||||
> 如果您觉得 `SoybeanAdmin`对您有所帮助,或者您喜欢我们的项目,请在 GitHub 上给我们一个 ⭐️。您的支持是我们持续改进和增加新功能的动力!感谢您的支持!
|
> 如果您觉得 `SoybeanAdmin`对您有所帮助,或者您喜欢我们的项目,请在 GitHub 上给我们一个 ⭐️。您的支持是我们持续改进和增加新功能的动力!感谢您的支持!
|
||||||
|
|
||||||
|
> [!NOTE]
|
||||||
|
> `SoybeanAdmin` 快速上手系列视频已在 [Bilibili](https://www.bilibili.com/video/BV1YKdRYXELC) 上线 [点击这里](https://www.bilibili.com/video/BV1YKdRYXELC) 前往查看
|
||||||
|
|
||||||
|
> [!WARNING]
|
||||||
|
> `SoybeanAdmin` 正在计划开发 `V2` 版本,详情见[计划清单](https://github.com/soybeanjs/soybean-admin/issues/767)
|
||||||
|
|
||||||
## 简介
|
## 简介
|
||||||
|
|
||||||
[`SoybeanAdmin`](https://github.com/soybeanjs/soybean-admin) 是一个清新优雅、高颜值且功能强大的后台管理模板,基于最新的前端技术栈,包括 Vue3, Vite6, TypeScript, Pinia 和 UnoCSS。它内置了丰富的主题配置和组件,代码规范严谨,实现了自动化的文件路由系统。此外,它还采用了基于 ApiFox 的在线Mock数据方案。`SoybeanAdmin` 为您提供了一站式的后台管理解决方案,无需额外配置,开箱即用。同样是一个快速学习前沿技术的最佳实践。
|
[`SoybeanAdmin`](https://github.com/soybeanjs/soybean-admin) 是一个清新优雅、高颜值且功能强大的后台管理模板,基于最新的前端技术栈,包括 Vue3, Vite6, TypeScript, Pinia 和 UnoCSS。它内置了丰富的主题配置和组件,代码规范严谨,实现了自动化的文件路由系统。此外,它还采用了基于 ApiFox 的在线Mock数据方案。`SoybeanAdmin` 为您提供了一站式的后台管理解决方案,无需额外配置,开箱即用。同样是一个快速学习前沿技术的最佳实践。
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
import { defineConfig } from '@soybeanjs/eslint-config';
|
import { defineConfig } from '@soybeanjs/eslint-config';
|
||||||
|
|
||||||
export default defineConfig(
|
export default defineConfig(
|
||||||
{ vue: true, unocss: true },
|
{ vue: true, unocss: true, ignores: ['src-tauri/target'] },
|
||||||
{
|
{
|
||||||
rules: {
|
rules: {
|
||||||
'vue/multi-word-component-names': [
|
'vue/multi-word-component-names': [
|
||||||
|
57
package.json
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "soybean-admin",
|
"name": "soybean-admin",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "1.3.13",
|
"version": "1.3.15",
|
||||||
"description": "A fresh and elegant admin template, based on Vue3、Vite6、TypeScript、NaiveUI and UnoCSS. 一个基于Vue3、Vite6、TypeScript、NaiveUI and UnoCSS的清新优雅的中后台模版。",
|
"description": "A fresh and elegant admin template, based on Vue3、Vite6、TypeScript、NaiveUI and UnoCSS. 一个基于Vue3、Vite6、TypeScript、NaiveUI and UnoCSS的清新优雅的中后台模版。",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Soybean",
|
"name": "Soybean",
|
||||||
@@ -32,17 +32,20 @@
|
|||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "vite build --mode prod",
|
"build": "vite build --mode prod",
|
||||||
|
"build:tauri": "pnpm tauri build",
|
||||||
"build:test": "vite build --mode test",
|
"build:test": "vite build --mode test",
|
||||||
"cleanup": "sa cleanup",
|
"cleanup": "sa cleanup",
|
||||||
"commit": "sa git-commit",
|
"commit": "sa git-commit",
|
||||||
"commit:zh": "sa git-commit -l=zh-cn",
|
"commit:zh": "sa git-commit -l=zh-cn",
|
||||||
"dev": "vite --mode test",
|
"dev": "vite --mode test",
|
||||||
"dev:prod": "vite --mode prod",
|
"dev:prod": "vite --mode prod",
|
||||||
|
"dev:tauri": "pnpm tauri dev",
|
||||||
"gen-route": "sa gen-route",
|
"gen-route": "sa gen-route",
|
||||||
"lint": "eslint . --fix",
|
"lint": "eslint . --fix",
|
||||||
"prepare": "simple-git-hooks",
|
"prepare": "simple-git-hooks",
|
||||||
"preview": "vite preview",
|
"preview": "vite preview",
|
||||||
"release": "sa release",
|
"release": "sa release",
|
||||||
|
"tauri-icon": "pnpm tauri icon ./public/logo.png",
|
||||||
"typecheck": "vue-tsc --noEmit --skipLibCheck",
|
"typecheck": "vue-tsc --noEmit --skipLibCheck",
|
||||||
"update-pkg": "sa update-pkg"
|
"update-pkg": "sa update-pkg"
|
||||||
},
|
},
|
||||||
@@ -54,52 +57,54 @@
|
|||||||
"@sa/hooks": "workspace:*",
|
"@sa/hooks": "workspace:*",
|
||||||
"@sa/materials": "workspace:*",
|
"@sa/materials": "workspace:*",
|
||||||
"@sa/utils": "workspace:*",
|
"@sa/utils": "workspace:*",
|
||||||
"@vueuse/core": "13.1.0",
|
"@tauri-apps/api": "2.5.0",
|
||||||
|
"@vueuse/core": "13.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",
|
||||||
"echarts": "5.6.0",
|
"echarts": "5.6.0",
|
||||||
"json5": "2.2.3",
|
"json5": "2.2.3",
|
||||||
"naive-ui": "2.41.0",
|
"naive-ui": "2.42.0",
|
||||||
"nprogress": "0.2.0",
|
"nprogress": "0.2.0",
|
||||||
"pinia": "3.0.2",
|
"pinia": "3.0.3",
|
||||||
"tailwind-merge": "3.2.0",
|
"tailwind-merge": "3.3.1",
|
||||||
"vue": "3.5.13",
|
"vue": "3.5.17",
|
||||||
"vue-draggable-plus": "0.6.0",
|
"vue-draggable-plus": "0.6.0",
|
||||||
"vue-i18n": "11.1.3",
|
"vue-i18n": "11.1.7",
|
||||||
"vue-router": "4.5.1"
|
"vue-router": "4.5.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@elegant-router/vue": "0.3.8",
|
"@elegant-router/vue": "0.3.8",
|
||||||
"@iconify/json": "2.2.337",
|
"@iconify/json": "2.2.352",
|
||||||
"@sa/scripts": "workspace:*",
|
"@sa/scripts": "workspace:*",
|
||||||
"@sa/uno-preset": "workspace:*",
|
"@sa/uno-preset": "workspace:*",
|
||||||
"@soybeanjs/eslint-config": "1.6.0",
|
"@soybeanjs/eslint-config": "1.6.1",
|
||||||
"@types/node": "22.15.17",
|
"@tauri-apps/cli": "2.5.0",
|
||||||
|
"@types/node": "24.0.3",
|
||||||
"@types/nprogress": "0.2.3",
|
"@types/nprogress": "0.2.3",
|
||||||
"@unocss/eslint-config": "66.1.1",
|
"@unocss/eslint-config": "66.2.3",
|
||||||
"@unocss/preset-icons": "66.1.1",
|
"@unocss/preset-icons": "66.2.3",
|
||||||
"@unocss/preset-uno": "66.1.1",
|
"@unocss/preset-uno": "66.2.3",
|
||||||
"@unocss/transformer-directives": "66.1.1",
|
"@unocss/transformer-directives": "66.2.3",
|
||||||
"@unocss/transformer-variant-group": "66.1.1",
|
"@unocss/transformer-variant-group": "66.2.3",
|
||||||
"@unocss/vite": "66.1.1",
|
"@unocss/vite": "66.2.3",
|
||||||
"@vitejs/plugin-vue": "5.2.4",
|
"@vitejs/plugin-vue": "6.0.0",
|
||||||
"@vitejs/plugin-vue-jsx": "4.1.2",
|
"@vitejs/plugin-vue-jsx": "5.0.0",
|
||||||
"consola": "3.4.2",
|
"consola": "3.4.2",
|
||||||
"eslint": "9.26.0",
|
"eslint": "9.29.0",
|
||||||
"eslint-plugin-vue": "10.1.0",
|
"eslint-plugin-vue": "10.2.0",
|
||||||
"kolorist": "1.8.0",
|
"kolorist": "1.8.0",
|
||||||
"sass": "1.88.0",
|
"sass": "1.89.2",
|
||||||
"simple-git-hooks": "2.13.0",
|
"simple-git-hooks": "2.13.0",
|
||||||
"tsx": "4.19.4",
|
"tsx": "4.20.3",
|
||||||
"typescript": "5.8.3",
|
"typescript": "5.8.3",
|
||||||
"unplugin-icons": "22.1.0",
|
"unplugin-icons": "22.1.0",
|
||||||
"unplugin-vue-components": "28.5.0",
|
"unplugin-vue-components": "28.7.0",
|
||||||
"vite": "6.3.5",
|
"vite": "7.0.0",
|
||||||
"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.7.6",
|
"vite-plugin-vue-devtools": "7.7.7",
|
||||||
"vue-eslint-parser": "10.1.3",
|
"vue-eslint-parser": "10.1.4",
|
||||||
"vue-tsc": "2.2.10"
|
"vue-tsc": "2.2.10"
|
||||||
},
|
},
|
||||||
"simple-git-hooks": {
|
"simple-git-hooks": {
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@sa/alova",
|
"name": "@sa/alova",
|
||||||
"version": "1.3.13",
|
"version": "1.3.15",
|
||||||
"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.14",
|
"@alova/mock": "2.0.17",
|
||||||
"@sa/utils": "workspace:*",
|
"@sa/utils": "workspace:*",
|
||||||
"alova": "3.2.10"
|
"alova": "3.3.3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@sa/axios",
|
"name": "@sa/axios",
|
||||||
"version": "1.3.13",
|
"version": "1.3.15",
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./src/index.ts"
|
".": "./src/index.ts"
|
||||||
},
|
},
|
||||||
@@ -11,11 +11,11 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@sa/utils": "workspace:*",
|
"@sa/utils": "workspace:*",
|
||||||
"axios": "1.9.0",
|
"axios": "1.10.0",
|
||||||
"axios-retry": "4.5.0",
|
"axios-retry": "4.5.0",
|
||||||
"qs": "6.14.0"
|
"qs": "6.14.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/qs": "6.9.18"
|
"@types/qs": "6.14.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@sa/color",
|
"name": "@sa/color",
|
||||||
"version": "1.3.13",
|
"version": "1.3.15",
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./src/index.ts"
|
".": "./src/index.ts"
|
||||||
},
|
},
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@sa/hooks",
|
"name": "@sa/hooks",
|
||||||
"version": "1.3.13",
|
"version": "1.3.15",
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./src/index.ts"
|
".": "./src/index.ts"
|
||||||
},
|
},
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@sa/materials",
|
"name": "@sa/materials",
|
||||||
"version": "1.3.13",
|
"version": "1.3.15",
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./src/index.ts"
|
".": "./src/index.ts"
|
||||||
},
|
},
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@sa/fetch",
|
"name": "@sa/fetch",
|
||||||
"version": "1.3.13",
|
"version": "1.3.15",
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./src/index.ts"
|
".": "./src/index.ts"
|
||||||
},
|
},
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@sa/scripts",
|
"name": "@sa/scripts",
|
||||||
"version": "1.3.13",
|
"version": "1.3.15",
|
||||||
"bin": {
|
"bin": {
|
||||||
"sa": "./bin.ts"
|
"sa": "./bin.ts"
|
||||||
},
|
},
|
||||||
@@ -14,12 +14,12 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@soybeanjs/changelog": "0.3.24",
|
"@soybeanjs/changelog": "0.3.24",
|
||||||
"bumpp": "10.1.0",
|
"bumpp": "10.2.0",
|
||||||
"c12": "3.0.3",
|
"c12": "3.0.4",
|
||||||
"cac": "6.7.14",
|
"cac": "6.7.14",
|
||||||
"consola": "3.4.2",
|
"consola": "3.4.2",
|
||||||
"enquirer": "2.4.1",
|
"enquirer": "2.4.1",
|
||||||
"execa": "9.5.3",
|
"execa": "9.6.0",
|
||||||
"kolorist": "1.8.0",
|
"kolorist": "1.8.0",
|
||||||
"npm-check-updates": "18.0.1",
|
"npm-check-updates": "18.0.1",
|
||||||
"rimraf": "6.0.1"
|
"rimraf": "6.0.1"
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@sa/uno-preset",
|
"name": "@sa/uno-preset",
|
||||||
"version": "1.3.13",
|
"version": "1.3.15",
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./src/index.ts"
|
".": "./src/index.ts"
|
||||||
},
|
},
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@sa/utils",
|
"name": "@sa/utils",
|
||||||
"version": "1.3.13",
|
"version": "1.3.15",
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./src/index.ts"
|
".": "./src/index.ts"
|
||||||
},
|
},
|
||||||
|
3247
pnpm-lock.yaml
generated
BIN
public/logo.png
Normal file
After Width: | Height: | Size: 20 KiB |
3
src-tauri/.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
# Generated by Cargo
|
||||||
|
# will have compiled files and executables
|
||||||
|
/target/
|
4580
src-tauri/Cargo.lock
generated
Normal file
26
src-tauri/Cargo.toml
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
[package]
|
||||||
|
name = "app"
|
||||||
|
version = "0.1.0"
|
||||||
|
description = "A Tauri App"
|
||||||
|
authors = ["you"]
|
||||||
|
license = ""
|
||||||
|
repository = ""
|
||||||
|
default-run = "app"
|
||||||
|
edition = "2021"
|
||||||
|
rust-version = "1.60"
|
||||||
|
|
||||||
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
|
[build-dependencies]
|
||||||
|
tauri-build = { version = "2", features = [] }
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
serde_json = "1.0"
|
||||||
|
serde = { version = "1.0", features = ["derive"] }
|
||||||
|
tauri = { version = "2", features = [] }
|
||||||
|
|
||||||
|
[features]
|
||||||
|
# this feature is used for production builds or when `devPath` points to the filesystem and the built-in dev server is disabled.
|
||||||
|
# If you use cargo directly instead of tauri's cli you can use this feature flag to switch between tauri's `dev` and `build` modes.
|
||||||
|
# DO NOT REMOVE!!
|
||||||
|
custom-protocol = [ "tauri/custom-protocol" ]
|
3
src-tauri/build.rs
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
fn main() {
|
||||||
|
tauri_build::build()
|
||||||
|
}
|
7
src-tauri/capabilities/migrated.json
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"identifier": "migrated",
|
||||||
|
"description": "permissions that were migrated from v1",
|
||||||
|
"local": true,
|
||||||
|
"windows": ["main"],
|
||||||
|
"permissions": ["core:default"]
|
||||||
|
}
|
1676
src-tauri/gen/schemas/acl-manifests.json
Normal file
9
src-tauri/gen/schemas/capabilities.json
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"migrated": {
|
||||||
|
"identifier": "migrated",
|
||||||
|
"description": "permissions that were migrated from v1",
|
||||||
|
"local": true,
|
||||||
|
"windows": ["main"],
|
||||||
|
"permissions": ["core:default"]
|
||||||
|
}
|
||||||
|
}
|
1778
src-tauri/gen/schemas/desktop-schema.json
Normal file
1778
src-tauri/gen/schemas/macOS-schema.json
Normal file
BIN
src-tauri/icons/128x128.png
Normal file
After Width: | Height: | Size: 8.8 KiB |
BIN
src-tauri/icons/128x128@2x.png
Normal file
After Width: | Height: | Size: 19 KiB |
BIN
src-tauri/icons/32x32.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
src-tauri/icons/Square107x107Logo.png
Normal file
After Width: | Height: | Size: 7.4 KiB |
BIN
src-tauri/icons/Square142x142Logo.png
Normal file
After Width: | Height: | Size: 9.9 KiB |
BIN
src-tauri/icons/Square150x150Logo.png
Normal file
After Width: | Height: | Size: 10 KiB |
BIN
src-tauri/icons/Square284x284Logo.png
Normal file
After Width: | Height: | Size: 21 KiB |
BIN
src-tauri/icons/Square30x30Logo.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
src-tauri/icons/Square310x310Logo.png
Normal file
After Width: | Height: | Size: 23 KiB |
BIN
src-tauri/icons/Square44x44Logo.png
Normal file
After Width: | Height: | Size: 2.6 KiB |
BIN
src-tauri/icons/Square71x71Logo.png
Normal file
After Width: | Height: | Size: 4.7 KiB |
BIN
src-tauri/icons/Square89x89Logo.png
Normal file
After Width: | Height: | Size: 6.1 KiB |
BIN
src-tauri/icons/StoreLogo.png
Normal file
After Width: | Height: | Size: 3.0 KiB |
BIN
src-tauri/icons/icon.icns
Normal file
BIN
src-tauri/icons/icon.ico
Normal file
After Width: | Height: | Size: 31 KiB |
BIN
src-tauri/icons/icon.png
Normal file
After Width: | Height: | Size: 39 KiB |
8
src-tauri/src/main.rs
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
// Prevents additional console window on Windows in release, DO NOT REMOVE!!
|
||||||
|
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
tauri::Builder::default()
|
||||||
|
.run(tauri::generate_context!())
|
||||||
|
.expect("error while running tauri application");
|
||||||
|
}
|
57
src-tauri/tauri.conf.json
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
{
|
||||||
|
"$schema": "../node_modules/@tauri-apps/cli/config.schema.json",
|
||||||
|
"build": {
|
||||||
|
"beforeBuildCommand": "npm run build",
|
||||||
|
"beforeDevCommand": "npm run dev",
|
||||||
|
"frontendDist": "../dist",
|
||||||
|
"devUrl": "http://localhost:9527"
|
||||||
|
},
|
||||||
|
"bundle": {
|
||||||
|
"active": true,
|
||||||
|
"category": "DeveloperTool",
|
||||||
|
"copyright": "",
|
||||||
|
"targets": "all",
|
||||||
|
"externalBin": [],
|
||||||
|
"icon": ["icons/32x32.png", "icons/128x128.png", "icons/128x128@2x.png", "icons/icon.icns", "icons/icon.ico"],
|
||||||
|
"windows": {
|
||||||
|
"certificateThumbprint": null,
|
||||||
|
"digestAlgorithm": "sha256",
|
||||||
|
"timestampUrl": ""
|
||||||
|
},
|
||||||
|
"longDescription": "",
|
||||||
|
"macOS": {
|
||||||
|
"entitlements": null,
|
||||||
|
"exceptionDomain": "",
|
||||||
|
"frameworks": [],
|
||||||
|
"providerShortName": null,
|
||||||
|
"signingIdentity": null
|
||||||
|
},
|
||||||
|
"resources": [],
|
||||||
|
"shortDescription": "",
|
||||||
|
"linux": {
|
||||||
|
"deb": {
|
||||||
|
"depends": []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"productName": "soybean-admin",
|
||||||
|
"mainBinaryName": "soybean-admin",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"identifier": "cn.soybeanjs.admin",
|
||||||
|
"plugins": {},
|
||||||
|
"app": {
|
||||||
|
"windows": [
|
||||||
|
{
|
||||||
|
"fullscreen": false,
|
||||||
|
"height": 768,
|
||||||
|
"resizable": true,
|
||||||
|
"title": "SoybeanAdmin",
|
||||||
|
"width": 1366,
|
||||||
|
"useHttpsScheme": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"security": {
|
||||||
|
"csp": null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@@ -4,6 +4,7 @@ import { NConfigProvider, darkTheme } from 'naive-ui';
|
|||||||
import type { WatermarkProps } from 'naive-ui';
|
import type { WatermarkProps } from 'naive-ui';
|
||||||
import { useAppStore } from './store/modules/app';
|
import { useAppStore } from './store/modules/app';
|
||||||
import { useThemeStore } from './store/modules/theme';
|
import { useThemeStore } from './store/modules/theme';
|
||||||
|
import { useAuthStore } from './store/modules/auth';
|
||||||
import { naiveDateLocales, naiveLocales } from './locales/naive';
|
import { naiveDateLocales, naiveLocales } from './locales/naive';
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
@@ -12,6 +13,7 @@ defineOptions({
|
|||||||
|
|
||||||
const appStore = useAppStore();
|
const appStore = useAppStore();
|
||||||
const themeStore = useThemeStore();
|
const themeStore = useThemeStore();
|
||||||
|
const authStore = useAuthStore();
|
||||||
|
|
||||||
const naiveDarkTheme = computed(() => (themeStore.darkMode ? darkTheme : undefined));
|
const naiveDarkTheme = computed(() => (themeStore.darkMode ? darkTheme : undefined));
|
||||||
|
|
||||||
@@ -24,8 +26,13 @@ const naiveDateLocale = computed(() => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const watermarkProps = computed<WatermarkProps>(() => {
|
const watermarkProps = computed<WatermarkProps>(() => {
|
||||||
|
const content =
|
||||||
|
themeStore.watermark.enableUserName && authStore.userInfo.userName
|
||||||
|
? authStore.userInfo.userName
|
||||||
|
: themeStore.watermark.text;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
content: themeStore.watermark.text,
|
content,
|
||||||
cross: true,
|
cross: true,
|
||||||
fullscreen: true,
|
fullscreen: true,
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
|
@@ -31,13 +31,25 @@ const tooltipContent = computed(() => {
|
|||||||
return $t('icon.lang');
|
return $t('icon.lang');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/** Add bottom margin to all options except the last one for proper visual separation */
|
||||||
|
const dropdownOptions = computed(() => {
|
||||||
|
const lastIndex = props.langOptions.length - 1;
|
||||||
|
|
||||||
|
return props.langOptions.map((option, index) => ({
|
||||||
|
...option,
|
||||||
|
props: {
|
||||||
|
class: index < lastIndex ? 'mb-1' : undefined
|
||||||
|
}
|
||||||
|
}));
|
||||||
|
});
|
||||||
|
|
||||||
function changeLang(lang: App.I18n.LangType) {
|
function changeLang(lang: App.I18n.LangType) {
|
||||||
emit('changeLang', lang);
|
emit('changeLang', lang);
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<NDropdown :value="lang" :options="langOptions" trigger="hover" @select="changeLang">
|
<NDropdown :value="lang" :options="dropdownOptions" trigger="hover" @select="changeLang">
|
||||||
<div>
|
<div>
|
||||||
<ButtonIcon :tooltip-content="tooltipContent" tooltip-placement="left">
|
<ButtonIcon :tooltip-content="tooltipContent" tooltip-placement="left">
|
||||||
<SvgIcon icon="heroicons:language" />
|
<SvgIcon icon="heroicons:language" />
|
||||||
|
@@ -38,7 +38,7 @@ const { isFullscreen, toggle } = useFullscreen();
|
|||||||
<GlobalBreadcrumb v-if="!appStore.isMobile" class="ml-12px" />
|
<GlobalBreadcrumb v-if="!appStore.isMobile" class="ml-12px" />
|
||||||
</div>
|
</div>
|
||||||
<div class="h-full flex-y-center justify-end">
|
<div class="h-full flex-y-center justify-end">
|
||||||
<GlobalSearch />
|
<GlobalSearch v-if="themeStore.header.globalSearch.visible" />
|
||||||
<FullScreen v-if="!appStore.isMobile" :full="isFullscreen" @click="toggle" />
|
<FullScreen v-if="!appStore.isMobile" :full="isFullscreen" @click="toggle" />
|
||||||
<LangSwitch
|
<LangSwitch
|
||||||
v-if="themeStore.header.multilingual.visible"
|
v-if="themeStore.header.multilingual.visible"
|
||||||
|
@@ -117,7 +117,10 @@ const isWrapperScrollMode = computed(() => themeStore.layout.scrollMode === 'wra
|
|||||||
<SettingItem key="8" :label="$t('theme.watermark.visible')">
|
<SettingItem key="8" :label="$t('theme.watermark.visible')">
|
||||||
<NSwitch v-model:value="themeStore.watermark.visible" />
|
<NSwitch v-model:value="themeStore.watermark.visible" />
|
||||||
</SettingItem>
|
</SettingItem>
|
||||||
<SettingItem v-if="themeStore.watermark.visible" key="8-1" :label="$t('theme.watermark.text')">
|
<SettingItem v-if="themeStore.watermark.visible" key="8-1" :label="$t('theme.watermark.enableUserName')">
|
||||||
|
<NSwitch v-model:value="themeStore.watermark.enableUserName" />
|
||||||
|
</SettingItem>
|
||||||
|
<SettingItem v-if="themeStore.watermark.visible" key="8-2" :label="$t('theme.watermark.text')">
|
||||||
<NInput
|
<NInput
|
||||||
v-model:value="themeStore.watermark.text"
|
v-model:value="themeStore.watermark.text"
|
||||||
autosize
|
autosize
|
||||||
@@ -130,6 +133,9 @@ const isWrapperScrollMode = computed(() => themeStore.layout.scrollMode === 'wra
|
|||||||
<SettingItem key="9" :label="$t('theme.header.multilingual.visible')">
|
<SettingItem key="9" :label="$t('theme.header.multilingual.visible')">
|
||||||
<NSwitch v-model:value="themeStore.header.multilingual.visible" />
|
<NSwitch v-model:value="themeStore.header.multilingual.visible" />
|
||||||
</SettingItem>
|
</SettingItem>
|
||||||
|
<SettingItem key="10" :label="$t('theme.header.globalSearch.visible')">
|
||||||
|
<NSwitch v-model:value="themeStore.header.globalSearch.visible" />
|
||||||
|
</SettingItem>
|
||||||
</TransitionGroup>
|
</TransitionGroup>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@@ -112,6 +112,9 @@ const local: App.I18n.Schema = {
|
|||||||
},
|
},
|
||||||
multilingual: {
|
multilingual: {
|
||||||
visible: 'Display multilingual button'
|
visible: 'Display multilingual button'
|
||||||
|
},
|
||||||
|
globalSearch: {
|
||||||
|
visible: 'Display GlobalSearch button'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
tab: {
|
tab: {
|
||||||
@@ -140,7 +143,8 @@ const local: App.I18n.Schema = {
|
|||||||
},
|
},
|
||||||
watermark: {
|
watermark: {
|
||||||
visible: 'Watermark Full Screen Visible',
|
visible: 'Watermark Full Screen Visible',
|
||||||
text: 'Watermark Text'
|
text: 'Watermark Text',
|
||||||
|
enableUserName: 'Enable User Name Watermark'
|
||||||
},
|
},
|
||||||
themeDrawerTitle: 'Theme Configuration',
|
themeDrawerTitle: 'Theme Configuration',
|
||||||
pageFunTitle: 'Page Function',
|
pageFunTitle: 'Page Function',
|
||||||
|
@@ -112,6 +112,9 @@ const local: App.I18n.Schema = {
|
|||||||
},
|
},
|
||||||
multilingual: {
|
multilingual: {
|
||||||
visible: '显示多语言按钮'
|
visible: '显示多语言按钮'
|
||||||
|
},
|
||||||
|
globalSearch: {
|
||||||
|
visible: '显示全局搜索按钮'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
tab: {
|
tab: {
|
||||||
@@ -140,7 +143,8 @@ const local: App.I18n.Schema = {
|
|||||||
},
|
},
|
||||||
watermark: {
|
watermark: {
|
||||||
visible: '显示全屏水印',
|
visible: '显示全屏水印',
|
||||||
text: '水印文本'
|
text: '水印文本',
|
||||||
|
enableUserName: '启用用户名水印'
|
||||||
},
|
},
|
||||||
themeDrawerTitle: '主题配置',
|
themeDrawerTitle: '主题配置',
|
||||||
pageFunTitle: '页面功能',
|
pageFunTitle: '页面功能',
|
||||||
|
@@ -25,8 +25,8 @@ export function setupAppVersionNotification() {
|
|||||||
|
|
||||||
const buildTime = await getHtmlBuildTime();
|
const buildTime = await getHtmlBuildTime();
|
||||||
|
|
||||||
// If build time hasn't changed, no update is needed
|
// If failed to get build time or build time hasn't changed, no update is needed.
|
||||||
if (buildTime === BUILD_TIME) {
|
if (!buildTime || buildTime === BUILD_TIME) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -88,16 +88,21 @@ export function setupAppVersionNotification() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getHtmlBuildTime() {
|
async function getHtmlBuildTime(): Promise<string | null> {
|
||||||
const baseUrl = import.meta.env.VITE_BASE_URL || '/';
|
const baseUrl = import.meta.env.VITE_BASE_URL || '/';
|
||||||
|
|
||||||
const res = await fetch(`${baseUrl}index.html?time=${Date.now()}`);
|
try {
|
||||||
|
const res = await fetch(`${baseUrl}index.html?time=${Date.now()}`);
|
||||||
|
|
||||||
const html = await res.text();
|
if (!res.ok) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
const match = html.match(/<meta name="buildTime" content="(.*)">/);
|
const html = await res.text();
|
||||||
|
const match = html.match(/<meta name="buildTime" content="(.*)">/);
|
||||||
const buildTime = match?.[1] || '';
|
return match?.[1] || null;
|
||||||
|
} catch (error) {
|
||||||
return buildTime;
|
window.console.error('getHtmlBuildTime error:', error);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -13,6 +13,7 @@ import { clearAuthStorage, getToken } from './shared';
|
|||||||
|
|
||||||
export const useAuthStore = defineStore(SetupStoreId.Auth, () => {
|
export const useAuthStore = defineStore(SetupStoreId.Auth, () => {
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
const authStore = useAuthStore();
|
||||||
const routeStore = useRouteStore();
|
const routeStore = useRouteStore();
|
||||||
const tabStore = useTabStore();
|
const tabStore = useTabStore();
|
||||||
const { toLogin, redirectFromLogin } = useRouterPush(false);
|
const { toLogin, redirectFromLogin } = useRouterPush(false);
|
||||||
@@ -39,8 +40,6 @@ export const useAuthStore = defineStore(SetupStoreId.Auth, () => {
|
|||||||
|
|
||||||
/** Reset auth store */
|
/** Reset auth store */
|
||||||
async function resetStore() {
|
async function resetStore() {
|
||||||
const authStore = useAuthStore();
|
|
||||||
|
|
||||||
recordUserId();
|
recordUserId();
|
||||||
|
|
||||||
clearAuthStorage();
|
clearAuthStorage();
|
||||||
|
@@ -100,7 +100,9 @@ export const useTabStore = defineStore(SetupStoreId.Tab, () => {
|
|||||||
|
|
||||||
const removedTabRouteKey = tabs.value[removeTabIndex].routeKey;
|
const removedTabRouteKey = tabs.value[removeTabIndex].routeKey;
|
||||||
const isRemoveActiveTab = activeTabId.value === tabId;
|
const isRemoveActiveTab = activeTabId.value === tabId;
|
||||||
const nextTab = tabs.value[removeTabIndex + 1] || homeTab.value;
|
|
||||||
|
// if remove the last tab, then switch to the second last tab
|
||||||
|
const nextTab = tabs.value[removeTabIndex + 1] || tabs.value[removeTabIndex - 1] || homeTab.value;
|
||||||
|
|
||||||
// remove tab
|
// remove tab
|
||||||
tabs.value.splice(removeTabIndex, 1);
|
tabs.value.splice(removeTabIndex, 1);
|
||||||
|
@@ -10,4 +10,5 @@ body,
|
|||||||
|
|
||||||
html {
|
html {
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
|
color: rgb(var(--base-text-color));
|
||||||
}
|
}
|
||||||
|
@@ -30,6 +30,9 @@ export const themeSettings: App.Theme.ThemeSetting = {
|
|||||||
},
|
},
|
||||||
multilingual: {
|
multilingual: {
|
||||||
visible: true
|
visible: true
|
||||||
|
},
|
||||||
|
globalSearch: {
|
||||||
|
visible: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
tab: {
|
tab: {
|
||||||
@@ -55,7 +58,8 @@ export const themeSettings: App.Theme.ThemeSetting = {
|
|||||||
},
|
},
|
||||||
watermark: {
|
watermark: {
|
||||||
visible: false,
|
visible: false,
|
||||||
text: 'SoybeanAdmin'
|
text: 'SoybeanAdmin',
|
||||||
|
enableUserName: false
|
||||||
},
|
},
|
||||||
tokens: {
|
tokens: {
|
||||||
light: {
|
light: {
|
||||||
|
10
src/typings/app.d.ts
vendored
@@ -58,6 +58,10 @@ declare namespace App {
|
|||||||
/** Whether to show the multilingual */
|
/** Whether to show the multilingual */
|
||||||
visible: boolean;
|
visible: boolean;
|
||||||
};
|
};
|
||||||
|
globalSearch: {
|
||||||
|
/** Whether to show the GlobalSearch */
|
||||||
|
visible: boolean;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
/** Tab */
|
/** Tab */
|
||||||
tab: {
|
tab: {
|
||||||
@@ -108,6 +112,8 @@ declare namespace App {
|
|||||||
visible: boolean;
|
visible: boolean;
|
||||||
/** Watermark text */
|
/** Watermark text */
|
||||||
text: string;
|
text: string;
|
||||||
|
/** Whether to use user name as watermark text */
|
||||||
|
enableUserName: boolean;
|
||||||
};
|
};
|
||||||
/** define some theme settings tokens, will transform to css variables */
|
/** define some theme settings tokens, will transform to css variables */
|
||||||
tokens: {
|
tokens: {
|
||||||
@@ -377,6 +383,9 @@ declare namespace App {
|
|||||||
multilingual: {
|
multilingual: {
|
||||||
visible: string;
|
visible: string;
|
||||||
};
|
};
|
||||||
|
globalSearch: {
|
||||||
|
visible: string;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
tab: {
|
tab: {
|
||||||
visible: string;
|
visible: string;
|
||||||
@@ -401,6 +410,7 @@ declare namespace App {
|
|||||||
watermark: {
|
watermark: {
|
||||||
visible: string;
|
visible: string;
|
||||||
text: string;
|
text: string;
|
||||||
|
enableUserName: string;
|
||||||
};
|
};
|
||||||
themeDrawerTitle: string;
|
themeDrawerTitle: string;
|
||||||
pageFunTitle: string;
|
pageFunTitle: string;
|
||||||
|
2
src/typings/vite-env.d.ts
vendored
@@ -25,7 +25,7 @@ declare namespace Env {
|
|||||||
*
|
*
|
||||||
* This prefix is start with the icon prefix
|
* This prefix is start with the icon prefix
|
||||||
*/
|
*/
|
||||||
readonly VITE_ICON_LOCAL_PREFIX: 'local-icon';
|
readonly VITE_ICON_LOCAL_PREFIX: 'icon-local';
|
||||||
/** backend service base url */
|
/** backend service base url */
|
||||||
readonly VITE_SERVICE_BASE_URL: string;
|
readonly VITE_SERVICE_BASE_URL: string;
|
||||||
/**
|
/**
|
||||||
|
@@ -1,19 +1,9 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { onActivated, onMounted } from 'vue';
|
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
url: string;
|
url: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
defineProps<Props>();
|
defineProps<Props>();
|
||||||
|
|
||||||
onMounted(() => {
|
|
||||||
console.log('mounted');
|
|
||||||
});
|
|
||||||
|
|
||||||
onActivated(() => {
|
|
||||||
console.log('activated');
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
"lib": ["DOM", "ESNext"],
|
"lib": ["DOM", "ESNext"],
|
||||||
"baseUrl": ".",
|
"baseUrl": ".",
|
||||||
"module": "ESNext",
|
"module": "ESNext",
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "bundler",
|
||||||
"paths": {
|
"paths": {
|
||||||
"@/*": ["./src/*"],
|
"@/*": ["./src/*"],
|
||||||
"~/*": ["./*"]
|
"~/*": ["./*"]
|
||||||
|