style: 统一内容区卡片、表单和对话框排版

This commit is contained in:
2026-11-02 10:07:36 +08:00
parent 08b2cb35be
commit d6c328a8d2
9 changed files with 388 additions and 238 deletions
+49 -8
View File
@@ -10,6 +10,7 @@ const palette = computed(() => isDark.value
watch(palette, (value) => { watch(palette, (value) => {
const root = document.documentElement; const root = document.documentElement;
const dark = isDark.value;
root.style.setProperty("--bg", value.bg); root.style.setProperty("--bg", value.bg);
root.style.setProperty("--panel", value.panel); root.style.setProperty("--panel", value.panel);
root.style.setProperty("--ink", value.ink); root.style.setProperty("--ink", value.ink);
@@ -18,11 +19,18 @@ watch(palette, (value) => {
root.style.setProperty("--accent", value.accent); root.style.setProperty("--accent", value.accent);
root.style.setProperty("--sidebar", value.sidebar); root.style.setProperty("--sidebar", value.sidebar);
root.style.setProperty("--danger", value.danger); root.style.setProperty("--danger", value.danger);
root.style.setProperty("--accent-soft", isDark.value ? "rgba(121, 192, 255, 0.16)" : "rgba(9, 105, 218, 0.12)"); root.style.setProperty("--ok", dark ? "#3FB950" : "#1A7F37");
root.dataset.theme = isDark.value ? "dark" : "light"; root.style.setProperty("--panel-2", dark ? "#1C2129" : "#F3F5F7");
root.style.setProperty("--hover", dark ? "rgba(230, 237, 243, 0.04)" : "rgba(13, 17, 23, 0.03)");
root.style.setProperty("--shadow", dark ? "none" : "0 1px 2px rgba(13, 17, 23, 0.04)");
root.style.setProperty("--accent-soft", dark ? "rgba(121, 192, 255, 0.16)" : "rgba(9, 105, 218, 0.12)");
root.dataset.theme = dark ? "dark" : "light";
}, { immediate: true }); }, { immediate: true });
const overrides = computed<GlobalThemeOverrides>(() => ({ const overrides = computed<GlobalThemeOverrides>(() => {
const line = isDark.value ? "#6E7681" : "#D0D7DE";
const lineHover = isDark.value ? "#C9D1D9" : "#57606A";
return {
common: { common: {
primaryColor: "#1F6FEB", primaryColor: "#1F6FEB",
primaryColorHover: "#388BFD", primaryColorHover: "#388BFD",
@@ -30,20 +38,53 @@ const overrides = computed<GlobalThemeOverrides>(() => ({
primaryColorSuppl: "#1F6FEB", primaryColorSuppl: "#1F6FEB",
bodyColor: palette.value.bg, bodyColor: palette.value.bg,
cardColor: palette.value.panel, cardColor: palette.value.panel,
modalColor: palette.value.panel,
popoverColor: palette.value.panel,
textColor2: palette.value.ink, textColor2: palette.value.ink,
textColor3: isDark.value ? "#C9D1D9" : "#57606A", textColor3: isDark.value ? "#C9D1D9" : "#57606A",
placeholderColor: isDark.value ? "#C9D1D9" : "#57606A", placeholderColor: isDark.value ? "#C9D1D9" : "#57606A",
borderColor: isDark.value ? "#6E7681" : "#D0D7DE", borderColor: line,
fontFamily: '"Segoe UI", "Microsoft YaHei", sans-serif', fontFamily: '"Segoe UI", "Microsoft YaHei", sans-serif',
borderRadius: "3px", borderRadius: "4px",
heightMedium: "34px",
heightSmall: "28px",
},
Button: {
heightMedium: "34px",
heightSmall: "28px",
paddingMedium: "0 14px",
paddingSmall: "0 10px",
fontWeightStrong: "600",
borderRadiusMedium: "4px",
}, },
Input: { Input: {
heightMedium: "34px",
placeholderColor: isDark.value ? "#C9D1D9" : "#57606A", placeholderColor: isDark.value ? "#C9D1D9" : "#57606A",
border: isDark.value ? "1px solid #6E7681" : "1px solid #D0D7DE", border: `1px solid ${line}`,
borderHover: isDark.value ? "1px solid #C9D1D9" : "1px solid #57606A", borderHover: `1px solid ${lineHover}`,
borderFocus: "1px solid #1F6FEB", borderFocus: "1px solid #1F6FEB",
}, },
})); InternalSelection: {
heightMedium: "34px",
border: `1px solid ${line}`,
borderHover: `1px solid ${lineHover}`,
borderActive: "1px solid #1F6FEB",
borderFocus: "1px solid #1F6FEB",
},
Dialog: {
borderRadius: "8px",
titleFontSize: "16px",
titleFontWeight: "650",
padding: "20px 24px 16px",
},
Card: {
borderRadius: "8px",
paddingMedium: "20px 24px",
titleFontSizeMedium: "16px",
titleFontWeight: "650",
},
};
});
</script> </script>
<template> <template>
+14 -10
View File
@@ -59,7 +59,8 @@ onMounted(load);
<n-button type="primary" @click="show = true">添加账号</n-button> <n-button type="primary" @click="show = true">添加账号</n-button>
</header> </header>
<div class="admin-scroll"> <div class="admin-scroll">
<table v-if="accounts.length" class="admin-table"> <div v-if="accounts.length" class="surface table-card">
<table class="admin-table">
<thead> <thead>
<tr> <tr>
<th>账号</th> <th>账号</th>
@@ -67,8 +68,8 @@ onMounted(load);
<th>地市</th> <th>地市</th>
<th>凭证</th> <th>凭证</th>
<th>登录</th> <th>登录</th>
<th>角色</th> <th class="col-pick">角色</th>
<th>操作</th> <th class="col-actions">操作</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@@ -76,19 +77,22 @@ onMounted(load);
<td>{{ account.loginId }}</td> <td>{{ account.loginId }}</td>
<td>{{ account.userName }}</td> <td>{{ account.userName }}</td>
<td>{{ account.cityName }}</td> <td>{{ account.cityName }}</td>
<td>{{ account.credentialValid ? "有效" : "失效" }}</td> <td :class="account.credentialValid ? 'status-ok' : 'status-bad'">{{ account.credentialValid ? "有效" : "失效" }}</td>
<td>{{ account.sessionOpen ? "未退出" : "已退出" }}</td> <td :class="account.sessionOpen ? 'status-run' : 'status-wait'">{{ account.sessionOpen ? "未退出" : "已退出" }}</td>
<td> <td class="col-pick">
<n-select :value="account.role" size="small" style="width: 120px" :options="[{ label: '用户', value: 'user' }, { label: '管理员', value: 'admin' }]" @update:value="(value) => setRole(account.id, value)" /> <n-select :value="account.role" size="small" :options="[{ label: '用户', value: 'user' }, { label: '管理员', value: 'admin' }]" @update:value="(value) => setRole(account.id, value)" />
</td> </td>
<td><n-button size="small" quaternary @click="confirmRemove(account)">删除</n-button></td> <td class="col-actions"><n-button size="small" quaternary @click="confirmRemove(account)">删除</n-button></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
<p v-else class="admin-status">没有账号</p> </div>
<div v-else class="surface empty-card">
<p class="admin-status">没有账号</p>
</div>
</div> </div>
</section> </section>
<n-modal v-model:show="show" preset="card" title="添加账号" :style="{ width: 'min(440px, calc(100vw - 32px))' }"> <n-modal v-model:show="show" class="app-dialog" preset="card" title="添加账号">
<LoginView purpose="pool" @done="show = false; load()" /> <LoginView purpose="pool" @done="show = false; load()" />
</n-modal> </n-modal>
</Shell> </Shell>
+2
View File
@@ -68,6 +68,7 @@ onMounted(load);
<n-button type="primary" attr-type="submit" :loading="saving" :disabled="!loaded">保存</n-button> <n-button type="primary" attr-type="submit" :loading="saving" :disabled="!loaded">保存</n-button>
</header> </header>
<div class="admin-scroll"> <div class="admin-scroll">
<div class="surface settings-card">
<p v-if="!loaded" class="admin-status">正在获取</p> <p v-if="!loaded" class="admin-status">正在获取</p>
<div v-else class="settings-fields"> <div v-else class="settings-fields">
<div class="form-row"> <div class="form-row">
@@ -93,6 +94,7 @@ onMounted(load);
</div> </div>
</div> </div>
</div> </div>
</div>
</form> </form>
</section> </section>
</Shell> </Shell>
+14 -5
View File
@@ -104,14 +104,15 @@ onMounted(load);
<n-button type="primary" @click="reset()">添加采集</n-button> <n-button type="primary" @click="reset()">添加采集</n-button>
</header> </header>
<div class="admin-scroll"> <div class="admin-scroll">
<table v-if="sources.length" class="admin-table"> <div v-if="sources.length" class="surface table-card">
<table class="admin-table">
<thead> <thead>
<tr> <tr>
<th>名称</th> <th>名称</th>
<th>来源</th> <th>来源</th>
<th>周期(天)</th> <th>周期(天)</th>
<th>状态</th> <th>状态</th>
<th>操作</th> <th class="col-actions">操作</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@@ -119,18 +120,26 @@ onMounted(load);
<td>{{ source.name }}</td> <td>{{ source.name }}</td>
<td>{{ source.kind === "nqi" ? "NQI" : "FTP/SFTP" }}</td> <td>{{ source.kind === "nqi" ? "NQI" : "FTP/SFTP" }}</td>
<td>{{ source.periodDays }}</td> <td>{{ source.periodDays }}</td>
<td>{{ source.lastError || (source.enabled ? "启用" : "停用") }}</td>
<td> <td>
<span v-if="source.lastError" class="status-bad">{{ source.lastError }}</span>
<span v-else :class="source.enabled ? 'status-ok' : 'status-wait'">{{ source.enabled ? "启用" : "停用" }}</span>
</td>
<td class="col-actions">
<div class="row-actions">
<n-button size="small" quaternary @click="reset(source)">编辑</n-button> <n-button size="small" quaternary @click="reset(source)">编辑</n-button>
<n-button size="small" quaternary @click="confirmRemove(source)">删除</n-button> <n-button size="small" quaternary @click="confirmRemove(source)">删除</n-button>
</div>
</td> </td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
<p v-else class="admin-status">没有采集</p> </div>
<div v-else class="surface empty-card">
<p class="admin-status">没有采集</p>
</div>
</div> </div>
</section> </section>
<n-modal v-model:show="show" preset="dialog" title="采集" positive-text="保存" negative-text="取消" @positive-click="save"> <n-modal v-model:show="show" class="app-dialog app-dialog-wide" preset="dialog" :show-icon="false" title="采集" positive-text="保存" negative-text="取消" @positive-click="save">
<div class="form-row"><label>来源</label><n-select v-model:value="kind" :options="[{ label: 'FTP/SFTP', value: 'ftp' }, { label: 'NQI', value: 'nqi' }]" /></div> <div class="form-row"><label>来源</label><n-select v-model:value="kind" :options="[{ label: 'FTP/SFTP', value: 'ftp' }, { label: 'NQI', value: 'nqi' }]" /></div>
<div class="form-row"><label>名称</label><n-input v-model:value="name" /></div> <div class="form-row"><label>名称</label><n-input v-model:value="name" /></div>
<p class="form-section">连接</p> <p class="form-section">连接</p>
+11 -7
View File
@@ -65,26 +65,30 @@ onMounted(load);
<n-button type="primary" @click="show = true">添加用户</n-button> <n-button type="primary" @click="show = true">添加用户</n-button>
</header> </header>
<div class="admin-scroll"> <div class="admin-scroll">
<table v-if="users.length" class="admin-table"> <div v-if="users.length" class="surface table-card compact">
<table class="admin-table">
<thead> <thead>
<tr> <tr>
<th>账号</th> <th>账号</th>
<th>角色</th> <th class="col-role">角色</th>
<th>操作</th> <th class="col-actions">操作</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr v-for="user in users" :key="user.id"> <tr v-for="user in users" :key="user.id">
<td>{{ user.username }}</td> <td>{{ user.username }}</td>
<td>{{ user.role === "admin" ? "管理员" : "用户" }}</td> <td class="col-role">{{ user.role === "admin" ? "管理员" : "用户" }}</td>
<td><n-button size="small" quaternary @click="confirmRemove(user)">删除</n-button></td> <td class="col-actions"><n-button size="small" quaternary @click="confirmRemove(user)">删除</n-button></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
<p v-else class="admin-status">没有用户</p> </div>
<div v-else class="surface empty-card compact">
<p class="admin-status">没有用户</p>
</div>
</div> </div>
</section> </section>
<n-modal v-model:show="show" preset="dialog" title="添加用户" positive-text="保存" negative-text="取消" @positive-click="create"> <n-modal v-model:show="show" class="app-dialog" preset="dialog" :show-icon="false" title="添加用户" positive-text="保存" negative-text="取消" @positive-click="create">
<div class="form-row"><label>账号</label><n-input v-model:value="username" /></div> <div class="form-row"><label>账号</label><n-input v-model:value="username" /></div>
<div class="form-row"><label>密码</label><n-input v-model:value="password" type="password" /></div> <div class="form-row"><label>密码</label><n-input v-model:value="password" type="password" /></div>
<div class="form-row"><label>角色</label><n-select v-model:value="role" :options="[{ label: '用户', value: 'user' }, { label: '管理员', value: 'admin' }]" /></div> <div class="form-row"><label>角色</label><n-select v-model:value="role" :options="[{ label: '用户', value: 'user' }, { label: '管理员', value: 'admin' }]" /></div>
+1 -1
View File
@@ -263,7 +263,7 @@ async function finishNqi() {
<n-button class="lv-go" type="primary" attr-type="submit" :loading="busy">{{ purpose === "pool" ? "添加" : "登录" }}</n-button> <n-button class="lv-go" type="primary" attr-type="submit" :loading="busy">{{ purpose === "pool" ? "添加" : "登录" }}</n-button>
</form> </form>
</section> </section>
<n-modal v-model:show="smsRequired" :mask-closable="false" preset="card" title="短信认证" style="width: 420px"> <n-modal v-model:show="smsRequired" class="app-dialog" :mask-closable="false" preset="card" title="短信认证">
<n-input v-model:value="smsCode" placeholder="输入短信验证码" @keyup.enter="finishNqi" /> <n-input v-model:value="smsCode" placeholder="输入短信验证码" @keyup.enter="finishNqi" />
<div class="sms-actions"> <div class="sms-actions">
<n-button @click="backFromSms">返回</n-button> <n-button @click="backFromSms">返回</n-button>
+9 -16
View File
@@ -70,22 +70,15 @@ async function submit() {
<div class="brand-mark" aria-hidden="true">D</div> <div class="brand-mark" aria-hidden="true">D</div>
<h1>安装 DecomEval</h1> <h1>安装 DecomEval</h1>
</div> </div>
<div class="form-grid"> <p class="form-section">数据库</p>
<label>数据库主机</label> <div class="form-row"><label>主机</label><n-input v-model:value="host" /></div>
<n-input v-model:value="host" /> <div class="form-row"><label>端口</label><n-input v-model:value="port" :allow-input="allowPort" placeholder="5432" :input-props="{ inputmode: 'numeric', autocomplete: 'off' }" /></div>
<label>端口</label> <div class="form-row"><label>数据库名</label><n-input v-model:value="database" /></div>
<n-input v-model:value="port" :allow-input="allowPort" placeholder="5432" :input-props="{ inputmode: 'numeric', autocomplete: 'off' }" /> <div class="form-row"><label>用户</label><n-input v-model:value="username" /></div>
<label>数据库名</label> <div class="form-row"><label>密码</label><n-input v-model:value="password" type="password" show-password-on="click" /></div>
<n-input v-model:value="database" /> <p class="form-section">管理员</p>
<label>数据库用户</label> <div class="form-row"><label>账号</label><n-input v-model:value="adminUsername" /></div>
<n-input v-model:value="username" /> <div class="form-row"><label>密码</label><n-input v-model:value="adminPassword" type="password" show-password-on="click" /></div>
<label>数据库密码</label>
<n-input v-model:value="password" type="password" />
<label>管理员账号</label>
<n-input v-model:value="adminUsername" />
<label>管理员密码</label>
<n-input v-model:value="adminPassword" type="password" />
</div>
<n-button class="gate-submit" type="primary" :loading="busy" @click="submit">完成安装</n-button> <n-button class="gate-submit" type="primary" :loading="busy" @click="submit">完成安装</n-button>
</section> </section>
</div> </div>
+20 -9
View File
@@ -34,6 +34,13 @@ function statusLabel(status: string) {
return "失败"; return "失败";
} }
function statusClass(status: string) {
if (status === "done") return "status-ok";
if (status === "running") return "status-run";
if (status === "failed") return "status-bad";
return "status-wait";
}
function rangeLabel(row: Task) { function rangeLabel(row: Task) {
if (row.start && row.end) return `${row.start} 至 ${row.end}`; if (row.start && row.end) return `${row.start} 至 ${row.end}`;
return "全部时间"; return "全部时间";
@@ -138,15 +145,16 @@ onUnmounted(stopPoll);
<n-button type="primary" @click="show = true">提交任务</n-button> <n-button type="primary" @click="show = true">提交任务</n-button>
</header> </header>
<div class="admin-scroll"> <div class="admin-scroll">
<table v-if="tasks.length" class="admin-table"> <div v-if="tasks.length" class="surface table-card">
<table class="admin-table">
<thead> <thead>
<tr> <tr>
<th>小区</th> <th>小区</th>
<th>时间</th> <th>时间</th>
<th>提交时间</th> <th>提交时间</th>
<th>格式</th> <th class="col-format">格式</th>
<th>状态</th> <th>状态</th>
<th>操作</th> <th class="col-actions">操作</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@@ -154,21 +162,24 @@ onUnmounted(stopPoll);
<td>{{ row.cellKey || "全部" }}</td> <td>{{ row.cellKey || "全部" }}</td>
<td>{{ rangeLabel(row) }}</td> <td>{{ rangeLabel(row) }}</td>
<td>{{ submittedLabel(row.createdAt) }}</td> <td>{{ submittedLabel(row.createdAt) }}</td>
<td>{{ row.format }}</td> <td class="col-format">{{ row.format }}</td>
<td> <td>
<div :class="row.status === 'failed' ? 'late' : ''">{{ statusLabel(row.status) }}</div> <div :class="statusClass(row.status)">{{ statusLabel(row.status) }}</div>
<div v-if="row.error" class="late">{{ row.error }}</div> <div v-if="row.error" class="status-bad">{{ row.error }}</div>
</td> </td>
<td> <td class="col-actions">
<n-button v-if="row.status === 'done'" type="primary" size="small" @click="download(row)">下载结果</n-button> <n-button v-if="row.status === 'done'" type="primary" size="small" @click="download(row)">下载结果</n-button>
</td> </td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
<p v-else class="admin-status">还没有任务</p> </div>
<div v-else class="surface empty-card">
<p class="admin-status">还没有任务</p>
</div>
</div> </div>
</section> </section>
<n-modal v-model:show="show" preset="dialog" title="提交任务" positive-text="提交" negative-text="取消" @positive-click="submit"> <n-modal v-model:show="show" class="app-dialog" preset="dialog" :show-icon="false" title="提交任务" positive-text="提交" negative-text="取消" @positive-click="submit">
<div class="form-row"><label>格式</label><n-select v-model:value="format" :options="formats" /></div> <div class="form-row"><label>格式</label><n-select v-model:value="format" :options="formats" /></div>
<div class="form-row"><label>小区</label><n-input v-model:value="cellKey" placeholder="留空则导出全部" /></div> <div class="form-row"><label>小区</label><n-input v-model:value="cellKey" placeholder="留空则导出全部" /></div>
<div class="form-row"> <div class="form-row">
+163 -77
View File
@@ -11,6 +11,7 @@ button, input, select { font: inherit; }
::selection { background: var(--accent-soft); } ::selection { background: var(--accent-soft); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; } :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* shell — keep sider geometry and selected-edge indicator */
.shell { height: 100%; background: var(--bg); color: var(--ink); } .shell { height: 100%; background: var(--bg); color: var(--ink); }
.shell .n-layout, .shell .n-layout,
.shell .n-layout-scroll-container, .shell .n-layout-scroll-container,
@@ -78,6 +79,8 @@ button, input, select { font: inherit; }
height: 100%; height: 100%;
overflow: hidden; overflow: hidden;
} }
/* page chrome */
.page { .page {
height: 100%; height: 100%;
min-height: 0; min-height: 0;
@@ -94,7 +97,7 @@ button, input, select { font: inherit; }
gap: 16px; gap: 16px;
flex: none; flex: none;
margin: 0; margin: 0;
padding: 0 16px 0 20px; padding: 0 24px;
border-bottom: 1px solid var(--line); border-bottom: 1px solid var(--line);
background: var(--bg); background: var(--bg);
} }
@@ -111,16 +114,40 @@ button, input, select { font: inherit; }
flex: 1; flex: 1;
min-height: 0; min-height: 0;
overflow: auto; overflow: auto;
padding: 20px 24px 24px; padding: 20px 24px 28px;
} }
.admin-status { margin: 0; color: var(--muted); } .admin-status { margin: 0; color: var(--muted); }
/* surfaces */
.surface {
background: var(--panel);
border: 1px solid var(--line);
border-radius: 8px;
box-shadow: var(--shadow);
}
.table-card { overflow: auto; }
.table-card.compact,
.empty-card.compact { width: min(720px, 100%); }
.empty-card {
min-height: 220px;
display: grid;
place-items: center;
padding: 32px 24px;
}
.settings-card {
width: min(520px, 100%);
padding: 20px 22px 10px;
}
.settings-card .form-row:last-child { margin-bottom: 10px; }
/* tables */
.admin-table { .admin-table {
width: 100%; width: 100%;
border-collapse: collapse; border-collapse: collapse;
} }
.admin-table th, .admin-table th,
.admin-table td { .admin-table td {
padding: 10px 16px 10px 0; padding: 11px 16px;
border-bottom: 1px solid var(--line); border-bottom: 1px solid var(--line);
text-align: left; text-align: left;
vertical-align: middle; vertical-align: middle;
@@ -129,30 +156,62 @@ button, input, select { font: inherit; }
position: sticky; position: sticky;
top: 0; top: 0;
z-index: 1; z-index: 1;
background: var(--bg); background: var(--panel-2);
color: var(--muted); color: var(--muted);
font-size: 12px; font-size: 12px;
font-weight: 400; font-weight: 550;
letter-spacing: 0.01em;
} }
.admin-table tbody tr:last-child td { border-bottom: 0; }
.admin-table tbody tr:hover td { background: var(--hover); }
.admin-table .col-actions {
width: 1%;
white-space: nowrap;
text-align: right;
}
.admin-table .col-format,
.admin-table .col-role { width: 88px; }
.admin-table .col-pick { width: 128px; }
.row-actions {
display: flex;
justify-content: flex-end;
align-items: center;
gap: 4px;
}
/* forms: label left, control right */
.form-row { .form-row {
display: grid; display: grid;
grid-template-columns: max-content minmax(160px, 280px); grid-template-columns: 7em minmax(0, 1fr);
gap: 8px 12px; gap: 8px 14px;
align-items: center; align-items: center;
justify-content: start;
margin-bottom: 12px; margin-bottom: 12px;
} }
.form-row > * { min-width: 0; }
.form-row > label {
display: inline-flex;
align-items: center;
color: var(--ink);
line-height: 1.3;
white-space: nowrap;
}
.form-row .n-input, .form-row .n-input,
.form-row .n-select, .form-row .n-select,
.form-row .n-input-number, .form-row .n-input-number,
.form-row .n-date-picker { width: 100%; } .form-row .n-date-picker,
.field-error { margin: 4px 0 0; color: var(--danger); font-size: 12px; } .form-row .n-radio-group { width: 100%; }
.form-row > div { width: 100%; }
.form-row:last-child { margin-bottom: 0; }
.field-error { margin: 6px 0 0; color: var(--danger); font-size: 12px; line-height: 1.3; }
.form-section { .form-section {
margin: 14px 0 8px; margin: 18px 0 10px;
color: var(--muted); color: var(--muted);
font-size: 12px; font-size: 12px;
font-weight: 650; font-weight: 650;
letter-spacing: 0.04em;
} }
.gate-brand + .form-section,
.form-section:first-child { margin-top: 0; }
.hint-mark { .hint-mark {
display: inline-grid; display: inline-grid;
place-items: center; place-items: center;
@@ -163,26 +222,40 @@ button, input, select { font: inherit; }
vertical-align: -2px; vertical-align: -2px;
cursor: help; cursor: help;
} }
.late { color: var(--danger); } .filters, .form-grid {
display: grid;
grid-template-columns: 7em minmax(0, 1fr);
gap: 8px 14px;
align-items: center;
}
.late, .status-bad { color: var(--danger); }
.status-ok { color: var(--ok); }
.status-run { color: var(--accent); }
.status-wait { color: var(--muted); }
.settings-form { .settings-form {
height: 100%; height: 100%;
min-height: 0; min-height: 0;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
} }
.settings-fields { max-width: 640px; } .settings-fields .form-row { grid-template-columns: 11em minmax(0, 1fr); }
.settings-form .form-row label { min-width: 8em; } .settings-fields .n-radio-group {
.setting-control {
display: flex; display: flex;
flex-wrap: wrap;
gap: 2px 18px;
align-items: center; align-items: center;
gap: 8px; }
.setting-control {
display: grid;
grid-template-columns: minmax(0, 1fr) auto;
align-items: center;
gap: 10px;
min-width: 0; min-width: 0;
} }
.setting-control .n-input-number { flex: 1; width: 100%; min-width: 0; } .setting-control .n-input-number { width: 100%; min-width: 0; }
.setting-unit { flex: none; color: var(--muted); } .setting-unit { flex: none; color: var(--muted); line-height: 34px; }
.panel { background: var(--panel); border: 1px solid var(--line); } .panel { background: var(--panel); border: 1px solid var(--line); }
.filters, .form-grid { display: grid; grid-template-columns: 112px minmax(0, 280px); gap: 8px 12px; align-items: center; }
.gate-card.wide .form-grid { grid-template-columns: 112px minmax(0, 1fr); }
.hint { .hint {
width: 16px; width: 16px;
height: 16px; height: 16px;
@@ -194,6 +267,8 @@ button, input, select { font: inherit; }
text-align: center; text-align: center;
cursor: default; cursor: default;
} }
/* gate / login / install */
.app-root { height: 100%; } .app-root { height: 100%; }
.gate { .gate {
position: relative; position: relative;
@@ -208,77 +283,74 @@ button, input, select { font: inherit; }
} }
.gate .theme-switch { position: absolute; top: 16px; right: 16px; } .gate .theme-switch { position: absolute; top: 16px; right: 16px; }
.sider-foot .theme-switch { position: static; align-self: flex-start; } .sider-foot .theme-switch { position: static; align-self: flex-start; }
.gate-card { .gate-card,
width: min(440px, 100%);
background: var(--panel);
border: 1px solid var(--line);
border-radius: 4px;
padding: 28px 28px 22px;
}
.gate-card.wide { width: min(560px, 100%); }
.gate-submit.n-button {
width: 100%;
height: 40px;
margin-top: 24px;
font-weight: 600;
letter-spacing: 0.12em;
}
.lv-side { .lv-side {
width: max-content; width: min(400px, 100%);
max-width: calc(100% - 32px);
box-sizing: border-box;
background: var(--panel); background: var(--panel);
color: var(--ink); color: var(--ink);
border: 1px solid var(--line); border: 1px solid var(--line);
border-radius: 4px; border-radius: 8px;
padding: 28px 24px 20px; padding: 32px;
box-shadow: var(--shadow);
} }
.gate-card.wide { width: min(480px, 100%); }
.gate-brand,
.lv-side .lv-brand { .lv-side .lv-brand {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: flex-start;
gap: 10px; gap: 12px;
margin-bottom: 18px; margin-bottom: 24px;
} }
.gate-brand h1,
.lv-side h1 { margin: 0; font-size: 20px; font-weight: 650; letter-spacing: -0.02em; }
.brand-mark,
.lv-side .lv-mark { .lv-side .lv-mark {
width: 28px; width: 32px;
height: 28px; height: 32px;
display: grid; display: grid;
place-items: center; place-items: center;
border: 1px solid var(--accent); border: 1px solid var(--accent);
color: var(--accent); color: var(--accent);
border-radius: 4px; border-radius: 6px;
font-weight: 650; font-weight: 650;
font-size: 13px; font-size: 14px;
flex: none;
} }
.lv-side h1 { margin: 0; font-size: 18px; }
.lv-side form, .lv-side form,
.lv-embed form { .lv-embed form {
display: grid; display: grid;
grid-template-columns: max-content minmax(0, 1fr); grid-template-columns: 4em minmax(0, 1fr);
column-gap: 8px; column-gap: 12px;
row-gap: 10px; row-gap: 14px;
align-items: center; align-items: center;
} }
.lv-side form { grid-template-columns: max-content 220px; }
.lv-side label, .lv-side label,
.lv-embed label { margin: 0; justify-self: end; } .lv-embed label {
margin: 0;
color: var(--ink);
line-height: 1.3;
}
.lv-side .n-alert, .lv-side .n-alert,
.lv-embed .n-alert { grid-column: 1 / -1; } .lv-embed .n-alert { grid-column: 1 / -1; }
.lv-side .n-button, .lv-side .n-button,
.lv-embed .n-button { grid-column: 2; width: 100%; } .lv-embed .n-button { grid-column: 2; width: 100%; }
.lv-side .lv-go, .lv-side .lv-go,
.lv-embed .lv-go { .lv-embed .lv-go,
.gate-submit.n-button {
height: 36px; height: 36px;
margin-top: 4px; margin-top: 8px;
font-weight: 600; font-weight: 600;
letter-spacing: 0.08em; }
.gate-submit.n-button {
width: 100%;
margin-top: 20px;
} }
.lv-captcha { display: flex; gap: 8px; align-items: center; min-width: 0; } .lv-captcha { display: flex; gap: 8px; align-items: center; min-width: 0; }
.lv-captcha .n-input { flex: 1; min-width: 0; } .lv-captcha .n-input { flex: 1; min-width: 0; }
.lv-captcha-box { .lv-captcha-box {
width: 112px; width: 108px;
height: 36px; height: 34px;
flex: none; flex: none;
display: grid; display: grid;
place-items: center; place-items: center;
@@ -289,6 +361,7 @@ button, input, select { font: inherit; }
cursor: pointer; cursor: pointer;
overflow: hidden; overflow: hidden;
} }
.lv-captcha-box:hover { border-color: var(--accent); }
.lv-captcha-box img { .lv-captcha-box img {
width: 100%; width: 100%;
height: 100%; height: 100%;
@@ -309,26 +382,39 @@ button, input, select { font: inherit; }
.sms-actions { .sms-actions {
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
flex-wrap: wrap;
gap: 8px; gap: 8px;
margin-top: 12px; margin-top: 16px;
} }
.gate-brand { .captcha { height: 34px; cursor: pointer; }
display: flex;
gap: 14px; /* dialogs: class is on the dialog/card itself; actions stay outside the scrolling body */
align-items: center; .n-dialog.app-dialog,
justify-content: center; .n-card.app-dialog,
margin-bottom: 22px; .app-dialog .n-dialog,
.app-dialog .n-card {
width: min(440px, calc(100vw - 32px));
} }
.gate-brand h1 { margin: 0; font-size: 20px; } .n-dialog.app-dialog-wide,
.brand-mark { .n-card.app-dialog-wide,
width: 36px; .app-dialog-wide .n-dialog,
height: 36px; .app-dialog-wide .n-card {
border-radius: 4px; width: min(480px, calc(100vw - 32px));
border: 1px solid var(--accent); }
color: var(--accent); .n-dialog.app-dialog .n-dialog__content,
display: grid; .n-dialog.app-dialog-wide .n-dialog__content,
place-items: center; .n-card.app-dialog .n-card__content,
font-weight: 650; .n-card.app-dialog-wide .n-card__content,
.app-dialog .n-dialog__content,
.app-dialog-wide .n-dialog__content,
.app-dialog .n-card__content,
.app-dialog-wide .n-card__content {
max-height: min(64vh, 560px);
overflow: auto;
}
.n-dialog.app-dialog .n-dialog__action,
.n-dialog.app-dialog-wide .n-dialog__action {
position: sticky;
bottom: 0;
background: var(--panel);
} }
.captcha { height: 40px; cursor: pointer; }
.row-actions { display: flex; gap: 8px; }