release: dsh-sansheng-liubu v0.2.1 (package at repo root)
朝堂按 4 审外观方案重排:宽屏左右分栏、窄栏上下布局、细分隔线页签。
This commit is contained in:
parent
d9cad5ddc8
commit
0eccc91e00
189
client.js
189
client.js
|
|
@ -371,51 +371,51 @@ var transport_default = request;
|
|||
|
||||
// src/client/styles.js
|
||||
var CSS = `
|
||||
.ssw-scope{--ssw-bg:#ffffff;--ssw-side:#f8f9fa;--ssw-rail:#f7f9fc;--ssw-card:#ffffff;--ssw-line:#e3e8ef;--ssw-strong:#c7d8f5;--ssw-ink:#0f172a;--ssw-muted:#667085;--ssw-faint:#98a2b3;--ssw-blue:#3b82f6;--ssw-wash:#eff6ff;--ssw-frame:#3b82f6;--ssw-wire:#c9d6ea;--ssw-danger:#dc2626;--ssw-ok:#16a34a;box-sizing:border-box;color:var(--ssw-ink);font-family:Inter,"Segoe UI","Microsoft YaHei",sans-serif;font-size:13px;line-height:1.5}
|
||||
.ssw-scope{--ssw-bg:#ffffff;--ssw-side:#f8f9fa;--ssw-rail:#f8fafc;--ssw-card:#ffffff;--ssw-line:#e3e8ef;--ssw-strong:#c7d8f5;--ssw-ink:#0f172a;--ssw-muted:#667085;--ssw-faint:#98a2b3;--ssw-blue:#4263eb;--ssw-wash:#eef2ff;--ssw-frame:#3b82f6;--ssw-wire:#c9d6ea;--ssw-danger:#dc2626;--ssw-ok:#16a34a;box-sizing:border-box;color:var(--ssw-ink);font-family:Inter,"Segoe UI","Microsoft YaHei",sans-serif;font-size:13px;line-height:1.5}
|
||||
.ssw-scope *,.ssw-scope *::before,.ssw-scope *::after{box-sizing:border-box}
|
||||
.ssw-scope button{font:inherit;color:inherit;background:transparent;border:0;cursor:pointer}
|
||||
.ssw-scope :where(button){font:inherit;color:inherit;background:transparent;border:0;cursor:pointer}
|
||||
.ssw-scope button:disabled{cursor:default;opacity:.55}
|
||||
.ssw-scope :focus-visible{outline:2px solid var(--ssw-blue);outline-offset:2px}
|
||||
body[data-ds-dark-theme] .ssw-scope,html[data-theme=dark] .ssw-scope,.ssw-scope[data-ssw-theme=dark]{--ssw-bg:#14171c;--ssw-side:#171b21;--ssw-rail:#161a20;--ssw-card:#1e232b;--ssw-line:#2c333d;--ssw-strong:#3b4a63;--ssw-frame:#6ea8ff;--ssw-ink:#e6ebf2;--ssw-muted:#a9b4c2;--ssw-faint:#7b8797;--ssw-blue:#6ea8ff;--ssw-wash:#1d2b40;--ssw-wire:#3a4350;--ssw-danger:#f87171;--ssw-ok:#4ade80}
|
||||
.ssw-float{position:fixed;right:14px;bottom:70px;z-index:2147483000;width:min(374px,calc(100vw - 28px));max-height:calc(100vh - 96px);display:flex;flex-direction:column;background:#ffffff;border:1px solid #e3e8ef;border-radius:12px;box-shadow:0 18px 50px -12px rgba(16,24,40,.28),0 4px 12px -2px rgba(16,24,40,.12);overflow:hidden}
|
||||
body[data-ds-dark-theme] .ssw-float,html[data-theme=dark] .ssw-float{background:#161a20;border-color:#2c333d}
|
||||
.ssw-root{display:flex;flex-direction:column;min-height:0;height:100%;overflow:auto;background:var(--ssw-rail);color:var(--ssw-ink)}
|
||||
.ssw-root{container-type:inline-size;display:flex;flex-direction:column;min-height:0;height:100%;overflow:auto;background:var(--ssw-rail);color:var(--ssw-ink)}
|
||||
.ssw-head{flex:none;height:52px;display:flex;align-items:center;gap:8px;padding:0 16px;border-bottom:1px solid var(--ssw-line);background:var(--ssw-card)}
|
||||
.ssw-head svg{width:18px;height:18px;color:var(--ssw-muted)}
|
||||
.ssw-head-title{font-size:13px;font-weight:600}
|
||||
.ssw-icon-btn{margin-left:auto;display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;border-radius:6px;color:var(--ssw-muted)}
|
||||
.ssw-icon-btn:hover{background:var(--ssw-wash);color:var(--ssw-blue)}
|
||||
.ssw-project{padding:18px 16px 0}
|
||||
.ssw-project{padding:22px 20px 0}
|
||||
.ssw-project-line{display:flex;align-items:center;justify-content:space-between;margin-bottom:5px}
|
||||
.ssw-eyebrow{display:inline-flex;align-items:center;gap:6px;font-size:11px;color:var(--ssw-muted)}
|
||||
.ssw-eyebrow svg{width:14px;height:14px}
|
||||
.ssw-count{font-size:10px;color:var(--ssw-faint)}
|
||||
.ssw-project-title{font-size:17px;font-weight:600;letter-spacing:.3px;margin:0 0 14px}
|
||||
.ssw-project-title{font-size:21px;font-weight:650;letter-spacing:.5px;margin:4px 0 16px}
|
||||
.ssw-enable{margin:0 16px 4px;padding:12px;border:1px solid var(--ssw-strong);background:var(--ssw-wash);border-radius:10px}
|
||||
.ssw-enable-note{margin:0 0 10px;font-size:12px;color:var(--ssw-muted);line-height:1.7}
|
||||
.ssw-primary{background:var(--ssw-blue);color:#ffffff;border-radius:7px;padding:8px 13px;font-size:12px;font-weight:500}
|
||||
.ssw-primary{min-height:36px;background:var(--ssw-blue);color:#ffffff;border-radius:7px;padding:8px 13px;font-size:12px;font-weight:500}
|
||||
.ssw-primary:hover{filter:brightness(1.05)}
|
||||
.ssw-tree{padding:14px 16px 4px;position:relative}
|
||||
.ssw-lead{width:150px;margin:0 auto;position:relative}
|
||||
.ssw-tree{padding:24px 20px 4px;position:relative}
|
||||
.ssw-lead{width:168px;margin:0 auto;position:relative}
|
||||
.ssw-lead::after{content:none}
|
||||
.ssw-sansheng{position:relative;margin-top:22px}
|
||||
.ssw-sansheng{position:relative;margin-top:24px}
|
||||
.ssw-trio{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
|
||||
.ssw-seat{position:relative;width:100%;display:flex;flex-direction:column;gap:6px;padding:10px 9px 8px;border:1.5px solid var(--ssw-frame);border-radius:10px;background:var(--ssw-card);text-align:left;min-height:70px;box-shadow:0 1px 2px rgba(16,24,40,.04);transition:border-color .15s,box-shadow .15s,transform .15s}
|
||||
.ssw-seat{position:relative;width:100%;display:flex;flex-direction:column;gap:6px;padding:14px 12px 12px;border:1px solid var(--ssw-line);border-radius:12px;background:var(--ssw-card);text-align:left;min-height:80px;box-shadow:0 1px 2px rgba(16,24,40,.04);transition:border-color .15s,box-shadow .15s,transform .15s}
|
||||
.ssw-seat:hover{border-color:var(--ssw-blue);transform:translateY(-1px);box-shadow:0 3px 8px rgba(16,24,40,.06)}
|
||||
.ssw-seat[aria-pressed=true]{border-color:var(--ssw-blue);background:var(--ssw-wash);box-shadow:0 0 0 2px rgba(59,130,246,.12)}
|
||||
.ssw-lead .ssw-seat{border-color:var(--ssw-blue)}
|
||||
.ssw-lead .ssw-seat{min-height:84px}
|
||||
.ssw-role-top{display:flex;align-items:center;justify-content:space-between;gap:6px}
|
||||
.ssw-role-name{font-size:14px;font-weight:600;letter-spacing:2px}
|
||||
.ssw-role-duty{font-size:10px;color:var(--ssw-muted);line-height:1.5}
|
||||
.ssw-role-duty{font-size:11px;color:var(--ssw-muted);line-height:1.5}
|
||||
.ssw-dot{flex:none;width:6px;height:6px;border-radius:50%;border:1px solid var(--ssw-faint);background:transparent}
|
||||
.ssw-dot[data-status=bound]{background:var(--ssw-ok);border-color:var(--ssw-ok)}
|
||||
.ssw-dot[data-status=failed],.ssw-dot[data-status=missing]{background:var(--ssw-danger);border-color:var(--ssw-danger)}
|
||||
.ssw-dot[data-status=creating]{background:var(--ssw-blue);border-color:var(--ssw-blue)}
|
||||
.ssw-ministries{position:relative;margin-top:18px}
|
||||
.ssw-group-label{display:block;margin:0 2px 8px;font-size:11px;font-weight:600;letter-spacing:.5px;color:var(--ssw-muted)}
|
||||
.ssw-group-label{display:flex;align-items:center;gap:10px;margin:0 2px 8px;font-size:11px;font-weight:600;letter-spacing:.5px;color:var(--ssw-muted)}
|
||||
.ssw-six{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
|
||||
.ssw-six .ssw-seat{min-height:66px;padding:9px 8px}
|
||||
.ssw-report{padding:0 16px;margin-top:4px}
|
||||
.ssw-six .ssw-seat{min-height:76px;padding:12px}
|
||||
.ssw-report{padding:0 20px;margin-top:4px}
|
||||
.ssw-report-toggle{font-size:12px;color:var(--ssw-blue);padding:7px 2px;font-weight:500}
|
||||
.ssw-report-list{display:flex;flex-direction:column;gap:8px;margin-top:4px}
|
||||
.ssw-report-item{border:1px solid var(--ssw-line);border-radius:9px;padding:9px 11px;background:var(--ssw-card)}
|
||||
|
|
@ -424,12 +424,12 @@ body[data-ds-dark-theme] .ssw-float,html[data-theme=dark] .ssw-float{background:
|
|||
.ssw-report-head span{font-size:10px;color:var(--ssw-muted)}
|
||||
.ssw-report-model{margin:4px 0 0;font-size:11px;color:var(--ssw-blue);letter-spacing:.2px}
|
||||
.ssw-report-text{margin:4px 0 0;font-size:12px;line-height:1.7;color:var(--ssw-muted)}
|
||||
.ssw-current{margin:16px 16px 0;padding:13px;border:1px solid var(--ssw-line);border-radius:11px;background:var(--ssw-card)}
|
||||
.ssw-current{margin:14px 20px 0;padding:16px;border:1px solid var(--ssw-line);border-radius:11px;background:var(--ssw-card)}
|
||||
.ssw-current-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:9px}
|
||||
.ssw-current-name{font-size:13px;font-weight:600}
|
||||
.ssw-current-label{font-size:10px;color:var(--ssw-faint)}
|
||||
.ssw-current-text{margin:0;font-size:12px;line-height:1.8;color:var(--ssw-muted)}
|
||||
.ssw-config{margin:10px 16px 0;border:1px solid var(--ssw-line);border-radius:10px;background:var(--ssw-card);overflow:hidden}
|
||||
.ssw-config{margin:10px 20px 20px;border:1px solid var(--ssw-line);border-radius:10px;background:var(--ssw-card);overflow:hidden}
|
||||
.ssw-config-toggle{display:flex;align-items:center;gap:8px;width:100%;padding:12px 13px;font-size:12px;color:var(--ssw-ink)}
|
||||
.ssw-config-toggle svg{width:15px;height:15px;color:var(--ssw-muted)}
|
||||
.ssw-chevron{margin-left:auto;transition:transform .2s}
|
||||
|
|
@ -453,7 +453,7 @@ body[data-ds-dark-theme] .ssw-float,html[data-theme=dark] .ssw-float{background:
|
|||
.ssw-inline-bar{flex:none;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 12px;border-bottom:1px solid var(--ssw-line);background:var(--ssw-card);font-size:12px;color:var(--ssw-muted)}
|
||||
.ssw-link{color:var(--ssw-blue);font-size:12px;padding:2px 4px}
|
||||
@media (prefers-reduced-motion:reduce){.ssw-scope *{transition:none!important}}
|
||||
.ssw-tabs{display:flex;gap:6px;margin:12px 16px 0;padding:4px;border:1px solid var(--ssw-line);border-radius:9px;background:var(--ssw-side)}
|
||||
.ssw-tabs{display:flex;gap:6px;margin:0 20px;padding:4px;border:1px solid var(--ssw-line);border-radius:12px;background:var(--ssw-side)}
|
||||
.ssw-tab{flex:1;display:flex;align-items:center;justify-content:center;gap:6px;padding:7px 6px;border-radius:6px;font-size:12px;color:var(--ssw-muted)}
|
||||
.ssw-tab.is-active{background:var(--ssw-card);color:var(--ssw-blue);font-weight:600;box-shadow:0 1px 2px rgba(16,24,40,.06)}
|
||||
.ssw-tab-count{font-size:10px;color:var(--ssw-faint)}
|
||||
|
|
@ -475,18 +475,61 @@ body[data-ds-dark-theme] .ssw-float,html[data-theme=dark] .ssw-float{background:
|
|||
.ssw-badge[data-status=failed]{background:rgba(220,38,38,.12);color:var(--ssw-danger)}
|
||||
.ssw-form{margin-bottom:12px;padding:10px;border:1px solid var(--ssw-line);border-radius:9px;background:var(--ssw-side)}
|
||||
.ssw-empty-line{margin:10px 0;font-size:12px;color:var(--ssw-faint)}
|
||||
/* 朝堂工作台外观(按 4 审 + 最新外观方案):浅底、白卡、细边、蓝色只给当前角色与主按钮 */
|
||||
.ssw-root{container-type:inline-size}
|
||||
.ssw-tabs{display:flex;gap:22px;margin:14px 16px 0;padding:0;border:0;border-bottom:1px solid var(--ssw-line);border-radius:0;background:transparent}
|
||||
.ssw-tab{flex:0 0 auto;display:flex;align-items:center;gap:6px;padding:8px 0 10px;border-radius:0;border-bottom:2px solid transparent;margin-bottom:-1px;color:var(--ssw-muted);font-size:13px}
|
||||
.ssw-tab.is-active{color:var(--ssw-blue);font-weight:600;border-bottom-color:var(--ssw-blue);background:transparent;box-shadow:none}
|
||||
.ssw-tab-count{font-size:11px;color:var(--ssw-faint);font-weight:400}
|
||||
.ssw-court{max-width:1040px;margin:0 auto;padding:16px 16px 8px;display:grid;grid-template-columns:1fr;gap:16px;align-items:start}
|
||||
@container (min-width:620px){.ssw-court{grid-template-columns:minmax(0,1fr) 300px}}
|
||||
.ssw-org{min-width:0}
|
||||
.ssw-tree{padding:0}
|
||||
.ssw-scope .ssw-seat{border:1px solid var(--ssw-line);border-radius:9px;background:var(--ssw-card)}
|
||||
.ssw-scope .ssw-lead .ssw-seat{border-color:var(--ssw-line)}
|
||||
.ssw-scope .ssw-seat:hover{border-color:var(--ssw-blue)}
|
||||
.ssw-scope .ssw-seat[aria-pressed=true]{border-color:var(--ssw-blue);background:var(--ssw-wash);box-shadow:0 0 0 2px rgba(59,130,246,.12)}
|
||||
.ssw-seat{min-height:64px;padding:11px 12px 9px;gap:5px;box-shadow:0 1px 2px rgba(16,24,40,.04)}
|
||||
.ssw-seat-head{display:flex;align-items:center;gap:8px}
|
||||
.ssw-seat-icon{flex:none;color:var(--ssw-muted)}
|
||||
.ssw-role-name{font-size:15px;font-weight:600;letter-spacing:1px;flex:1;white-space:nowrap}
|
||||
.ssw-role-duty{font-size:11px;color:var(--ssw-muted);line-height:1.5}
|
||||
.ssw-dot{width:7px;height:7px}
|
||||
.ssw-lead{width:190px}
|
||||
.ssw-detail{border:1px solid var(--ssw-line);border-radius:10px;background:var(--ssw-card);padding:16px;display:flex;flex-direction:column;gap:12px;min-height:340px}
|
||||
.ssw-detail-top{display:flex;align-items:baseline;justify-content:space-between;gap:8px}
|
||||
.ssw-detail-name{font-size:17px;font-weight:600;letter-spacing:1px}
|
||||
.ssw-detail-status{font-size:11px;color:var(--ssw-faint)}
|
||||
.ssw-detail-text{margin:0;font-size:12px;line-height:1.9;color:var(--ssw-muted)}
|
||||
.ssw-detail-actions .ssw-primary{width:100%;padding:10px 12px;font-size:13px}
|
||||
.ssw-detail .ssw-config{margin:0;border:1px solid var(--ssw-line);border-radius:8px;background:var(--ssw-bg)}
|
||||
.ssw-detail .ssw-report{padding:0;margin:0}
|
||||
.ssw-detail .ssw-report-toggle{color:var(--ssw-muted);font-size:12px;padding:2px 0}
|
||||
@container (max-width:619px){
|
||||
.ssw-court{padding:12px 12px 8px;gap:14px}
|
||||
.ssw-lead{width:100%}
|
||||
.ssw-six{grid-template-columns:repeat(2,minmax(0,1fr))}
|
||||
.ssw-seat{min-height:52px;padding:12px;gap:0}
|
||||
.ssw-role-duty{display:none}
|
||||
.ssw-role-name{font-size:15px}
|
||||
.ssw-seat-icon{width:15px;height:15px}
|
||||
.ssw-detail{min-height:0}
|
||||
}
|
||||
.ssw-tab-body{height:100%;min-height:0;display:flex;flex-direction:column}
|
||||
.ssw-tab-body .ssw-root{flex:1;min-height:0}
|
||||
.ssw-tab-title{font-size:13px}
|
||||
/* 宿主的 .ssw-scope button{border:0} 会盖掉 .ssw-seat 的边框(选择器更具体),
|
||||
导致十张部门卡平时没有框、只有选中时靠背景色看着像有框。这里提高选择器优先级,
|
||||
让每张卡始终显示蓝色描边,选中时再加深。 */
|
||||
.ssw-scope .ssw-seat{border:2px solid var(--ssw-frame);border-radius:10px;background:var(--ssw-card)}
|
||||
.ssw-scope .ssw-lead .ssw-seat{border-color:var(--ssw-blue)}
|
||||
.ssw-scope .ssw-six .ssw-seat{border-color:var(--ssw-frame)}
|
||||
.ssw-scope .ssw-seat:hover{border-color:var(--ssw-blue)}
|
||||
.ssw-scope .ssw-seat[aria-pressed=true]{border-color:var(--ssw-blue);background:var(--ssw-wash);box-shadow:0 0 0 2px rgba(59,130,246,.12)}
|
||||
body[data-ds-dark-theme] .ssw-scope .ssw-seat[aria-pressed=true]{box-shadow:0 0 0 2px rgba(110,168,255,.18)}
|
||||
.ssw-group-label::after{content:"";height:1px;background:var(--ssw-line);flex:1}
|
||||
.ssw-role-top{width:100%}
|
||||
.ssw-tab-count{padding:1px 5px;border-radius:5px;background:var(--ssw-rail)}
|
||||
.ssw-current-name{font-size:15px;letter-spacing:1px}
|
||||
.ssw-current-label{padding:3px 7px;border-radius:5px;background:var(--ssw-side)}
|
||||
.ssw-config-toggle:hover{background:var(--ssw-side)}
|
||||
/* 按工作台本身的宽度适配:宽屏居中,右侧窄栏保持紧凑。 */
|
||||
.ssw-root > :is(.ssw-project,.ssw-tree,.ssw-report,.ssw-page){width:100%;max-width:720px;align-self:center;flex-shrink:0}
|
||||
.ssw-root > :is(.ssw-tabs,.ssw-current,.ssw-config,.ssw-enable,.ssw-notice,.ssw-error){width:calc(100% - 40px);max-width:680px;margin-left:auto;margin-right:auto;flex-shrink:0}
|
||||
.ssw-enable{margin-top:12px}
|
||||
@container(max-width:380px){.ssw-root > :is(.ssw-tabs,.ssw-current,.ssw-config,.ssw-enable,.ssw-notice,.ssw-error){width:calc(100% - 24px);margin-left:auto;margin-right:auto}
|
||||
.ssw-project{padding:16px 12px 0}.ssw-tabs{margin:0 12px}.ssw-tree{padding:20px 12px 4px}.ssw-current{margin:12px 12px 0}.ssw-config{margin:10px 12px 16px}.ssw-report{padding:0 12px}.ssw-trio,.ssw-six{gap:6px}.ssw-seat,.ssw-six .ssw-seat{padding:10px 8px}.ssw-role-duty{font-size:10px}}
|
||||
`;
|
||||
|
||||
// src/native/panel.js
|
||||
|
|
@ -899,6 +942,33 @@ var ChevronIcon = (props) => (0, import_react.createElement)("svg", {
|
|||
className: "ssw-chevron",
|
||||
"aria-hidden": "true"
|
||||
}, (0, import_react.createElement)("path", { d: "m6 9 6 6 6-6" }));
|
||||
var SEAT_ICON_PATHS = {
|
||||
lead: ["M12 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8Z", "M4.5 20c0-3.2 3.4-5 7.5-5s7.5 1.8 7.5 5"],
|
||||
zhongshu: ["M7 3h7l4 4v14H7z", "M14 3v4h4", "M9.5 12h5", "M9.5 16h5"],
|
||||
shangshu: ["M4 4h6.5v6.5H4z", "M13.5 4H20v6.5h-6.5z", "M4 13.5h6.5V20H4z", "M13.5 13.5H20V20h-6.5z"],
|
||||
menxia: ["M12 3l7 3v6c0 4-3 7-7 9-4-2-7-5-7-9V6z", "m9 12 2 2 4-4"],
|
||||
libu: ["M12 11a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7Z", "M5 20c0-3 3-4.5 7-4.5s7 1.5 7 4.5"],
|
||||
hubu: ["M4 5h16v14H4z", "M4 10h16", "M10 5v14"],
|
||||
lipu: ["M7 3h10v18H7z", "M10 8h4", "M10 12h4", "M10 16h4"],
|
||||
bingbu: ["M4 5h16v12H4z", "m8 13 3-6 5 6", "M4 20h16"],
|
||||
xingbu: ["M6 3h12v18l-6-3-6 3z", "m9 10 2 2 4-4"],
|
||||
gongbu: ["m8 8-4 4 4 4", "m16 8 4 4-4 4", "M13 5l-2 14"]
|
||||
};
|
||||
function SeatIcon(props) {
|
||||
const paths = SEAT_ICON_PATHS[props && props.id] ?? SEAT_ICON_PATHS.lead;
|
||||
return (0, import_react.createElement)("svg", {
|
||||
viewBox: "0 0 24 24",
|
||||
width: 16,
|
||||
height: 16,
|
||||
fill: "none",
|
||||
stroke: "currentColor",
|
||||
strokeWidth: 1.6,
|
||||
strokeLinecap: "round",
|
||||
strokeLinejoin: "round",
|
||||
"aria-hidden": "true",
|
||||
className: "ssw-seat-icon"
|
||||
}, paths.map((d, index) => (0, import_react.createElement)("path", { key: index, d })));
|
||||
}
|
||||
function isFn(value) {
|
||||
return typeof value === "function";
|
||||
}
|
||||
|
|
@ -1407,7 +1477,8 @@ function apply(ctx) {
|
|||
},
|
||||
(0, import_react.createElement)(
|
||||
"span",
|
||||
{ className: "ssw-role-top" },
|
||||
{ className: "ssw-seat-head" },
|
||||
(0, import_react.createElement)(SeatIcon, { id: seat.id }),
|
||||
(0, import_react.createElement)("span", { className: "ssw-role-name" }, seat.name),
|
||||
(0, import_react.createElement)("span", { className: "ssw-dot", "data-status": seat.status, "aria-hidden": "true" })
|
||||
),
|
||||
|
|
@ -1460,31 +1531,20 @@ function apply(ctx) {
|
|||
onClick: enableSeats
|
||||
}, busy ? "正在启用…" : "启用此项目的十席")
|
||||
) : null;
|
||||
const currentCard = (0, import_react.createElement)(
|
||||
"section",
|
||||
{ className: "ssw-current" },
|
||||
(0, import_react.createElement)(
|
||||
"div",
|
||||
{ className: "ssw-current-top" },
|
||||
(0, import_react.createElement)("strong", { className: "ssw-current-name" }, wb.selected.name),
|
||||
(0, import_react.createElement)("span", { className: "ssw-current-label" }, "角色职责 · " + wb.selected.statusLabel)
|
||||
),
|
||||
(0, import_react.createElement)("p", { className: "ssw-current-text" }, wb.selected.responsibility),
|
||||
(0, import_react.createElement)(
|
||||
"div",
|
||||
{ className: "ssw-current-actions" },
|
||||
wb.ready ? (0, import_react.createElement)("button", {
|
||||
type: "button",
|
||||
className: "ssw-primary",
|
||||
disabled: busy,
|
||||
onClick: () => pickSeat(wb.selected.id)
|
||||
}, "开始对话") : (0, import_react.createElement)("button", {
|
||||
type: "button",
|
||||
className: "ssw-primary",
|
||||
disabled: busy,
|
||||
onClick: enableSeats
|
||||
}, busy ? "正在启用…" : "启用此项目的十席")
|
||||
)
|
||||
const detailActions = (0, import_react.createElement)(
|
||||
"div",
|
||||
{ className: "ssw-detail-actions" },
|
||||
wb.ready ? (0, import_react.createElement)("button", {
|
||||
type: "button",
|
||||
className: "ssw-primary",
|
||||
disabled: busy,
|
||||
onClick: () => pickSeat(wb.selected.id)
|
||||
}, "开始对话") : (0, import_react.createElement)("button", {
|
||||
type: "button",
|
||||
className: "ssw-primary",
|
||||
disabled: busy,
|
||||
onClick: enableSeats
|
||||
}, busy ? "正在启用…" : "启用此项目的十席")
|
||||
);
|
||||
const optionEls = wb.selected.modelOptions.map((option) => (0, import_react.createElement)("option", { key: option.value, value: option.value }, option.label));
|
||||
if (wb.selected.modelValue && !wb.selected.modelOptions.some((option) => option.value === wb.selected.modelValue)) {
|
||||
|
|
@ -1546,7 +1606,7 @@ function apply(ctx) {
|
|||
className: "ssw-report-toggle",
|
||||
"aria-expanded": reportOpen ? "true" : "false",
|
||||
onClick: () => setReportOpen((value) => !value)
|
||||
}, reportOpen ? "收起职责汇报" : "全部汇报职责"),
|
||||
}, reportOpen ? "收起角色职责" : "全部角色职责"),
|
||||
reportOpen ? (0, import_react.createElement)(
|
||||
"div",
|
||||
{ className: "ssw-report-list" },
|
||||
|
|
@ -1663,7 +1723,26 @@ function apply(ctx) {
|
|||
) : null,
|
||||
(0, import_react.createElement)("div", { className: "ssw-list" }, artifactRows)
|
||||
);
|
||||
const courtView = (0, import_react.createElement)(import_react.Fragment, null, enableBlock, tree, report, currentCard, config);
|
||||
const detail = (0, import_react.createElement)(
|
||||
"aside",
|
||||
{ className: "ssw-detail" },
|
||||
(0, import_react.createElement)(
|
||||
"div",
|
||||
{ className: "ssw-detail-top" },
|
||||
(0, import_react.createElement)("strong", { className: "ssw-detail-name" }, wb.selected.name),
|
||||
(0, import_react.createElement)("span", { className: "ssw-detail-status" }, "角色职责 · " + wb.selected.statusLabel)
|
||||
),
|
||||
(0, import_react.createElement)("p", { className: "ssw-detail-text" }, wb.selected.responsibility),
|
||||
detailActions,
|
||||
config,
|
||||
report
|
||||
);
|
||||
const courtView = (0, import_react.createElement)(
|
||||
"section",
|
||||
{ className: "ssw-court" },
|
||||
(0, import_react.createElement)("div", { className: "ssw-org" }, enableBlock, tree),
|
||||
detail
|
||||
);
|
||||
let body;
|
||||
if (phase === "loading") body = (0, import_react.createElement)("div", { className: "ssw-loading" }, "正在加载工作台…");
|
||||
else if (phase === "no-workspace") body = (0, import_react.createElement)(
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "dsh-sansheng-liubu",
|
||||
"version": "0.2.0",
|
||||
"version": "0.2.1",
|
||||
"description": "三省六部:每个项目固定十席角色与独立会话的 DSH 插件(第一版)。",
|
||||
"keywords": [
|
||||
"dsh-plugin",
|
||||
|
|
|
|||
|
|
@ -60,6 +60,28 @@ const ChevronIcon = (props) => h('svg', {
|
|||
className: 'ssw-chevron', 'aria-hidden': 'true',
|
||||
}, h('path', { d: 'm6 9 6 6 6-6' }))
|
||||
|
||||
// 每个席位一个简单线性图标,沿用外观方案的“图标 + 两字名称 + 状态点”卡片。
|
||||
const SEAT_ICON_PATHS = {
|
||||
lead: ['M12 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8Z', 'M4.5 20c0-3.2 3.4-5 7.5-5s7.5 1.8 7.5 5'],
|
||||
zhongshu: ['M7 3h7l4 4v14H7z', 'M14 3v4h4', 'M9.5 12h5', 'M9.5 16h5'],
|
||||
shangshu: ['M4 4h6.5v6.5H4z', 'M13.5 4H20v6.5h-6.5z', 'M4 13.5h6.5V20H4z', 'M13.5 13.5H20V20h-6.5z'],
|
||||
menxia: ['M12 3l7 3v6c0 4-3 7-7 9-4-2-7-5-7-9V6z', 'm9 12 2 2 4-4'],
|
||||
libu: ['M12 11a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7Z', 'M5 20c0-3 3-4.5 7-4.5s7 1.5 7 4.5'],
|
||||
hubu: ['M4 5h16v14H4z', 'M4 10h16', 'M10 5v14'],
|
||||
lipu: ['M7 3h10v18H7z', 'M10 8h4', 'M10 12h4', 'M10 16h4'],
|
||||
bingbu: ['M4 5h16v12H4z', 'm8 13 3-6 5 6', 'M4 20h16'],
|
||||
xingbu: ['M6 3h12v18l-6-3-6 3z', 'm9 10 2 2 4-4'],
|
||||
gongbu: ['m8 8-4 4 4 4', 'm16 8 4 4-4 4', 'M13 5l-2 14'],
|
||||
}
|
||||
function SeatIcon(props) {
|
||||
const paths = SEAT_ICON_PATHS[props && props.id] ?? SEAT_ICON_PATHS.lead
|
||||
return h('svg', {
|
||||
viewBox: '0 0 24 24', width: 16, height: 16, fill: 'none', stroke: 'currentColor',
|
||||
strokeWidth: 1.6, strokeLinecap: 'round', strokeLinejoin: 'round', 'aria-hidden': 'true',
|
||||
className: 'ssw-seat-icon',
|
||||
}, paths.map((d, index) => h('path', { key: index, d })))
|
||||
}
|
||||
|
||||
function isFn(value) { return typeof value === 'function' }
|
||||
function safeCall(obj, name) {
|
||||
try {
|
||||
|
|
@ -511,7 +533,8 @@ export function apply(ctx) {
|
|||
title: seat.name + ' · ' + seat.duty + '(' + seat.statusLabel + ')',
|
||||
onClick: () => pickSeat(seat.id),
|
||||
},
|
||||
h('span', { className: 'ssw-role-top' },
|
||||
h('span', { className: 'ssw-seat-head' },
|
||||
h(SeatIcon, { id: seat.id }),
|
||||
h('span', { className: 'ssw-role-name' }, seat.name),
|
||||
h('span', { className: 'ssw-dot', 'data-status': seat.status, 'aria-hidden': 'true' }),
|
||||
),
|
||||
|
|
@ -556,22 +579,15 @@ export function apply(ctx) {
|
|||
)
|
||||
: null
|
||||
|
||||
const currentCard = h('section', { className: 'ssw-current' },
|
||||
h('div', { className: 'ssw-current-top' },
|
||||
h('strong', { className: 'ssw-current-name' }, wb.selected.name),
|
||||
h('span', { className: 'ssw-current-label' }, '角色职责 · ' + wb.selected.statusLabel),
|
||||
),
|
||||
h('p', { className: 'ssw-current-text' }, wb.selected.responsibility),
|
||||
h('div', { className: 'ssw-current-actions' },
|
||||
wb.ready
|
||||
? h('button', {
|
||||
type: 'button', className: 'ssw-primary', disabled: busy,
|
||||
onClick: () => pickSeat(wb.selected.id),
|
||||
}, '开始对话')
|
||||
: h('button', {
|
||||
type: 'button', className: 'ssw-primary', disabled: busy, onClick: enableSeats,
|
||||
}, busy ? '正在启用…' : '启用此项目的十席'),
|
||||
),
|
||||
const detailActions = h('div', { className: 'ssw-detail-actions' },
|
||||
wb.ready
|
||||
? h('button', {
|
||||
type: 'button', className: 'ssw-primary', disabled: busy,
|
||||
onClick: () => pickSeat(wb.selected.id),
|
||||
}, '开始对话')
|
||||
: h('button', {
|
||||
type: 'button', className: 'ssw-primary', disabled: busy, onClick: enableSeats,
|
||||
}, busy ? '正在启用…' : '启用此项目的十席'),
|
||||
)
|
||||
|
||||
const optionEls = wb.selected.modelOptions.map(option => h('option', { key: option.value, value: option.value }, option.label))
|
||||
|
|
@ -616,7 +632,7 @@ export function apply(ctx) {
|
|||
h('button', {
|
||||
type: 'button', className: 'ssw-report-toggle', 'aria-expanded': reportOpen ? 'true' : 'false',
|
||||
onClick: () => setReportOpen(value => !value),
|
||||
}, reportOpen ? '收起职责汇报' : '全部汇报职责'),
|
||||
}, reportOpen ? '收起角色职责' : '全部角色职责'),
|
||||
reportOpen
|
||||
? h('div', { className: 'ssw-report-list' },
|
||||
SEAT_IDS.map(id => {
|
||||
|
|
@ -702,7 +718,20 @@ export function apply(ctx) {
|
|||
) : null,
|
||||
h('div', { className: 'ssw-list' }, artifactRows))
|
||||
|
||||
const courtView = h(Fragment, null, enableBlock, tree, report, currentCard, config)
|
||||
const detail = h('aside', { className: 'ssw-detail' },
|
||||
h('div', { className: 'ssw-detail-top' },
|
||||
h('strong', { className: 'ssw-detail-name' }, wb.selected.name),
|
||||
h('span', { className: 'ssw-detail-status' }, '角色职责 · ' + wb.selected.statusLabel),
|
||||
),
|
||||
h('p', { className: 'ssw-detail-text' }, wb.selected.responsibility),
|
||||
detailActions,
|
||||
config,
|
||||
report,
|
||||
)
|
||||
const courtView = h('section', { className: 'ssw-court' },
|
||||
h('div', { className: 'ssw-org' }, enableBlock, tree),
|
||||
detail,
|
||||
)
|
||||
|
||||
let body
|
||||
if (phase === 'loading') body = h('div', { className: 'ssw-loading' }, '正在加载工作台…')
|
||||
|
|
|
|||
|
|
@ -3,51 +3,51 @@
|
|||
// 不依赖任何构建工具,作为普通字符串导出,由入口注入 <style>。
|
||||
|
||||
export const CSS = `
|
||||
.ssw-scope{--ssw-bg:#ffffff;--ssw-side:#f8f9fa;--ssw-rail:#f7f9fc;--ssw-card:#ffffff;--ssw-line:#e3e8ef;--ssw-strong:#c7d8f5;--ssw-ink:#0f172a;--ssw-muted:#667085;--ssw-faint:#98a2b3;--ssw-blue:#3b82f6;--ssw-wash:#eff6ff;--ssw-frame:#3b82f6;--ssw-wire:#c9d6ea;--ssw-danger:#dc2626;--ssw-ok:#16a34a;box-sizing:border-box;color:var(--ssw-ink);font-family:Inter,"Segoe UI","Microsoft YaHei",sans-serif;font-size:13px;line-height:1.5}
|
||||
.ssw-scope{--ssw-bg:#ffffff;--ssw-side:#f8f9fa;--ssw-rail:#f8fafc;--ssw-card:#ffffff;--ssw-line:#e3e8ef;--ssw-strong:#c7d8f5;--ssw-ink:#0f172a;--ssw-muted:#667085;--ssw-faint:#98a2b3;--ssw-blue:#4263eb;--ssw-wash:#eef2ff;--ssw-frame:#3b82f6;--ssw-wire:#c9d6ea;--ssw-danger:#dc2626;--ssw-ok:#16a34a;box-sizing:border-box;color:var(--ssw-ink);font-family:Inter,"Segoe UI","Microsoft YaHei",sans-serif;font-size:13px;line-height:1.5}
|
||||
.ssw-scope *,.ssw-scope *::before,.ssw-scope *::after{box-sizing:border-box}
|
||||
.ssw-scope button{font:inherit;color:inherit;background:transparent;border:0;cursor:pointer}
|
||||
.ssw-scope :where(button){font:inherit;color:inherit;background:transparent;border:0;cursor:pointer}
|
||||
.ssw-scope button:disabled{cursor:default;opacity:.55}
|
||||
.ssw-scope :focus-visible{outline:2px solid var(--ssw-blue);outline-offset:2px}
|
||||
body[data-ds-dark-theme] .ssw-scope,html[data-theme=dark] .ssw-scope,.ssw-scope[data-ssw-theme=dark]{--ssw-bg:#14171c;--ssw-side:#171b21;--ssw-rail:#161a20;--ssw-card:#1e232b;--ssw-line:#2c333d;--ssw-strong:#3b4a63;--ssw-frame:#6ea8ff;--ssw-ink:#e6ebf2;--ssw-muted:#a9b4c2;--ssw-faint:#7b8797;--ssw-blue:#6ea8ff;--ssw-wash:#1d2b40;--ssw-wire:#3a4350;--ssw-danger:#f87171;--ssw-ok:#4ade80}
|
||||
.ssw-float{position:fixed;right:14px;bottom:70px;z-index:2147483000;width:min(374px,calc(100vw - 28px));max-height:calc(100vh - 96px);display:flex;flex-direction:column;background:#ffffff;border:1px solid #e3e8ef;border-radius:12px;box-shadow:0 18px 50px -12px rgba(16,24,40,.28),0 4px 12px -2px rgba(16,24,40,.12);overflow:hidden}
|
||||
body[data-ds-dark-theme] .ssw-float,html[data-theme=dark] .ssw-float{background:#161a20;border-color:#2c333d}
|
||||
.ssw-root{display:flex;flex-direction:column;min-height:0;height:100%;overflow:auto;background:var(--ssw-rail);color:var(--ssw-ink)}
|
||||
.ssw-root{container-type:inline-size;display:flex;flex-direction:column;min-height:0;height:100%;overflow:auto;background:var(--ssw-rail);color:var(--ssw-ink)}
|
||||
.ssw-head{flex:none;height:52px;display:flex;align-items:center;gap:8px;padding:0 16px;border-bottom:1px solid var(--ssw-line);background:var(--ssw-card)}
|
||||
.ssw-head svg{width:18px;height:18px;color:var(--ssw-muted)}
|
||||
.ssw-head-title{font-size:13px;font-weight:600}
|
||||
.ssw-icon-btn{margin-left:auto;display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;border-radius:6px;color:var(--ssw-muted)}
|
||||
.ssw-icon-btn:hover{background:var(--ssw-wash);color:var(--ssw-blue)}
|
||||
.ssw-project{padding:18px 16px 0}
|
||||
.ssw-project{padding:22px 20px 0}
|
||||
.ssw-project-line{display:flex;align-items:center;justify-content:space-between;margin-bottom:5px}
|
||||
.ssw-eyebrow{display:inline-flex;align-items:center;gap:6px;font-size:11px;color:var(--ssw-muted)}
|
||||
.ssw-eyebrow svg{width:14px;height:14px}
|
||||
.ssw-count{font-size:10px;color:var(--ssw-faint)}
|
||||
.ssw-project-title{font-size:17px;font-weight:600;letter-spacing:.3px;margin:0 0 14px}
|
||||
.ssw-project-title{font-size:21px;font-weight:650;letter-spacing:.5px;margin:4px 0 16px}
|
||||
.ssw-enable{margin:0 16px 4px;padding:12px;border:1px solid var(--ssw-strong);background:var(--ssw-wash);border-radius:10px}
|
||||
.ssw-enable-note{margin:0 0 10px;font-size:12px;color:var(--ssw-muted);line-height:1.7}
|
||||
.ssw-primary{background:var(--ssw-blue);color:#ffffff;border-radius:7px;padding:8px 13px;font-size:12px;font-weight:500}
|
||||
.ssw-primary{min-height:36px;background:var(--ssw-blue);color:#ffffff;border-radius:7px;padding:8px 13px;font-size:12px;font-weight:500}
|
||||
.ssw-primary:hover{filter:brightness(1.05)}
|
||||
.ssw-tree{padding:14px 16px 4px;position:relative}
|
||||
.ssw-lead{width:150px;margin:0 auto;position:relative}
|
||||
.ssw-tree{padding:24px 20px 4px;position:relative}
|
||||
.ssw-lead{width:168px;margin:0 auto;position:relative}
|
||||
.ssw-lead::after{content:none}
|
||||
.ssw-sansheng{position:relative;margin-top:22px}
|
||||
.ssw-sansheng{position:relative;margin-top:24px}
|
||||
.ssw-trio{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
|
||||
.ssw-seat{position:relative;width:100%;display:flex;flex-direction:column;gap:6px;padding:10px 9px 8px;border:1.5px solid var(--ssw-frame);border-radius:10px;background:var(--ssw-card);text-align:left;min-height:70px;box-shadow:0 1px 2px rgba(16,24,40,.04);transition:border-color .15s,box-shadow .15s,transform .15s}
|
||||
.ssw-seat{position:relative;width:100%;display:flex;flex-direction:column;gap:6px;padding:14px 12px 12px;border:1px solid var(--ssw-line);border-radius:12px;background:var(--ssw-card);text-align:left;min-height:80px;box-shadow:0 1px 2px rgba(16,24,40,.04);transition:border-color .15s,box-shadow .15s,transform .15s}
|
||||
.ssw-seat:hover{border-color:var(--ssw-blue);transform:translateY(-1px);box-shadow:0 3px 8px rgba(16,24,40,.06)}
|
||||
.ssw-seat[aria-pressed=true]{border-color:var(--ssw-blue);background:var(--ssw-wash);box-shadow:0 0 0 2px rgba(59,130,246,.12)}
|
||||
.ssw-lead .ssw-seat{border-color:var(--ssw-blue)}
|
||||
.ssw-lead .ssw-seat{min-height:84px}
|
||||
.ssw-role-top{display:flex;align-items:center;justify-content:space-between;gap:6px}
|
||||
.ssw-role-name{font-size:14px;font-weight:600;letter-spacing:2px}
|
||||
.ssw-role-duty{font-size:10px;color:var(--ssw-muted);line-height:1.5}
|
||||
.ssw-role-duty{font-size:11px;color:var(--ssw-muted);line-height:1.5}
|
||||
.ssw-dot{flex:none;width:6px;height:6px;border-radius:50%;border:1px solid var(--ssw-faint);background:transparent}
|
||||
.ssw-dot[data-status=bound]{background:var(--ssw-ok);border-color:var(--ssw-ok)}
|
||||
.ssw-dot[data-status=failed],.ssw-dot[data-status=missing]{background:var(--ssw-danger);border-color:var(--ssw-danger)}
|
||||
.ssw-dot[data-status=creating]{background:var(--ssw-blue);border-color:var(--ssw-blue)}
|
||||
.ssw-ministries{position:relative;margin-top:18px}
|
||||
.ssw-group-label{display:block;margin:0 2px 8px;font-size:11px;font-weight:600;letter-spacing:.5px;color:var(--ssw-muted)}
|
||||
.ssw-group-label{display:flex;align-items:center;gap:10px;margin:0 2px 8px;font-size:11px;font-weight:600;letter-spacing:.5px;color:var(--ssw-muted)}
|
||||
.ssw-six{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
|
||||
.ssw-six .ssw-seat{min-height:66px;padding:9px 8px}
|
||||
.ssw-report{padding:0 16px;margin-top:4px}
|
||||
.ssw-six .ssw-seat{min-height:76px;padding:12px}
|
||||
.ssw-report{padding:0 20px;margin-top:4px}
|
||||
.ssw-report-toggle{font-size:12px;color:var(--ssw-blue);padding:7px 2px;font-weight:500}
|
||||
.ssw-report-list{display:flex;flex-direction:column;gap:8px;margin-top:4px}
|
||||
.ssw-report-item{border:1px solid var(--ssw-line);border-radius:9px;padding:9px 11px;background:var(--ssw-card)}
|
||||
|
|
@ -56,12 +56,12 @@ body[data-ds-dark-theme] .ssw-float,html[data-theme=dark] .ssw-float{background:
|
|||
.ssw-report-head span{font-size:10px;color:var(--ssw-muted)}
|
||||
.ssw-report-model{margin:4px 0 0;font-size:11px;color:var(--ssw-blue);letter-spacing:.2px}
|
||||
.ssw-report-text{margin:4px 0 0;font-size:12px;line-height:1.7;color:var(--ssw-muted)}
|
||||
.ssw-current{margin:16px 16px 0;padding:13px;border:1px solid var(--ssw-line);border-radius:11px;background:var(--ssw-card)}
|
||||
.ssw-current{margin:14px 20px 0;padding:16px;border:1px solid var(--ssw-line);border-radius:11px;background:var(--ssw-card)}
|
||||
.ssw-current-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:9px}
|
||||
.ssw-current-name{font-size:13px;font-weight:600}
|
||||
.ssw-current-label{font-size:10px;color:var(--ssw-faint)}
|
||||
.ssw-current-text{margin:0;font-size:12px;line-height:1.8;color:var(--ssw-muted)}
|
||||
.ssw-config{margin:10px 16px 0;border:1px solid var(--ssw-line);border-radius:10px;background:var(--ssw-card);overflow:hidden}
|
||||
.ssw-config{margin:10px 20px 20px;border:1px solid var(--ssw-line);border-radius:10px;background:var(--ssw-card);overflow:hidden}
|
||||
.ssw-config-toggle{display:flex;align-items:center;gap:8px;width:100%;padding:12px 13px;font-size:12px;color:var(--ssw-ink)}
|
||||
.ssw-config-toggle svg{width:15px;height:15px;color:var(--ssw-muted)}
|
||||
.ssw-chevron{margin-left:auto;transition:transform .2s}
|
||||
|
|
@ -85,7 +85,7 @@ body[data-ds-dark-theme] .ssw-float,html[data-theme=dark] .ssw-float{background:
|
|||
.ssw-inline-bar{flex:none;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 12px;border-bottom:1px solid var(--ssw-line);background:var(--ssw-card);font-size:12px;color:var(--ssw-muted)}
|
||||
.ssw-link{color:var(--ssw-blue);font-size:12px;padding:2px 4px}
|
||||
@media (prefers-reduced-motion:reduce){.ssw-scope *{transition:none!important}}
|
||||
.ssw-tabs{display:flex;gap:6px;margin:12px 16px 0;padding:4px;border:1px solid var(--ssw-line);border-radius:9px;background:var(--ssw-side)}
|
||||
.ssw-tabs{display:flex;gap:6px;margin:0 20px;padding:4px;border:1px solid var(--ssw-line);border-radius:12px;background:var(--ssw-side)}
|
||||
.ssw-tab{flex:1;display:flex;align-items:center;justify-content:center;gap:6px;padding:7px 6px;border-radius:6px;font-size:12px;color:var(--ssw-muted)}
|
||||
.ssw-tab.is-active{background:var(--ssw-card);color:var(--ssw-blue);font-weight:600;box-shadow:0 1px 2px rgba(16,24,40,.06)}
|
||||
.ssw-tab-count{font-size:10px;color:var(--ssw-faint)}
|
||||
|
|
@ -107,16 +107,59 @@ body[data-ds-dark-theme] .ssw-float,html[data-theme=dark] .ssw-float{background:
|
|||
.ssw-badge[data-status=failed]{background:rgba(220,38,38,.12);color:var(--ssw-danger)}
|
||||
.ssw-form{margin-bottom:12px;padding:10px;border:1px solid var(--ssw-line);border-radius:9px;background:var(--ssw-side)}
|
||||
.ssw-empty-line{margin:10px 0;font-size:12px;color:var(--ssw-faint)}
|
||||
/* 朝堂工作台外观(按 4 审 + 最新外观方案):浅底、白卡、细边、蓝色只给当前角色与主按钮 */
|
||||
.ssw-root{container-type:inline-size}
|
||||
.ssw-tabs{display:flex;gap:22px;margin:14px 16px 0;padding:0;border:0;border-bottom:1px solid var(--ssw-line);border-radius:0;background:transparent}
|
||||
.ssw-tab{flex:0 0 auto;display:flex;align-items:center;gap:6px;padding:8px 0 10px;border-radius:0;border-bottom:2px solid transparent;margin-bottom:-1px;color:var(--ssw-muted);font-size:13px}
|
||||
.ssw-tab.is-active{color:var(--ssw-blue);font-weight:600;border-bottom-color:var(--ssw-blue);background:transparent;box-shadow:none}
|
||||
.ssw-tab-count{font-size:11px;color:var(--ssw-faint);font-weight:400}
|
||||
.ssw-court{max-width:1040px;margin:0 auto;padding:16px 16px 8px;display:grid;grid-template-columns:1fr;gap:16px;align-items:start}
|
||||
@container (min-width:620px){.ssw-court{grid-template-columns:minmax(0,1fr) 300px}}
|
||||
.ssw-org{min-width:0}
|
||||
.ssw-tree{padding:0}
|
||||
.ssw-scope .ssw-seat{border:1px solid var(--ssw-line);border-radius:9px;background:var(--ssw-card)}
|
||||
.ssw-scope .ssw-lead .ssw-seat{border-color:var(--ssw-line)}
|
||||
.ssw-scope .ssw-seat:hover{border-color:var(--ssw-blue)}
|
||||
.ssw-scope .ssw-seat[aria-pressed=true]{border-color:var(--ssw-blue);background:var(--ssw-wash);box-shadow:0 0 0 2px rgba(59,130,246,.12)}
|
||||
.ssw-seat{min-height:64px;padding:11px 12px 9px;gap:5px;box-shadow:0 1px 2px rgba(16,24,40,.04)}
|
||||
.ssw-seat-head{display:flex;align-items:center;gap:8px}
|
||||
.ssw-seat-icon{flex:none;color:var(--ssw-muted)}
|
||||
.ssw-role-name{font-size:15px;font-weight:600;letter-spacing:1px;flex:1;white-space:nowrap}
|
||||
.ssw-role-duty{font-size:11px;color:var(--ssw-muted);line-height:1.5}
|
||||
.ssw-dot{width:7px;height:7px}
|
||||
.ssw-lead{width:190px}
|
||||
.ssw-detail{border:1px solid var(--ssw-line);border-radius:10px;background:var(--ssw-card);padding:16px;display:flex;flex-direction:column;gap:12px;min-height:340px}
|
||||
.ssw-detail-top{display:flex;align-items:baseline;justify-content:space-between;gap:8px}
|
||||
.ssw-detail-name{font-size:17px;font-weight:600;letter-spacing:1px}
|
||||
.ssw-detail-status{font-size:11px;color:var(--ssw-faint)}
|
||||
.ssw-detail-text{margin:0;font-size:12px;line-height:1.9;color:var(--ssw-muted)}
|
||||
.ssw-detail-actions .ssw-primary{width:100%;padding:10px 12px;font-size:13px}
|
||||
.ssw-detail .ssw-config{margin:0;border:1px solid var(--ssw-line);border-radius:8px;background:var(--ssw-bg)}
|
||||
.ssw-detail .ssw-report{padding:0;margin:0}
|
||||
.ssw-detail .ssw-report-toggle{color:var(--ssw-muted);font-size:12px;padding:2px 0}
|
||||
@container (max-width:619px){
|
||||
.ssw-court{padding:12px 12px 8px;gap:14px}
|
||||
.ssw-lead{width:100%}
|
||||
.ssw-six{grid-template-columns:repeat(2,minmax(0,1fr))}
|
||||
.ssw-seat{min-height:52px;padding:12px;gap:0}
|
||||
.ssw-role-duty{display:none}
|
||||
.ssw-role-name{font-size:15px}
|
||||
.ssw-seat-icon{width:15px;height:15px}
|
||||
.ssw-detail{min-height:0}
|
||||
}
|
||||
.ssw-tab-body{height:100%;min-height:0;display:flex;flex-direction:column}
|
||||
.ssw-tab-body .ssw-root{flex:1;min-height:0}
|
||||
.ssw-tab-title{font-size:13px}
|
||||
/* 宿主的 .ssw-scope button{border:0} 会盖掉 .ssw-seat 的边框(选择器更具体),
|
||||
导致十张部门卡平时没有框、只有选中时靠背景色看着像有框。这里提高选择器优先级,
|
||||
让每张卡始终显示蓝色描边,选中时再加深。 */
|
||||
.ssw-scope .ssw-seat{border:2px solid var(--ssw-frame);border-radius:10px;background:var(--ssw-card)}
|
||||
.ssw-scope .ssw-lead .ssw-seat{border-color:var(--ssw-blue)}
|
||||
.ssw-scope .ssw-six .ssw-seat{border-color:var(--ssw-frame)}
|
||||
.ssw-scope .ssw-seat:hover{border-color:var(--ssw-blue)}
|
||||
.ssw-scope .ssw-seat[aria-pressed=true]{border-color:var(--ssw-blue);background:var(--ssw-wash);box-shadow:0 0 0 2px rgba(59,130,246,.12)}
|
||||
body[data-ds-dark-theme] .ssw-scope .ssw-seat[aria-pressed=true]{box-shadow:0 0 0 2px rgba(110,168,255,.18)}
|
||||
`
|
||||
.ssw-group-label::after{content:"";height:1px;background:var(--ssw-line);flex:1}
|
||||
.ssw-role-top{width:100%}
|
||||
.ssw-tab-count{padding:1px 5px;border-radius:5px;background:var(--ssw-rail)}
|
||||
.ssw-current-name{font-size:15px;letter-spacing:1px}
|
||||
.ssw-current-label{padding:3px 7px;border-radius:5px;background:var(--ssw-side)}
|
||||
.ssw-config-toggle:hover{background:var(--ssw-side)}
|
||||
/* 按工作台本身的宽度适配:宽屏居中,右侧窄栏保持紧凑。 */
|
||||
.ssw-root > :is(.ssw-project,.ssw-tree,.ssw-report,.ssw-page){width:100%;max-width:720px;align-self:center;flex-shrink:0}
|
||||
.ssw-root > :is(.ssw-tabs,.ssw-current,.ssw-config,.ssw-enable,.ssw-notice,.ssw-error){width:calc(100% - 40px);max-width:680px;margin-left:auto;margin-right:auto;flex-shrink:0}
|
||||
.ssw-enable{margin-top:12px}
|
||||
@container(max-width:380px){.ssw-root > :is(.ssw-tabs,.ssw-current,.ssw-config,.ssw-enable,.ssw-notice,.ssw-error){width:calc(100% - 24px);margin-left:auto;margin-right:auto}
|
||||
.ssw-project{padding:16px 12px 0}.ssw-tabs{margin:0 12px}.ssw-tree{padding:20px 12px 4px}.ssw-current{margin:12px 12px 0}.ssw-config{margin:10px 12px 16px}.ssw-report{padding:0 12px}.ssw-trio,.ssw-six{gap:6px}.ssw-seat,.ssw-six .ssw-seat{padding:10px 8px}.ssw-role-duty{font-size:10px}}
|
||||
`
|
||||
|
|
|
|||
Loading…
Reference in New Issue