mirror of
https://gitee.com/mirrors/AllinSSL.git
synced 2026-03-13 01:50:53 +08:00
【新增】插件git同步模块,用于同步项目内容,加速项目开发
【调整】前端暗色问题
This commit is contained in:
@@ -5,12 +5,12 @@
|
||||
|
||||
/* 侧边栏样式 */
|
||||
.sider {
|
||||
@apply h-screen dark:bg-gray-800 shadow-lg z-10 transition-all duration-300 ease-in-out;
|
||||
@apply h-screen shadow-lg z-10 transition-all duration-300 ease-in-out;
|
||||
}
|
||||
|
||||
/* Logo容器样式 */
|
||||
.logoContainer {
|
||||
@apply flex items-center px-[2rem] h-[var(--n-sider-login-height)] border-b dark:border-gray-700 relative;
|
||||
@apply flex items-center px-[2rem] h-[var(--n-sider-login-height)] border-b relative;
|
||||
border-color: var(--n-border-color);
|
||||
}
|
||||
|
||||
@@ -36,42 +36,42 @@
|
||||
|
||||
/* 折叠按钮样式 */
|
||||
.collapsedIcon {
|
||||
@apply w-[4.2rem] h-[3.6rem] hover:bg-gray-200 hover:text-gray-500 hover:dark:bg-gray-500 absolute right-[1rem] rounded-[.4rem] flex items-center justify-center cursor-pointer transition-all duration-300;
|
||||
@apply w-[4.2rem] h-[3.6rem] hover:bg-gray-200 hover:text-gray-500 absolute right-[1rem] rounded-[.4rem] flex items-center justify-center cursor-pointer transition-all duration-300;
|
||||
}
|
||||
|
||||
/* 头部样式 */
|
||||
.header {
|
||||
@apply h-[var(--n-header-height)] bg-[var(--n-header-color)] border-b dark:border-gray-700 shadow-sm z-10 transition-all duration-300 ease-in-out flex items-center justify-end px-6;
|
||||
@apply h-[var(--n-header-height)] bg-[var(--n-header-color)] border-b shadow-sm z-10 transition-all duration-300 ease-in-out flex items-center justify-end px-6;
|
||||
border-color: var(--n-border-color);
|
||||
}
|
||||
|
||||
/* 系统信息样式 */
|
||||
.systemInfo {
|
||||
@apply flex items-center space-x-4 text-[1.2rem] text-gray-600 dark:text-gray-300;
|
||||
@apply flex items-center space-x-4 text-[1.2rem] text-gray-600 ;
|
||||
}
|
||||
|
||||
/* 内容区域样式 */
|
||||
.content {
|
||||
@apply flex-1 transition-all duration-300 ease-in-out bg-slate-50 dark:bg-gray-900 p-[var(--n-content-padding)] h-[calc(100vh-var(--n-main-diff-height))] overflow-y-auto;
|
||||
@apply flex-1 transition-all duration-300 ease-in-out p-[var(--n-content-padding)] h-[calc(100vh-var(--n-main-diff-height))] bg-[var(--n-layout-content-background-color)] overflow-y-auto;
|
||||
transition: padding 0s;
|
||||
}
|
||||
|
||||
/* 折叠按钮样式 */
|
||||
.collapseButton {
|
||||
@apply absolute right-0 top-1/2 -translate-y-1/2 translate-x-1/2 dark:bg-gray-800 rounded-full p-2 shadow-lg cursor-pointer hover:bg-gray-100 dark:hover:bg-gray-700 transition-all duration-300;
|
||||
@apply absolute right-0 top-1/2 -translate-y-1/2 translate-x-1/2 rounded-full p-2 shadow-lg cursor-pointer hover:bg-gray-100 transition-all duration-300;
|
||||
}
|
||||
|
||||
/* 子路由导航样式 */
|
||||
.subRouteNav {
|
||||
@apply mb-4 p-4 bg-white dark:bg-gray-800 rounded-lg shadow-sm;
|
||||
@apply mb-4 p-4 bg-white rounded-lg shadow-sm;
|
||||
}
|
||||
|
||||
/* 子路由标题样式 */
|
||||
.subRouteTitle {
|
||||
@apply text-lg font-medium mb-2 text-gray-700 dark:text-gray-300;
|
||||
@apply text-lg font-medium mb-2 text-gray-700 ;
|
||||
}
|
||||
|
||||
/* 子路由面包屑样式 */
|
||||
.breadcrumb {
|
||||
@apply bg-white dark:bg-gray-800 p-3 rounded-lg shadow-sm mb-4;
|
||||
@apply bg-white p-3 rounded-lg shadow-sm mb-4;
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ export default defineComponent({
|
||||
useController()
|
||||
|
||||
// 获取主题变量
|
||||
const cssVars = useThemeCssVar(['cardColor', 'headerColor'])
|
||||
const cssVars = useThemeCssVar(['cardColor', 'headerColor', 'contentColor'])
|
||||
|
||||
return () => (
|
||||
<NLayout class={styles.layoutContainer} hasSider style={cssVars.value}>
|
||||
@@ -66,7 +66,7 @@ export default defineComponent({
|
||||
<NLayoutHeader class={styles.header}>
|
||||
<div class={styles.systemInfo}>
|
||||
<NBadge value={1} show={false} dot>
|
||||
<span class="px-[.5rem] cursor-pointer">v1.0</span>
|
||||
<span class="px-[.5rem] cursor-pointer">v1.0.1</span>
|
||||
</NBadge>
|
||||
</div>
|
||||
</NLayoutHeader>
|
||||
|
||||
@@ -83,7 +83,7 @@ export const useController = () => {
|
||||
...routeMenuItems,
|
||||
{
|
||||
key: 'logout',
|
||||
label: () => <a onClick={handleLogout}>{$t('t_0_1744168657526')}</a>,
|
||||
label: () => <a onClick={handleLogout}>{$t('t_15_1745457484292')}</a>,
|
||||
icon: renderIcon('logout'),
|
||||
},
|
||||
]
|
||||
|
||||
@@ -4,6 +4,7 @@ import type { RouteName } from './types'
|
||||
import { DnsProviderOption, NotifyProviderOption } from '@/types/setting'
|
||||
import { getReportList } from '@api/setting'
|
||||
import { getAccessAllList } from '@api/index'
|
||||
import { $t } from '@locales/index'
|
||||
|
||||
/**
|
||||
* @description 布局相关的状态管理
|
||||
@@ -34,7 +35,7 @@ export const useLayoutStore = defineStore('layout-store', () => {
|
||||
/**
|
||||
* @description 导航状态
|
||||
*/
|
||||
const menuActive = useLocalStorage<RouteName>('menu-active', 'home')
|
||||
const menuActive = useSessionStorage<RouteName>('menu-active', 'home')
|
||||
|
||||
/**
|
||||
* @description 布局内边距
|
||||
@@ -48,6 +49,47 @@ export const useLayoutStore = defineStore('layout-store', () => {
|
||||
*/
|
||||
const locales = useLocalStorage<string>('locales-active', 'zhCN')
|
||||
|
||||
/**
|
||||
* @description 主机提供商
|
||||
*/
|
||||
const sourceTypes = ref({
|
||||
// 主机提供商
|
||||
ssh: { name: 'SSH', access: ['host'] },
|
||||
btpanel: { name: $t('t_10_1745735765165'), access: ['host'] },
|
||||
'1panel': { name: '1Panel', access: ['host'] },
|
||||
aliyun: { name: $t('t_2_1747019616224'), access: ['dns', 'host'] },
|
||||
tencentcloud: { name: $t('t_3_1747019616129'), access: ['dns', 'host'] },
|
||||
huaweicloud: { name: '华为云', access: ['dns'] },
|
||||
cloudflare: { name: 'Cloudflare', access: ['dns'] },
|
||||
})
|
||||
|
||||
/**
|
||||
* @description 主机提供商衍生类型
|
||||
*/
|
||||
const sourceDerivationTypes = ref({
|
||||
// 网站
|
||||
'btpanel-site': { name: $t('t_11_1745735766456') },
|
||||
'1panel-site': { name: $t('t_13_1745735766084') },
|
||||
// 云服务
|
||||
'aliyun-cdn': { name: $t('t_16_1745735766712') },
|
||||
'aliyun-oss': { name: $t('t_2_1746697487164') },
|
||||
'tencentcloud-cdn': { name: $t('t_14_1745735766121') },
|
||||
'tencentcloud-cos': { name: $t('t_15_1745735768976') },
|
||||
})
|
||||
|
||||
/**
|
||||
* @description 消息通知提供商
|
||||
*/
|
||||
const pushSourceType = ref({
|
||||
mail: { name: $t('t_68_1745289354676') },
|
||||
dingtalk: { name: $t('t_32_1746773348993') },
|
||||
wecom: { name: $t('t_33_1746773350932') },
|
||||
feishu: { name: $t('t_34_1746773350153') },
|
||||
webhook: { name: 'WebHook' },
|
||||
})
|
||||
|
||||
// ==============================
|
||||
// UI 交互方法
|
||||
// ==============================
|
||||
// UI 交互方法
|
||||
// ==============================
|
||||
@@ -88,7 +130,7 @@ export const useLayoutStore = defineStore('layout-store', () => {
|
||||
*/
|
||||
const resetDataInfo = (): void => {
|
||||
menuActive.value = 'home'
|
||||
localStorage.removeItem('menu-active')
|
||||
sessionStorage.removeItem('menu-active')
|
||||
}
|
||||
|
||||
// ==============================
|
||||
@@ -126,14 +168,12 @@ export const useLayoutStore = defineStore('layout-store', () => {
|
||||
try {
|
||||
dnsProvider.value = []
|
||||
const { data } = await getAccessAllList({ type }).fetch()
|
||||
console.timeEnd('loadDnsProviders')
|
||||
dnsProvider.value =
|
||||
data?.map((item) => ({
|
||||
label: item.name,
|
||||
value: item.id.toString(),
|
||||
type: item.type,
|
||||
})) || []
|
||||
console.timeEnd('loadDnsProviders')
|
||||
} catch (error) {
|
||||
handleError(error)
|
||||
}
|
||||
@@ -151,6 +191,9 @@ export const useLayoutStore = defineStore('layout-store', () => {
|
||||
isCollapsed,
|
||||
layoutPadding,
|
||||
menuActive,
|
||||
sourceTypes,
|
||||
sourceDerivationTypes,
|
||||
pushSourceType,
|
||||
|
||||
// 方法
|
||||
resetDataInfo,
|
||||
|
||||
Reference in New Issue
Block a user