562 lines
21 KiB
Vue
562 lines
21 KiB
Vue
<!--
|
||
FrontConfigForm — 仓库「前端独立部署」配置页(独立标签页,表单项页面)
|
||
对接接口:
|
||
- setting.warehouse.getFrontConfig:加载当前仓库前端部署配置(品牌 + 域名/证书状态 + cert_pem/key_pem 证书内容回显)
|
||
- setting.warehouse.saveFrontConfig:保存品牌配置(title/logo/favicon/login_bg/theme)
|
||
- setting.warehouse.saveFrontCert:上传自持域名 HTTPS 证书(domain + pem/key)
|
||
该页从基础设置(WarehouseSettingsForm)独立拆出,作为 basicManagement/newview 的
|
||
viewType='form' 标签页渲染。
|
||
-->
|
||
<template>
|
||
<div v-loading="frontPageLoading" class="front-config-page">
|
||
<div class="settings-header">
|
||
<div class="header-text">
|
||
<span class="title">前端独立部署</span>
|
||
<span class="sub">按仓库自持域名部署并品牌化前端(站点标题 / Logo / favicon / 登录页 / 主题 / HTTPS 证书)</span>
|
||
</div>
|
||
<div class="header-actions">
|
||
<el-button :loading="frontPageLoading" @click="loadFrontConfig">刷新</el-button>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="front-config-section">
|
||
<el-divider content-position="left" class="front-config-divider">前端独立部署(品牌配置)</el-divider>
|
||
<el-alert
|
||
v-if="frontCertStatus.level === 'danger' || frontCertStatus.level === 'warning'"
|
||
:type="frontCertStatus.level"
|
||
:title="frontCertStatus.title"
|
||
:description="frontCertStatus.desc"
|
||
show-icon
|
||
:closable="false"
|
||
class="mb-16 front-config-alert"
|
||
/>
|
||
<el-alert
|
||
v-if="frontSyncFailed"
|
||
type="error"
|
||
title="证书部署同步失败"
|
||
:description="frontMeta.last_sync_error || '同步失败,请重新上传证书或稍后重试'"
|
||
show-icon
|
||
:closable="false"
|
||
class="mb-16 front-config-alert"
|
||
/>
|
||
<!-- 配置回显全量展示(getFrontConfig 响应字段;无数据显式置空占位,不做条件隐藏) -->
|
||
<el-descriptions :column="2" border size="small" class="front-config-meta">
|
||
<el-descriptions-item label="当前仓库 ID">{{ frontMeta.warehouse_id ?? '—' }}</el-descriptions-item>
|
||
<el-descriptions-item label="自持域名">{{ frontMeta.domain || '—' }}</el-descriptions-item>
|
||
<el-descriptions-item label="证书状态">
|
||
<el-tag :type="frontCertTagType" size="small" effect="plain">{{ frontCertStatus.text }}</el-tag>
|
||
</el-descriptions-item>
|
||
<el-descriptions-item label="证书到期时间">{{ formatFrontDateTime(frontMeta.cert_expire_at) }}</el-descriptions-item>
|
||
<el-descriptions-item label="证书内容">
|
||
<span v-if="frontHasCert">已配置(见下方回显)</span>
|
||
<span v-else>未配置</span>
|
||
</el-descriptions-item>
|
||
<el-descriptions-item label="配置更新时间">{{ formatFrontDateTime(frontMeta.updated_at) }}</el-descriptions-item>
|
||
<el-descriptions-item label="同步状态">{{ frontSyncStatusText }}</el-descriptions-item>
|
||
<el-descriptions-item label="同步尝试次数">{{ frontMeta.sync_attempts ?? 0 }} 次</el-descriptions-item>
|
||
<el-descriptions-item label="最近同步成功时间">{{ formatFrontDateTime(frontMeta.last_synced_at) }}</el-descriptions-item>
|
||
<el-descriptions-item label="最近同步失败原因">{{ frontMeta.last_sync_error || '—' }}</el-descriptions-item>
|
||
</el-descriptions>
|
||
<el-form label-width="140px" label-position="right" class="front-config-form">
|
||
<el-form-item label="站点标题">
|
||
<el-input v-model="frontForm.title" maxlength="100" clearable placeholder="站点标题(留空表示清空)" />
|
||
</el-form-item>
|
||
<el-form-item label="Logo 地址">
|
||
<el-input v-model="frontForm.logo_url" maxlength="255" clearable placeholder="Logo 图片 URL(留空清空)" />
|
||
</el-form-item>
|
||
<el-form-item label="favicon 地址">
|
||
<el-input v-model="frontForm.favicon_url" maxlength="255" clearable placeholder="favicon 图标 URL(留空清空)" />
|
||
</el-form-item>
|
||
<el-form-item label="登录页背景图">
|
||
<el-input v-model="frontForm.login_bg_url" maxlength="255" clearable placeholder="登录页背景图 URL(留空清空)" />
|
||
</el-form-item>
|
||
<el-form-item label="主题配置">
|
||
<div class="front-theme-editor">
|
||
<div v-for="(row, idx) in frontThemeRows" :key="`front-theme-${idx}`" class="front-theme-row">
|
||
<el-input v-model="row.key" class="front-theme-row__key" placeholder="键(如 primary)" maxlength="60" />
|
||
<el-input v-model="row.value" class="front-theme-row__value" placeholder="值:文本,或 JSON 对象/数组/数字/布尔" />
|
||
<el-button type="danger" plain size="small" @click="removeFrontThemeRow(idx)">删除</el-button>
|
||
</div>
|
||
<div class="front-theme-actions">
|
||
<el-button type="primary" plain size="small" @click="addFrontThemeRow">新增自定义键</el-button>
|
||
</div>
|
||
<div class="front-config-hint front-theme-hint">主题仅承载 CSS 变量自定义键(保存后应用为 --<key>);网页名称/Logo/favicon/登录背景等品牌字段见上方表单(getFrontConfig/saveFrontConfig 顶层字段),不再写入主题。</div>
|
||
</div>
|
||
</el-form-item>
|
||
<el-form-item>
|
||
<el-button type="primary" :loading="frontSaving" @click="saveFrontConfig">保存品牌配置</el-button>
|
||
<span class="front-config-hint">品牌字段留空即清空;主题删空全部键后保存即清空主题;保存成功后自动重新加载</span>
|
||
</el-form-item>
|
||
</el-form>
|
||
|
||
<el-divider content-position="left" class="front-config-divider">前端独立部署(自持域名 & 证书)</el-divider>
|
||
<el-form label-width="140px" label-position="right" class="front-config-form">
|
||
<el-form-item label="自持域名">
|
||
<el-input v-model="frontCert.domain" maxlength="100" clearable placeholder="如 self.example.com(全局唯一)" />
|
||
</el-form-item>
|
||
<el-form-item label="证书 PEM">
|
||
<el-input v-model="frontCert.pem" type="textarea" :rows="4" placeholder="-----BEGIN CERTIFICATE-----..." />
|
||
</el-form-item>
|
||
<el-form-item label="私钥 PEM">
|
||
<el-input v-model="frontCert.key" type="textarea" :rows="4" placeholder="-----BEGIN PRIVATE KEY-----..." />
|
||
</el-form-item>
|
||
<el-form-item>
|
||
<el-button type="warning" :loading="frontCertSaving" @click="submitFrontCert">上传证书</el-button>
|
||
<span class="front-config-hint">上传成功后自动写入证书到期时间、重置同步状态并重新加载配置</span>
|
||
</el-form-item>
|
||
</el-form>
|
||
|
||
<!-- 证书内容回显:getFrontConfig 响应返回 cert_pem/key_pem(PEM 原文),仅本仓库设置页可见;
|
||
始终渲染该区块,未配置时显式置空占位,有证书时默认展开 -->
|
||
<el-divider content-position="left" class="front-config-divider">证书内容回显(cert_pem / key_pem)</el-divider>
|
||
<div class="front-cert-echo">
|
||
<el-alert
|
||
type="info"
|
||
show-icon
|
||
:closable="false"
|
||
class="front-cert-echo__alert"
|
||
title="证书内容已直接存库并由 getFrontConfig 回显"
|
||
:description="`来自接口响应(仅登录仓库主体 settings 页可见,公共接口 frontConfig.getByDomain 不返回);未配置时为空。证书到期:${formatFrontDateTime(frontMeta.cert_expire_at)}。私钥敏感,请勿外泄。`"
|
||
/>
|
||
<el-collapse v-model="frontCertEchoOpen" class="front-cert-echo__collapse">
|
||
<el-collapse-item name="cert_pem" title="证书 PEM(cert_pem)">
|
||
<div class="front-cert-echo__bar">
|
||
<el-tag v-if="frontHasCert" type="success" size="small" effect="plain">已配置</el-tag>
|
||
<el-tag v-else type="info" size="small" effect="plain">未配置</el-tag>
|
||
<el-button size="small" :disabled="!frontHasCert" @click="copyFrontText(frontMeta.cert_pem)">复制证书</el-button>
|
||
</div>
|
||
<el-input
|
||
type="textarea"
|
||
:rows="6"
|
||
readonly
|
||
:model-value="String(frontMeta.cert_pem ?? '')"
|
||
placeholder="未配置(空)"
|
||
class="front-cert-echo__pem"
|
||
/>
|
||
</el-collapse-item>
|
||
<el-collapse-item name="key_pem" title="私钥 PEM(key_pem · 敏感)">
|
||
<div class="front-cert-echo__bar">
|
||
<el-tag v-if="frontHasKey" type="success" size="small" effect="plain">已配置</el-tag>
|
||
<el-tag v-else type="info" size="small" effect="plain">未配置</el-tag>
|
||
<el-button size="small" :disabled="!frontHasKey" @click="copyFrontText(frontMeta.key_pem)">复制私钥</el-button>
|
||
</div>
|
||
<el-input
|
||
type="textarea"
|
||
:rows="6"
|
||
readonly
|
||
:model-value="String(frontMeta.key_pem ?? '')"
|
||
placeholder="未配置(空)"
|
||
class="front-cert-echo__pem"
|
||
/>
|
||
</el-collapse-item>
|
||
</el-collapse>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</template>
|
||
|
||
<script setup lang="ts">
|
||
import { computed, reactive, ref } from 'vue'
|
||
import { ElMessage } from 'element-plus'
|
||
import {
|
||
settingWarehouseGetFrontConfig,
|
||
settingWarehouseSaveFrontConfig,
|
||
settingWarehouseSaveFrontCert,
|
||
unwrapSettingWarehousePayload
|
||
} from '@/api/setting.warehouse/settingwarehouse'
|
||
|
||
defineOptions({ name: 'FrontConfigForm' })
|
||
|
||
const okCode = (code: unknown) => code === 1 || code === 200 || code === 0
|
||
|
||
/** getFrontConfig 响应:仓库前端部署元信息(品牌 + 证书/同步内部字段,仅用于本页回显)
|
||
* 最新接口返回 cert_pem/key_pem(PEM 原文),不再返回 cert_path/key_path。 */
|
||
type FrontConfigMeta = {
|
||
warehouse_id?: number
|
||
domain?: string
|
||
title?: string
|
||
logo_url?: string
|
||
favicon_url?: string
|
||
login_bg_url?: string
|
||
theme?: Record<string, unknown> | string | null
|
||
cert_pem?: string
|
||
key_pem?: string
|
||
cert_expire_at?: string | null
|
||
sync_status?: number
|
||
sync_attempts?: number
|
||
last_sync_error?: string
|
||
last_synced_at?: string | null
|
||
updated_at?: string | null
|
||
[key: string]: unknown
|
||
}
|
||
|
||
// ── 前端独立部署(品牌 & 域名证书):getFrontConfig / saveFrontConfig / saveFrontCert ──
|
||
const frontPageLoading = ref(false)
|
||
const frontSaving = ref(false)
|
||
const frontCertSaving = ref(false)
|
||
const frontMeta = reactive<FrontConfigMeta>({})
|
||
/** 证书回显折叠面板展开项(有证书时默认展开 cert_pem/key_pem) */
|
||
const frontCertEchoOpen = ref<string[]>([])
|
||
const frontForm = reactive({ title: '', logo_url: '', favicon_url: '', login_bg_url: '' })
|
||
/** 历史遗留 theme 约定键(曾承载 网页名称/主页面Logo/登录页Logo/登录页文字)。
|
||
* 现已改由品牌顶层字段(saveFrontConfig:title/logo_url 等)配置,theme 不再约定这些业务键。
|
||
* 加载时隐藏不展示、保存时原样保留,避免历史数据丢失。 */
|
||
const FRONT_THEME_LEGACY_KEYS = ['siteName', 'mainLogoUrl', 'loginLogoUrl', 'loginText'] as const
|
||
/** 历史遗留 theme 键原值(只读保留:不展示、不编辑,保存时透传回写) */
|
||
const frontThemeLegacy = reactive<Record<string, unknown>>({})
|
||
const frontThemeRows = ref<Array<{ key: string; value: string }>>([])
|
||
const frontCert = reactive({ domain: '', pem: '', key: '' })
|
||
|
||
const frontSyncStatusText = computed(() => {
|
||
const s = Number(frontMeta.sync_status)
|
||
if (s === 0) return '待同步'
|
||
if (s === 1) return '同步成功'
|
||
if (s === 2) return '同步失败'
|
||
return frontMeta.sync_status ?? '—'
|
||
})
|
||
|
||
/** 同步是否失败(用于同步失败告警) */
|
||
const frontSyncFailed = computed(() => Number(frontMeta.sync_status) === 2)
|
||
|
||
/** 是否已配置证书(cert_pem 非空,用于回显区展示) */
|
||
const frontHasCert = computed(() => Boolean(frontMeta.cert_pem && String(frontMeta.cert_pem).trim()))
|
||
/** 是否回显私钥(key_pem 非空) */
|
||
const frontHasKey = computed(() => Boolean(frontMeta.key_pem && String(frontMeta.key_pem).trim()))
|
||
|
||
/** 复制接口回显的证书/私钥内容到剪贴板 */
|
||
async function copyFrontText(text: unknown) {
|
||
const value = String(text ?? '').trim()
|
||
if (!value) {
|
||
ElMessage.warning('无内容可复制')
|
||
return
|
||
}
|
||
try {
|
||
await navigator.clipboard.writeText(value)
|
||
ElMessage.success('已复制到剪贴板')
|
||
} catch {
|
||
ElMessage.warning('复制失败,请手动全选复制')
|
||
}
|
||
}
|
||
|
||
function fmtFrontDate(ts: number): string {
|
||
const d = new Date(ts)
|
||
const p = (n: number) => String(n).padStart(2, '0')
|
||
return `${d.getFullYear()}-${p(d.getMonth() + 1)}-${p(d.getDate())}`
|
||
}
|
||
|
||
/** 格式化接口返回的时间字段(ISO/秒/毫秒时间戳 → 本地 YYYY-MM-DD HH:mm:ss),空值/非法返回 '—' */
|
||
function formatFrontDateTime(value: unknown): string {
|
||
const raw = String(value ?? '').trim()
|
||
if (!raw) return '—'
|
||
const ts = Date.parse(raw)
|
||
if (Number.isNaN(ts)) return '—'
|
||
const d = new Date(ts)
|
||
const p = (n: number) => String(n).padStart(2, '0')
|
||
return `${d.getFullYear()}-${p(d.getMonth() + 1)}-${p(d.getDate())} ${p(d.getHours())}:${p(d.getMinutes())}:${p(d.getSeconds())}`
|
||
}
|
||
|
||
/** 证书状态:none=未上传,success=正常,warning=30 天内到期,danger=已过期 */
|
||
const frontCertStatus = computed<{
|
||
level: 'success' | 'warning' | 'danger' | 'info' | 'none'
|
||
text: string
|
||
title: string
|
||
desc: string
|
||
}>(() => {
|
||
const raw = String(frontMeta.cert_expire_at ?? '').trim()
|
||
if (!raw) return { level: 'none', text: '未上传', title: '', desc: '' }
|
||
const ts = Date.parse(raw)
|
||
if (Number.isNaN(ts)) return { level: 'info', text: raw, title: '', desc: '' }
|
||
const days = Math.ceil((ts - Date.now()) / 86400000)
|
||
const when = fmtFrontDate(ts)
|
||
if (days < 0) {
|
||
return {
|
||
level: 'danger',
|
||
text: `${when} 已过期`,
|
||
title: 'HTTPS 证书已过期',
|
||
desc: `证书已于 ${when} 过期(${-days} 天),自持域名将无法正常访问,请重新上传证书。`
|
||
}
|
||
}
|
||
if (days <= 30) {
|
||
return {
|
||
level: 'warning',
|
||
text: `${when} 到期(剩 ${days} 天)`,
|
||
title: 'HTTPS 证书即将到期',
|
||
desc: `证书将于 ${when} 到期,剩余 ${days} 天,请及时更新证书。`
|
||
}
|
||
}
|
||
return { level: 'success', text: `有效期至 ${when}`, title: '', desc: '' }
|
||
})
|
||
|
||
/** 证书 tag 类型(none/info 一律用 info 灰) */
|
||
const frontCertTagType = computed<'success' | 'warning' | 'danger' | 'info'>(() => {
|
||
const level = frontCertStatus.value.level
|
||
return level === 'success' || level === 'warning' || level === 'danger' ? level : 'info'
|
||
})
|
||
|
||
function stringifyFrontThemeValue(v: unknown): string {
|
||
if (v === null || v === undefined) return ''
|
||
if (typeof v === 'string') return v
|
||
try {
|
||
return JSON.stringify(v)
|
||
} catch {
|
||
return String(v)
|
||
}
|
||
}
|
||
|
||
function parseFrontThemeValue(text: string): unknown {
|
||
const t = text.trim()
|
||
if (!t) return ''
|
||
try {
|
||
return JSON.parse(t)
|
||
} catch {
|
||
return t
|
||
}
|
||
}
|
||
|
||
function addFrontThemeRow() {
|
||
frontThemeRows.value.push({ key: '', value: '' })
|
||
}
|
||
|
||
function removeFrontThemeRow(index: number) {
|
||
frontThemeRows.value.splice(index, 1)
|
||
}
|
||
|
||
async function loadFrontConfig() {
|
||
frontPageLoading.value = true
|
||
try {
|
||
const res = await settingWarehouseGetFrontConfig()
|
||
if (!res || !okCode(res.code)) {
|
||
ElMessage.error(res?.message || '获取前端部署配置失败')
|
||
return
|
||
}
|
||
const cfg = unwrapSettingWarehousePayload(res as Record<string, unknown>)
|
||
Object.keys(frontMeta).forEach((k) => delete frontMeta[k])
|
||
Object.assign(frontMeta, cfg)
|
||
// 有证书内容时默认展开证书/私钥回显面板(无则收起,字段仍以「未配置」占位展示)
|
||
frontCertEchoOpen.value =
|
||
cfg.cert_pem || cfg.key_pem ? ['cert_pem', 'key_pem'] : []
|
||
frontForm.title = String(cfg.title ?? '')
|
||
frontForm.logo_url = String(cfg.logo_url ?? '')
|
||
frontForm.favicon_url = String(cfg.favicon_url ?? '')
|
||
frontForm.login_bg_url = String(cfg.login_bg_url ?? '')
|
||
// theme:与 getFrontConfig 响应参数一致,按对象键逐项展开编辑
|
||
let themeObj: Record<string, unknown> | null = null
|
||
if (cfg.theme && typeof cfg.theme === 'object' && !Array.isArray(cfg.theme)) {
|
||
themeObj = cfg.theme as Record<string, unknown>
|
||
} else if (typeof cfg.theme === 'string' && cfg.theme.trim()) {
|
||
try {
|
||
const parsed = JSON.parse(cfg.theme)
|
||
if (parsed && typeof parsed === 'object' && !Array.isArray(parsed)) themeObj = parsed as Record<string, unknown>
|
||
} catch {
|
||
// 忽略无法解析的主题字符串
|
||
}
|
||
}
|
||
const src = themeObj
|
||
// 历史遗留约定键:只读保留(隐藏不展示);其余键进入自定义 CSS 变量区编辑
|
||
Object.keys(frontThemeLegacy).forEach((k) => delete frontThemeLegacy[k])
|
||
frontThemeRows.value = []
|
||
if (src) {
|
||
Object.keys(src).forEach((k) => {
|
||
const value = src[k]
|
||
if (FRONT_THEME_LEGACY_KEYS.includes(k as (typeof FRONT_THEME_LEGACY_KEYS)[number])) {
|
||
frontThemeLegacy[k] = value
|
||
} else if (value !== undefined && value !== null && String(value).trim() !== '') {
|
||
frontThemeRows.value.push({ key: k, value: stringifyFrontThemeValue(value) })
|
||
}
|
||
})
|
||
}
|
||
} catch (e: unknown) {
|
||
ElMessage.error(e instanceof Error ? e.message : '获取前端部署配置失败')
|
||
} finally {
|
||
frontPageLoading.value = false
|
||
}
|
||
}
|
||
|
||
async function saveFrontConfig() {
|
||
frontSaving.value = true
|
||
try {
|
||
const themeObj: Record<string, unknown> = { ...frontThemeLegacy }
|
||
frontThemeRows.value.forEach((row) => {
|
||
const key = row.key.trim()
|
||
const valueText = row.value.trim()
|
||
if (!key || !valueText) return
|
||
// 历史遗留约定键不可通过自定义区再次写入(已由顶层品牌字段承担)
|
||
if (FRONT_THEME_LEGACY_KEYS.includes(key as (typeof FRONT_THEME_LEGACY_KEYS)[number])) return
|
||
themeObj[key] = parseFrontThemeValue(valueText)
|
||
})
|
||
const res = await settingWarehouseSaveFrontConfig({
|
||
title: frontForm.title.trim(),
|
||
logo_url: frontForm.logo_url.trim(),
|
||
favicon_url: frontForm.favicon_url.trim(),
|
||
login_bg_url: frontForm.login_bg_url.trim(),
|
||
theme: themeObj
|
||
})
|
||
if (!res || !okCode(res.code)) {
|
||
ElMessage.error(res?.message || '保存品牌配置失败')
|
||
return
|
||
}
|
||
ElMessage.success('品牌配置已保存')
|
||
await loadFrontConfig()
|
||
} catch (e: unknown) {
|
||
ElMessage.error(e instanceof Error ? e.message : '保存品牌配置失败')
|
||
} finally {
|
||
frontSaving.value = false
|
||
}
|
||
}
|
||
|
||
async function submitFrontCert() {
|
||
const domain = frontCert.domain.trim()
|
||
const pem = frontCert.pem.trim()
|
||
const key = frontCert.key.trim()
|
||
if (!domain || !pem || !key) {
|
||
ElMessage.warning('域名、证书 PEM、私钥 PEM 均必填')
|
||
return
|
||
}
|
||
frontCertSaving.value = true
|
||
try {
|
||
const res = await settingWarehouseSaveFrontCert({ domain, pem, key })
|
||
if (!res || !okCode(res.code)) {
|
||
ElMessage.error(res?.message || '证书上传失败')
|
||
return
|
||
}
|
||
ElMessage.success('证书已上传并生效')
|
||
frontCert.domain = ''
|
||
frontCert.pem = ''
|
||
frontCert.key = ''
|
||
await loadFrontConfig()
|
||
} catch (e: unknown) {
|
||
ElMessage.error(e instanceof Error ? e.message : '证书上传失败')
|
||
} finally {
|
||
frontCertSaving.value = false
|
||
}
|
||
}
|
||
|
||
loadFrontConfig()
|
||
</script>
|
||
|
||
<style lang="scss" scoped>
|
||
.front-config-page {
|
||
padding: 12px 16px 24px;
|
||
box-sizing: border-box;
|
||
}
|
||
|
||
.settings-header {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
gap: 12px;
|
||
flex-wrap: wrap;
|
||
margin-bottom: 12px;
|
||
}
|
||
|
||
.header-text {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 4px;
|
||
}
|
||
|
||
.title {
|
||
font-size: 16px;
|
||
font-weight: 600;
|
||
color: #303133;
|
||
}
|
||
|
||
.sub {
|
||
font-size: 13px;
|
||
color: #909399;
|
||
}
|
||
|
||
.header-actions {
|
||
display: flex;
|
||
gap: 8px;
|
||
}
|
||
|
||
.mb-16 {
|
||
margin-bottom: 16px;
|
||
}
|
||
|
||
.front-config-section {
|
||
margin-top: 8px;
|
||
}
|
||
|
||
.front-config-divider {
|
||
margin: 12px 0;
|
||
}
|
||
|
||
.front-config-meta {
|
||
margin-bottom: 12px;
|
||
max-width: 720px;
|
||
}
|
||
|
||
.front-config-alert {
|
||
margin: 0 0 12px;
|
||
max-width: 720px;
|
||
}
|
||
|
||
.front-config-form {
|
||
max-width: 720px;
|
||
}
|
||
|
||
.front-config-hint {
|
||
font-size: 12px;
|
||
color: #909399;
|
||
margin-left: 8px;
|
||
}
|
||
|
||
.front-theme-editor {
|
||
width: 100%;
|
||
max-width: 560px;
|
||
}
|
||
|
||
.front-theme-row {
|
||
display: flex;
|
||
gap: 8px;
|
||
align-items: center;
|
||
margin-bottom: 8px;
|
||
|
||
&__key {
|
||
flex: 0 0 180px;
|
||
}
|
||
|
||
&__value {
|
||
flex: 1;
|
||
min-width: 200px;
|
||
}
|
||
}
|
||
|
||
.front-theme-actions {
|
||
margin-bottom: 4px;
|
||
}
|
||
|
||
.front-theme-hint {
|
||
margin-left: 0;
|
||
margin-top: 6px;
|
||
}
|
||
|
||
.front-cert-echo {
|
||
max-width: 720px;
|
||
|
||
&__alert {
|
||
margin-bottom: 12px;
|
||
}
|
||
|
||
&__collapse {
|
||
margin-bottom: 8px;
|
||
}
|
||
|
||
&__bar {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
gap: 8px;
|
||
margin-bottom: 6px;
|
||
}
|
||
|
||
&__pem {
|
||
:deep(.el-textarea__inner) {
|
||
font-family: var(--el-font-family-mono), Consolas, Menlo, monospace;
|
||
}
|
||
}
|
||
}
|
||
</style>
|