Browse Source

fix(web): 统一团队账号编辑对话框的操作按钮样式

sy 1 day ago
parent
commit
7f94f896ba

+ 3 - 3
web-scaffold/src/components/OrganizationAccountInline.tsx

@@ -149,7 +149,7 @@ export function OrganizationAccountInline({ account, provision, mobile, note }:
           {!activated && (
             <div className="org-account-inline-action">
               <span>激活码仅在未激活时可重置,明文只返回一次。</span>
-              <button className="org-button org-button-quiet" disabled={!userId || busy} onClick={() => void resetCode()} title={userId ? undefined : "后端未下发 user_id,无法调用重置接口"} type="button">{busy ? "处理中…" : "重置激活码"}</button>
+              <button className="org-button org-button-scope" disabled={!userId || busy} onClick={() => void resetCode()} title={userId ? undefined : "后端未下发 user_id,无法调用重置接口"} type="button">{busy ? "处理中…" : "重置激活码"}</button>
             </div>
           )}
           {activation && <div className="org-account-secret"><span>本次激活码</span><strong>{activation.code ?? FIELD_UNAVAILABLE}</strong><span>有效期至</span><strong>{activation.expire ?? FIELD_UNAVAILABLE}</strong><small>仅本次返回,关闭后不可再查。</small></div>}
@@ -175,11 +175,11 @@ export function OrganizationAccountInline({ account, provision, mobile, note }:
             <div className="org-account-inline-action is-stacked">
               <div className="org-account-inline-row">
                 <span>{stopped ? "重新启用后即可恢复登录。" : "停用后无法登录,可在本处重新启用。"}</span>
-                <button className={stopped ? "org-button org-button-quiet" : "org-button org-button-danger"} disabled={!userId || busy} onClick={() => stopped ? void toggleAccount() : setConfirmStop(true)} title={userId ? undefined : "后端未下发 user_id,无法调用启停接口"} type="button">{stopped ? "重新启用" : "停用账号"}</button>
+                <button className={stopped ? "org-button org-button-scope" : "org-button org-button-danger-soft"} disabled={!userId || busy} onClick={() => stopped ? void toggleAccount() : setConfirmStop(true)} title={userId ? undefined : "后端未下发 user_id,无法调用启停接口"} type="button">{stopped ? "重新启用" : "停用账号"}</button>
               </div>
               <div className="org-account-inline-row">
                 <span>解绑=撤销登录绑定(`account/unbind`),与停用不同。</span>
-                <button className="org-button org-button-danger" disabled={!userId || busy} onClick={() => setConfirmUnbind(true)} title={userId ? undefined : "后端未下发 user_id,无法调用解绑接口"} type="button">解绑账号</button>
+                <button className="org-button org-button-danger-soft" disabled={!userId || busy} onClick={() => setConfirmUnbind(true)} title={userId ? undefined : "后端未下发 user_id,无法调用解绑接口"} type="button">解绑账号</button>
               </div>
             </div>
           )}

+ 9 - 2
web-scaffold/src/styles/organization.css

@@ -484,8 +484,15 @@
 .org-account-setting-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 13px; padding: 11px 0; }
 .org-account-setting-row + .org-account-setting-row { border-top: 1px solid var(--border-subtle); }
 .org-account-setting-row strong { color: var(--foreground); font-size: var(--type-body); font-weight: 600; }
-.org-account-settings .org-button { min-height: 34px; padding: 5px 11px; font-size: var(--type-support); font-weight: 600; }
-.org-account-settings .org-button:disabled { opacity: .5; cursor: not-allowed; }
+.org-account-settings .org-button,
+.org-account-inline :is(.org-account-inline-action, .org-account-inline-row) > :is(.org-button-scope, .org-button-danger-soft) {
+  min-height: 34px;
+  padding: 5px 11px;
+  font-size: var(--type-support);
+  font-weight: 600;
+}
+.org-account-settings .org-button:disabled,
+.org-account-inline :is(.org-button-scope, .org-button-danger-soft):disabled { opacity: .5; cursor: not-allowed; }
 .org-account-activation > .org-access-feedback, .org-account-setting-row > .org-access-feedback { grid-column: 1 / -1; }
 .org-account-access > :is(.org-access-confirm, .org-access-feedback) { margin-block: 0 11px; }
 .org-account-access > .org-access-confirm { border-color: var(--border); background: var(--surface-subtle); }