【新增】插件git同步模块,用于同步项目内容,加速项目开发

【调整】前端暗色问题
This commit is contained in:
chudong
2025-05-14 16:50:56 +08:00
parent dc43da936b
commit e6947ec5c4
215 changed files with 19918 additions and 9710 deletions

View File

@@ -5,6 +5,7 @@ import { $t } from '@locales/index'
import { useThemeCssVar } from '@baota/naive-ui/theme'
import { useController } from './useController'
import EmptyState from '@components/emptyState/index'
import BaseComponent from '@components/baseComponent'
/**
@@ -48,8 +49,13 @@ export default defineComponent({
></NInput>
),
content: () => (
<div class="rounded-lg bg-white">
<ApiTable size="medium" />
<div class="rounded-lg">
<ApiTable
size="medium"
v-slots={{
empty: () => <EmptyState addButtonText={$t('t_0_1745289355714')} onAddClick={openAddForm} />,
}}
/>
</div>
),
footerRight: () => (

View File

@@ -25,7 +25,7 @@ import {
useLoadingMask,
} from '@baota/naive-ui/hooks'
import { useError } from '@baota/hooks/error'
import { isIp, isPort, isUrl } from '@baota/utils/business'
import { isEmail, isIp, isPort, isUrl } from '@baota/utils/business'
import { $t } from '@locales/index'
import { useStore } from './useStore'
@@ -35,10 +35,20 @@ import type { FormConfig } from '@baota/naive-ui/types/form'
import ApiManageForm from './components/apiManageForm'
import SvgIcon from '@components/svgIcon'
import TypeIcon from '@components/typeIcon'
import { useStore as useLayoutStore } from '@layout/useStore'
const { sourceTypes } = useLayoutStore()
// 状态和方法
const { accessTypes, apiFormProps, fetchAccessList, deleteExistingAccess, addNewAccess, updateExistingAccess } =
useStore()
const {
accessTypeMap,
apiFormProps,
fetchAccessList,
deleteExistingAccess,
addNewAccess,
updateExistingAccess,
resetApiForm,
} = useStore()
// 消息和对话框
const { handleError } = useError()
@@ -47,12 +57,6 @@ const { handleError } = useError()
* @returns {Object} 返回授权API相关的状态数据和处理方法
*/
export const useController = () => {
// 表格列配置
const accessTypeMap = {
dns: $t('t_3_1745735765112'),
host: $t('t_0_1746754500246'),
}
/**
* @description 创建表格列配置
* @returns {DataTableColumns<AccessItem>} 返回表格列配置数组
@@ -69,7 +73,7 @@ export const useController = () => {
{
title: $t('t_1_1746754499371'),
key: 'type',
width: 180,
width: 120,
render: (row) => <TypeIcon icon={row.type} type="success" />,
},
{
@@ -78,10 +82,10 @@ export const useController = () => {
width: 180,
render: (row) => (
<NSpace>
{row.access_type.map((type) => {
{row.access_type?.map((type) => {
return (
<NTag type="default" size="small">
{accessTypeMap[type]}
<NTag key={type} type={type === 'dns' ? 'success' : 'info'} size="small">
{accessTypeMap[type as keyof typeof accessTypeMap]}
</NTag>
)
})}
@@ -159,6 +163,7 @@ export const useController = () => {
footer: true,
onUpdateShow: (show) => {
if (!show) fetch()
resetApiForm()
},
})
}
@@ -176,6 +181,7 @@ export const useController = () => {
footer: true,
onUpdateShow: (show) => {
if (!show) fetch()
resetApiForm()
},
})
}
@@ -207,7 +213,6 @@ export const useController = () => {
ApiTablePage,
param,
data,
accessTypes,
openAddForm,
}
}
@@ -282,9 +287,17 @@ export const useApiFormController = (props: { data: AccessItem }) => {
},
},
api_key: {
required: true,
message: $t('t_3_1745317313561'),
trigger: 'input',
validator: (rule: FormItemRule, value: string, callback: (error?: Error) => void) => {
if (!value.length) {
if (param.value.type === 'cloudflare') {
return callback(new Error($t('t_0_1747042966820')))
} else if (param.value.type === 'btpanel') {
return callback(new Error($t('t_1_1747042969705')))
}
}
callback()
},
},
access_key_id: {
required: true,
@@ -302,15 +315,41 @@ export const useApiFormController = (props: { data: AccessItem }) => {
trigger: 'input',
},
secret_key: {
required: true,
message: $t('t_7_1745317313831'),
trigger: 'input',
validator: (rule: FormItemRule, value: string, callback: (error?: Error) => void) => {
if (!value.length) {
if (param.value.type === 'tencentcloud') {
return callback(new Error($t('t_2_1747042967277')))
} else if (param.value.type === 'huaweicloud') {
return callback(new Error($t('t_3_1747042967608')))
}
}
callback()
},
},
access_key: {
required: true,
message: $t('t_4_1747042966254'),
trigger: 'input',
},
email: {
trigger: 'input',
validator: (rule: FormItemRule, value: string, callback: (error?: Error) => void) => {
if (!isEmail(value)) {
return callback(new Error($t('t_5_1747042965911')))
}
callback()
},
},
},
}
// 类型列表
const typeList = Object.entries(accessTypes.value).map(([key, value]) => ({ label: value, value: key }))
const typeList = Object.entries(sourceTypes.value).map(([key, value]) => ({
label: value.name,
value: key,
access: value.access,
}))
// 表单配置
const config = computed(() => {
@@ -394,6 +433,12 @@ export const useApiFormController = (props: { data: AccessItem }) => {
case 'tencentcloud':
items.push(useFormInput('SecretId', 'config.secret_id'), useFormInput('SecretKey', 'config.secret_key'))
break
case 'huaweicloud':
items.push(useFormInput('AccessKey', 'config.access_key'), useFormInput('SecretKey', 'config.secret_key'))
break
case 'cloudflare':
items.push(useFormInput('邮箱', 'config.email'), useFormInput('APIKey', 'config.api_key'))
break
default:
break
}
@@ -445,16 +490,13 @@ export const useApiFormController = (props: { data: AccessItem }) => {
*/
const renderSingleSelectTag = ({ option }: Record<string, any>): VNode => {
return (
<div class="flex items-center">
<NFlex class="w-full">
{option.label ? (
<NFlex>
<SvgIcon icon={`resources-${option.value}`} size="2rem" />
<NText>{option.label}</NText>
</NFlex>
renderLabel(option)
) : (
<span class="text-[1.4rem] text-gray-400">{$t('t_0_1745833934390')}</span>
)}
</div>
</NFlex>
)
}
@@ -463,11 +505,22 @@ export const useApiFormController = (props: { data: AccessItem }) => {
* @param {Record<string, any>} option - 选项
* @returns {VNode} 渲染后的VNode
*/
const renderLabel = (option: { value: string; label: string }): VNode => {
const renderLabel = (option: { value: string; label: string; access: string[] }): VNode => {
return (
<NFlex>
<SvgIcon icon={`resources-${option.value}`} size="2rem" />
<NText>{option.label}</NText>
<NFlex justify="space-between" class="w-[38rem]">
<NFlex align="center" size="small">
<SvgIcon icon={`resources-${option.value}`} size="1.6rem" />
<NText>{option.label}</NText>
</NFlex>
<NFlex class="pr-[1rem]">
{option.access.map((item: string) => {
return (
<NTag type={item === 'dns' ? 'success' : 'info'} size="small" key={item}>
{accessTypeMap[item as keyof typeof accessTypeMap]}
</NTag>
)
})}
</NFlex>
</NFlex>
)
}
@@ -504,6 +557,7 @@ export const useApiFormController = (props: { data: AccessItem }) => {
try {
openLoad()
await fetch()
resetApiForm()
close()
} catch (error) {
return handleError(error)

View File

@@ -15,13 +15,6 @@ const message = useMessage() // 导入消息钩子
*/
export const useAuthApiManageStore = defineStore('auth-api-manage-store', () => {
// -------------------- 状态定义 --------------------
const accessTypes = ref({
ssh: 'SSH',
aliyun: '阿里云',
tencentcloud: '腾讯云',
btpanel: '宝塔',
'1panel': '1Panel',
})
/** 添加/编辑API表单 */
const apiFormProps = ref({
@@ -34,6 +27,12 @@ export const useAuthApiManageStore = defineStore('auth-api-manage-store', () =>
},
})
// 表格列配置
const accessTypeMap = {
dns: $t('t_3_1745735765112'),
host: $t('t_0_1746754500246'),
}
// -------------------- 请求方法 --------------------
/**
* 获取授权API列表
@@ -123,8 +122,8 @@ export const useAuthApiManageStore = defineStore('auth-api-manage-store', () =>
return {
// 状态
accessTypes,
apiFormProps,
accessTypeMap,
// 方法
fetchAccessList,

View File

@@ -5,9 +5,11 @@ import { RouterView } from '@baota/router'
import { PlusOutlined } from '@vicons/antd'
import { Search } from '@vicons/carbon'
import { useController } from './useController'
import BaseComponent from '@components/baseComponent'
import { useRouter } from 'vue-router'
import BaseComponent from '@components/baseComponent'
import EmptyState from '@components/emptyState/index'
/**
* 工作流页面组件
*/
@@ -52,7 +54,7 @@ export default defineComponent({
headerLeft: () => (
<NButton type="primary" size="large" class="px-5" onClick={handleAddWorkflow}>
<PlusOutlined class="text-[var(--text-color-3)] w-[1.6rem]" />
<span class="px-2">{$t('t_0_1745227838699')}</span>
<span class="px-2">{$t('t_0_1747047213730')}</span>
</NButton>
),
headerRight: () => (
@@ -76,8 +78,14 @@ export default defineComponent({
></NInput>
),
content: () => (
<div class="rounded-lg bg-white">
<WorkflowTable size="medium" />
<div class="rounded-lg ">
<WorkflowTable size="medium">
{{
empty: () => (
<EmptyState addButtonText={$t('t_0_1747047213730')} onAddClick={handleAddWorkflow} />
),
}}
</WorkflowTable>
</div>
),
footerRight: () => (

View File

@@ -55,7 +55,7 @@ const statusCol = <T,>(key: string, title: string): TableColumn<T> => ({
text: $t('t_1_1746773348701'),
}
return (
<NTag type={status.type as any} size="small" bordered={false}>
<NTag type={status.type as any} size="small">
{status.text}
</NTag>
)

View File

@@ -6,6 +6,7 @@ import { $t } from '@locales/index'
import { useController } from './useController'
import BaseComponent from '@components/baseComponent'
import EmptyState from '@components/emptyState'
/**
* 证书管理组件
@@ -50,8 +51,12 @@ export default defineComponent({
></NInput>
),
content: () => (
<div class="rounded-lg bg-white">
<CertTable size="medium" />
<div class="rounded-lg">
<CertTable size="medium">
{{
empty: () => <EmptyState addButtonText={$t('t_1_1747047213009')} onAddClick={openUploadModal} />,
}}
</CertTable>
</div>
),
footerRight: () => (

View File

@@ -69,7 +69,7 @@ export const useController = () => {
const [_, type, text] = config.find((item) => item[0]) ?? ['default', 'error', '获取失败']
console.log(config)
return (
<NTag type={type} size="small" bordered={false}>
<NTag type={type} size="small">
{text}
</NTag>
)

View File

@@ -1,72 +1,10 @@
/* 主题颜色变量 */
:root {
--text-primary: #1a1a1a;
--text-secondary: #666666;
--text-success: #22c55e;
--text-warning: #eab308;
--text-error: #ef4444;
--text-info: #3b82f6;
--text-default: #6b7280;
--bg-primary: #ffffff;
--bg-secondary: #f3f4f6;
--bg-success-light: #dcfce7;
--bg-warning-light: #fef9c3;
--bg-error-light: #fee2e2;
--bg-info-light: #dbeafe;
/* 快捷入口卡片颜色 */
--workflow-bg: rgba(16, 185, 129, 0.08);
--workflow-icon-bg: rgba(16, 185, 129, 0.15);
--workflow-color: #10B981;
--cert-bg: rgba(245, 158, 11, 0.08);
--cert-icon-bg: rgba(245, 158, 11, 0.15);
--cert-color: #F59E0B;
--monitor-bg: rgba(139, 92, 246, 0.08);
--monitor-icon-bg: rgba(139, 92, 246, 0.15);
--monitor-color: #8B5CF6;
}
/* 暗色模式 */
:root[data-theme='dark'] {
--text-primary: #ffffff;
--text-secondary: #9ca3af;
--text-success: #4ade80;
--text-warning: #facc15;
--text-error: #f87171;
--text-info: #60a5fa;
--text-default: #9ca3af;
--bg-primary: #1a1a1a;
--bg-secondary: #262626;
--bg-success-light: rgba(34, 197, 94, 0.2);
--bg-warning-light: rgba(234, 179, 8, 0.2);
--bg-error-light: rgba(239, 68, 68, 0.2);
--bg-info-light: rgba(59, 130, 246, 0.2);
/* 暗色模式下的快捷入口卡片颜色 */
--workflow-bg: rgba(16, 185, 129, 0.12);
--workflow-icon-bg: rgba(16, 185, 129, 0.2);
--workflow-color: #34D399;
--cert-bg: rgba(245, 158, 11, 0.12);
--cert-icon-bg: rgba(245, 158, 11, 0.2);
--cert-color: #FCD34D;
--monitor-bg: rgba(139, 92, 246, 0.12);
--monitor-icon-bg: rgba(139, 92, 246, 0.2);
--monitor-color: #A78BFA;
}
/* 状态文本颜色 */
.stateText {
&.success { color: var(--text-success); }
&.warning { color: var(--text-warning); }
&.error { color: var(--text-error); }
&.info { color: var(--text-info); }
&.default { color: var(--text-default); }
&.success { color: #22c55e; }
&.warning { color: #eab308; }
&.error { color: #ef4444; }
&.info { color: #3b82f6; }
&.default { color: #6b7280; }
}
/* 卡片样式 */
@@ -145,15 +83,3 @@
font-weight: 500;
margin-bottom: 0.75rem;
}
/* 表格样式 */
.tableText {
color: var(--text-secondary);
}
.viewAllButton {
color: var(--text-info);
&:hover {
color: var(--text-primary);
}
}

View File

@@ -23,7 +23,7 @@ export default defineComponent({
<div class="grid grid-cols-1 md:grid-cols-3 gap-4">
{/* 自动化工作流概览卡片 */}
<div onClick={() => pushToWorkflow()} class="cursor-pointer relative">
<div class="absolute right-0 top-0 w-24 h-24 rounded-full bg-blue-50 dark:bg-blue-900/30 opacity-70 -z-10"></div>
<div class="absolute right-0 top-0 w-24 h-24 rounded-full bg-blue-50 opacity-70 -z-10"></div>
<NCard class="transition-all duration-300 rounded-[0.6rem]" hoverable={true} bordered={false}>
<div class="flex items-center justify-center">
<div class="flex-1">
@@ -33,7 +33,7 @@ export default defineComponent({
<span class="text-[2.4rem] font-bold">{overviewData.value.workflow.count}</span>
<p class={styles.tableText}>{$t('t_3_1746773348798')}</p>
</div>
<div class="border-l-2 dark:border-gray-600 pl-[2rem] ml-[3rem]">
<div class="border-l-2 pl-[2rem] ml-[3rem] h-[5rem] lining-[5rem]">
<div class="flex items-center space-x-1">
<span class="w-4 h-4 rounded-full mr-[.6rem] bg-green-500"></span>
<span class={styles.tableText}>
@@ -60,7 +60,7 @@ export default defineComponent({
{/* 证书管理概览卡片 */}
<div onClick={() => pushToCertManage()} class="cursor-pointer relative">
<div class="absolute right-0 top-0 w-24 h-24 rounded-full bg-blue-50 dark:bg-blue-900/30 opacity-70 -z-10"></div>
<div class="absolute right-0 top-0 w-24 h-24 rounded-full bg-blue-50 opacity-70 -z-10"></div>
<NCard class="transition-all duration-300 rounded-[0.6rem]" hoverable={true} bordered={false}>
<div class="flex items-center justify-center">
<div class="flex-1">
@@ -70,7 +70,7 @@ export default defineComponent({
<span class="text-[2.4rem] font-bold">{overviewData.value.cert.count}</span>
<p class={styles.tableText}>{$t('t_3_1746773348798')}</p>
</div>
<div class="border-l-2 dark:border-gray-600 pl-[2rem] ml-[3rem]">
<div class="border-l-2 pl-[2rem] ml-[3rem] h-[5rem] lining-[5rem]">
<div class="flex items-center space-x-1">
<span class="w-4 h-4 rounded-full mr-[.6rem] bg-yellow-500"></span>
<span class={styles.tableText}>
@@ -97,7 +97,7 @@ export default defineComponent({
{/* 实时监控概览卡片 */}
<div onClick={() => pushToMonitor()} class="cursor-pointer relative">
<div class="absolute right-0 top-0 w-24 h-24 rounded-full bg-blue-50 dark:bg-blue-900/30 opacity-70 -z-10"></div>
<div class="absolute right-0 top-0 w-24 h-24 rounded-full bg-blue-50 opacity-70 -z-10"></div>
<NCard class="transition-all duration-300 rounded-[0.6rem]" hoverable={true} bordered={false}>
<div class="flex items-center justify-center">
<div class="flex-1">
@@ -107,7 +107,7 @@ export default defineComponent({
<span class="text-[2.4rem] font-bold">{overviewData.value.site_monitor.count}</span>
<p class={styles.tableText}>{$t('t_3_1746773348798')}</p>
</div>
<div class="border-l-2 dark:border-gray-600 pl-[2rem] ml-[3rem]">
<div class="border-l-2 pl-[2rem] ml-[3rem] h-[5rem] lining-[5rem]">
<div class="flex items-center space-x-1">
<span class="w-4 h-4 rounded-full mr-[.6rem] bg-red-500"></span>
<span class={styles.tableText}>
@@ -131,7 +131,7 @@ export default defineComponent({
<NCard class="rounded-[0.6rem] transition-all duration-300" hoverable={true} bordered={false}>
<div class="flex justify-between items-center mb-4">
<div class={styles.tableText}>{$t('t_8_1746773351524')}</div>
<NButton text onClick={() => pushToWorkflow()} class={styles.viewAllButton}>
<NButton text type="primary" onClick={() => pushToWorkflow()} class={styles.viewAllButton}>
{$t('t_9_1746773348221')}
<NIcon class="ml-1">
<ArrowRight />
@@ -216,7 +216,7 @@ export default defineComponent({
</div>
<div class="flex-1">
<div class={`${styles.title} text-[1.8rem] font-medium mb-3`}>{$t('t_11_1745289354516')}</div>
<div class={styles.tableText}>{$t('t_15_1746773358151')}</div>
<div class={styles.tableText}>{$t('t_1_1747019624067')}</div>
</div>
</div>
</NCard>

View File

@@ -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;
}

View File

@@ -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>

View File

@@ -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'),
},
]

View File

@@ -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,

View File

@@ -3,11 +3,10 @@ import { UserOutlined, LockOutlined, CodeOutlined } from '@vicons/antd'
import { useTheme, useThemeCssVar } from '@baota/naive-ui/theme'
import { $t } from '@locales/index'
import { useController } from './useController'
import styles from './index.module.css'
// import LocalesTips from '@baota/naive-ui/components/localesTips'
// import ThemeTips from '@baota/naive-ui/components/themeTips'
import LocalesTips from '@baota/naive-ui/components/localesTips'
import ThemeTips from '@baota/naive-ui/components/themeTips'
export default defineComponent({
setup() {
@@ -27,15 +26,15 @@ export default defineComponent({
class={styles.container}
style={`background-image:${isDark.value ? 'url(/static/images/login-bg-dark.svg)' : 'url(/static/images/login-bg.svg)'};`}
>
{/* <div class="absolute z-[99] top-0 right-0 p-[2rem] flex w-[120px] justify-between">
<div class="absolute z-[99] top-0 right-0 p-[2rem] flex w-[120px] justify-between">
<LocalesTips />
<ThemeTips />
</div> */}
</div>
<div class={styles.loginBox}>
<div class={styles.leftSection}>
<h2 class={styles.leftTitle}>
<img src="/static/images/logo.png" alt="logo" class={styles.logo} />
<span>{$t('t_0_1744164843238')}</span>
<span>{$t('t_2_1747047214975')}</span>
</h2>
<div class={styles.leftImageWrapper}>
<img src="/static/images/login-display.svg" alt={$t('t_1_1744164835667')} class={styles.leftImage} />

View File

@@ -7,6 +7,7 @@ import { useThemeCssVar } from '@baota/naive-ui/theme'
import { useController } from './useController'
import BaseComponent from '@components/baseComponent'
import EmptyState from '@components/emptyState'
/**
* 监控管理组件
@@ -52,8 +53,12 @@ export default defineComponent({
></NInput>
),
content: () => (
<div class="rounded-lg bg-white">
<MonitorTable size="medium" />
<div class="rounded-lg">
<MonitorTable size="medium">
{{
empty: () => <EmptyState addButtonText={$t('t_11_1745289354516')} onAddClick={openAddForm} />,
}}
</MonitorTable>
</div>
),
footerRight: () => (

View File

@@ -14,7 +14,7 @@ export default defineComponent({
<NDescriptions bordered>
<NDescriptionsItem label={$t('t_5_1745833933241')}>
<div class="flex items-center">
<span class="text-[2rem] font-medium">v1.0.0</span>
<span class="text-[2rem] font-medium">v1.0.1</span>
</div>
</NDescriptionsItem>
<NDescriptionsItem label={$t('t_29_1746667589773')}>
@@ -34,7 +34,7 @@ export default defineComponent({
<NCard title={$t('t_13_1745833933630')} class="mb-4">
<div class="about-content">
<p class="text-gray-700 leading-relaxed">
<p class="text-[3rem] font-medium">ALLinSSL</p>
<p class="text-[3rem] font-medium">AllinSSL</p>
<br />
<p class="text-[1.6rem] text-primary mb-[2rem]">{$t('t_35_1746773362992')}</p>
<span class="text-[1.4rem] mb-[1rem] text-gray-500">

View File

@@ -88,7 +88,7 @@ export const useSettingsStore = defineStore('settings-store', () => {
wechat: 'https://example.com/wechat_qr.png',
},
description: $t(
'ALLinSSL \n\r开源免费的 SSL 证书自动化管理平台 \n\r一键自动化申请、续期、部署、监控所有 SSL/TLS 证书,支持跨云环境和多 CA (coding~),告别繁琐配置和高昂费用。',
'AllinSSL \n\r开源免费的 SSL 证书自动化管理平台 \n\r一键自动化申请、续期、部署、监控所有 SSL/TLS 证书,支持跨云环境和多 CA (coding~),告别繁琐配置和高昂费用。',
),
})