fix SCUM player online freshness display
This commit is contained in:
@@ -174,7 +174,8 @@ describe("ServerDetailPage config write approval", () => {
|
||||
expect(serverDetailPageSource).toContain("serverDetailSectionEntries(readyPlugin)");
|
||||
expect(serverDetailPageSource).toContain("plugin:${page.key}");
|
||||
expect(serverDetailPageSource).toContain("ServerDetailSectionNav");
|
||||
expect(serverDetailPageSource).toContain('aria-label="游戏运营功能"');
|
||||
expect(serverDetailPageSource).toContain('aria-label="插件功能"');
|
||||
expect(serverDetailPageSource).not.toContain(">游戏运营</span>");
|
||||
expect(serverDetailPageSource).toContain("server-plugin-section-tabs");
|
||||
expect(serverDetailPageSource).not.toContain("server-plugin-section-picker");
|
||||
expect(serverDetailPageSource).toContain('section === "files"');
|
||||
|
||||
@@ -271,8 +271,7 @@ function ServerDetailSectionNav({ entries, section, onChange }: { entries: Array
|
||||
return (
|
||||
<nav className="section-tabs" aria-label="server sections">
|
||||
{pluginEntries.length > 0 && (
|
||||
<div className="server-plugin-section-tabs" aria-label="游戏运营功能">
|
||||
<span className="server-plugin-section-label">游戏运营</span>
|
||||
<div className="server-plugin-section-tabs" aria-label="插件功能">
|
||||
{pluginEntries.map((entry) => (
|
||||
<button key={entry.id} type="button" className={cx("section-tab", section === entry.id && "section-tab-active")} aria-current={section === entry.id ? "page" : undefined} onClick={() => onChange(entry.id)}>
|
||||
{entry.label}
|
||||
|
||||
@@ -496,7 +496,7 @@ to{transform:translate(-50%,-50%) rotate(calc(var(--construct-drift) + 360deg))}
|
||||
.server-detail-title-row>div:first-child{min-width:0}
|
||||
.server-detail-title-row h1{margin:0;font-size:24px;color:var(--ink);overflow-wrap:anywhere}
|
||||
.section-tabs{display:flex;gap:6px;flex-wrap:wrap;padding:8px;border:1px solid var(--line);border-radius:8px;background:var(--frosted-surface),color-mix(in srgb,var(--surface) 72%,transparent);box-shadow:inset 0 1px 0 var(--crystal-rim)}
|
||||
.server-plugin-section-tabs{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.server-plugin-section-label{display:inline-flex;align-items:center;min-height:38px;padding:0 8px;color:var(--ink-faint);font-size:12px;font-weight:850;white-space:nowrap}
|
||||
.server-plugin-section-tabs{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
|
||||
.section-tab{display:inline-flex;align-items:center;gap:6px;min-height:38px;padding:0 14px;border:1px solid var(--line-strong);border-radius:999px;background:var(--control-surface);color:var(--ink-soft);cursor:pointer;white-space:nowrap}
|
||||
.section-tab:focus-visible,.section-tab:hover{border-color:var(--accent);outline:0}
|
||||
.section-tab-active{background:var(--primary-command-surface);border-color:var(--accent-deep);color:#fff;font-weight:700;box-shadow:0 10px 24px var(--candy-glow),inset 0 1px 0 var(--crystal-rim),0 0 18px var(--moonbeam)}
|
||||
@@ -841,3 +841,5 @@ button.operations-inline-warning{cursor:pointer}
|
||||
}
|
||||
@media (prefers-reduced-motion:reduce){.console-row-button,.operations-job-row,.operations-tray-trigger{transition:none}
|
||||
}
|
||||
.scum-online-summary{display:inline-flex;align-items:center;min-height:30px;margin-left:auto;padding:0 10px;border:1px solid color-mix(in srgb,var(--accent) 42%,var(--line));border-radius:6px;background:color-mix(in srgb,var(--accent-soft) 46%,transparent);color:var(--ink-soft);font-size:12px;font-weight:760;white-space:nowrap}.scum-online-summary strong{color:var(--accent-deep);font-family:var(--font-mono);font-size:13px}
|
||||
@media (max-width:760px){.scum-online-summary{margin-left:0}}
|
||||
|
||||
Reference in New Issue
Block a user