feat(registry): 迁移至 Rust + Axum + SQLite 并新增编辑、分页和档案同步功能 - 后端从 Node.js 迁移到 Rust,使用 Axum 框架和 SQLite 存储 - 新增档案编辑对话框,支持修改机型、登记人及替换/删除照片 - 档案列表增加分页导航(每页20条) - 新增档案同步状态提示及手动重试同步按钮 - Node.js 原版后端及网页保留为回退方案,移至 legacy-web 目录 - 更新 .gitignore 添加 Rust 构建产物(target、dist) - 更新 README 文档,补充 Rust 启动、开发、检查及打包说明 - 启动源码版.cmd 默认转发至 Rust 版启动脚本 ```
6 lines
11 KiB
CSS
6 lines
11 KiB
CSS
:root{font-family:Inter,"Segoe UI","Microsoft YaHei",sans-serif;color:#172b40;background:#eef2f6;font-synthesis:none}*{box-sizing:border-box}body{margin:0}button,input{font:inherit}button{cursor:pointer}.shell{max-width:1320px;margin:0 auto;min-height:100vh;background:#f8fafc;box-shadow:0 0 60px #1d3d5912}.topbar{height:76px;background:#fff;border-bottom:1px solid #e4eaf0;display:flex;align-items:center;padding:0 48px;gap:14px}.brand-mark{width:38px;height:38px;background:#144e83;color:white;display:grid;place-items:center;border-radius:10px;font-size:21px;font-weight:900;letter-spacing:-5px;padding-right:6px}.brand-mark span{color:#7fd5f3;font-size:18px;margin-left:-2px}.brand-copy{display:flex;flex-direction:column;line-height:1.15;gap:4px}.brand-copy strong{font-size:17px;letter-spacing:.04em}.brand-copy small{color:#8192a2;font-size:12px}.top-status{margin-left:auto;border:1px solid #cce8d9;background:#f3fbf6;border-radius:999px;color:#187348;font-size:12px;font-weight:700;padding:8px 13px}.top-status i{display:inline-block;width:7px;height:7px;border-radius:50%;background:#2eae6c;margin-right:5px}main{padding:38px 48px 54px}.hero{display:flex;justify-content:space-between;align-items:center;gap:26px;margin-bottom:22px}.eyebrow{color:#4a779b;font-size:11px;font-weight:800;letter-spacing:.2em}.hero h1{font-size:32px;letter-spacing:-.025em;margin:12px 0 10px}.hero p{color:#617488;font-size:14px;line-height:1.7;max-width:720px;margin:0}.hero-aside{display:flex;flex-direction:column;align-items:flex-end;gap:4px;min-width:125px;color:#3a627f;font-size:13px}.hero-aside small{color:#91a0af}.hero-dot{width:40px;height:40px;border-radius:12px;background:linear-gradient(135deg,#dff8ee,#a9e0c7);margin-bottom:2px;position:relative}.hero-dot:after{content:"✓";position:absolute;inset:0;display:grid;place-items:center;color:#13815a;font-size:21px;font-weight:800}.notice{display:flex;align-items:center;gap:14px;background:#fff8e9;border:1px solid #f0ddb0;border-radius:12px;padding:13px 17px;color:#755b28;font-size:13px;margin-bottom:24px}.notice b{white-space:nowrap;color:#7b5314}.columns{display:grid;grid-template-columns:minmax(0,1.03fr) minmax(0,.97fr);gap:22px}.panel{background:#fff;border:1px solid #e2e8ef;border-radius:17px;box-shadow:0 8px 25px #173b5b0a}.form-panel,.result-panel{min-height:570px;padding:26px 28px}.panel-head{display:flex;align-items:center;justify-content:space-between;gap:15px;padding-bottom:24px}.panel-head>div{display:flex;align-items:center;gap:11px}.panel-head h2{font-size:18px;margin:0}.step{width:29px;height:29px;border-radius:8px;background:#dcecf9;color:#1a5d8e;font-weight:800;font-size:12px;display:grid;place-items:center}.step.muted{background:#eef2f6;color:#73879b}.subtle{color:#9aa9b5;font-size:12px}label{font-size:13px;font-weight:700;display:block;margin:0 0 9px}label em{color:#d76254;font-size:11px;font-style:normal;margin-left:6px}label .optional{color:#a2b0bd;font-size:11px;font-weight:500}input{height:45px;width:100%;border:1px solid #d6e0e9;border-radius:9px;background:#fbfcfe;padding:0 13px;color:#1f3448;outline:none;transition:border-color .15s,box-shadow .15s}input:focus{border-color:#3a91cd;box-shadow:0 0 0 3px #3a91cd20}input::placeholder{color:#a7b3be}.hint{margin:7px 0 24px;color:#93a0ae;font-size:11px;line-height:1.5}.field-grid{display:grid;grid-template-columns:1fr 1fr;gap:15px}.field-grid+label{margin-top:3px}.input-prefix{height:45px;display:flex;border:1px solid #d6e0e9;border-radius:9px;overflow:hidden;background:#fbfcfe}.input-prefix span{display:grid;place-items:center;width:58px;background:#edf4f9;color:#2e6d9c;font-weight:800;font-size:13px;border-right:1px solid #d6e0e9}.input-prefix input{border:0;border-radius:0;background:transparent;height:43px}.input-prefix:focus-within{border-color:#3a91cd;box-shadow:0 0 0 3px #3a91cd20}.primary{height:47px;width:100%;border:0;border-radius:9px;background:#206d9f;color:#fff;font-weight:750;display:flex;align-items:center;justify-content:center;gap:12px;box-shadow:0 8px 16px #206d9f26}.primary:hover{background:#155d8d}.primary:disabled{opacity:.55;cursor:wait}.form-message{min-height:18px;margin:12px 0 0;font-size:12px;color:#23724b}.form-message.error{color:#bd4c3b}.empty-state{height:415px;border:1px dashed #d6e1eb;border-radius:12px;background:#fbfcfe;display:flex;align-items:center;justify-content:center;flex-direction:column;color:#9aaab8;gap:9px;text-align:center;padding:20px}.empty-state b{font-size:15px;color:#526b7f}.empty-state span{font-size:12px;max-width:230px;line-height:1.6}.empty-glyph{height:64px;width:64px;border-radius:17px;background:#ecf3f8;color:#93afc2;display:grid;place-items:center;font-size:38px;margin-bottom:6px}.record-result{display:flex;align-items:center;flex-direction:column}.record-result[hidden],.empty-state[hidden],#history-table[hidden],#history-empty[hidden]{display:none}.qr-stage{width:200px;height:200px;display:grid;place-items:center;background:white;border:1px solid #e5ecf2;border-radius:12px;padding:9px;box-shadow:0 8px 22px #183a5a10}.qr-stage svg{max-width:100%;max-height:100%}.record-kicker{font-size:11px;color:#26915f;font-weight:800;margin-top:16px;letter-spacing:.05em}.uas-display{font-size:27px;font-weight:850;letter-spacing:.04em;margin:3px 0 17px;color:#174d78}.result-fields{width:100%;margin:0;border-top:1px solid #edf1f5;border-bottom:1px solid #edf1f5}.result-fields div{display:flex;justify-content:space-between;gap:10px;padding:8px 0;font-size:12px}.result-fields dt{color:#8a9bae}.result-fields dd{margin:0;font-weight:700;text-align:right;overflow-wrap:anywhere}.url-box{align-self:stretch;background:#f4f7fa;border-radius:8px;margin-top:16px;padding:10px 12px;font-size:11px}.url-box span{display:block;color:#92a2b0;margin-bottom:3px}.url-box code{overflow-wrap:anywhere;color:#366987}.result-actions{display:flex;width:100%;gap:10px;margin-top:15px}.secondary,.ghost{height:39px;border-radius:8px;font-size:12px;font-weight:700}.secondary{flex:1;background:#e9f3fa;color:#1a6b9b;border:1px solid #cce2f1}.ghost{flex:1;background:#fff;color:#52718a;border:1px solid #d9e3eb}.result-tip{font-size:11px;color:#95a5b2;line-height:1.55;align-self:stretch;margin:12px 0 0}.history-panel{margin-top:22px;padding:24px 28px}.history-panel .panel-head{padding-bottom:14px}.text-button{border:0;background:none;color:#2879ab;font-size:12px;font-weight:700}.history-empty{color:#9eacb7;font-size:13px;padding:25px 0}.table-scroll{overflow-x:auto}table{width:100%;border-collapse:collapse;text-align:left;font-size:12px}th{background:#f5f8fb;color:#7a8c9d;font-weight:700;padding:11px 13px}td{padding:13px;border-bottom:1px solid #edf1f4;color:#334b60}td code{color:#286e9c;font-weight:700}.show-record{border:0;color:#2677a8;background:none;font-size:12px;font-weight:700}footer{border-top:1px solid #e8edf2;padding:17px 48px 22px;color:#a0acb8;font-size:11px;display:flex;justify-content:space-between}@media(max-width:850px){.topbar{padding:0 22px}main{padding:28px 20px}.columns{grid-template-columns:1fr}.form-panel,.result-panel{min-height:auto}.hero-aside{display:none}footer{padding:18px 22px}}@media(max-width:530px){.hero h1{font-size:25px}.field-grid{grid-template-columns:1fr}.notice{align-items:flex-start;flex-direction:column;gap:5px}.panel-head{align-items:flex-start}.subtle{display:none}.result-actions{flex-direction:column}footer{gap:5px;flex-direction:column}}
|
|
.photo-fields{margin-top:4px}.photo-fields input[type=file]{padding:10px;height:auto;min-height:45px;font-size:11px}.photo-fields+.hint{margin-bottom:22px}.saved-photos{align-self:stretch;display:flex;gap:10px;margin-top:12px}.saved-photos[hidden],.saved-photos a[hidden]{display:none}.saved-photos a{width:50%;border:1px solid #e5ecf2;border-radius:8px;overflow:hidden;text-align:center;color:#4a708c;text-decoration:none;font-size:11px;padding:5px}.saved-photos img{width:100%;height:90px;object-fit:contain;background:#f5f8fb;display:block}.saved-photos span{display:block;margin-top:4px}
|
|
.action-link{display:grid;place-items:center;text-decoration:none}.history-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:14px}.archive-card{border:1px solid #dfe8f0;border-radius:12px;padding:16px;background:#fbfdff}.archive-card h3{font-size:15px;margin:0 0 5px;overflow-wrap:anywhere}.archive-card strong{color:#236d9b;font-size:13px}.archive-card p{color:#8193a3;font-size:11px;line-height:1.5;margin:9px 0 12px}.archive-thumbs{display:grid;grid-template-columns:1fr 1fr;gap:8px}.archive-thumbs>div{height:105px;border:1px solid #e2e9ef;border-radius:7px;background:#f3f7fa;display:grid;place-items:center;color:#a4b1bc;font-size:11px;overflow:hidden}.archive-thumbs img{height:100%;width:100%;object-fit:contain}.archive-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:13px}.archive-actions a,.archive-actions button{background:#eaf3f9;color:#236f9d;border:1px solid #d0e2ef;border-radius:7px;padding:7px 9px;font-size:11px;font-weight:700;text-decoration:none;cursor:pointer}
|
|
.topbar .brand-mark{width:42px;height:42px;object-fit:contain;border-radius:10px;padding:0;letter-spacing:normal;background:#fff}.hero h1{margin-top:0}.history-head{align-items:center}.history-controls{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:10px}.select-all{display:inline-flex;align-items:center;gap:5px;margin:0;color:#49657a;white-space:nowrap;font-size:12px}.select-all input,.archive-select input{width:16px;height:16px;accent-color:#206d9f;cursor:pointer}.export-button{height:34px;padding:0 11px;border:1px solid #c8ddeb;border-radius:7px;background:#e9f3fa;color:#1d6c9c;font-size:12px;font-weight:700}.export-button:disabled{opacity:.48;cursor:not-allowed}.history-message{font-size:11px;line-height:1.55;color:#8a9dad;margin:0 0 14px}.history-message.error{color:#b84036}.archive-card{position:relative}.archive-card.selected{border-color:#4b9bc8;box-shadow:0 0 0 2px #4b9bc820}.archive-select{display:flex;align-items:center;gap:5px;float:right;margin:0 0 8px 10px;color:#59788f;font-size:11px;font-weight:600}.archive-actions .delete-record{background:#fff1ef;color:#b34039;border-color:#f2c9c5}.archive-actions .delete-record:hover{background:#ffe7e3}footer{justify-content:flex-end}@media(max-width:850px){.history-head{align-items:flex-start;flex-direction:column}.history-controls{justify-content:flex-start}}@media(max-width:530px){.history-controls{gap:8px}.export-button{flex:1}}
|
|
.history-search{position:relative;width:260px;flex:0 1 260px}.history-search input{height:36px;padding:0 66px 0 12px;font-size:12px;background:#fff}.history-search input::placeholder{color:#8fa1af}.history-search #search-count{position:absolute;right:10px;top:50%;transform:translateY(-50%);color:#6b8294;font-size:11px;white-space:nowrap;pointer-events:none}.history-search #search-count:empty{display:none}@media(max-width:850px){.history-controls{width:100%}.history-search{flex:1 1 260px}}@media(max-width:530px){.history-search{flex-basis:100%;width:100%}}
|