fix: 清掉无用接口和样式,并收紧登录与工号边界

This commit is contained in:
2026-11-16 11:30:59 +08:00
parent 7381b49e4c
commit 5b83b7e415
15 changed files with 232 additions and 329 deletions
+3 -5
View File
@@ -1,6 +1,6 @@
<script setup lang="ts">
import { onMounted, ref } from "vue";
import { darkTheme, dateZhCN, NButton, NConfigProvider, NDialogProvider, NMessageProvider, zhCN } from "naive-ui";
import { darkTheme, dateZhCN, NButton, NConfigProvider, NDialogProvider, zhCN } from "naive-ui";
import LoginView from "./features/auth/LoginView.vue";
import Shell from "./shell/Shell.vue";
import AdminShell from "./shell/AdminShell.vue";
@@ -96,8 +96,7 @@ function onLogin(next: AppSession) {
<template>
<n-config-provider class="app-root" :locale="zhCN" :date-locale="dateZhCN" :theme="isDark ? darkTheme : null" :theme-overrides="themeOverrides">
<n-message-provider class="app-root">
<n-dialog-provider>
<n-dialog-provider>
<div v-if="ready && sessionError && !session" class="gate">
<section class="gate-card">
<p class="session-note">暂时无法确认登录状态</p>
@@ -115,7 +114,6 @@ function onLogin(next: AppSession) {
<Shell v-else-if="session.kind === 'user'" :employee-id="session.employeeId" @logout="exitSystem" @revoke="revokeAccount" />
<AdminShell v-else-if="session.kind === 'admin'" :username="session.username" @logout="exitAdmin" @refresh="loadSession" />
</div>
</n-dialog-provider>
</n-message-provider>
</n-dialog-provider>
</n-config-provider>
</template>
+4 -124
View File
@@ -174,10 +174,6 @@ select {
opacity: 0.7;
}
.gate-card.with-qr {
width: min(440px, 100%);
}
.qr-block {
text-align: center;
}
@@ -510,7 +506,6 @@ select {
margin-bottom: 4px;
}
.compact-form,
.compact-nform {
display: flex;
flex-direction: column;
@@ -542,28 +537,6 @@ select {
display: none;
}
.compact-row {
display: flex;
align-items: center;
gap: 12px;
}
.compact-row > label,
.compact-row > .field-title,
.field-title {
flex: none;
color: var(--muted);
font-size: 13px;
}
.compact-row > .n-select,
.compact-row > .n-input,
.compact-row > .n-input-number,
.compact-row > .n-time-picker {
flex: 1;
min-width: 0;
}
.settings-stack {
flex: 1;
min-height: 0;
@@ -632,24 +605,13 @@ select {
color: var(--muted);
}
.home-target {
display: flex;
align-items: center;
gap: 12px;
padding-top: 16px;
border-top: 1px solid var(--line);
}
.home-target label {
flex: none;
font-size: 13px;
color: var(--muted);
}
.field-title {
display: inline-flex;
flex: none;
align-items: center;
gap: 4px;
color: var(--muted);
font-size: 13px;
}
.hint-icon {
@@ -669,11 +631,6 @@ select {
font-size: 15px;
}
.recommend-mark {
color: var(--muted);
font-size: 12px;
}
.target-control {
display: flex;
align-items: center;
@@ -736,7 +693,6 @@ select {
font-size: 13px;
}
.home-study-status,
.study-live-status {
display: flex;
align-items: center;
@@ -999,14 +955,6 @@ select {
font-variant-numeric: tabular-nums;
}
.boards {
flex: 1;
min-height: 0;
display: grid;
grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
gap: 16px;
}
.board {
min-width: 0;
min-height: 0;
@@ -1017,19 +965,6 @@ select {
border-radius: 4px;
}
.board h3 {
flex: none;
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
margin: 0;
padding: 8px 12px 8px 16px;
border-bottom: 1px solid var(--line);
font-size: 14px;
font-weight: 650;
}
.board-tools {
display: flex;
align-items: center;
@@ -1127,6 +1062,7 @@ select {
.event time {
display: block;
font-variant-numeric: tabular-nums;
}
.event .meta {
@@ -1145,10 +1081,6 @@ select {
color: var(--danger);
}
.event time {
font-variant-numeric: tabular-nums;
}
.event strong {
display: block;
margin-top: 2px;
@@ -1382,11 +1314,6 @@ select {
padding: 16px 12px;
}
.boards {
grid-template-columns: minmax(0, 1fr);
grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
}
.facts {
grid-template-columns: repeat(3, minmax(0, 1fr));
}
@@ -1497,42 +1424,6 @@ select {
color: var(--muted);
}
.settings-form .form-row {
grid-template-columns: 7.5em minmax(160px, 280px);
justify-content: start;
}
.settings-form .form-row label {
min-width: 0;
white-space: normal;
}
.setting-control {
display: flex;
align-items: center;
gap: 8px;
min-width: 0;
}
.setting-control .n-input-number {
flex: 1;
width: 100%;
min-width: 0;
}
.setting-unit {
flex: none;
color: var(--muted);
}
.form-section {
margin: 20px 0 8px;
font-size: 13px;
font-weight: 600;
color: var(--muted);
letter-spacing: 0.04em;
}
.form-hint {
margin: 0;
padding: 2px 0 0 0;
@@ -1720,17 +1611,6 @@ body .n-base-select-menu .n-base-select-option__content {
}
}
@media (max-width: 800px) {
.settings-form .form-row {
grid-template-columns: minmax(0, 1fr);
}
.settings-form .form-row label {
min-width: 0;
white-space: normal;
}
}
@media (max-width: 480px) {
.gate {
padding: 16px 12px;