1 parent
8f53b80c57
commit
db82a573dd
4 files changed
+15
-3
No files matched your search
@@ -1,5 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="config-field" :class="{ 'field-wide': ['list', 'network'].includes(field.type) }" :data-field="fieldKey(field)">
|
<div
|
||||||
|
class="config-field"
|
||||||
|
:class="{ 'field-wide': ['list', 'network'].includes(field.type) && field.wide !== false }"
|
||||||
|
:data-field="fieldKey(field)"
|
||||||
|
>
|
||||||
<label :id="`${id}-label`" :for="id" class="field-label">
|
<label :id="`${id}-label`" :for="id" class="field-label">
|
||||||
{{ field.label }}
|
{{ field.label }}
|
||||||
<span v-if="field.required" class="field-required" aria-hidden="true">*</span>
|
<span v-if="field.required" class="field-required" aria-hidden="true">*</span>
|
||||||
|
|||||||
@@ -109,3 +109,11 @@
|
|||||||
gap: 12px;
|
gap: 12px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 基础配置的站点字段在桌面半屏抽屉中保持两行两列,窄手机容器回退为单列。 */
|
||||||
|
@container config-main (min-width: 441px) {
|
||||||
|
.form-grid.site-grid {
|
||||||
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||||
|
gap: 10px 14px;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -79,7 +79,7 @@ const baseGroups = [
|
|||||||
group('site', '站点与域名', '填写域名即可,无需添加协议前缀或路径。', [
|
group('site', '站点与域名', '填写域名即可,无需添加协议前缀或路径。', [
|
||||||
field('domains.primary', '主邮件域名', 'text', { required: true, placeholder: 'example.com' }),
|
field('domains.primary', '主邮件域名', 'text', { required: true, placeholder: 'example.com' }),
|
||||||
field('domains.web', '网页访问域名', 'text', { required: true, placeholder: 'mail.example.com' }),
|
field('domains.web', '网页访问域名', 'text', { required: true, placeholder: 'mail.example.com' }),
|
||||||
field('domains.accepted', '接收邮件的域名', 'list', { required: true, hint: '需包含主邮件域名,每个域名单独填写。', placeholder: 'example.com' }),
|
field('domains.accepted', '接收邮件的域名', 'list', { required: true, wide: false, hint: '需包含主邮件域名,每个域名单独填写。', placeholder: 'example.com' }),
|
||||||
field('logLevel', '日志级别', 'select', { options: options([['', '默认级别'], ['debug', '调试'], ['info', '信息'], ['warn', '警告'], ['error', '错误']]) })
|
field('logLevel', '日志级别', 'select', { options: options([['', '默认级别'], ['debug', '调试'], ['info', '信息'], ['warn', '警告'], ['error', '错误']]) })
|
||||||
]),
|
]),
|
||||||
group('database', '数据库连接', '修改数据库类型、名称或文件请使用右侧“数据库迁移”,支持 SQLite、MySQL、PostgreSQL,避免切换到空数据库。', [
|
group('database', '数据库连接', '修改数据库类型、名称或文件请使用右侧“数据库迁移”,支持 SQLite、MySQL、PostgreSQL,避免切换到空数据库。', [
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
>
|
>
|
||||||
<p v-if="group.secretConfigured !== undefined" class="credential-status">{{ group.secretConfigured ? '凭据已配置' : '未配置凭据' }}</p>
|
<p v-if="group.secretConfigured !== undefined" class="credential-status">{{ group.secretConfigured ? '凭据已配置' : '未配置凭据' }}</p>
|
||||||
<p v-if="group.note" class="form-group-note" role="note">{{ group.note }}</p>
|
<p v-if="group.note" class="form-group-note" role="note">{{ group.note }}</p>
|
||||||
<div class="form-grid">
|
<div class="form-grid" :class="{ 'site-grid': section === 'base' && group.id === 'site' }">
|
||||||
<ConfigField
|
<ConfigField
|
||||||
v-for="field in group.fields"
|
v-for="field in group.fields"
|
||||||
:key="fieldKey(field)"
|
:key="fieldKey(field)"
|
||||||
|
|||||||
Reference in new issue
Block a user