重构共享逻辑并修复值班提醒回执去重

This commit is contained in:
2026-11-22 14:32:13 +08:00
parent 2fb2c5e1ad
commit 982f0df41c
35 changed files with 2345 additions and 571 deletions
+56 -3
View File
@@ -59,6 +59,7 @@ textarea { width: 100%; resize: vertical; }
.btn:hover { border-color: var(--primary); color: var(--primary); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn.primary:hover { background: #205640; border-color: #205640; color: #fff; }
.btn.small { padding: 4px 12px; font-size: 13px; }
.btn.danger { color: var(--bad); border-color: #f2c4c4; }
.btn.danger:hover { background: var(--bad-soft); }
.btn.ghost { border-color: transparent; background: transparent; }
@@ -282,7 +283,9 @@ textarea { width: 100%; resize: vertical; }
.auth-title { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 24px; letter-spacing: -.8px; }
.auth-sub { color: var(--muted); margin: 10px 0 28px; font-size: 13px; }
.tabs { display: flex; background: var(--bg); border-radius: 10px; padding: 4px; margin-bottom: 18px; }
.tab { flex: 1; border: none; background: transparent; padding: 8px; border-radius: 8px; font-weight: 500; color: var(--muted); }
.tabs { overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: 1 0 auto; border: none; background: transparent; padding: 8px 10px; border-radius: 8px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.tab.active { background: #fff; color: var(--ink); box-shadow: var(--shadow); }
.auth-modes { display: flex; gap: 8px; margin-top: 14px; }
.auth-mode { flex: 1; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); padding: 8px; }
@@ -478,6 +481,9 @@ button:focus-visible, a:focus-visible, [tabindex]:focus-visible { outline: 3px s
.face:nth-child(3n) { background: #84745c; }
.face.more { background: #e7eee8; color: var(--muted); }
.auth-card .btn.block { margin-top: 8px; min-height: 46px; }
#public-loan-form h3 { margin: 4px 0 6px; }
#public-loan-form > p:first-of-type { line-height: 1.7; margin: 0 0 18px; }
#public-loan-form textarea { min-height: 96px; }
.auth-card .form-error:empty, .auth-card .form-hint:empty { display: none; }
.auth-card .form-hint { margin-top: 10px; line-height: 1.7; }
.auth-card .auth-links { margin-bottom: 16px; }
@@ -580,14 +586,21 @@ button:focus-visible, a:focus-visible, [tabindex]:focus-visible { outline: 3px s
.settings-divider { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
@media (max-width: 520px) { .duty-reminder-row { flex-wrap: wrap; } .duty-row-actions { width: 100%; } }
.activity-photos { display:flex; gap:10px; flex-wrap:wrap; margin:14px 0; }
.photo-preview { margin:14px 0; }
.photo-preview-summary { display:flex; align-items:center; flex-wrap:wrap; gap:10px; padding:10px 12px; border:1px solid var(--line); border-radius:10px; background:#f7faf8; color:var(--muted); font-size:13px; }
.photo-preview-summary strong { color:var(--text); }
.selected-photo-summary:empty { display:none; }
.activity-photos { display:grid; grid-template-columns:repeat(auto-fill,minmax(120px,1fr)); gap:10px; margin:12px 0 0; }
.activity-photos:empty { display:none; }
.activity-materials { margin:12px 0; display:flex; flex-direction:column; gap:8px; }
.activity-materials > div { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.upload-progress { margin:16px 0; padding:12px 14px; border:1px solid var(--line); border-radius:10px; background:var(--primary-soft); }
.upload-progress p { margin:0 0 8px; font-size:13px; overflow-wrap:anywhere; }
.upload-progress progress { display:block; width:100%; height:12px; accent-color:var(--primary); }
.activity-photos img { width:120px; height:90px; object-fit:cover; border-radius:8px; border:1px solid var(--line); cursor:zoom-in; }
.activity-photos img { display:block; width:100%; aspect-ratio:4/3; height:auto; object-fit:cover; border-radius:8px; border:1px solid var(--line); cursor:zoom-in; background:#edf2ee; }
.activity-photos img.photo-loading { background:linear-gradient(110deg,#edf2ee 8%,#f8faf8 18%,#edf2ee 33%); background-size:200% 100%; animation:photo-shimmer 1.4s linear infinite; }
.activity-photos img.photo-error { display:grid; place-items:center; padding:10px; color:var(--muted); font-size:12px; cursor:default; }
@keyframes photo-shimmer { to { background-position-x:-200%; } }
.center-toolbar { margin-bottom:24px; }
.center-export { margin:0 0 24px; padding:16px 20px; border:1px solid var(--line); background:var(--card); border-radius:12px; }
.center-export summary { cursor:pointer; font-weight:600; }
@@ -601,6 +614,40 @@ button:focus-visible, a:focus-visible, [tabindex]:focus-visible { outline: 3px s
.center-tabs { max-width:500px; margin-bottom:24px; }
.center-check-status { padding:18px 20px; background:var(--primary-soft); border:1px solid #d5e5da; border-radius:12px; margin-bottom:20px; }
.center-subhead { margin-top:32px; }
.center-duty-head { display:flex; align-items:flex-end; justify-content:space-between; flex-wrap:wrap; gap:18px; margin-bottom:18px; }
.center-duty-head h3 { margin:4px 0 7px; font-size:24px; letter-spacing:-.4px; }
.center-duty-head p { margin:0; }
.center-duty-kicker { color:var(--primary); font-size:12px; font-weight:650; letter-spacing:1.4px; }
.center-duty-nav { display:flex; flex-wrap:wrap; gap:8px; }
.center-duty-nav .btn { min-height:38px; padding:7px 13px; }
.center-duty-current { margin-bottom:12px; }
.center-duty-live { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:18px 20px; background:linear-gradient(110deg,#e7f2eb,#f3f8f4); border:1px solid #cfe2d4; border-radius:14px; }
.center-duty-live b { font-size:17px; }
.center-duty-live p { margin:4px 0 0; color:var(--muted); }
.center-duty-live > span { color:var(--primary); font-weight:600; font-variant-numeric:tabular-nums; }
.center-duty-live-dot { display:inline-block; width:8px; height:8px; margin-right:8px; border-radius:50%; background:var(--ok); box-shadow:0 0 0 5px #12805c18; }
.center-duty-idle { display:flex; align-items:center; flex-wrap:wrap; gap:8px 16px; padding:16px 20px; background:#f7f9f7; border:1px solid var(--line); border-radius:14px; }
.center-duty-idle span { color:var(--muted); font-size:13px; }
.center-duty-rule { display:flex; gap:8px 14px; align-items:baseline; flex-wrap:wrap; padding:12px 16px; border-left:3px solid #c49b65; background:#fbf8f2; color:var(--muted); font-size:13px; }
.center-duty-rule strong { color:var(--ink); }
.center-duty-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-top:18px; }
.center-duty-day { min-width:0; overflow:hidden; background:var(--card); border:1px solid var(--line); border-radius:13px; box-shadow:var(--shadow); }
.center-duty-day.is-today { border-color:#9abda8; box-shadow:0 0 0 2px #28664f12; }
.center-duty-day > header { display:flex; align-items:baseline; gap:8px; padding:12px 15px; background:#f4f8f5; border-bottom:1px solid var(--line); }
.center-duty-day > header b { font-size:16px; }
.center-duty-day > header span { color:var(--muted); font-size:12px; }
.center-duty-day > header em { margin-left:auto; padding:2px 7px; border-radius:999px; background:var(--primary); color:#fff; font-size:11px; font-style:normal; }
.center-duty-slot { display:grid; grid-template-columns:96px minmax(0,1fr) auto; align-items:center; gap:12px; padding:13px 15px; border-bottom:1px solid #edf1ee; }
.center-duty-slot:last-child { border-bottom:0; }
.center-duty-slot.is-active { background:#edf7f0; }
.center-duty-slot.is-past { opacity:.68; }
.center-duty-slot > div:first-child b,.center-duty-slot > div:first-child span { display:block; }
.center-duty-slot > div:first-child span { color:var(--muted); font-size:11px; font-variant-numeric:tabular-nums; }
.center-duty-people { display:flex; flex-wrap:wrap; gap:6px; min-width:0; }
.center-duty-name { display:inline-flex; align-items:center; gap:5px; padding:4px 8px; border-radius:7px; background:#edf3ef; color:var(--ink); font-size:13px; }
.center-duty-name small { color:var(--warn); font-size:10px; }
.center-duty-leave { flex:none; }
.center-duty-slot .btn[disabled] { min-height:32px; }
.timetable-mine { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; margin:24px 0; }
.timetable-card { min-width:0; padding:22px; background:var(--card); border:1px solid var(--line); border-radius:12px; }
.timetable-card h3 { margin:0 0 12px; }
@@ -655,6 +702,12 @@ button:focus-visible, a:focus-visible, [tabindex]:focus-visible { outline: 3px s
.timetable-warnings { padding:12px 14px; background:#fff7e7; border-radius:8px; font-size:13px; }
.timetable-text { white-space:pre-wrap; overflow-wrap:anywhere; max-height:220px; overflow:auto; }
@media (max-width:600px) { .timetable-mine { grid-template-columns:1fr; } .timetable-member { flex-wrap:wrap; } .timetable-member .acard-actions { width:100%; } }
@media (max-width:760px) {
.center-duty-grid { grid-template-columns:1fr; }
.center-duty-slot { grid-template-columns:84px minmax(0,1fr); }
.center-duty-slot > .btn { grid-column:2; justify-self:start; }
.center-duty-live { align-items:flex-start; flex-direction:column; }
}
@media (max-width:600px) {
.timetable-review-toolbar .muted { flex-basis:100%; margin-left:0; }
.timetable-review-panel { width:calc(100% - 8px); padding:7px; }