mirror of https://github.com/certd/certd
perf: 调整小助手,仅在登录之后显示
parent
677fec0a0b
commit
aebb07c5cc
|
@ -3,7 +3,6 @@
|
|||
<FsFormProvider>
|
||||
<contextHolder />
|
||||
<router-view />
|
||||
<MaxKBChat v-if="settingsStore.sysPublic.aiChatEnabled !== false" ref="chatBox" />
|
||||
</FsFormProvider>
|
||||
</AConfigProvider>
|
||||
</template>
|
||||
|
@ -49,7 +48,7 @@ localeChanged("zh-cn");
|
|||
provide("fn:router.reload", reload);
|
||||
provide("fn:locale.changed", localeChanged);
|
||||
|
||||
const settingsStore = useSettingStore();
|
||||
|
||||
const { isDark } = usePreferences();
|
||||
const { tokens } = useAntdDesignTokens();
|
||||
|
||||
|
@ -74,13 +73,5 @@ const tokenTheme = computed(() => {
|
|||
// const settingStore = useSettingStore();
|
||||
// settingStore.init();
|
||||
|
||||
const chatBox = ref();
|
||||
// onMounted(async () => {
|
||||
// await util.sleep(2000);
|
||||
// await chatBox.value.openChat({ q: "hello" });
|
||||
// });
|
||||
const openChat = (q: string) => {
|
||||
chatBox.value.openChat({ q });
|
||||
};
|
||||
provide("fn:ai.open", openChat);
|
||||
|
||||
</script>
|
||||
|
|
|
@ -1,17 +1,16 @@
|
|||
<script lang="ts" setup>
|
||||
import { BasicLayout, LockScreen, UserDropdown } from "/@/vben/layouts";
|
||||
|
||||
import { computed, onErrorCaptured, onMounted } from "vue";
|
||||
import { preferences } from "/@/vben/preferences";
|
||||
import { useAccessStore } from "/@/vben/stores";
|
||||
import { computed, onErrorCaptured, onMounted, provide, ref } from "vue";
|
||||
import { useUserStore } from "/@/store/user";
|
||||
import VipButton from "/@/components/vip-button/index.vue";
|
||||
import TutorialButton from "/@/components/tutorial/index.vue";
|
||||
import { useSettingStore } from "/@/store/settings";
|
||||
import PageFooter from "./components/footer/index.vue";
|
||||
import { useRouter } from "vue-router";
|
||||
import MaxKBChat from "/@/components/ai/index.vue";
|
||||
|
||||
const userStore = useUserStore();
|
||||
const accessStore = useAccessStore();
|
||||
|
||||
const router = useRouter();
|
||||
const menus = computed(() => [
|
||||
|
@ -56,6 +55,12 @@ onMounted(async () => {
|
|||
function goGithub() {
|
||||
window.open("https://github.com/certd/certd");
|
||||
}
|
||||
const settingsStore = useSettingStore();
|
||||
const chatBox = ref();
|
||||
const openChat = (q: string) => {
|
||||
chatBox.value.openChat({ q });
|
||||
};
|
||||
provide("fn:ai.open", openChat);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
@ -79,6 +84,8 @@ function goGithub() {
|
|||
</template>
|
||||
<template #footer>
|
||||
<PageFooter></PageFooter>
|
||||
|
||||
<MaxKBChat v-if="settingsStore.sysPublic.aiChatEnabled !== false" ref="chatBox" />
|
||||
</template>
|
||||
</BasicLayout>
|
||||
</template>
|
||||
|
|
|
@ -43,6 +43,8 @@
|
|||
</a-tabs>
|
||||
<a-form-item>
|
||||
<a-button type="primary" size="large" html-type="submit" :loading="loading" class="login-button">登录</a-button>
|
||||
|
||||
<div class="mt-2"><a href="https://certd.docmirror.cn/guide/use/forgotpasswd/" target="_blank">忘记管理员密码?</a></div>
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item class="user-login-other">
|
||||
|
|
Loading…
Reference in New Issue