mirror of https://github.com/certd/certd
perf: 小助手可以关闭
parent
44f11b38e7
commit
3e2101aa5b
|
@ -27,6 +27,7 @@ export class SysPublicSettings extends BaseSettings {
|
|||
icpNo?: string;
|
||||
mpsNo?: string;
|
||||
robots?: boolean = true;
|
||||
aiChatEnabled = true;
|
||||
}
|
||||
|
||||
export class SysPrivateSettings extends BaseSettings {
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<FsFormProvider>
|
||||
<contextHolder />
|
||||
<router-view />
|
||||
<MaxKBChat ref="chatBox" />
|
||||
<MaxKBChat v-if="settingsStore.sysPublic.aiChatEnabled !== false" ref="chatBox" />
|
||||
</FsFormProvider>
|
||||
</AConfigProvider>
|
||||
</template>
|
||||
|
@ -22,7 +22,7 @@ import AConfigProvider from "ant-design-vue/es/config-provider";
|
|||
import { Modal } from "ant-design-vue";
|
||||
import MaxKBChat from "/@/components/ai/index.vue";
|
||||
import { util } from "/@/utils";
|
||||
|
||||
import { useSettingStore } from "/@/store/settings";
|
||||
defineOptions({
|
||||
name: "App",
|
||||
});
|
||||
|
@ -49,6 +49,7 @@ localeChanged("zh-cn");
|
|||
provide("fn:router.reload", reload);
|
||||
provide("fn:locale.changed", localeChanged);
|
||||
|
||||
const settingsStore = useSettingStore();
|
||||
const { isDark } = usePreferences();
|
||||
const { tokens } = useAntdDesignTokens();
|
||||
|
||||
|
|
|
@ -41,6 +41,7 @@ export type SysPublicSetting = {
|
|||
icpNo?: string;
|
||||
mpsNo?: string;
|
||||
robots?: boolean;
|
||||
aiChatEnabled?: boolean;
|
||||
};
|
||||
export type SuiteSetting = {
|
||||
enabled?: boolean;
|
||||
|
|
|
@ -8,6 +8,9 @@
|
|||
<a-input v-model:value="formState.public.mpsNo" placeholder="京公网安备xxxxxxx号" />
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item label="开启小助手" :name="['public', 'aiChatEnabled']">
|
||||
<a-switch v-model:checked="formState.public.aiChatEnabled" />
|
||||
</a-form-item>
|
||||
<a-form-item label="允许爬虫" :name="['public', 'robots']">
|
||||
<a-switch v-model:checked="formState.public.robots" />
|
||||
</a-form-item>
|
||||
|
|
Loading…
Reference in New Issue