Restore visible game operation tabs
This commit is contained in:
@@ -175,7 +175,8 @@ describe("ServerDetailPage config write approval", () => {
|
|||||||
expect(serverDetailPageSource).toContain("plugin:${page.key}");
|
expect(serverDetailPageSource).toContain("plugin:${page.key}");
|
||||||
expect(serverDetailPageSource).toContain("ServerDetailSectionNav");
|
expect(serverDetailPageSource).toContain("ServerDetailSectionNav");
|
||||||
expect(serverDetailPageSource).toContain('aria-label="游戏运营功能"');
|
expect(serverDetailPageSource).toContain('aria-label="游戏运营功能"');
|
||||||
expect(serverDetailPageSource).toContain("server-plugin-section-picker-active");
|
expect(serverDetailPageSource).toContain("server-plugin-section-tabs");
|
||||||
|
expect(serverDetailPageSource).not.toContain("server-plugin-section-picker");
|
||||||
expect(serverDetailPageSource).toContain('section === "files"');
|
expect(serverDetailPageSource).toContain('section === "files"');
|
||||||
expect(serverDetailPageSource).toContain("PluginPageSection");
|
expect(serverDetailPageSource).toContain("PluginPageSection");
|
||||||
expect(serverDetailPageSource).toContain("PluginPageHostPage");
|
expect(serverDetailPageSource).toContain("PluginPageHostPage");
|
||||||
|
|||||||
@@ -268,17 +268,17 @@ function serverDetailSectionEntries(plugin?: GamePluginResponse): Array<{ id: Se
|
|||||||
function ServerDetailSectionNav({ entries, section, onChange }: { entries: Array<{ id: ServerDetailSection; label: string }>; section: ServerDetailSection; onChange: (section: ServerDetailSection) => void }) {
|
function ServerDetailSectionNav({ entries, section, onChange }: { entries: Array<{ id: ServerDetailSection; label: string }>; section: ServerDetailSection; onChange: (section: ServerDetailSection) => void }) {
|
||||||
const pluginEntries = entries.filter((entry) => entry.id.startsWith("plugin:"));
|
const pluginEntries = entries.filter((entry) => entry.id.startsWith("plugin:"));
|
||||||
const platformEntries = entries.filter((entry) => !entry.id.startsWith("plugin:"));
|
const platformEntries = entries.filter((entry) => !entry.id.startsWith("plugin:"));
|
||||||
const activePluginSection = section.startsWith("plugin:") ? section : "";
|
|
||||||
return (
|
return (
|
||||||
<nav className="section-tabs" aria-label="server sections">
|
<nav className="section-tabs" aria-label="server sections">
|
||||||
{pluginEntries.length > 0 && (
|
{pluginEntries.length > 0 && (
|
||||||
<label className={cx("server-plugin-section-picker", activePluginSection && "server-plugin-section-picker-active")}>
|
<div className="server-plugin-section-tabs" aria-label="游戏运营功能">
|
||||||
<span>游戏运营</span>
|
<span className="server-plugin-section-label">游戏运营</span>
|
||||||
<select aria-label="游戏运营功能" value={activePluginSection} onChange={(event) => event.target.value && onChange(event.target.value as ServerDetailSection)}>
|
{pluginEntries.map((entry) => (
|
||||||
<option value="" disabled>选择功能</option>
|
<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)}>
|
||||||
{pluginEntries.map((entry) => <option key={entry.id} value={entry.id}>{entry.label}</option>)}
|
{entry.label}
|
||||||
</select>
|
</button>
|
||||||
</label>
|
))}
|
||||||
|
</div>
|
||||||
)}
|
)}
|
||||||
{platformEntries.map((entry) => (
|
{platformEntries.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)}>
|
<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)}>
|
||||||
|
|||||||
@@ -444,7 +444,7 @@ to{transform:translate(-50%,-50%) rotate(calc(var(--construct-drift) + 360deg))}
|
|||||||
.scum-editor>summary{display:flex;align-items:center;justify-content:space-between;gap:10px;cursor:pointer;list-style:none}.scum-editor>summary::-webkit-details-marker{display:none}.scum-editor>summary::after{content:"+";color:var(--accent);font-size:18px;font-weight:400}.scum-editor[open]>summary::after{content:"-"}.scum-editor[open]>summary{margin-bottom:12px}.scum-editor .console-row-actions{align-items:flex-end}.scum-editor .console-row-actions>.console-field{flex:1 1 140px;max-width:260px}.scum-player-overview{margin-bottom:12px;padding-bottom:10px;border-bottom:1px solid var(--line)}
|
.scum-editor>summary{display:flex;align-items:center;justify-content:space-between;gap:10px;cursor:pointer;list-style:none}.scum-editor>summary::-webkit-details-marker{display:none}.scum-editor>summary::after{content:"+";color:var(--accent);font-size:18px;font-weight:400}.scum-editor[open]>summary::after{content:"-"}.scum-editor[open]>summary{margin-bottom:12px}.scum-editor .console-row-actions{align-items:flex-end}.scum-editor .console-row-actions>.console-field{flex:1 1 140px;max-width:260px}.scum-player-overview{margin-bottom:12px;padding-bottom:10px;border-bottom:1px solid var(--line)}
|
||||||
.scum-workbench{padding:12px;overflow:visible}.scum-workbench>.console-record-list{gap:8px}.scum-filter-bar{margin:0;padding:0 0 10px;border-bottom:1px solid color-mix(in srgb,var(--line) 68%,transparent)}.scum-filter-bar .console-field{flex:0 1 210px}.scum-filter-bar .console-field:first-child{flex:1 1 320px}.scum-filter-bar .page-status{margin-left:auto}.scum-layer-toggle{display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 9px;border:1px solid var(--line);border-radius:999px;background:var(--control-surface);color:var(--ink-soft);font-size:12px;font-weight:760}.scum-layer-toggle input{accent-color:var(--accent)}.scum-table-wrap{border-color:color-mix(in srgb,var(--line) 72%,transparent);background:linear-gradient(180deg,color-mix(in srgb,var(--surface-solid) 84%,transparent),color-mix(in srgb,var(--surface) 66%,transparent));-webkit-backdrop-filter:blur(8px) saturate(.92);backdrop-filter:blur(8px) saturate(.92);box-shadow:inset 0 1px 0 color-mix(in srgb,var(--crystal-rim) 46%,transparent)}.scum-table-wrap::before,.scum-table-wrap::after{content:none}.scum-user-table{min-width:720px;table-layout:fixed}.scum-user-table caption{caption-side:top;padding:0 0 8px;text-align:left;color:var(--ink-faint);font-size:12px;font-weight:800}.scum-user-table th,.scum-user-table td{padding:9px 14px;border-bottom-color:color-mix(in srgb,var(--line) 64%,transparent)}.scum-user-table th{background:color-mix(in srgb,var(--accent-soft) 52%,transparent);color:color-mix(in srgb,var(--ink) 70%,var(--accent-deep))}.scum-user-table tbody tr:hover{background:color-mix(in srgb,var(--accent-soft) 24%,transparent)}.scum-user-table th:nth-child(1),.scum-user-table td:nth-child(1){width:24%}.scum-user-table th:nth-child(2),.scum-user-table td:nth-child(2){width:22%}.scum-user-table th:nth-child(3),.scum-user-table td:nth-child(3){width:16%}.scum-user-table th:nth-child(4),.scum-user-table td:nth-child(4){width:26%}.scum-user-table th:last-child,.scum-user-table td:last-child{width:120px;text-align:right}.scum-user-table .icon-command{min-height:32px;padding:0 10px}.inline-action-control{position:relative;display:inline-block}.inline-action-control>summary{list-style:none}.inline-action-control>summary::-webkit-details-marker{display:none}.inline-action-control[open]>summary{border-color:var(--accent);color:var(--ink)}.inline-action-control .inline-action-menu{right:0}
|
.scum-workbench{padding:12px;overflow:visible}.scum-workbench>.console-record-list{gap:8px}.scum-filter-bar{margin:0;padding:0 0 10px;border-bottom:1px solid color-mix(in srgb,var(--line) 68%,transparent)}.scum-filter-bar .console-field{flex:0 1 210px}.scum-filter-bar .console-field:first-child{flex:1 1 320px}.scum-filter-bar .page-status{margin-left:auto}.scum-layer-toggle{display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 9px;border:1px solid var(--line);border-radius:999px;background:var(--control-surface);color:var(--ink-soft);font-size:12px;font-weight:760}.scum-layer-toggle input{accent-color:var(--accent)}.scum-table-wrap{border-color:color-mix(in srgb,var(--line) 72%,transparent);background:linear-gradient(180deg,color-mix(in srgb,var(--surface-solid) 84%,transparent),color-mix(in srgb,var(--surface) 66%,transparent));-webkit-backdrop-filter:blur(8px) saturate(.92);backdrop-filter:blur(8px) saturate(.92);box-shadow:inset 0 1px 0 color-mix(in srgb,var(--crystal-rim) 46%,transparent)}.scum-table-wrap::before,.scum-table-wrap::after{content:none}.scum-user-table{min-width:720px;table-layout:fixed}.scum-user-table caption{caption-side:top;padding:0 0 8px;text-align:left;color:var(--ink-faint);font-size:12px;font-weight:800}.scum-user-table th,.scum-user-table td{padding:9px 14px;border-bottom-color:color-mix(in srgb,var(--line) 64%,transparent)}.scum-user-table th{background:color-mix(in srgb,var(--accent-soft) 52%,transparent);color:color-mix(in srgb,var(--ink) 70%,var(--accent-deep))}.scum-user-table tbody tr:hover{background:color-mix(in srgb,var(--accent-soft) 24%,transparent)}.scum-user-table th:nth-child(1),.scum-user-table td:nth-child(1){width:24%}.scum-user-table th:nth-child(2),.scum-user-table td:nth-child(2){width:22%}.scum-user-table th:nth-child(3),.scum-user-table td:nth-child(3){width:16%}.scum-user-table th:nth-child(4),.scum-user-table td:nth-child(4){width:26%}.scum-user-table th:last-child,.scum-user-table td:last-child{width:120px;text-align:right}.scum-user-table .icon-command{min-height:32px;padding:0 10px}.inline-action-control{position:relative;display:inline-block}.inline-action-control>summary{list-style:none}.inline-action-control>summary::-webkit-details-marker{display:none}.inline-action-control[open]>summary{border-color:var(--accent);color:var(--ink)}.inline-action-control .inline-action-menu{right:0}
|
||||||
:root[data-custom-background=true] .scum-workbench,:root[data-custom-background=true] .scum-table-wrap{background:linear-gradient(180deg,rgba(5,10,16,.76),rgba(5,10,16,.64));border-color:color-mix(in srgb,var(--line-strong) 54%,rgba(255,255,255,.18))}:root[data-custom-background=true][data-theme-palette=magical-girl] .scum-workbench,:root[data-custom-background=true][data-theme-palette=magical-girl] .scum-table-wrap{background:linear-gradient(180deg,rgba(18,19,26,.74),rgba(13,15,22,.64));border-color:rgba(250,240,249,.34)}
|
:root[data-custom-background=true] .scum-workbench,:root[data-custom-background=true] .scum-table-wrap{background:linear-gradient(180deg,rgba(5,10,16,.76),rgba(5,10,16,.64));border-color:color-mix(in srgb,var(--line-strong) 54%,rgba(255,255,255,.18))}:root[data-custom-background=true][data-theme-palette=magical-girl] .scum-workbench,:root[data-custom-background=true][data-theme-palette=magical-girl] .scum-table-wrap{background:linear-gradient(180deg,rgba(18,19,26,.74),rgba(13,15,22,.64));border-color:rgba(250,240,249,.34)}
|
||||||
@media (max-width:760px){.server-plugin-section-picker select{max-width:120px}.scum-filter-bar .page-status{margin-left:0}.scum-user-table{min-width:640px}}
|
@media (max-width:760px){.scum-filter-bar .page-status{margin-left:0}.scum-user-table{min-width:640px}}
|
||||||
.provider-form input,.provider-form select,.provider-form textarea{width:100%;min-height:38px;border:1px solid var(--line-strong);border-radius:8px;padding:0 10px;background:var(--surface-solid);color:var(--ink);font:inherit}
|
.provider-form input,.provider-form select,.provider-form textarea{width:100%;min-height:38px;border:1px solid var(--line-strong);border-radius:8px;padding:0 10px;background:var(--surface-solid);color:var(--ink);font:inherit}
|
||||||
.provider-form textarea{min-height:120px;padding:10px;resize:vertical;font-family:var(--font-mono);font-size:13px}
|
.provider-form textarea{min-height:120px;padding:10px;resize:vertical;font-family:var(--font-mono);font-size:13px}
|
||||||
.provider-form input:focus,.provider-form select:focus,.provider-form textarea:focus{border-color:var(--accent);outline:2px solid var(--accent-soft)}
|
.provider-form input:focus,.provider-form select:focus,.provider-form textarea:focus{border-color:var(--accent);outline:2px solid var(--accent-soft)}
|
||||||
@@ -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>div:first-child{min-width:0}
|
||||||
.server-detail-title-row h1{margin:0;font-size:24px;color:var(--ink);overflow-wrap:anywhere}
|
.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)}
|
.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-picker{display:inline-flex;align-items:center;gap:7px;min-height:38px;padding:0 12px;border:1px solid var(--line-strong);border-radius:999px;background:var(--control-surface);color:var(--ink-soft);font-size:12px;font-weight:800;white-space:nowrap}.server-plugin-section-picker>span{color:inherit;opacity:.82}.server-plugin-section-picker select{width:auto;min-width:96px;max-width:146px;height:30px;border:0;border-left:1px solid color-mix(in srgb,var(--line) 72%,transparent);border-radius:0;padding:0 20px 0 8px;background:transparent;color:var(--ink);font:inherit;outline:0}.server-plugin-section-picker select option{background:#061019;color:#eaf7fb}.server-plugin-section-picker-active{border-color:var(--accent-deep);background:var(--primary-command-surface);color:#fff;box-shadow:0 10px 24px var(--candy-glow),inset 0 1px 0 var(--crystal-rim),0 0 18px var(--moonbeam)}.server-plugin-section-picker-active select{color:#fff}.server-plugin-section-picker:focus-within{border-color:var(--accent);box-shadow:0 0 0 2px var(--accent-soft)}
|
.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}
|
||||||
.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{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: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)}
|
.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)}
|
||||||
|
|||||||
Reference in New Issue
Block a user