perf: 支持公告功能

This commit is contained in:
xiaojunnuo
2026-01-07 17:54:18 +08:00
parent 14f99875fb
commit a79fe1f350
9 changed files with 42 additions and 10 deletions
@@ -62,6 +62,7 @@ export class SysPublicSettings extends BaseSettings {
addonId: number; addonId: number;
}> = {}; }> = {};
notice?: string;
} }
export class SysPrivateSettings extends BaseSettings { export class SysPrivateSettings extends BaseSettings {
@@ -801,6 +801,9 @@ export default {
templateProviderSelectorPlaceholder: "Not Configured", templateProviderSelectorPlaceholder: "Not Configured",
}, },
notice: "System Notice",
noticeHelper: "System notice, will be displayed on the login page",
noticePlaceholder: "System notice",
}, },
}, },
modal: { modal: {
@@ -811,6 +811,9 @@ export default {
templateProviderSelectorPlaceholder: "未配置", templateProviderSelectorPlaceholder: "未配置",
}, },
notice: "系统通知",
noticeHelper: "系统通知,将在顶部显示",
noticePlaceholder: "系统通知",
}, },
}, },
modal: { modal: {
@@ -81,6 +81,8 @@ export type SysPublicSetting = {
addonId: number; addonId: number;
} }
>; >;
// 系统通知
notice?: string;
}; };
export type SuiteSetting = { export type SuiteSetting = {
enabled?: boolean; enabled?: boolean;
@@ -3,6 +3,11 @@
<template #header> <template #header>
<div class="title">{{ t("certd.myPipelines") }}</div> <div class="title">{{ t("certd.myPipelines") }}</div>
</template> </template>
<a-alert v-if="settingStore.sysPublic.notice" type="warning" show-icon>
<template #message>
{{ settingStore.sysPublic.notice }}
</template>
</a-alert>
<fs-crud ref="crudRef" v-bind="crudBinding"> <fs-crud ref="crudRef" v-bind="crudBinding">
<div v-if="selectedRowKeys.length > 0" class="batch-actions"> <div v-if="selectedRowKeys.length > 0" class="batch-actions">
<div class="batch-actions-inner"> <div class="batch-actions-inner">
@@ -60,14 +60,23 @@
<SimpleSteps></SimpleSteps> <SimpleSteps></SimpleSteps>
</div> </div>
</div> </div>
<div v-if="!settingStore.isComm" class="warning"> <div class="warning">
<a-alert type="warning" show-icon> <a-carousel arrows dots-class="slick-dots slick-thumb" autoplay dot-position="right">
<template #message> <a-alert v-if="!settingStore.isComm" type="warning" show-icon>
{{ t("certd.dashboard.alertMessage") }} <template #message>
<a class="ml-5 flex-inline" href="https://gitee.com/certd/certd" target="_blank">gitee</a> <a class="ml-5 flex-inline" href="https://github.com/certd/certd" target="_blank">github</a> <div>
<a class="ml-5 flex-inline" href="https://certd.docmirror.cn" target="_blank">{{ t("certd.dashboard.helpDoc") }}</a> {{ t("certd.dashboard.alertMessage") }}
</template> <a class="ml-5 flex-inline" href="https://gitee.com/certd/certd" target="_blank">gitee</a> <a class="ml-5 flex-inline" href="https://github.com/certd/certd" target="_blank">github</a>
</a-alert> <a class="ml-5 flex-inline" href="https://certd.docmirror.cn" target="_blank">{{ t("certd.dashboard.helpDoc") }}</a>
</div>
</template>
</a-alert>
<a-alert type="warning" show-icon>
<template #message>
{{ settingStore.sysPublic.notice }}
</template>
</a-alert>
</a-carousel>
</div> </div>
<div class="statistic-data m-20"> <div class="statistic-data m-20">
@@ -157,6 +166,7 @@ import { useI18n } from "/src/locales";
const { t } = useI18n(); const { t } = useI18n();
import { usePluginStore } from "/@/store/plugin"; import { usePluginStore } from "/@/store/plugin";
import { notification } from "ant-design-vue"; import { notification } from "ant-design-vue";
import { ExclamationCircleOutlined } from "@ant-design/icons-vue";
defineOptions({ defineOptions({
name: "DashboardUser", name: "DashboardUser",
}); });
@@ -288,7 +298,10 @@ function openChangeLogUrl() {
border-left: 0; border-left: 0;
border-right: 0; border-right: 0;
border-radius: 0; border-radius: 0;
display: flex !important;
} }
height: 40px;
overflow: hidden;
} }
.header-profile { .header-profile {
display: flex; display: flex;
@@ -47,6 +47,11 @@
<div class="helper" v-html="t('certd.commonCnameHelper')"></div> <div class="helper" v-html="t('certd.commonCnameHelper')"></div>
</a-form-item> </a-form-item>
<a-form-item :label="t('certd.sys.setting.notice')" :name="['public', 'notice']">
<a-textarea v-model:value="formState.public.notice" :placeholder="t('certd.sys.setting.noticePlaceholder')" :rows="5" />
<div class="helper" v-html="t('certd.sys.setting.noticeHelper')"></div>
</a-form-item>
<a-form-item label=" " :colon="false" :wrapper-col="{ span: 8 }"> <a-form-item label=" " :colon="false" :wrapper-col="{ span: 8 }">
<a-button :loading="saveLoading" type="primary" html-type="submit">{{ t("certd.saveButton") }}</a-button> <a-button :loading="saveLoading" type="primary" html-type="submit">{{ t("certd.saveButton") }}</a-button>
</a-form-item> </a-form-item>
@@ -695,7 +695,7 @@ export class PipelineService extends BaseService<PipelineEntity> {
triggerType = null; triggerType = null;
} else { } else {
logger.info(`timer trigger:${key}, ${found.title}, ${JSON.stringify(found.props)}`); logger.info(`timer trigger:${key}, ${found.title}, ${JSON.stringify(found.props)}`);
triggerType = "timer"; triggerType = found.type || "timer";
} }
} }
return triggerType; return triggerType;
+1 -1
View File
@@ -7,7 +7,7 @@
"esModuleInterop": true, "esModuleInterop": true,
"experimentalDecorators": true, "experimentalDecorators": true,
"emitDecoratorMetadata": true, "emitDecoratorMetadata": true,
"sourceMap": false, "sourceMap": true,
"inlineSourceMap": false, "inlineSourceMap": false,
"noImplicitThis": true, "noImplicitThis": true,
"noUnusedLocals": true, "noUnusedLocals": true,