mirror of
https://github.com/certd/certd.git
synced 2026-04-18 00:20:56 +08:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4343fb1b30 | ||
|
|
64e6c74bb6 | ||
|
|
73962536d5 | ||
|
|
38be8d84b2 | ||
|
|
8ab632c97c | ||
|
|
903edf12df |
@@ -3,6 +3,12 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.26.3](https://github.com/certd/certd/compare/v1.26.2...v1.26.3) (2024-10-12)
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* 优化系统设置加载时机 ([7396253](https://github.com/certd/certd/commit/73962536d5a4769902d760d005f3f879465addcc))
|
||||
|
||||
## [1.26.2](https://github.com/certd/certd/compare/v1.26.1...v1.26.2) (2024-10-11)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
@@ -1 +1 @@
|
||||
00:32
|
||||
13:39
|
||||
|
||||
@@ -9,5 +9,5 @@
|
||||
}
|
||||
},
|
||||
"npmClient": "pnpm",
|
||||
"version": "1.26.2"
|
||||
"version": "1.26.3"
|
||||
}
|
||||
|
||||
@@ -3,6 +3,10 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.26.3](https://github.com/publishlab/node-acme-client/compare/v1.26.2...v1.26.3) (2024-10-12)
|
||||
|
||||
**Note:** Version bump only for package @certd/acme-client
|
||||
|
||||
## [1.26.2](https://github.com/publishlab/node-acme-client/compare/v1.26.1...v1.26.2) (2024-10-11)
|
||||
|
||||
**Note:** Version bump only for package @certd/acme-client
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"description": "Simple and unopinionated ACME client",
|
||||
"private": false,
|
||||
"author": "nmorsman",
|
||||
"version": "1.26.2",
|
||||
"version": "1.26.3",
|
||||
"main": "src/index.js",
|
||||
"types": "types/index.d.ts",
|
||||
"license": "MIT",
|
||||
@@ -59,5 +59,5 @@
|
||||
"bugs": {
|
||||
"url": "https://github.com/publishlab/node-acme-client/issues"
|
||||
},
|
||||
"gitHead": "daf575e7c3b808e6b7db48e50c62ebd9fa213b0a"
|
||||
"gitHead": "66f9b08fcf5035577eafc609fd634d6490bc9cae"
|
||||
}
|
||||
|
||||
@@ -3,6 +3,10 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.26.3](https://github.com/certd/certd/compare/v1.26.2...v1.26.3) (2024-10-12)
|
||||
|
||||
**Note:** Version bump only for package @certd/basic
|
||||
|
||||
## [1.26.2](https://github.com/certd/certd/compare/v1.26.1...v1.26.2) (2024-10-11)
|
||||
|
||||
**Note:** Version bump only for package @certd/basic
|
||||
|
||||
@@ -1 +1 @@
|
||||
13:36
|
||||
15:04
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@certd/basic",
|
||||
"private": false,
|
||||
"version": "1.26.2",
|
||||
"version": "1.26.3",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.js",
|
||||
@@ -64,5 +64,5 @@
|
||||
"vite": "^4.3.8",
|
||||
"vue-tsc": "^1.6.5"
|
||||
},
|
||||
"gitHead": "daf575e7c3b808e6b7db48e50c62ebd9fa213b0a"
|
||||
"gitHead": "66f9b08fcf5035577eafc609fd634d6490bc9cae"
|
||||
}
|
||||
|
||||
@@ -3,6 +3,10 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.26.3](https://github.com/certd/certd/compare/v1.26.2...v1.26.3) (2024-10-12)
|
||||
|
||||
**Note:** Version bump only for package @certd/pipeline
|
||||
|
||||
## [1.26.2](https://github.com/certd/certd/compare/v1.26.1...v1.26.2) (2024-10-11)
|
||||
|
||||
**Note:** Version bump only for package @certd/pipeline
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@certd/pipeline",
|
||||
"private": false,
|
||||
"version": "1.26.2",
|
||||
"version": "1.26.3",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
@@ -15,8 +15,8 @@
|
||||
"test": "mocha --loader=ts-node/esm"
|
||||
},
|
||||
"dependencies": {
|
||||
"@certd/basic": "^1.26.2",
|
||||
"@certd/plus-core": "^1.26.2",
|
||||
"@certd/basic": "^1.26.3",
|
||||
"@certd/plus-core": "^1.26.3",
|
||||
"axios": "^1.7.2",
|
||||
"dayjs": "^1.11.7",
|
||||
"fix-path": "^4.0.0",
|
||||
@@ -66,5 +66,5 @@
|
||||
"vite": "^4.3.8",
|
||||
"vue-tsc": "^1.6.5"
|
||||
},
|
||||
"gitHead": "daf575e7c3b808e6b7db48e50c62ebd9fa213b0a"
|
||||
"gitHead": "66f9b08fcf5035577eafc609fd634d6490bc9cae"
|
||||
}
|
||||
|
||||
@@ -3,6 +3,10 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.26.3](https://github.com/certd/certd/compare/v1.26.2...v1.26.3) (2024-10-12)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-huawei
|
||||
|
||||
## [1.26.2](https://github.com/certd/certd/compare/v1.26.1...v1.26.2) (2024-10-11)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-huawei
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@certd/lib-huawei",
|
||||
"private": false,
|
||||
"version": "1.26.2",
|
||||
"version": "1.26.3",
|
||||
"main": "./dist/bundle.js",
|
||||
"module": "./dist/bundle.js",
|
||||
"types": "./dist/d/index.d.ts",
|
||||
@@ -17,5 +17,5 @@
|
||||
"rimraf": "^5.0.5",
|
||||
"rollup": "^3.7.4"
|
||||
},
|
||||
"gitHead": "daf575e7c3b808e6b7db48e50c62ebd9fa213b0a"
|
||||
"gitHead": "66f9b08fcf5035577eafc609fd634d6490bc9cae"
|
||||
}
|
||||
|
||||
@@ -3,6 +3,10 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.26.3](https://github.com/certd/certd/compare/v1.26.2...v1.26.3) (2024-10-12)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-iframe
|
||||
|
||||
## [1.26.2](https://github.com/certd/certd/compare/v1.26.1...v1.26.2) (2024-10-11)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-iframe
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@certd/lib-iframe",
|
||||
"private": false,
|
||||
"version": "1.26.2",
|
||||
"version": "1.26.3",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
@@ -39,5 +39,5 @@
|
||||
"tslib": "^2.5.2",
|
||||
"typescript": "^5.4.2"
|
||||
},
|
||||
"gitHead": "daf575e7c3b808e6b7db48e50c62ebd9fa213b0a"
|
||||
"gitHead": "66f9b08fcf5035577eafc609fd634d6490bc9cae"
|
||||
}
|
||||
|
||||
@@ -3,6 +3,10 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.26.3](https://github.com/certd/certd/compare/v1.26.2...v1.26.3) (2024-10-12)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-jdcloud
|
||||
|
||||
## [1.26.2](https://github.com/certd/certd/compare/v1.26.1...v1.26.2) (2024-10-11)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-jdcloud
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@certd/lib-jdcloud",
|
||||
"private": false,
|
||||
"version": "1.26.2",
|
||||
"version": "1.26.3",
|
||||
"main": "./dist/bundle.mjs",
|
||||
"module": "./dist/bundle.mjs",
|
||||
"types": "./dist/d/index.d.ts",
|
||||
@@ -27,5 +27,5 @@
|
||||
"rimraf": "^5.0.5",
|
||||
"rollup": "^3.7.4"
|
||||
},
|
||||
"gitHead": "daf575e7c3b808e6b7db48e50c62ebd9fa213b0a"
|
||||
"gitHead": "66f9b08fcf5035577eafc609fd634d6490bc9cae"
|
||||
}
|
||||
|
||||
@@ -3,6 +3,10 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.26.3](https://github.com/certd/certd/compare/v1.26.2...v1.26.3) (2024-10-12)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-k8s
|
||||
|
||||
## [1.26.2](https://github.com/certd/certd/compare/v1.26.1...v1.26.2) (2024-10-11)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-k8s
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@certd/lib-k8s",
|
||||
"private": false,
|
||||
"version": "1.26.2",
|
||||
"version": "1.26.3",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
@@ -18,7 +18,7 @@
|
||||
"@kubernetes/client-node": "0.21.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@certd/pipeline": "^1.26.2",
|
||||
"@certd/pipeline": "^1.26.3",
|
||||
"@rollup/plugin-commonjs": "^23.0.4",
|
||||
"@rollup/plugin-json": "^6.0.0",
|
||||
"@rollup/plugin-node-resolve": "^15.0.1",
|
||||
@@ -40,5 +40,5 @@
|
||||
"tslib": "^2.5.2",
|
||||
"typescript": "^5.4.2"
|
||||
},
|
||||
"gitHead": "daf575e7c3b808e6b7db48e50c62ebd9fa213b0a"
|
||||
"gitHead": "66f9b08fcf5035577eafc609fd634d6490bc9cae"
|
||||
}
|
||||
|
||||
@@ -3,6 +3,12 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.26.3](https://github.com/certd/certd/compare/v1.26.2...v1.26.3) (2024-10-12)
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* 优化系统设置加载时机 ([7396253](https://github.com/certd/certd/commit/73962536d5a4769902d760d005f3f879465addcc))
|
||||
|
||||
## [1.26.2](https://github.com/certd/certd/compare/v1.26.1...v1.26.2) (2024-10-11)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@certd/lib-server",
|
||||
"version": "1.26.2",
|
||||
"version": "1.26.3",
|
||||
"description": "midway with flyway, sql upgrade way ",
|
||||
"private": false,
|
||||
"type": "module",
|
||||
@@ -26,8 +26,8 @@
|
||||
],
|
||||
"license": "AGPL",
|
||||
"dependencies": {
|
||||
"@certd/basic": "^1.26.2",
|
||||
"@certd/pipeline": "^1.26.2",
|
||||
"@certd/basic": "^1.26.3",
|
||||
"@certd/pipeline": "^1.26.3",
|
||||
"@midwayjs/cache": "~3.14.0",
|
||||
"@midwayjs/core": "~3.17.1",
|
||||
"@midwayjs/i18n": "~3.17.3",
|
||||
@@ -68,5 +68,5 @@
|
||||
"typeorm": "^0.3.11",
|
||||
"typescript": "^5.4.2"
|
||||
},
|
||||
"gitHead": "daf575e7c3b808e6b7db48e50c62ebd9fa213b0a"
|
||||
"gitHead": "66f9b08fcf5035577eafc609fd634d6490bc9cae"
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ import { CacheManager } from '@midwayjs/cache';
|
||||
import { BaseSettings, SysPrivateSettings, SysPublicSettings } from './models.js';
|
||||
import * as _ from 'lodash-es';
|
||||
import { BaseService } from '../../../basic/index.js';
|
||||
import { checkComm } from '@certd/pipeline';
|
||||
import { isComm } from '@certd/pipeline';
|
||||
|
||||
/**
|
||||
* 设置
|
||||
@@ -40,8 +40,8 @@ export class SysSettingsService extends BaseService<SysSettingsEntity> {
|
||||
if (!key) {
|
||||
return null;
|
||||
}
|
||||
if (key === 'sys.site') {
|
||||
checkComm();
|
||||
if (key === 'sys.site' && isComm()) {
|
||||
return null;
|
||||
}
|
||||
return await this.repository.findOne({
|
||||
where: {
|
||||
|
||||
@@ -3,6 +3,10 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.26.3](https://github.com/certd/certd/compare/v1.26.2...v1.26.3) (2024-10-12)
|
||||
|
||||
**Note:** Version bump only for package @certd/midway-flyway-js
|
||||
|
||||
## [1.26.2](https://github.com/certd/certd/compare/v1.26.1...v1.26.2) (2024-10-11)
|
||||
|
||||
**Note:** Version bump only for package @certd/midway-flyway-js
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@certd/midway-flyway-js",
|
||||
"version": "1.26.2",
|
||||
"version": "1.26.3",
|
||||
"description": "midway with flyway, sql upgrade way ",
|
||||
"private": false,
|
||||
"type": "module",
|
||||
@@ -56,5 +56,5 @@
|
||||
"typeorm": "^0.3.11",
|
||||
"typescript": "^5.4.2"
|
||||
},
|
||||
"gitHead": "daf575e7c3b808e6b7db48e50c62ebd9fa213b0a"
|
||||
"gitHead": "66f9b08fcf5035577eafc609fd634d6490bc9cae"
|
||||
}
|
||||
|
||||
@@ -3,6 +3,10 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.26.3](https://github.com/certd/certd/compare/v1.26.2...v1.26.3) (2024-10-12)
|
||||
|
||||
**Note:** Version bump only for package @certd/plugin-cert
|
||||
|
||||
## [1.26.2](https://github.com/certd/certd/compare/v1.26.1...v1.26.2) (2024-10-11)
|
||||
|
||||
**Note:** Version bump only for package @certd/plugin-cert
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@certd/plugin-cert",
|
||||
"private": false,
|
||||
"version": "1.26.2",
|
||||
"version": "1.26.3",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
@@ -15,9 +15,9 @@
|
||||
"preview": "vite preview"
|
||||
},
|
||||
"dependencies": {
|
||||
"@certd/acme-client": "^1.26.2",
|
||||
"@certd/basic": "^1.26.2",
|
||||
"@certd/pipeline": "^1.26.2",
|
||||
"@certd/acme-client": "^1.26.3",
|
||||
"@certd/basic": "^1.26.3",
|
||||
"@certd/pipeline": "^1.26.3",
|
||||
"@google-cloud/publicca": "^1.3.0",
|
||||
"dayjs": "^1.11.7",
|
||||
"jszip": "^3.10.1",
|
||||
@@ -57,5 +57,5 @@
|
||||
"vite": "^3.1.0",
|
||||
"vue-tsc": "^0.38.9"
|
||||
},
|
||||
"gitHead": "daf575e7c3b808e6b7db48e50c62ebd9fa213b0a"
|
||||
"gitHead": "66f9b08fcf5035577eafc609fd634d6490bc9cae"
|
||||
}
|
||||
|
||||
@@ -3,6 +3,12 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.26.3](https://github.com/certd/certd/compare/v1.26.2...v1.26.3) (2024-10-12)
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* 优化系统设置加载时机 ([7396253](https://github.com/certd/certd/commit/73962536d5a4769902d760d005f3f879465addcc))
|
||||
|
||||
## [1.26.2](https://github.com/certd/certd/compare/v1.26.1...v1.26.2) (2024-10-11)
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@certd/ui-client",
|
||||
"version": "1.26.2",
|
||||
"version": "1.26.3",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "vite --open",
|
||||
@@ -61,8 +61,8 @@
|
||||
"vuedraggable": "^4.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@certd/lib-iframe": "^1.26.2",
|
||||
"@certd/pipeline": "^1.26.2",
|
||||
"@certd/lib-iframe": "^1.26.3",
|
||||
"@certd/pipeline": "^1.26.3",
|
||||
"@rollup/plugin-commonjs": "^25.0.7",
|
||||
"@rollup/plugin-node-resolve": "^15.2.3",
|
||||
"@types/chai": "^4.3.12",
|
||||
|
||||
@@ -48,7 +48,6 @@ export default {
|
||||
const pageStore = usePageStore();
|
||||
pageStore.init();
|
||||
const settingStore = useSettingStore();
|
||||
settingStore.init();
|
||||
|
||||
return {
|
||||
routerEnabled,
|
||||
|
||||
@@ -1,6 +1,28 @@
|
||||
import { request } from "../service";
|
||||
import { SiteEnv, SiteInfo } from "/@/store/modules/settings";
|
||||
|
||||
export type SiteEnv = {
|
||||
agent?: {
|
||||
enabled?: boolean;
|
||||
contactText?: string;
|
||||
contactLink?: string;
|
||||
};
|
||||
};
|
||||
export type SiteInfo = {
|
||||
title: string;
|
||||
slogan: string;
|
||||
logo: string;
|
||||
loginLogo: string;
|
||||
icpNo: string;
|
||||
licenseTo?: string;
|
||||
licenseToUrl?: string;
|
||||
};
|
||||
|
||||
export type PlusInfo = {
|
||||
vipType?: string;
|
||||
expireTime?: number;
|
||||
isPlus: boolean;
|
||||
isComm?: boolean;
|
||||
};
|
||||
export type SysPublicSetting = {
|
||||
registerEnabled: boolean;
|
||||
managerOtherUserPipeline: boolean;
|
||||
@@ -11,29 +33,17 @@ export type SysInstallInfo = {
|
||||
siteId: string;
|
||||
};
|
||||
|
||||
export async function getSysPublicSettings(): Promise<SysPublicSetting> {
|
||||
return await request({
|
||||
url: "/basic/settings/public",
|
||||
method: "get"
|
||||
});
|
||||
}
|
||||
export type AllSettings = {
|
||||
sysPublic: SysPublicSetting;
|
||||
installInfo: SysInstallInfo;
|
||||
plusInfo: PlusInfo;
|
||||
siteInfo: SiteInfo;
|
||||
siteEnv: SiteEnv;
|
||||
};
|
||||
|
||||
export async function getInstallInfo(): Promise<SysInstallInfo> {
|
||||
export async function loadAllSettings(): Promise<AllSettings> {
|
||||
return await request({
|
||||
url: "/basic/settings/install",
|
||||
method: "get"
|
||||
});
|
||||
}
|
||||
|
||||
export async function getSiteInfo(): Promise<SiteInfo> {
|
||||
return await request({
|
||||
url: "/basic/settings/siteInfo",
|
||||
method: "get"
|
||||
});
|
||||
}
|
||||
export async function getSiteEnv(): Promise<SiteEnv> {
|
||||
return await request({
|
||||
url: "/basic/settings/siteEnv",
|
||||
url: "/basic/settings/all",
|
||||
method: "get"
|
||||
});
|
||||
}
|
||||
@@ -45,10 +55,3 @@ export async function bindUrl(data: any): Promise<any> {
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
export async function getPlusInfo() {
|
||||
return await request({
|
||||
url: "/basic/settings/plusInfo",
|
||||
method: "get"
|
||||
});
|
||||
}
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
<div class="fs-user-info">您好,{{ userStore.getUserInfo?.nickName }}</div>
|
||||
<template #overlay>
|
||||
<a-menu>
|
||||
<a-menu-item>
|
||||
<div @click="goUserProfile">账号信息</div>
|
||||
</a-menu-item>
|
||||
<a-menu-item>
|
||||
<div @click="doLogout">注销登录</div>
|
||||
</a-menu-item>
|
||||
@@ -10,31 +13,33 @@
|
||||
</template>
|
||||
</a-dropdown>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { defineComponent } from "vue";
|
||||
<script lang="ts" setup>
|
||||
import { useUserStore } from "/src/store/modules/user";
|
||||
import { Modal } from "ant-design-vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
export default defineComponent({
|
||||
name: "FsUserInfo",
|
||||
setup() {
|
||||
const userStore = useUserStore();
|
||||
console.log("user", userStore);
|
||||
const { t } = useI18n();
|
||||
function doLogout() {
|
||||
Modal.confirm({
|
||||
iconType: "warning",
|
||||
title: t("app.login.logoutTip"),
|
||||
content: t("app.login.logoutMessage"),
|
||||
onOk: async () => {
|
||||
await userStore.logout(true);
|
||||
}
|
||||
});
|
||||
}
|
||||
return {
|
||||
userStore,
|
||||
doLogout
|
||||
};
|
||||
}
|
||||
import { useRouter } from "vue-router";
|
||||
|
||||
defineOptions({
|
||||
name: "FsUserInfo"
|
||||
});
|
||||
const userStore = useUserStore();
|
||||
console.log("user", userStore);
|
||||
const { t } = useI18n();
|
||||
|
||||
const router = useRouter();
|
||||
|
||||
function goUserProfile() {
|
||||
console.log("goUserProfile");
|
||||
router.push("/certd/mine/user-profile");
|
||||
}
|
||||
function doLogout() {
|
||||
Modal.confirm({
|
||||
iconType: "warning",
|
||||
title: t("app.login.logoutTip"),
|
||||
content: t("app.login.logoutMessage"),
|
||||
onOk: async () => {
|
||||
await userStore.logout(true);
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -7,6 +7,8 @@ import { site } from "../utils/util.site";
|
||||
import { routes } from "./resolve";
|
||||
import { useResourceStore } from "../store/modules/resource";
|
||||
import { useUserStore } from "../store/modules/user";
|
||||
import { useSettingStore } from "/@/store/modules/settings";
|
||||
|
||||
const router = createRouter({
|
||||
history: createWebHashHistory(),
|
||||
routes
|
||||
@@ -18,6 +20,8 @@ const router = createRouter({
|
||||
router.beforeEach(async (to, from, next) => {
|
||||
// 进度条
|
||||
NProgress.start();
|
||||
const settingStore = useSettingStore();
|
||||
await settingStore.initOnce();
|
||||
// 修复三级以上路由页面无法缓存的问题
|
||||
if (to.matched && to.matched.length > 2) {
|
||||
to.matched.splice(1, to.matched.length - 2);
|
||||
|
||||
@@ -27,8 +27,7 @@ export const frameworkResource = [
|
||||
}
|
||||
},
|
||||
//...crudResources,
|
||||
...certdResources,
|
||||
...sysResources
|
||||
...certdResources
|
||||
]
|
||||
}
|
||||
];
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import { sysResources } from "/@/router/source/modules/sys";
|
||||
|
||||
export const certdResources = [
|
||||
{
|
||||
title: "证书自动化",
|
||||
@@ -73,9 +75,11 @@ export const certdResources = [
|
||||
component: "/certd/mine/user-profile.vue",
|
||||
meta: {
|
||||
icon: "ion:person-outline",
|
||||
auth: true
|
||||
auth: true,
|
||||
isMenu: false
|
||||
}
|
||||
}
|
||||
},
|
||||
...sysResources
|
||||
]
|
||||
}
|
||||
];
|
||||
|
||||
@@ -13,40 +13,6 @@ export const sysResources = [
|
||||
permission: "sys"
|
||||
},
|
||||
children: [
|
||||
{
|
||||
title: "权限管理",
|
||||
name: "AuthorityManager",
|
||||
path: "/sys/authority",
|
||||
redirect: "/sys/authority/permission",
|
||||
meta: {
|
||||
icon: "ion:ribbon-outline",
|
||||
//需要校验权限
|
||||
permission: "sys:auth"
|
||||
},
|
||||
children: [
|
||||
{
|
||||
title: "权限资源管理",
|
||||
name: "PermissionManager",
|
||||
path: "/sys/authority/permission",
|
||||
component: "/sys/authority/permission/index.vue",
|
||||
meta: {
|
||||
icon: "ion:list-outline",
|
||||
//需要校验权限
|
||||
permission: "sys:auth:per:view"
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "角色管理",
|
||||
name: "RoleManager",
|
||||
path: "/sys/authority/role",
|
||||
component: "/sys/authority/role/index.vue",
|
||||
meta: {
|
||||
icon: "ion:people-outline",
|
||||
permission: "sys:auth:role:view"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: "用户管理",
|
||||
name: "UserManager",
|
||||
@@ -102,6 +68,37 @@ export const sysResources = [
|
||||
permission: "sys:settings:view"
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "账号绑定",
|
||||
name: "AccountBind",
|
||||
path: "/sys/account",
|
||||
component: "/sys/account/index.vue",
|
||||
meta: {
|
||||
icon: "ion:golf-outline",
|
||||
permission: "sys:settings:view"
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "权限管理",
|
||||
name: "PermissionManager",
|
||||
path: "/sys/authority/permission",
|
||||
component: "/sys/authority/permission/index.vue",
|
||||
meta: {
|
||||
icon: "ion:list-outline",
|
||||
//需要校验权限
|
||||
permission: "sys:auth:per:view"
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "角色管理",
|
||||
name: "RoleManager",
|
||||
path: "/sys/authority/role",
|
||||
component: "/sys/authority/role/index.vue",
|
||||
meta: {
|
||||
icon: "ion:people-outline",
|
||||
permission: "sys:auth:role:view"
|
||||
}
|
||||
}
|
||||
|
||||
// {
|
||||
// title: "商业版设置",
|
||||
@@ -130,16 +127,6 @@ export const sysResources = [
|
||||
// }
|
||||
// ]
|
||||
// }
|
||||
{
|
||||
title: "账号绑定",
|
||||
name: "AccountBind",
|
||||
path: "/sys/account",
|
||||
component: "/sys/account/index.vue",
|
||||
meta: {
|
||||
icon: "ion:golf-outline",
|
||||
permission: "sys:settings:view"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
|
||||
@@ -5,7 +5,7 @@ import _ from "lodash-es";
|
||||
import { LocalStorage } from "/src/utils/util.storage";
|
||||
|
||||
import * as basicApi from "/@/api/modules/api.basic";
|
||||
import { SysInstallInfo, SysPublicSetting } from "/@/api/modules/api.basic";
|
||||
import { PlusInfo, SiteEnv, SiteInfo, SysInstallInfo, SysPublicSetting } from "/@/api/modules/api.basic";
|
||||
import { useUserStore } from "/@/store/modules/user";
|
||||
import { mitter } from "/@/utils/util.mitt";
|
||||
import { env } from "/@/utils/util.env";
|
||||
@@ -36,31 +36,7 @@ export interface SettingState {
|
||||
siteInfo: SiteInfo;
|
||||
plusInfo?: PlusInfo;
|
||||
siteEnv?: SiteEnv;
|
||||
}
|
||||
|
||||
export type SiteEnv = {
|
||||
agent?: {
|
||||
enabled?: boolean;
|
||||
contactText?: string;
|
||||
contactLink?: string;
|
||||
};
|
||||
};
|
||||
export type SiteInfo = {
|
||||
title: string;
|
||||
slogan: string;
|
||||
logo: string;
|
||||
loginLogo: string;
|
||||
warningOff: boolean;
|
||||
icpNo: string;
|
||||
licenseTo?: string;
|
||||
licenseToUrl?: string;
|
||||
};
|
||||
|
||||
interface PlusInfo {
|
||||
vipType?: string;
|
||||
expireTime?: number;
|
||||
isPlus: boolean;
|
||||
isComm?: boolean;
|
||||
inited?: boolean;
|
||||
}
|
||||
|
||||
const defaultThemeConfig = {
|
||||
@@ -73,7 +49,6 @@ const defaultSiteInfo = {
|
||||
slogan: env.SLOGAN || "让你的证书永不过期",
|
||||
logo: env.LOGO || "/static/images/logo/logo.svg",
|
||||
loginLogo: env.LOGIN_LOGO || "/static/images/logo/rect-block.svg",
|
||||
warningOff: false,
|
||||
icpNo: env.ICP_NO,
|
||||
licenseTo: "",
|
||||
licenseToUrl: ""
|
||||
@@ -88,7 +63,8 @@ export const useSettingStore = defineStore({
|
||||
},
|
||||
plusInfo: {
|
||||
isPlus: false,
|
||||
vipType: "free"
|
||||
vipType: "free",
|
||||
isComm: false
|
||||
},
|
||||
sysPublic: {
|
||||
registerEnabled: false,
|
||||
@@ -109,7 +85,8 @@ export const useSettingStore = defineStore({
|
||||
contactText: "",
|
||||
contactLink: ""
|
||||
}
|
||||
}
|
||||
},
|
||||
inited: false
|
||||
}),
|
||||
getters: {
|
||||
getThemeConfig(): any {
|
||||
@@ -127,6 +104,12 @@ export const useSettingStore = defineStore({
|
||||
isComm(): boolean {
|
||||
return this.plusInfo?.isComm && this.plusInfo?.expireTime > new Date().getTime();
|
||||
},
|
||||
isAgent(): boolean {
|
||||
return this.siteEnv?.agent?.enabled === true;
|
||||
},
|
||||
isCommOrAgent() {
|
||||
return this.isComm || this.isAgent;
|
||||
},
|
||||
vipLabel(): string {
|
||||
const vipLabelMap: any = {
|
||||
free: "免费版",
|
||||
@@ -146,33 +129,18 @@ export const useSettingStore = defineStore({
|
||||
}
|
||||
},
|
||||
async loadSysSettings() {
|
||||
await this.loadSysPublicSettings();
|
||||
await this.loadSiteEnv();
|
||||
await this.loadInstallInfo();
|
||||
await this.loadPlusInfo();
|
||||
await this.loadSiteInfo();
|
||||
const allSettings = await basicApi.loadAllSettings();
|
||||
_.merge(this.sysPublic, allSettings.sysPublic || {});
|
||||
_.merge(this.installInfo, allSettings.installInfo || {});
|
||||
_.merge(this.siteEnv, allSettings.siteEnv || {});
|
||||
_.merge(this.plusInfo, allSettings.plusInfo || {});
|
||||
//@ts-ignore
|
||||
this.initSiteInfo(allSettings.siteInfo || {});
|
||||
await this.checkUrlBound();
|
||||
},
|
||||
async loadSysPublicSettings() {
|
||||
const settings = await basicApi.getSysPublicSettings();
|
||||
_.merge(this.sysPublic, settings);
|
||||
},
|
||||
async loadInstallInfo() {
|
||||
const installInfo = await basicApi.getInstallInfo();
|
||||
_.merge(this.installInfo, installInfo);
|
||||
},
|
||||
async loadSiteEnv() {
|
||||
const siteEnv = await basicApi.getSiteEnv();
|
||||
_.merge(this.siteEnv, siteEnv);
|
||||
},
|
||||
async loadPlusInfo() {
|
||||
this.plusInfo = await basicApi.getPlusInfo();
|
||||
},
|
||||
async loadSiteInfo() {
|
||||
const isComm = this.isComm;
|
||||
let siteInfo: SiteInfo = {};
|
||||
if (isComm) {
|
||||
siteInfo = await basicApi.getSiteInfo();
|
||||
initSiteInfo(siteInfo: SiteInfo) {
|
||||
//@ts-ignore
|
||||
if (this.isComm) {
|
||||
if (siteInfo.logo) {
|
||||
siteInfo.logo = `/api/basic/file/download?key=${siteInfo.logo}`;
|
||||
}
|
||||
@@ -205,8 +173,9 @@ export const useSettingStore = defineStore({
|
||||
|
||||
const doBindUrl = async (url: string) => {
|
||||
await basicApi.bindUrl({ url });
|
||||
await this.loadInstallInfo();
|
||||
await this.loadSysSettings();
|
||||
};
|
||||
|
||||
const baseUrl = getBaseUrl();
|
||||
if (!bindUrl) {
|
||||
//绑定url
|
||||
@@ -269,6 +238,13 @@ export const useSettingStore = defineStore({
|
||||
async init() {
|
||||
await this.setThemeConfig(this.getThemeConfig);
|
||||
await this.loadSysSettings();
|
||||
},
|
||||
async initOnce() {
|
||||
if (this.inited) {
|
||||
return;
|
||||
}
|
||||
await this.init();
|
||||
this.inited = true;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import * as envs from "./util.env";
|
||||
import * as sites from "./util.site";
|
||||
import * as storages from "./util.storage";
|
||||
import * as commons from "./util.common";
|
||||
import commons from "./util.common";
|
||||
import * as mitt from "./util.mitt";
|
||||
export const util = {
|
||||
...envs,
|
||||
|
||||
@@ -29,5 +29,9 @@ export default {
|
||||
array.push(item);
|
||||
}
|
||||
return array;
|
||||
},
|
||||
|
||||
async sleep(ms: number) {
|
||||
return new Promise((resolve) => setTimeout(resolve, ms));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
</template>
|
||||
<div class="p-10">
|
||||
<a-descriptions title="" bordered>
|
||||
<a-descriptions-item label="用户名">{{ userInfo.userInfoname }}</a-descriptions-item>
|
||||
<a-descriptions-item label="用户名">{{ userInfo.username }}</a-descriptions-item>
|
||||
<a-descriptions-item label="昵称">{{ userInfo.nickName }}</a-descriptions-item>
|
||||
<a-descriptions-item label="邮箱">{{ userInfo.email }}</a-descriptions-item>
|
||||
<a-descriptions-item label="手机号">{{ userInfo.phoneCode }}{{ userInfo.mobile }}</a-descriptions-item>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<p class="d2-page-cover__sub-title">{{ siteInfo.slogan }}</p>
|
||||
<div v-if="siteInfo.warningOff !== true && settingStore.siteEnv?.agent?.enabled === false" class="warning">
|
||||
<div v-if="!settingStore.isCommOrAgent" class="warning">
|
||||
<a-alert type="warning" show-icon>
|
||||
<template #description>
|
||||
<div class="flex">
|
||||
@@ -17,10 +17,10 @@
|
||||
</template>
|
||||
</a-alert>
|
||||
</div>
|
||||
<div class="content">
|
||||
<div v-if="!settingStore.isCommOrAgent" class="content">
|
||||
<img src="/static/images/preview.png" class="preview_img" />
|
||||
</div>
|
||||
<div v-if="!settingStore.isComm" class="footer_box">
|
||||
<div v-if="!settingStore.isCommOrAgent" class="footer_box">
|
||||
<div>如果觉得好用,请不要吝啬你的star哟!</div>
|
||||
<a href="https://gitee.com/certd/certd" target="_blank"><img src="https://gitee.com/certd/certd/badge/star.svg?theme=dark" alt="star" /></a>
|
||||
<a href="https://github.com/certd/certd" target="_blank"><img alt="GitHub stars" src="https://img.shields.io/github/stars/certd/certd?logo=github" /></a>
|
||||
@@ -29,7 +29,8 @@
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { computed, ref, Ref } from "vue";
|
||||
import { SiteInfo, useSettingStore } from "/@/store/modules/settings";
|
||||
import { useSettingStore } from "/@/store/modules/settings";
|
||||
import { SiteInfo } from "/@/api/modules/api.basic";
|
||||
|
||||
const version = ref(import.meta.env.VITE_APP_VERSION);
|
||||
const settingStore = useSettingStore();
|
||||
|
||||
@@ -54,11 +54,13 @@ defineOptions({
|
||||
interface FormState {
|
||||
registerEnabled: boolean;
|
||||
managerOtherUserPipeline: boolean;
|
||||
icpNo: string;
|
||||
}
|
||||
|
||||
const formState = reactive<Partial<FormState>>({
|
||||
registerEnabled: false,
|
||||
managerOtherUserPipeline: false
|
||||
managerOtherUserPipeline: false,
|
||||
icpNo: ""
|
||||
});
|
||||
|
||||
async function loadSysPublicSettings() {
|
||||
|
||||
@@ -37,9 +37,6 @@
|
||||
:build-url="buildUrl"
|
||||
/>
|
||||
</a-form-item>
|
||||
<a-form-item label="关闭首页告警" name="warningOff">
|
||||
<a-switch v-model:checked="formState.warningOff" />
|
||||
</a-form-item>
|
||||
<a-form-item label="你的主体名称" name="licenseTo">
|
||||
<a-input v-model:value="formState.licenseTo" />
|
||||
<div class="helper">将会显示在底部</div>
|
||||
@@ -77,7 +74,6 @@ interface FormState {
|
||||
slogan: string;
|
||||
logo: string;
|
||||
loginLogo: string;
|
||||
warningOff: boolean;
|
||||
licenseTo: string;
|
||||
licenseToUrl: string;
|
||||
}
|
||||
|
||||
@@ -3,6 +3,12 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.26.3](https://github.com/certd/certd/compare/v1.26.2...v1.26.3) (2024-10-12)
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* 优化系统设置加载时机 ([7396253](https://github.com/certd/certd/commit/73962536d5a4769902d760d005f3f879465addcc))
|
||||
|
||||
## [1.26.2](https://github.com/certd/certd/compare/v1.26.1...v1.26.2) (2024-10-11)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@certd/ui-server",
|
||||
"version": "1.26.2",
|
||||
"version": "1.26.3",
|
||||
"description": "fast-server base midway",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
@@ -24,17 +24,17 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@alicloud/pop-core": "^1.7.10",
|
||||
"@certd/acme-client": "^1.26.2",
|
||||
"@certd/commercial-core": "^1.26.2",
|
||||
"@certd/lib-huawei": "^1.26.2",
|
||||
"@certd/lib-jdcloud": "^1.26.2",
|
||||
"@certd/lib-k8s": "^1.26.2",
|
||||
"@certd/lib-server": "^1.26.2",
|
||||
"@certd/midway-flyway-js": "^1.26.2",
|
||||
"@certd/pipeline": "^1.26.2",
|
||||
"@certd/plugin-cert": "^1.26.2",
|
||||
"@certd/plugin-plus": "^1.26.2",
|
||||
"@certd/plus-core": "^1.26.2",
|
||||
"@certd/acme-client": "^1.26.3",
|
||||
"@certd/commercial-core": "^1.26.3",
|
||||
"@certd/lib-huawei": "^1.26.3",
|
||||
"@certd/lib-jdcloud": "^1.26.3",
|
||||
"@certd/lib-k8s": "^1.26.3",
|
||||
"@certd/lib-server": "^1.26.3",
|
||||
"@certd/midway-flyway-js": "^1.26.3",
|
||||
"@certd/pipeline": "^1.26.3",
|
||||
"@certd/plugin-cert": "^1.26.3",
|
||||
"@certd/plugin-plus": "^1.26.3",
|
||||
"@certd/plus-core": "^1.26.3",
|
||||
"@koa/cors": "^5.0.0",
|
||||
"@midwayjs/bootstrap": "~3.17.1",
|
||||
"@midwayjs/cache": "~3.14.0",
|
||||
|
||||
@@ -89,7 +89,7 @@ export class MainConfiguration {
|
||||
this.app.getMiddleware().insertFirst(async (ctx: IMidwayKoaContext, next: NextFunction) => {
|
||||
await next();
|
||||
if (ctx.path === '/' || ctx.path === '/index.html') {
|
||||
ctx.response.set('Cache-Control', 'public,max-age=180');
|
||||
ctx.response.set('Cache-Control', 'public,max-age=60');
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { ALL, Body, Config, Controller, Get, Inject, Provide } from '@midwayjs/core';
|
||||
import { Config, Controller, Get, Inject, Provide } from '@midwayjs/core';
|
||||
import { BaseController, Constants, SysInstallInfo, SysPublicSettings, SysSettingsService, SysSiteEnv, SysSiteInfo } from '@certd/lib-server';
|
||||
import { AppKey, getPlusInfo } from '@certd/pipeline';
|
||||
|
||||
@@ -15,39 +15,45 @@ export class BasicSettingsController extends BaseController {
|
||||
@Config('agent')
|
||||
agentConfig: SysSiteEnv['agent'];
|
||||
|
||||
@Get('/public', { summary: Constants.per.guest })
|
||||
public async getSysPublic() {
|
||||
const settings = await this.sysSettingsService.getSetting(SysPublicSettings);
|
||||
return this.ok(settings);
|
||||
return await this.sysSettingsService.getSetting(SysPublicSettings);
|
||||
}
|
||||
|
||||
@Get('/install', { summary: Constants.per.guest })
|
||||
public async getInstallInfo() {
|
||||
const settings: SysInstallInfo = await this.sysSettingsService.getSetting(SysInstallInfo);
|
||||
settings.accountServerBaseUrl = this.accountServerBaseUrl;
|
||||
settings.appKey = AppKey;
|
||||
return this.ok(settings);
|
||||
return settings;
|
||||
}
|
||||
|
||||
@Get('/siteInfo', { summary: Constants.per.guest })
|
||||
public async getSiteInfo() {
|
||||
const settings: SysSiteInfo = await this.sysSettingsService.getSetting(SysSiteInfo);
|
||||
return this.ok(settings);
|
||||
return await this.sysSettingsService.getSetting(SysSiteInfo);
|
||||
}
|
||||
|
||||
@Get('/siteEnv', { summary: Constants.per.guest })
|
||||
public async getSiteEnv() {
|
||||
const env: SysSiteEnv = {
|
||||
agent: this.agentConfig,
|
||||
};
|
||||
return this.ok(env);
|
||||
return env;
|
||||
}
|
||||
|
||||
@Get('/plusInfo', { summary: Constants.per.guest })
|
||||
async plusInfo(@Body(ALL) body: any) {
|
||||
const info = getPlusInfo();
|
||||
async plusInfo() {
|
||||
return getPlusInfo();
|
||||
}
|
||||
|
||||
@Get('/all', { summary: Constants.per.guest })
|
||||
async getAllSettings() {
|
||||
const sysPublic = await this.getSysPublic();
|
||||
const installInfo = await this.getInstallInfo();
|
||||
const siteInfo = await this.getSiteInfo();
|
||||
const siteEnv = await this.getSiteEnv();
|
||||
const plusInfo = await this.plusInfo();
|
||||
return this.ok({
|
||||
...info,
|
||||
sysPublic,
|
||||
installInfo,
|
||||
siteInfo,
|
||||
siteEnv,
|
||||
plusInfo,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user