From 3d1ff732282b8b36f48ff3374c0eb6674db5e7f0 Mon Sep 17 00:00:00 2001 From: xlsea Date: Fri, 30 May 2025 18:08:27 +0800 Subject: [PATCH 01/34] =?UTF-8?q?docs:=20=E6=96=B0=E5=A2=9E=E9=83=A8?= =?UTF-8?q?=E7=BD=B2=E5=B7=A5=E4=BD=9C=E6=B5=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitee/workflows/linter.yml | 30 -------------------------- .gitee/workflows/release.yml | 25 ---------------------- .github/workflows/deploy.yml | 41 ++++++++++++++++++++++++++++++++++++ .github/workflows/linter.yml | 2 +- 4 files changed, 42 insertions(+), 56 deletions(-) delete mode 100644 .gitee/workflows/linter.yml delete mode 100644 .gitee/workflows/release.yml create mode 100644 .github/workflows/deploy.yml diff --git a/.gitee/workflows/linter.yml b/.gitee/workflows/linter.yml deleted file mode 100644 index 450ec865..00000000 --- a/.gitee/workflows/linter.yml +++ /dev/null @@ -1,30 +0,0 @@ ---- -name: Lint Code - -permissions: - contents: write - -on: - pull_request: - branches: [main] - -jobs: - lint: - name: Lint All Code - runs-on: ubuntu-latest - - steps: - - name: Checkout Code - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Lint Code Base - uses: github/super-linter@v4 - env: - VALIDATE_ALL_CODEBASE: false - DEFAULT_BRANCH: main - # To change branch master or main - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - FILTER_REGEX_EXCLUDE: (docs|.github) - VALIDATE_MARKDOWN: false diff --git a/.gitee/workflows/release.yml b/.gitee/workflows/release.yml deleted file mode 100644 index 0bf7c92d..00000000 --- a/.gitee/workflows/release.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: Release - -permissions: - contents: write - -on: - push: - tags: - - "v*" - -jobs: - release: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - uses: actions/setup-node@v3 - with: - node-version: 18.x - - - run: npx githublogen - env: - GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 00000000..6077ef89 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,41 @@ +name: Build and Deploy + +on: + push: + branches: [ "master" ] + +jobs: + build-and-deploy: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Install pnpm + uses: pnpm/action-setup@v4 + with: + version: 10.x + run_install: false + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: 20.x + cache: 'pnpm' + + - name: Install dependencies + run: pnpm install + + - name: Build project + run: pnpm build + + - name: Upload via SCP + uses: appleboy/scp-action@v0.1.4 + with: + host: ${{ secrets.SSH_HOST }} + username: ${{ secrets.SSH_USERNAME }} + key: ${{ secrets.SSH_PRIVATE_KEY }} + port: ${{ secrets.SSH_PORT }} + source: "dist/*" + target: ${{ secrets.TARGET_PATH }} diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 450ec865..3ee2a874 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -6,7 +6,7 @@ permissions: on: pull_request: - branches: [main] + branches: [master] jobs: lint: From 75455b006c4b2a9ec7d5ba2ecefaf450691be617 Mon Sep 17 00:00:00 2001 From: t8y2 <1156263951@qq.com> Date: Thu, 29 May 2025 11:09:12 +0800 Subject: [PATCH 02/34] feat(theme): global search button toggle MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在主题设置中添加全局搜索按钮的显示控制选项 - 更新多语言文件,添加全局搜索按钮显示控制的翻译 - 修改全局头部组件,根据主题设置决定是否显示全局搜索按钮 - 在主题抽屉中添加全局搜索按钮显示控制的开关 --- src/layouts/modules/global-header/index.vue | 2 +- src/layouts/modules/theme-drawer/modules/page-fun.vue | 3 +++ src/locales/langs/en-us.ts | 3 +++ src/locales/langs/zh-cn.ts | 3 +++ src/theme/settings.ts | 3 +++ src/typings/app.d.ts | 7 +++++++ 6 files changed, 20 insertions(+), 1 deletion(-) diff --git a/src/layouts/modules/global-header/index.vue b/src/layouts/modules/global-header/index.vue index 592048db..d1e680a7 100644 --- a/src/layouts/modules/global-header/index.vue +++ b/src/layouts/modules/global-header/index.vue @@ -38,7 +38,7 @@ const { isFullscreen, toggle } = useFullscreen();
- + themeStore.layout.scrollMode === 'wra + + + diff --git a/src/locales/langs/en-us.ts b/src/locales/langs/en-us.ts index c3ae71c7..ef8baf32 100644 --- a/src/locales/langs/en-us.ts +++ b/src/locales/langs/en-us.ts @@ -112,6 +112,9 @@ const local: App.I18n.Schema = { }, multilingual: { visible: 'Display multilingual button' + }, + globalSearch: { + visible: 'Display GlobalSearch button' } }, tab: { diff --git a/src/locales/langs/zh-cn.ts b/src/locales/langs/zh-cn.ts index 32c14ceb..c21d7a63 100644 --- a/src/locales/langs/zh-cn.ts +++ b/src/locales/langs/zh-cn.ts @@ -112,6 +112,9 @@ const local: App.I18n.Schema = { }, multilingual: { visible: '显示多语言按钮' + }, + globalSearch: { + visible: '显示全局搜索按钮' } }, tab: { diff --git a/src/theme/settings.ts b/src/theme/settings.ts index 4cfa185f..63c2cb25 100644 --- a/src/theme/settings.ts +++ b/src/theme/settings.ts @@ -30,6 +30,9 @@ export const themeSettings: App.Theme.ThemeSetting = { }, multilingual: { visible: true + }, + globalSearch: { + visible: true } }, tab: { diff --git a/src/typings/app.d.ts b/src/typings/app.d.ts index 73cd76f1..7f9c30c2 100644 --- a/src/typings/app.d.ts +++ b/src/typings/app.d.ts @@ -58,6 +58,10 @@ declare namespace App { /** Whether to show the multilingual */ visible: boolean; }; + globalSearch: { + /** Whether to show the GlobalSearch */ + visible: boolean; + }; }; /** Tab */ tab: { @@ -377,6 +381,9 @@ declare namespace App { multilingual: { visible: string; }; + globalSearch: { + visible: string; + }; }; tab: { visible: string; From 222187d3b036ead467e5f18f2829d43476e8e99a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=81=95=E7=91=9E=E7=8E=9B=E7=9A=84=E7=9A=87=E5=B8=9D?= <2075125282@qq.com> Date: Sat, 31 May 2025 02:21:40 +0800 Subject: [PATCH 03/34] optimize(hooks): update detection function to cover the exceptions that occur when the request fails. --- src/plugins/app.ts | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/src/plugins/app.ts b/src/plugins/app.ts index 1a0d8999..4943341f 100644 --- a/src/plugins/app.ts +++ b/src/plugins/app.ts @@ -25,8 +25,8 @@ export function setupAppVersionNotification() { const buildTime = await getHtmlBuildTime(); - // If build time hasn't changed, no update is needed - if (buildTime === BUILD_TIME) { + // If failed to get build time or build time hasn't changed, no update is needed. + if (!buildTime || buildTime === BUILD_TIME) { return; } @@ -88,16 +88,22 @@ export function setupAppVersionNotification() { } } -async function getHtmlBuildTime() { +async function getHtmlBuildTime(): Promise { 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) { + console.error('getHtmlBuildTime error:', res.status, res.statusText); + return null; + } - const match = html.match(//); - - const buildTime = match?.[1] || ''; - - return buildTime; + const html = await res.text(); + const match = html.match(//); + return match?.[1] || null; + } catch (error) { + console.error('getHtmlBuildTime error:', error); + return null; + } } From 86c1466229738ceb42fdde5e5f12ca91481e2917 Mon Sep 17 00:00:00 2001 From: xlsea Date: Tue, 3 Jun 2025 11:37:01 +0800 Subject: [PATCH 04/34] =?UTF-8?q?docs:=20=E6=96=B0=E5=A2=9E=E9=83=A8?= =?UTF-8?q?=E7=BD=B2=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .drone.yml | 73 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 3 ++- 2 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 .drone.yml diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 00000000..786f8d98 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,73 @@ +kind: pipeline +type: docker +name: Build and Deploy + +clone: + depth: 10 + +volumes: + - name: go_cache + host: + path: /data/drone_cache/go_cache + +steps: + - name: restore-cache + image: drillster/drone-volume-cache + volumes: + - name: go_cache + path: /cache + settings: + restore: true + mount: + - ./.npm-cache + - ./node_modules + + - name: build + image: node:alpine + pull: if-not-exists + commands: + - export NODE_OPTIONS=--max_old_space_size=6144 + - echo ${DRONE_BRANCH} + - echo ${DRONE_TAG} + - echo ${DRONE_COMMIT} + - echo ${DRONE_COMMIT:0-7} + - npm config set registry https://registry.npmmirror.com + - npm install -g pnpm + - pnpm config set registry https://registry.npmmirror.com + - pnpm i + - pnpm build + + - name: rebuild-cache + image: drillster/drone-volume-cache + volumes: + - name: go_cache + path: /cache + settings: + rebuild: true + mount: + - ./.npm-cache + - ./node_modules + + - name: scp files + image: appleboy/drone-scp + pull: if-not-exists + settings: + host: + from_secret: HOST + username: + from_secret: USERNAME + password: + from_secret: PASSWORD + port: + from_secret: PORT + target: + from_secret: TARGET_PATH + source: dist/* + overwrite: true + rm: true + +trigger: + branch: + - master + event: + - push diff --git a/README.md b/README.md index eff06374..05152803 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,8 @@

一个基于 RuoYi-Vue-Plus 的后端能力和 Soybean Admin 前端特性的现代化多租户管理系统

- Gitee + Gitee + Github vue typescript vite From 94a578a087a6d7c59df7b76540a153b092d20802 Mon Sep 17 00:00:00 2001 From: AN <1983933789@qq.com> Date: Wed, 4 Jun 2025 11:51:48 +0800 Subject: [PATCH 05/34] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8DlistClass?= =?UTF-8?q?=E4=B8=BA=E7=A9=BA=E6=97=B6=E6=9C=AA=E6=98=BE=E7=A4=BABug.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/custom/dict-tag.vue | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/components/custom/dict-tag.vue b/src/components/custom/dict-tag.vue index cf8464e4..6835cab4 100644 --- a/src/components/custom/dict-tag.vue +++ b/src/components/custom/dict-tag.vue @@ -1,6 +1,5 @@ + + + + diff --git a/src/layouts/modules/global-header/index.vue b/src/layouts/modules/global-header/index.vue index 93c15ee2..1428030a 100644 --- a/src/layouts/modules/global-header/index.vue +++ b/src/layouts/modules/global-header/index.vue @@ -10,6 +10,7 @@ import GlobalBreadcrumb from '../global-breadcrumb/index.vue'; import GlobalSearch from '../global-search/index.vue'; import ThemeButton from './components/theme-button.vue'; import UserAvatar from './components/user-avatar.vue'; +import MessageButton from './components/message-button.vue'; defineOptions({ name: 'GlobalHeader' @@ -45,6 +46,7 @@ const tenantId = ref(authStore.userInfo?.user?.tenantId || '0

+ { +export const useNoticeStore = defineStore(SetupStoreId.Notice, () => { const state = reactive({ notices: [] as NoticeItem[] }); @@ -21,6 +22,10 @@ export const useNoticeStore = defineStore('notice', () => { state.notices.splice(state.notices.indexOf(notice), 1); }; + const readNotice = (notice: NoticeItem) => { + state.notices[state.notices.indexOf(notice)].read = true; + }; + // 实现全部已读 const readAll = () => { state.notices.forEach((item: any) => { @@ -31,10 +36,12 @@ export const useNoticeStore = defineStore('notice', () => { const clearNotice = () => { state.notices = []; }; + return { state, addNotice, removeNotice, + readNotice, readAll, clearNotice }; diff --git a/src/typings/components.d.ts b/src/typings/components.d.ts index 6ae162ed..f735fc70 100644 --- a/src/typings/components.d.ts +++ b/src/typings/components.d.ts @@ -62,6 +62,7 @@ declare module 'vue' { NA: typeof import('naive-ui')['NA'] NAlert: typeof import('naive-ui')['NAlert'] NAvatar: typeof import('naive-ui')['NAvatar'] + NBadge: typeof import('naive-ui')['NBadge'] NBreadcrumb: typeof import('naive-ui')['NBreadcrumb'] NBreadcrumbItem: typeof import('naive-ui')['NBreadcrumbItem'] NButton: typeof import('naive-ui')['NButton'] @@ -81,6 +82,7 @@ declare module 'vue' { NDrawerContent: typeof import('naive-ui')['NDrawerContent'] NDropdown: typeof import('naive-ui')['NDropdown'] NDynamicInput: typeof import('naive-ui')['NDynamicInput'] + NEllipsis: typeof import('naive-ui')['NEllipsis'] NEmpty: typeof import('naive-ui')['NEmpty'] NForm: typeof import('naive-ui')['NForm'] NFormItem: typeof import('naive-ui')['NFormItem'] From e6a18ec527338fe5d86f8ab765d3594d0d2420cc Mon Sep 17 00:00:00 2001 From: AN <1983933789@qq.com> Date: Wed, 4 Jun 2025 22:25:46 +0800 Subject: [PATCH 10/34] =?UTF-8?q?optimize(projects):=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E8=8F=9C=E5=8D=95=E7=AE=A1=E7=90=86=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/menu/index.vue | 32 ++- .../menu/modules/menu-operate-drawer.vue | 261 +++++++++--------- 2 files changed, 159 insertions(+), 134 deletions(-) diff --git a/src/views/system/menu/index.vue b/src/views/system/menu/index.vue index c710d51d..8bc7a7ec 100644 --- a/src/views/system/menu/index.vue +++ b/src/views/system/menu/index.vue @@ -1,5 +1,5 @@