fix SCUM player online freshness display

This commit is contained in:
npc0-hue
2026-08-27 10:12:23 +08:00
parent 9022cf0bea
commit 2937ece1bc
5 changed files with 21 additions and 8 deletions
+2 -1
View File
@@ -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"');
+1 -2
View File
@@ -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}