2024-07-14 16:42:38 +08:00
|
|
|
|
<script setup>
|
2025-12-19 14:41:23 +08:00
|
|
|
|
import { ref, reactive, onMounted, useTemplateRef, computed, provide } from 'vue'
|
2024-07-14 16:42:38 +08:00
|
|
|
|
import { RouterLink, RouterView, useRoute } from 'vue-router'
|
2025-12-30 19:01:45 +08:00
|
|
|
|
import { GithubOutlined } from '@ant-design/icons-vue'
|
2025-11-25 22:34:44 +08:00
|
|
|
|
import { Bot, Waypoints, LibraryBig, BarChart3, CircleCheck } from 'lucide-vue-next';
|
2025-06-27 01:53:30 +08:00
|
|
|
|
import { onLongPress } from '@vueuse/core'
|
2025-05-20 20:49:50 +08:00
|
|
|
|
|
2024-07-27 14:32:57 +08:00
|
|
|
|
import { useConfigStore } from '@/stores/config'
|
2024-07-28 16:16:52 +08:00
|
|
|
|
import { useDatabaseStore } from '@/stores/database'
|
2025-06-22 23:07:57 +08:00
|
|
|
|
import { useInfoStore } from '@/stores/info'
|
2025-10-11 15:02:24 +08:00
|
|
|
|
import { useTaskerStore } from '@/stores/tasker'
|
|
|
|
|
|
import { storeToRefs } from 'pinia'
|
2025-05-02 23:56:59 +08:00
|
|
|
|
import UserInfoComponent from '@/components/UserInfoComponent.vue'
|
2025-06-27 01:53:30 +08:00
|
|
|
|
import DebugComponent from '@/components/DebugComponent.vue'
|
2025-10-11 15:02:24 +08:00
|
|
|
|
import TaskCenterDrawer from '@/components/TaskCenterDrawer.vue'
|
2025-12-19 14:41:23 +08:00
|
|
|
|
import SettingsModal from '@/components/SettingsModal.vue'
|
2024-07-22 00:00:54 +08:00
|
|
|
|
|
|
|
|
|
|
const configStore = useConfigStore()
|
2024-07-28 16:16:52 +08:00
|
|
|
|
const databaseStore = useDatabaseStore()
|
2025-06-22 23:07:57 +08:00
|
|
|
|
const infoStore = useInfoStore()
|
2025-10-11 15:02:24 +08:00
|
|
|
|
const taskerStore = useTaskerStore()
|
|
|
|
|
|
const { activeCount: activeCountRef, isDrawerOpen } = storeToRefs(taskerStore)
|
2024-07-22 00:00:54 +08:00
|
|
|
|
|
2024-09-24 11:58:28 +08:00
|
|
|
|
const layoutSettings = reactive({
|
|
|
|
|
|
showDebug: false,
|
|
|
|
|
|
useTopBar: false, // 是否使用顶栏
|
|
|
|
|
|
})
|
2024-08-25 20:29:24 +08:00
|
|
|
|
|
2025-02-26 12:37:06 +08:00
|
|
|
|
// Add state for GitHub stars
|
|
|
|
|
|
const githubStars = ref(0)
|
|
|
|
|
|
const isLoadingStars = ref(false)
|
|
|
|
|
|
|
2025-06-27 01:52:59 +08:00
|
|
|
|
// Add state for debug modal
|
|
|
|
|
|
const showDebugModal = ref(false)
|
|
|
|
|
|
const htmlRefHook = useTemplateRef('htmlRefHook')
|
|
|
|
|
|
|
2025-12-19 14:41:23 +08:00
|
|
|
|
// Add state for settings modal
|
|
|
|
|
|
const showSettingsModal = ref(false)
|
|
|
|
|
|
|
|
|
|
|
|
// Provide settings modal methods to child components
|
|
|
|
|
|
const openSettingsModal = () => {
|
|
|
|
|
|
showSettingsModal.value = true
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-06-27 01:52:59 +08:00
|
|
|
|
// Setup long press for debug modal
|
|
|
|
|
|
onLongPress(
|
|
|
|
|
|
htmlRefHook,
|
|
|
|
|
|
() => {
|
|
|
|
|
|
console.log('long press')
|
|
|
|
|
|
showDebugModal.value = true
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
delay: 1000, // 1秒长按
|
|
|
|
|
|
modifiers: {
|
|
|
|
|
|
prevent: true
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
// Handle debug modal close
|
|
|
|
|
|
const handleDebugModalClose = () => {
|
|
|
|
|
|
showDebugModal.value = false
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-07-22 00:00:54 +08:00
|
|
|
|
const getRemoteConfig = () => {
|
2024-10-24 13:09:59 +08:00
|
|
|
|
configStore.refreshConfig()
|
2024-07-22 00:00:54 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2024-07-28 16:16:52 +08:00
|
|
|
|
const getRemoteDatabase = () => {
|
2025-12-30 19:01:45 +08:00
|
|
|
|
databaseStore.loadDatabases()
|
2024-07-28 16:16:52 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2025-02-26 12:37:06 +08:00
|
|
|
|
// Fetch GitHub stars count
|
|
|
|
|
|
const fetchGithubStars = async () => {
|
|
|
|
|
|
try {
|
|
|
|
|
|
isLoadingStars.value = true
|
2025-05-02 23:56:59 +08:00
|
|
|
|
// 公共API,可以直接使用fetch
|
2025-02-26 12:37:06 +08:00
|
|
|
|
const response = await fetch('https://api.github.com/repos/xerrors/Yuxi-Know')
|
|
|
|
|
|
const data = await response.json()
|
|
|
|
|
|
githubStars.value = data.stargazers_count
|
|
|
|
|
|
} catch (error) {
|
2025-05-02 23:56:59 +08:00
|
|
|
|
console.error('获取GitHub stars失败:', error)
|
2025-02-26 12:37:06 +08:00
|
|
|
|
} finally {
|
|
|
|
|
|
isLoadingStars.value = false
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-06-22 23:07:57 +08:00
|
|
|
|
onMounted(async () => {
|
|
|
|
|
|
// 加载信息配置
|
|
|
|
|
|
await infoStore.loadInfoConfig()
|
|
|
|
|
|
// 加载其他配置
|
2024-10-14 22:10:56 +08:00
|
|
|
|
getRemoteConfig()
|
2024-07-28 16:16:52 +08:00
|
|
|
|
getRemoteDatabase()
|
2025-02-26 12:37:06 +08:00
|
|
|
|
fetchGithubStars() // Fetch GitHub stars on mount
|
2025-12-24 13:17:12 +08:00
|
|
|
|
// 预加载任务数据,确保任务中心打开时有内容
|
|
|
|
|
|
taskerStore.loadTasks()
|
2024-07-22 00:00:54 +08:00
|
|
|
|
})
|
2024-07-14 16:42:38 +08:00
|
|
|
|
|
|
|
|
|
|
// 打印当前页面的路由信息,使用 vue3 的 setup composition API
|
|
|
|
|
|
const route = useRoute()
|
|
|
|
|
|
console.log(route)
|
2025-03-25 05:40:07 +08:00
|
|
|
|
|
2025-10-11 15:02:24 +08:00
|
|
|
|
const activeTaskCount = computed(() => activeCountRef.value || 0)
|
|
|
|
|
|
|
2025-03-25 05:40:07 +08:00
|
|
|
|
// 下面是导航菜单部分,添加智能体项
|
|
|
|
|
|
const mainList = [{
|
2025-05-04 21:04:01 +08:00
|
|
|
|
name: '智能体',
|
|
|
|
|
|
path: '/agent',
|
2025-05-20 20:49:50 +08:00
|
|
|
|
icon: Bot,
|
|
|
|
|
|
activeIcon: Bot,
|
2025-03-25 05:40:07 +08:00
|
|
|
|
}, {
|
|
|
|
|
|
name: '图谱',
|
|
|
|
|
|
path: '/graph',
|
2025-05-20 20:49:50 +08:00
|
|
|
|
icon: Waypoints,
|
|
|
|
|
|
activeIcon: Waypoints,
|
2025-03-25 05:40:07 +08:00
|
|
|
|
}, {
|
|
|
|
|
|
name: '知识库',
|
|
|
|
|
|
path: '/database',
|
2025-05-20 20:49:50 +08:00
|
|
|
|
icon: LibraryBig,
|
|
|
|
|
|
activeIcon: LibraryBig,
|
2025-10-04 22:21:30 +08:00
|
|
|
|
}, {
|
|
|
|
|
|
name: 'Dashboard',
|
|
|
|
|
|
path: '/dashboard',
|
|
|
|
|
|
icon: BarChart3,
|
|
|
|
|
|
activeIcon: BarChart3,
|
2025-03-25 05:40:07 +08:00
|
|
|
|
}
|
|
|
|
|
|
]
|
2025-12-19 14:41:23 +08:00
|
|
|
|
|
|
|
|
|
|
// Provide settings modal methods to child components
|
|
|
|
|
|
provide('settingsModal', {
|
|
|
|
|
|
openSettingsModal
|
|
|
|
|
|
})
|
2024-07-14 16:42:38 +08:00
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<template>
|
2024-09-24 11:58:28 +08:00
|
|
|
|
<div class="app-layout" :class="{ 'use-top-bar': layoutSettings.useTopBar }">
|
|
|
|
|
|
<div class="header" :class="{ 'top-bar': layoutSettings.useTopBar }">
|
2024-11-14 20:07:49 +08:00
|
|
|
|
<div class="logo circle">
|
2024-09-24 11:58:28 +08:00
|
|
|
|
<router-link to="/">
|
2025-06-22 23:07:57 +08:00
|
|
|
|
<img :src="infoStore.organization.avatar">
|
2024-09-24 11:58:28 +08:00
|
|
|
|
</router-link>
|
2024-07-14 16:42:38 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
<div class="nav">
|
2025-03-25 05:40:07 +08:00
|
|
|
|
<!-- 使用mainList渲染导航项 -->
|
2025-10-05 14:50:34 +08:00
|
|
|
|
<RouterLink
|
2025-03-25 05:40:07 +08:00
|
|
|
|
v-for="(item, index) in mainList"
|
|
|
|
|
|
:key="index"
|
2025-10-05 14:50:34 +08:00
|
|
|
|
:to="item.path"
|
|
|
|
|
|
v-show="!item.hidden"
|
|
|
|
|
|
class="nav-item"
|
|
|
|
|
|
active-class="active">
|
|
|
|
|
|
<a-tooltip placement="right">
|
|
|
|
|
|
<template #title>{{ item.name }}</template>
|
2025-10-04 22:59:25 +08:00
|
|
|
|
<component class="icon" :is="route.path.startsWith(item.path) ? item.activeIcon : item.icon" size="22"/>
|
2025-10-05 14:50:34 +08:00
|
|
|
|
</a-tooltip>
|
|
|
|
|
|
</RouterLink>
|
2025-10-11 15:02:24 +08:00
|
|
|
|
<div
|
|
|
|
|
|
class="nav-item task-center"
|
|
|
|
|
|
:class="{ active: isDrawerOpen }"
|
|
|
|
|
|
@click="taskerStore.openDrawer()"
|
|
|
|
|
|
>
|
|
|
|
|
|
<a-tooltip placement="right">
|
|
|
|
|
|
<template #title>任务中心</template>
|
|
|
|
|
|
<a-badge
|
|
|
|
|
|
:count="activeTaskCount"
|
|
|
|
|
|
:overflow-count="99"
|
|
|
|
|
|
class="task-center-badge"
|
|
|
|
|
|
size="small"
|
|
|
|
|
|
>
|
2025-11-05 10:15:17 +08:00
|
|
|
|
<CircleCheck class="icon" size="22" />
|
2025-10-11 15:02:24 +08:00
|
|
|
|
</a-badge>
|
|
|
|
|
|
</a-tooltip>
|
|
|
|
|
|
</div>
|
2024-07-14 16:42:38 +08:00
|
|
|
|
</div>
|
2025-06-27 01:53:30 +08:00
|
|
|
|
<div
|
|
|
|
|
|
ref="htmlRefHook"
|
|
|
|
|
|
class="fill debug-trigger"
|
|
|
|
|
|
></div>
|
2024-07-27 14:32:57 +08:00
|
|
|
|
<div class="github nav-item">
|
2025-04-01 00:39:54 +08:00
|
|
|
|
<a-tooltip placement="right">
|
2025-05-20 20:49:50 +08:00
|
|
|
|
<template #title>欢迎 Star</template>
|
2025-04-01 00:39:54 +08:00
|
|
|
|
<a href="https://github.com/xerrors/Yuxi-Know" target="_blank" class="github-link">
|
2025-11-23 01:39:44 +08:00
|
|
|
|
<GithubOutlined class="icon" />
|
2025-04-01 00:39:54 +08:00
|
|
|
|
<span v-if="githubStars > 0" class="github-stars">
|
2025-05-04 21:04:01 +08:00
|
|
|
|
<span class="star-count">{{ (githubStars / 1000).toFixed(1) }}k</span>
|
2025-04-01 00:39:54 +08:00
|
|
|
|
</span>
|
|
|
|
|
|
</a>
|
|
|
|
|
|
</a-tooltip>
|
|
|
|
|
|
</div>
|
2025-05-05 16:31:35 +08:00
|
|
|
|
<!-- 用户信息组件 -->
|
|
|
|
|
|
<div class="nav-item user-info">
|
2025-11-25 22:34:44 +08:00
|
|
|
|
<UserInfoComponent />
|
2025-05-05 16:31:35 +08:00
|
|
|
|
</div>
|
2026-01-07 20:59:30 +08:00
|
|
|
|
</div>
|
2024-09-14 02:46:21 +08:00
|
|
|
|
<router-view v-slot="{ Component, route }" id="app-router-view">
|
|
|
|
|
|
<keep-alive v-if="route.meta.keepAlive !== false">
|
2024-07-14 16:42:38 +08:00
|
|
|
|
<component :is="Component" />
|
|
|
|
|
|
</keep-alive>
|
2024-09-14 02:46:21 +08:00
|
|
|
|
<component :is="Component" v-else />
|
2024-07-14 16:42:38 +08:00
|
|
|
|
</router-view>
|
2025-06-27 01:53:30 +08:00
|
|
|
|
|
|
|
|
|
|
<!-- Debug Modal -->
|
|
|
|
|
|
<a-modal
|
|
|
|
|
|
v-model:open="showDebugModal"
|
|
|
|
|
|
title="调试面板"
|
|
|
|
|
|
width="90%"
|
|
|
|
|
|
:footer="null"
|
|
|
|
|
|
@cancel="handleDebugModalClose"
|
|
|
|
|
|
:maskClosable="true"
|
|
|
|
|
|
:destroyOnClose="true"
|
|
|
|
|
|
class="debug-modal"
|
|
|
|
|
|
>
|
|
|
|
|
|
<DebugComponent />
|
|
|
|
|
|
</a-modal>
|
2025-10-11 15:02:24 +08:00
|
|
|
|
<TaskCenterDrawer />
|
2025-12-19 14:41:23 +08:00
|
|
|
|
<SettingsModal
|
|
|
|
|
|
v-model:visible="showSettingsModal"
|
|
|
|
|
|
@close="() => showSettingsModal = false"
|
|
|
|
|
|
/>
|
2024-07-14 16:42:38 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<style lang="less" scoped>
|
2025-09-21 13:33:09 +08:00
|
|
|
|
// Less 变量定义
|
2025-10-05 14:50:34 +08:00
|
|
|
|
@header-width: 50px;
|
2025-04-15 12:39:46 +08:00
|
|
|
|
|
2024-07-14 16:42:38 +08:00
|
|
|
|
.app-layout {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: row;
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
height: 100vh;
|
|
|
|
|
|
min-width: var(--min-width);
|
2024-07-27 14:32:57 +08:00
|
|
|
|
|
2024-08-25 20:29:24 +08:00
|
|
|
|
.debug-panel {
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
z-index: 100;
|
|
|
|
|
|
right: 0;
|
2024-09-01 21:14:23 +08:00
|
|
|
|
bottom: 50px;
|
|
|
|
|
|
border-radius: 20px 0 0 20px;
|
2024-08-25 20:29:24 +08:00
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
}
|
2024-07-14 16:42:38 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
div.header, #app-router-view {
|
|
|
|
|
|
height: 100%;
|
|
|
|
|
|
max-width: 100%;
|
2024-09-14 02:46:21 +08:00
|
|
|
|
user-select: none;
|
2024-07-14 16:42:38 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#app-router-view {
|
|
|
|
|
|
flex: 1 1 auto;
|
|
|
|
|
|
overflow-y: auto;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.header {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
2025-09-21 13:33:09 +08:00
|
|
|
|
flex: 0 0 @header-width;
|
2024-07-14 16:42:38 +08:00
|
|
|
|
justify-content: flex-start;
|
|
|
|
|
|
align-items: center;
|
2025-11-11 16:56:23 +08:00
|
|
|
|
background-color: var(--main-0);
|
2024-07-14 16:42:38 +08:00
|
|
|
|
height: 100%;
|
2025-09-21 13:33:09 +08:00
|
|
|
|
width: @header-width;
|
2025-09-11 03:09:17 +08:00
|
|
|
|
border-right: 1px solid var(--gray-100);
|
2024-07-14 16:42:38 +08:00
|
|
|
|
|
2025-06-27 01:53:30 +08:00
|
|
|
|
.nav {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
position: relative;
|
|
|
|
|
|
// height: 45px;
|
|
|
|
|
|
gap: 16px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 添加debug触发器样式
|
|
|
|
|
|
.debug-trigger {
|
|
|
|
|
|
position: relative;
|
|
|
|
|
|
height: 100%;
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
min-height: 20px;
|
|
|
|
|
|
flex-grow: 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-07-25 20:30:28 +08:00
|
|
|
|
.logo {
|
2025-09-20 22:53:37 +08:00
|
|
|
|
width: 34px;
|
|
|
|
|
|
height: 34px;
|
2026-01-15 04:54:53 +08:00
|
|
|
|
margin: 6px 0 20px 0;
|
2024-07-14 16:42:38 +08:00
|
|
|
|
|
|
|
|
|
|
img {
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
height: 100%;
|
2024-11-23 11:14:26 +08:00
|
|
|
|
border-radius: 4px; // 50% for circle
|
2024-07-14 16:42:38 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
& > a {
|
|
|
|
|
|
text-decoration: none;
|
|
|
|
|
|
font-size: 24px;
|
|
|
|
|
|
font-weight: bold;
|
2025-11-23 01:39:44 +08:00
|
|
|
|
color: var(--gray-900);
|
2024-07-14 16:42:38 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2024-07-16 18:14:27 +08:00
|
|
|
|
|
2024-07-25 20:30:28 +08:00
|
|
|
|
.nav-item {
|
2024-09-14 02:46:21 +08:00
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
justify-content: center;
|
2026-01-01 23:39:17 +08:00
|
|
|
|
width: 36px;
|
|
|
|
|
|
height: 36px;
|
2025-10-20 09:23:11 +08:00
|
|
|
|
padding: 4px;
|
2024-09-14 02:46:21 +08:00
|
|
|
|
border: 1px solid transparent;
|
2025-10-20 09:23:11 +08:00
|
|
|
|
border-radius: 12px;
|
2024-07-25 20:30:28 +08:00
|
|
|
|
background-color: transparent;
|
2025-11-23 01:39:44 +08:00
|
|
|
|
color: var(--gray-1000);
|
2024-07-25 20:30:28 +08:00
|
|
|
|
font-size: 20px;
|
2025-11-23 01:39:44 +08:00
|
|
|
|
transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
|
2025-04-15 12:39:46 +08:00
|
|
|
|
margin: 0;
|
2024-09-14 02:46:21 +08:00
|
|
|
|
text-decoration: none;
|
|
|
|
|
|
cursor: pointer;
|
2025-10-20 09:23:11 +08:00
|
|
|
|
outline: none;
|
|
|
|
|
|
|
|
|
|
|
|
& > svg:focus {
|
|
|
|
|
|
outline: none;
|
|
|
|
|
|
}
|
|
|
|
|
|
& > svg:focus-visible {
|
|
|
|
|
|
outline: none;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
&.active {
|
2025-11-23 01:39:44 +08:00
|
|
|
|
background-color: var(--gray-100);
|
2025-10-20 09:23:11 +08:00
|
|
|
|
font-weight: bold;
|
|
|
|
|
|
color: var(--main-color);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
&.warning {
|
2025-11-25 22:34:44 +08:00
|
|
|
|
color: var(--color-error-500);
|
2025-10-20 09:23:11 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
|
|
color: var(--main-color);
|
|
|
|
|
|
}
|
2024-09-14 02:46:21 +08:00
|
|
|
|
|
|
|
|
|
|
&.github {
|
|
|
|
|
|
padding: 10px 12px;
|
2025-10-05 15:43:11 +08:00
|
|
|
|
margin-bottom: 16px;
|
2024-09-24 11:58:28 +08:00
|
|
|
|
&:hover {
|
|
|
|
|
|
background-color: transparent;
|
|
|
|
|
|
border: 1px solid transparent;
|
|
|
|
|
|
}
|
2025-02-26 12:37:06 +08:00
|
|
|
|
|
|
|
|
|
|
.github-link {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
color: inherit;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.github-stars {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
|
margin-top: 4px;
|
|
|
|
|
|
|
|
|
|
|
|
.star-icon {
|
2025-11-25 22:34:44 +08:00
|
|
|
|
color: var(--color-warning-500);
|
2025-02-26 12:37:06 +08:00
|
|
|
|
font-size: 12px;
|
|
|
|
|
|
margin-right: 2px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.star-count {
|
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2024-09-14 02:46:21 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2025-04-01 00:39:54 +08:00
|
|
|
|
&.api-docs {
|
|
|
|
|
|
padding: 10px 12px;
|
|
|
|
|
|
}
|
2025-11-23 01:39:44 +08:00
|
|
|
|
&.docs { display: none; }
|
2025-10-11 15:02:24 +08:00
|
|
|
|
&.task-center {
|
|
|
|
|
|
.task-center-badge {
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-11-23 01:39:44 +08:00
|
|
|
|
&.theme-toggle-nav {
|
|
|
|
|
|
.theme-toggle-icon {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
height: 100%;
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
color: var(--gray-1000);
|
|
|
|
|
|
transition: color 0.2s ease-in-out;
|
|
|
|
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
|
|
color: var(--main-color);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2025-11-25 22:34:44 +08:00
|
|
|
|
&.user-info {
|
|
|
|
|
|
margin-bottom: 8px;
|
2024-09-14 02:46:21 +08:00
|
|
|
|
}
|
2024-07-14 16:42:38 +08:00
|
|
|
|
}
|
2024-07-27 14:32:57 +08:00
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-07-14 16:42:38 +08:00
|
|
|
|
|
2024-09-24 11:58:28 +08:00
|
|
|
|
.app-layout.use-top-bar {
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.header.top-bar {
|
|
|
|
|
|
flex-direction: row;
|
|
|
|
|
|
flex: 0 0 50px;
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
height: 50px;
|
|
|
|
|
|
border-right: none;
|
2025-07-30 11:00:50 +08:00
|
|
|
|
border-bottom: 1px solid var(--main-40);
|
|
|
|
|
|
background-color: var(--main-20);
|
2024-09-24 11:58:28 +08:00
|
|
|
|
padding: 0 20px;
|
|
|
|
|
|
gap: 24px;
|
|
|
|
|
|
|
|
|
|
|
|
.logo {
|
|
|
|
|
|
width: fit-content;
|
|
|
|
|
|
height: 28px;
|
|
|
|
|
|
margin-right: 16px;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
|
|
|
|
|
|
a {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
text-decoration: none;
|
|
|
|
|
|
color: inherit;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
img {
|
|
|
|
|
|
width: 28px;
|
|
|
|
|
|
height: 28px;
|
|
|
|
|
|
margin-right: 8px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.nav {
|
|
|
|
|
|
flex-direction: row;
|
|
|
|
|
|
height: auto;
|
|
|
|
|
|
gap: 20px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.nav-item {
|
|
|
|
|
|
flex-direction: row;
|
|
|
|
|
|
width: auto;
|
|
|
|
|
|
padding: 4px 16px;
|
|
|
|
|
|
margin: 0;
|
|
|
|
|
|
|
|
|
|
|
|
.icon {
|
|
|
|
|
|
margin-right: 8px;
|
|
|
|
|
|
font-size: 15px; // 减小图标大小
|
2025-05-20 20:49:50 +08:00
|
|
|
|
border: none;
|
|
|
|
|
|
outline: none;
|
|
|
|
|
|
|
|
|
|
|
|
&:focus, &:active {
|
|
|
|
|
|
border: none;
|
|
|
|
|
|
outline: none;
|
|
|
|
|
|
}
|
2024-09-24 11:58:28 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.text {
|
|
|
|
|
|
margin-top: 0;
|
|
|
|
|
|
font-size: 15px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-11-25 22:34:44 +08:00
|
|
|
|
&.github {
|
2024-09-24 11:58:28 +08:00
|
|
|
|
padding: 8px 12px;
|
|
|
|
|
|
|
|
|
|
|
|
.icon {
|
|
|
|
|
|
margin-right: 0;
|
|
|
|
|
|
font-size: 18px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
&.active {
|
2025-07-26 03:36:54 +08:00
|
|
|
|
color: var(--main-color);
|
2024-09-24 11:58:28 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
a {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
}
|
2025-02-26 12:37:06 +08:00
|
|
|
|
|
|
|
|
|
|
.github-stars {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
margin-left: 6px;
|
|
|
|
|
|
|
|
|
|
|
|
.star-icon {
|
2025-11-25 22:34:44 +08:00
|
|
|
|
color: var(--color-warning-500);
|
2025-02-26 12:37:06 +08:00
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
margin-right: 2px;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2024-09-24 11:58:28 +08:00
|
|
|
|
}
|
2025-11-23 01:39:44 +08:00
|
|
|
|
|
|
|
|
|
|
&.theme-toggle-nav {
|
|
|
|
|
|
padding: 8px 12px;
|
|
|
|
|
|
|
|
|
|
|
|
.theme-toggle-icon {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
color: var(--gray-1000);
|
|
|
|
|
|
transition: color 0.2s ease-in-out;
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
|
|
color: var(--main-color);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
&.active {
|
|
|
|
|
|
.theme-toggle-icon {
|
|
|
|
|
|
color: var(--main-color);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2024-09-24 11:58:28 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2025-10-11 01:22:05 +08:00
|
|
|
|
</style>
|