fix: 优化后台列表与系统设置布局

This commit is contained in:
Nixevol
2026-07-04 22:02:07 +08:00
parent d484da3862
commit 2333033b19
10 changed files with 303 additions and 150 deletions
+1 -1
View File
@@ -90,7 +90,7 @@ pnpm dev:client # 客户端 http://localhost:5174
### 出库导入与备份
- 出库批量导入使用 ZIP:根目录包含 1 个 xlsx 和 `images/` 文件夹,xlsx 中出库实况图路径填写 `images/xxx.jpg`,多张用英文分号分隔。后台会先预览校验,确认后才正式入库。
- 超管可在后台「备份与恢复」手动创建、下载、删除备份包,也可在「系统设置」配置定时备份与保留策略。备份包保存在服务器本地非公开目录,不放入 `/uploads`。
- 超管可在后台「系统设置 → 备份与恢复」手动创建、下载、删除备份包,也可在同页配置定时备份与保留策略。备份包保存在服务器本地非公开目录,不放入 `/uploads`。
## 四、环境变量(.env)
+4 -1
View File
@@ -112,7 +112,10 @@
- 后台可交付增强(2026-07-04):完成追溯码批量删除、ZIP 出库批量导入预览确认、二维码 Excel 导出、操作日志、权限加固、图片预览、表头筛选、备份与恢复。新增依赖:API 使用 `adm-zip` 生成/解析备份包与导入模板,Admin 使用 `photoswipe` 作为后台图片/视频查看器。新增 Prisma 模型 `OperationLog`、`OutboundImportSession`、`OutboundImportRow`、`BackupRecord`,`TraceCode.outImages` 支持出库多图并兼容旧 `outImage`。
- 追溯码与出库导入约定(2026-07-04):`POST /trace-codes/batch/delete` 事务删除所选追溯码,先解除查询日志 `traceCodeId` 再回减批次计数;二维码后台接口取消公开访问,后台通过鉴权 blob 预览。出库批量导入改为 ZIP:根目录必须有且仅有一个 xlsx,图片放 `images/`,xlsx 的出库实况图路径用 `images/xxx.jpg`,多张用 `;` 分隔;上传后先创建导入会话并走 `IMPORT_OUTBOUND_PREVIEW` 队列,预览无错误后再 `commit` 进入 `IMPORT_OUTBOUND` 正式入库。导入会话和 jobs 按创建人隔离,超管可查看全部。
- 操作日志与权限约定(2026-07-04):`OperationLogInterceptor` 记录写操作、导出/下载、导入、备份恢复等关键后台操作,脱敏 password/token/authorization;操作日志页面和接口仅超管可用。JWT 守卫每次请求重新读取数据库账号,账号不存在或禁用立即 401,角色以数据库当前值为准;Jobs、导入会话等查询按用户隔离。系统设置新增 `operationLogRetentionDays`、`backupEnabled`、`backupSchedule`、`backupRetentionDays`、`backupRetentionCount`。
- 备份恢复约定(2026-07-04):新增超管页面“备份与恢复”,备份包存放在服务器本地非公开目录(默认 storage 同级 `backups`,不走 `/uploads`),通过鉴权接口下载。备份 ZIP 包含 `manifest.json`、`database.json` 和 `storage/` 文件。恢复采用整库覆盖,预校验上传包后确认恢复,恢复前自动创建 `AUTO_BEFORE_RESTORE` 快照;`BackupRecord` 不参与 database.json 的业务表恢复,避免恢复过程删除当前恢复记录或与自动快照冲突。`.gitignore` 已忽略 `backups/` 与 `apps/api/backups/`,不要提交真实备份包。
- 备份恢复约定(2026-07-04):新增超管备份恢复能力,备份包存放在服务器本地非公开目录(默认 storage 同级 `backups`,不走 `/uploads`),通过鉴权接口下载。备份 ZIP 包含 `manifest.json`、`database.json` 和 `storage/` 文件。恢复采用整库覆盖,预校验上传包后确认恢复,恢复前自动创建 `AUTO_BEFORE_RESTORE` 快照;`BackupRecord` 不参与 database.json 的业务表恢复,避免恢复过程删除当前恢复记录或与自动快照冲突。`.gitignore` 已忽略 `backups/` 与 `apps/api/backups/`,不要提交真实备份包。
- 系统设置布局优化(2026-07-04):备份与恢复入口并入后台「系统设置」页的「备份与恢复」标签,侧边栏不再提供独立菜单,旧 `/backups` 路由重定向到 `/settings`。系统设置页采用基础设置/备份恢复双标签布局;基础设置按平台信息、日志与展示、备份策略分组,备份恢复 tab 内的备份记录列表复用全局 `table-fill + flex-height + table-pagination` 约定,宽高自适应内容区,横向滚动和固定操作列仍发生在列表内部。
- 操作日志列表展示(2026-07-04):`OperationLogs.vue` 的文本列统一单行展示,角色、模块、操作、目标 ID、路径、IP、耗时、消息等列使用 `ellipsis: { tooltip: true }`,并为操作日志表格加局部 `white-space: nowrap`,避免 `SUPER_ADMIN`、长接口路径等字段换行撑高行高;超出宽度时用省略号,鼠标悬浮查看完整内容。
- 出库列表布局修复(2026-07-04):`Outbound.vue` 移除包裹整页列表的外层 `n-card`,改为与内容审核等主列表一致的“顶部工具栏 / 固定说明与摘要 / `table-fill` 自适应表格 / 底部分页”结构。出库导入说明和会话摘要只占固定高度,备份/导入记录表格占满剩余区域,避免列表被卡片内容区或上传控件挤压。
- 后台 UI 约定补充(2026-07-04):后台术语统一用“客户端”替代“C 端”。新增 `openMediaViewer` 复用 PhotoSwipe,`MediaUpload`、`MediaSorter`、作品/审核封面、出库导入预览图均可点击预览。枚举/下拉筛选移入表头,输入检索保留在工具栏;新增 `renderTableFilterTitle` 作为表头筛选渲染工具。所有操作列应固定右侧、`align: center`,按钮容器使用全局 `.row-actions`。
- 本次验证(2026-07-04):已执行 `pnpm --filter @artveris/api prisma:generate`、`pnpm build:shared`、`pnpm --filter @artveris/api build`、`pnpm --filter @artveris/admin build`、`pnpm --filter @artveris/client build`、`pnpm --filter @artveris/api test`,均通过;`pnpm --filter @artveris/api prisma:deploy` 已成功应用迁移 `20260704090000_import_backup_audit`。浏览器检查新增菜单/页面(操作日志、备份恢复、出库导入、艺术品档案、查询日志、系统设置)无前端 error;接口联调通过 ZIP 模板下载、二维码 xlsx 导出、ZIP 导入预览+确认、备份创建+下载+删除。
@@ -1,18 +1,20 @@
<template>
<div class="page table-page backups-page">
<div class="page-toolbar">
<div class="backup-panel">
<div class="backup-toolbar">
<n-button type="primary" :loading="creating" @click="createBackup">创建备份</n-button>
<n-upload :show-file-list="false" accept=".zip" :custom-request="previewRestore" :disabled="restoring">
<n-button :loading="restoring">上传备份包预校验</n-button>
</n-upload>
<div class="spacer" />
<n-button @click="load">刷新</n-button>
</div>
<n-alert v-if="restorePreviewResult" type="warning" class="restore-alert" :show-icon="true">
已通过备份包预校验:{{ restorePreviewResult.manifest?.createdAt || '-' }}。
恢复会整库覆盖当前系统,确认前会自动生成当前快照。
<n-button size="small" type="error" :loading="restoring" @click="commitRestore">确认恢复</n-button>
<div class="restore-content">
<span>
已通过备份包预校验:{{ restorePreviewResult.manifest?.createdAt || '-' }}。恢复会整库覆盖当前系统,确认前会自动生成当前快照。
</span>
<n-button size="small" type="error" :loading="restoring" @click="commitRestore">确认恢复</n-button>
</div>
</n-alert>
<n-data-table
@@ -20,10 +22,10 @@
:data="rows"
:loading="loading"
:pagination="false"
class="table-fill"
class="table-fill backup-table"
flex-height
remote
:scroll-x="1280"
:scroll-x="1180"
:row-key="(r) => r.id"
/>
<div class="table-pagination">
@@ -70,7 +72,7 @@ const columns = computed<DataTableColumns<any>>(() => [
render: (row) => h(NTag, { size: 'small', type: statusType(row.status) }, { default: () => row.status }),
},
{ title: '大小', key: 'size', width: 120, render: (row) => formatSize(row.size) },
{ title: '错误', key: 'error', minWidth: 260, ellipsis: { tooltip: true }, render: (row) => row.error || '-' },
{ title: '错误', key: 'error', minWidth: 240, ellipsis: { tooltip: true }, render: (row) => row.error || '-' },
{
title: '操作',
key: 'ops',
@@ -219,16 +221,36 @@ onMounted(load);
</script>
<style scoped>
.backups-page {
min-width: 0;
.backup-panel {
height: 100%;
min-height: 0;
display: flex;
flex-direction: column;
overflow: hidden;
}
.restore-alert {
.backup-toolbar {
flex: 0 0 auto;
display: flex;
align-items: center;
gap: 10px;
flex-wrap: wrap;
margin-bottom: 12px;
}
.restore-alert :deep(.n-alert-body__content) {
.backup-toolbar :deep(.n-upload) {
width: auto;
}
.restore-alert {
flex: 0 0 auto;
margin-bottom: 12px;
}
.restore-content {
display: flex;
align-items: center;
gap: 12px;
flex-wrap: wrap;
}
.backup-table {
flex: 1 1 auto;
min-height: 0;
}
</style>
-1
View File
@@ -100,7 +100,6 @@ const menuOptions = computed<MenuOption[]>(() => {
{ label: t('menu.audit'), key: 'audit', icon: renderIcon(ShieldCheckmarkOutline), auditOnly: true },
{ label: t('menu.queryLogs'), key: 'queryLogs', icon: renderIcon(ListOutline) },
{ label: t('menu.operationLogs'), key: 'operationLogs', icon: renderIcon(ListOutline), superOnly: true },
{ label: t('menu.backups'), key: 'backups', icon: renderIcon(SettingsOutline), superOnly: true },
{ label: t('menu.users'), key: 'users', icon: renderIcon(PeopleOutline), superOnly: true },
{ label: t('menu.settings'), key: 'settings', icon: renderIcon(SettingsOutline), superOnly: true },
];
-1
View File
@@ -131,7 +131,6 @@
"audit": "Content Audit",
"queryLogs": "Query Logs",
"operationLogs": "Operation Logs",
"backups": "Backup & Restore",
"users": "Users",
"settings": "Settings",
"profile": "Profile"
-1
View File
@@ -131,7 +131,6 @@
"audit": "内容审核",
"queryLogs": "查询日志",
"operationLogs": "操作日志",
"backups": "备份与恢复",
"users": "用户管理",
"settings": "系统设置",
"profile": "个人中心"
+1 -1
View File
@@ -25,7 +25,7 @@ export const routes: RouteRecordRaw[] = [
{ path: 'audit', name: 'audit', component: () => import('@/views/Audit.vue'), meta: { roles: ['SUPER_ADMIN', 'AUDITOR'] } },
{ path: 'query-logs', name: 'queryLogs', component: () => import('@/views/QueryLogs.vue') },
{ path: 'operation-logs', name: 'operationLogs', component: () => import('@/views/OperationLogs.vue'), meta: { roles: ['SUPER_ADMIN'] } },
{ path: 'backups', name: 'backups', component: () => import('@/views/Backups.vue'), meta: { roles: ['SUPER_ADMIN'] } },
{ path: 'backups', redirect: '/settings' },
{ path: 'users', name: 'users', component: () => import('@/views/Users.vue'), meta: { roles: ['SUPER_ADMIN'] } },
{ path: 'settings', name: 'settings', component: () => import('@/views/Settings.vue'), meta: { roles: ['SUPER_ADMIN'] } },
{ path: 'profile', name: 'profile', component: () => import('@/views/Profile.vue') },
+13 -5
View File
@@ -11,7 +11,7 @@
:data="rows"
:loading="loading"
:pagination="false"
class="table-fill"
class="table-fill operation-log-table"
flex-height
remote
:scroll-x="1460"
@@ -60,18 +60,20 @@ const resultOptions = [
];
const columns = computed<DataTableColumns<any>>(() => [
{ title: '时间', key: 'createdAt', width: 170, render: (row) => fmt(row.createdAt) },
{ title: '账号', key: 'username', width: 130, render: (row) => row.username || '-' },
{ title: '角色', key: 'role', width: 120 },
{ title: '时间', key: 'createdAt', width: 170, ellipsis: { tooltip: true }, render: (row) => fmt(row.createdAt) },
{ title: '账号', key: 'username', width: 130, ellipsis: { tooltip: true }, render: (row) => row.username || '-' },
{ title: '角色', key: 'role', width: 130, ellipsis: { tooltip: true } },
{
title: () => renderFilterTitle('模块', query.module, moduleOptions, (value) => setFilter('module', value)),
key: 'module',
width: 140,
ellipsis: { tooltip: true },
},
{
title: () => renderFilterTitle('操作', query.action, actionOptions, (value) => setFilter('action', value)),
key: 'action',
width: 110,
ellipsis: { tooltip: true },
},
{
title: () => renderFilterTitle('结果', query.status, resultOptions, (value) => setFilter('status', value)),
@@ -83,7 +85,7 @@ const columns = computed<DataTableColumns<any>>(() => [
{ title: '目标 ID', key: 'targetId', width: 150, ellipsis: { tooltip: true }, render: (row) => row.targetId || '-' },
{ title: '路径', key: 'path', width: 260, ellipsis: { tooltip: true } },
{ title: 'IP', key: 'ip', width: 150, ellipsis: { tooltip: true } },
{ title: '耗时', key: 'durationMs', width: 90, render: (row) => `${row.durationMs || 0}ms` },
{ title: '耗时', key: 'durationMs', width: 90, ellipsis: { tooltip: true }, render: (row) => `${row.durationMs || 0}ms` },
{ title: '消息', key: 'message', minWidth: 260, ellipsis: { tooltip: true }, render: (row) => row.message || '-' },
]);
@@ -142,3 +144,9 @@ function onSearch() {
watch(range, onSearch);
onMounted(load);
</script>
<style scoped>
.operation-log-table :deep(.n-data-table-td) {
white-space: nowrap;
}
</style>
+79 -82
View File
@@ -1,80 +1,77 @@
<template>
<div class="page table-page outbound-page">
<n-card :bordered="false" class="outbound-card">
<template #header>出库批量导入</template>
<template #header-extra>
<n-space>
<n-button @click="downloadTemplate">
<template #icon><n-icon :component="DownloadOutline" /></template>
下载 ZIP 模板
</n-button>
<n-upload
:show-file-list="false"
accept=".zip"
:custom-request="uploadPreview"
:disabled="busy || !auth.canWrite"
>
<n-button type="primary" :loading="previewing">
<template #icon><n-icon :component="CloudUploadOutline" /></template>
上传 ZIP 并预览
</n-button>
</n-upload>
</n-space>
</template>
<div class="page-toolbar outbound-toolbar">
<div class="section-title">出库批量导入</div>
<div class="spacer" />
<n-button @click="downloadTemplate">
<template #icon><n-icon :component="DownloadOutline" /></template>
下载 ZIP 模板
</n-button>
<n-upload
:show-file-list="false"
accept=".zip"
:custom-request="uploadPreview"
:disabled="busy || !auth.canWrite"
>
<n-button type="primary" :loading="previewing">
<template #icon><n-icon :component="CloudUploadOutline" /></template>
上传 ZIP 并预览
</n-button>
</n-upload>
</div>
<n-alert type="info" :show-icon="true" class="section-alert">
ZIP 内需要包含 1 个 xlsx 文件和 images 文件夹;xlsx 中出库实况图路径填写 images/xxx.jpg,多张用英文分号分隔。
</n-alert>
<n-alert type="info" :show-icon="true" class="section-alert">
ZIP 内需要包含 1 个 xlsx 文件和 images 文件夹;xlsx 中出库实况图路径填写 images/xxx.jpg,多张用英文分号分隔。
</n-alert>
<n-card v-if="session" embedded class="summary-card" :bordered="false">
<n-space align="center" size="large" wrap>
<n-statistic label="总行数" :value="session.total || 0" />
<n-statistic label="有效行">
<span class="success-text">{{ session.validCount || 0 }}</span>
</n-statistic>
<n-statistic label="错误行">
<span class="danger-text">{{ session.invalidCount || 0 }}</span>
</n-statistic>
<n-tag :type="statusType(session.status)">{{ session.status }}</n-tag>
<n-progress
v-if="busy"
type="line"
:percentage="progressPercent"
:indicator-placement="'inside'"
class="progress"
/>
<n-button
v-if="auth.canWrite"
type="primary"
:disabled="!canCommit"
:loading="committing"
@click="commitImport"
>
确认导入
</n-button>
<n-button v-if="result?.resultFileUrl" tag="a" :href="result.resultFileUrl" target="_blank">
<template #icon><n-icon :component="DownloadOutline" /></template>
下载导入结果
</n-button>
</n-space>
<n-text v-if="session.error" type="error" class="session-error">{{ session.error }}</n-text>
</n-card>
<n-data-table
:columns="columns"
:data="rows"
:loading="loading"
:pagination="false"
class="table-fill"
flex-height
remote
:scroll-x="1320"
:row-key="(r) => r.id"
/>
<div class="table-pagination">
<n-pagination v-bind="pagination" :disabled="loading" />
</div>
<n-card v-if="session" embedded class="summary-card" :bordered="false">
<n-space align="center" size="large" wrap>
<n-statistic label="总行数" :value="session.total || 0" />
<n-statistic label="有效行">
<span class="success-text">{{ session.validCount || 0 }}</span>
</n-statistic>
<n-statistic label="错误行">
<span class="danger-text">{{ session.invalidCount || 0 }}</span>
</n-statistic>
<n-tag :type="statusType(session.status)">{{ session.status }}</n-tag>
<n-progress
v-if="busy"
type="line"
:percentage="progressPercent"
:indicator-placement="'inside'"
class="progress"
/>
<n-button
v-if="auth.canWrite"
type="primary"
:disabled="!canCommit"
:loading="committing"
@click="commitImport"
>
确认导入
</n-button>
<n-button v-if="result?.resultFileUrl" tag="a" :href="result.resultFileUrl" target="_blank">
<template #icon><n-icon :component="DownloadOutline" /></template>
下载导入结果
</n-button>
</n-space>
<n-text v-if="session.error" type="error" class="session-error">{{ session.error }}</n-text>
</n-card>
<n-data-table
:columns="columns"
:data="rows"
:loading="loading"
:pagination="false"
class="table-fill"
flex-height
remote
:scroll-x="1320"
:row-key="(r) => r.id"
/>
<div class="table-pagination">
<n-pagination v-bind="pagination" :disabled="loading" />
</div>
</div>
</template>
@@ -267,20 +264,20 @@ async function loadRows() {
.outbound-page {
min-width: 0;
}
.outbound-card {
flex: 1 1 auto;
min-height: 0;
display: flex;
flex-direction: column;
.outbound-toolbar {
margin-bottom: 12px;
}
.outbound-card :deep(.n-card__content) {
flex: 1 1 auto;
min-height: 0;
display: flex;
flex-direction: column;
.outbound-toolbar :deep(.n-upload) {
width: auto;
}
.section-title {
font-size: 16px;
font-weight: 600;
white-space: nowrap;
}
.section-alert {
margin-bottom: 12px;
flex: 0 0 auto;
}
.summary-card {
margin-bottom: 12px;
+170 -44
View File
@@ -1,50 +1,79 @@
<template>
<div class="page">
<n-card :title="t('menu.settings')" :bordered="false" style="max-width: 760px">
<n-form label-placement="top">
<n-form-item :label="t('pages.settings.appName')">
<n-input v-model:value="form.appName" />
</n-form-item>
<n-form-item :label="t('pages.settings.logRetentionDays')">
<n-input-number v-model:value="form.logRetentionDays" :min="1" style="width: 220px" />
</n-form-item>
<n-form-item label="操作日志保留天数">
<n-input-number v-model:value="form.operationLogRetentionDays" :min="1" style="width: 220px" />
</n-form-item>
<n-form-item :label="t('pages.settings.watermarkText')">
<n-input v-model:value="form.watermarkText" />
</n-form-item>
<n-form-item :label="t('pages.settings.carouselInterval')">
<div class="field-stack">
<n-input-number
v-model:value="form.carouselInterval"
:min="0"
:max="30"
:step="0.5"
:precision="1"
style="width: 220px"
/>
<span class="field-tip">{{ t('pages.settings.carouselIntervalHint') }}</span>
<div class="page settings-page">
<div class="settings-shell">
<n-tabs type="line" animated class="settings-tabs">
<n-tab-pane name="base" tab="基础设置">
<div class="settings-base-pane">
<n-form class="settings-form" label-placement="top">
<section class="settings-section">
<div class="section-title">平台信息</div>
<div class="field-grid two">
<n-form-item :label="t('pages.settings.appName')">
<n-input v-model:value="form.appName" class="control-wide" />
</n-form-item>
<n-form-item :label="t('pages.settings.watermarkText')">
<n-input v-model:value="form.watermarkText" class="control-wide" />
</n-form-item>
</div>
</section>
<section class="settings-section">
<div class="section-title">日志与展示</div>
<div class="field-grid three">
<n-form-item :label="t('pages.settings.logRetentionDays')">
<n-input-number v-model:value="form.logRetentionDays" :min="1" class="control-short" />
</n-form-item>
<n-form-item label="操作日志保留天数">
<n-input-number v-model:value="form.operationLogRetentionDays" :min="1" class="control-short" />
</n-form-item>
<n-form-item :label="t('pages.settings.carouselInterval')">
<div class="field-stack">
<n-input-number
v-model:value="form.carouselInterval"
:min="0"
:max="30"
:step="0.5"
:precision="1"
class="control-short"
/>
<span class="field-tip">{{ t('pages.settings.carouselIntervalHint') }}</span>
</div>
</n-form-item>
</div>
</section>
<section class="settings-section">
<div class="section-title">备份策略</div>
<div class="field-grid four">
<n-form-item label="启用定时备份">
<div class="switch-field"><n-switch v-model:value="form.backupEnabled" /></div>
</n-form-item>
<n-form-item label="备份周期">
<n-select v-model:value="form.backupSchedule" :options="backupScheduleOptions" class="control-short" />
</n-form-item>
<n-form-item label="备份保留天数">
<n-input-number v-model:value="form.backupRetentionDays" :min="1" class="control-short" />
</n-form-item>
<n-form-item label="最多保留备份数量">
<n-input-number v-model:value="form.backupRetentionCount" :min="1" class="control-short" />
</n-form-item>
</div>
</section>
<div class="form-actions">
<n-button type="primary" :loading="saving" @click="save">{{ t('common.action.save') }}</n-button>
</div>
</n-form>
</div>
</n-form-item>
</n-tab-pane>
<n-divider>备份策略</n-divider>
<n-form-item label="启用定时备份">
<n-switch v-model:value="form.backupEnabled" />
</n-form-item>
<n-form-item label="备份周期">
<n-select v-model:value="form.backupSchedule" :options="backupScheduleOptions" style="width: 220px" />
</n-form-item>
<n-form-item label="备份保留天数">
<n-input-number v-model:value="form.backupRetentionDays" :min="1" style="width: 220px" />
</n-form-item>
<n-form-item label="最多保留备份数量">
<n-input-number v-model:value="form.backupRetentionCount" :min="1" style="width: 220px" />
</n-form-item>
<n-button type="primary" :loading="saving" @click="save">{{ t('common.action.save') }}</n-button>
</n-form>
</n-card>
<n-tab-pane name="backup" tab="备份与恢复">
<div class="settings-backup-pane">
<backup-restore-panel />
</div>
</n-tab-pane>
</n-tabs>
</div>
</div>
</template>
@@ -53,6 +82,7 @@ import { onMounted, reactive, ref } from 'vue';
import { useI18n } from 'vue-i18n';
import { settingsApi } from '@/api';
import { message } from '@/utils/feedback';
import BackupRestorePanel from '@/components/BackupRestorePanel.vue';
const { t } = useI18n();
const saving = ref(false);
@@ -104,17 +134,113 @@ async function save() {
saving.value = false;
}
}
onMounted(load);
</script>
<style scoped>
.settings-page {
height: var(--admin-content-height);
min-height: calc(var(--admin-min-height) - var(--admin-header-height) - var(--admin-footer-height));
display: flex;
flex-direction: column;
overflow: hidden;
padding: 16px;
}
.settings-shell {
width: 100%;
height: 100%;
min-width: 0;
min-height: 0;
display: flex;
flex-direction: column;
}
.settings-tabs {
flex: 1 1 auto;
width: 100%;
min-height: 0;
display: flex;
flex-direction: column;
}
.settings-tabs :deep(.n-tabs-pane-wrapper) {
flex: 1 1 auto;
min-height: 0;
padding-top: 12px;
}
.settings-tabs :deep(.n-tab-pane) {
height: 100%;
min-height: 0;
}
.settings-base-pane {
height: 100%;
overflow: auto;
padding-right: 8px;
}
.settings-backup-pane {
height: 100%;
min-height: 0;
}
.settings-form {
width: min(980px, 100%);
}
.settings-section {
padding: 16px 0 10px;
border-bottom: 1px solid var(--n-border-color);
}
.section-title {
font-size: 15px;
font-weight: 600;
margin-bottom: 12px;
}
.field-grid {
display: grid;
gap: 12px 20px;
align-items: start;
}
.field-grid.two {
grid-template-columns: repeat(2, minmax(280px, 1fr));
}
.field-grid.three {
grid-template-columns: repeat(3, minmax(180px, 1fr));
}
.field-grid.four {
grid-template-columns: repeat(4, minmax(150px, 1fr));
}
.control-wide {
width: 100%;
}
.control-short {
width: 100%;
}
.field-stack {
width: 100%;
display: flex;
flex-direction: column;
gap: 4px;
}
.field-tip {
max-width: 320px;
font-size: 12px;
color: #999;
}
.switch-field {
display: flex;
align-items: center;
height: 34px;
}
.form-actions {
display: flex;
justify-content: flex-start;
padding-top: 18px;
}
@media (max-width: 900px) {
.settings-shell {
min-width: 0;
}
.field-grid.two,
.field-grid.three,
.field-grid.four {
grid-template-columns: 1fr;
}
}
</style>