diff --git a/frontend/src/components/Gallery/GalleryToolbar.test.ts b/frontend/src/components/Gallery/GalleryToolbar.test.ts
index fbc55c539..10389caab 100644
--- a/frontend/src/components/Gallery/GalleryToolbar.test.ts
+++ b/frontend/src/components/Gallery/GalleryToolbar.test.ts
@@ -227,3 +227,47 @@ describe("GalleryToolbar sort axis", () => {
wrapper.unmount();
});
});
+
+describe("GalleryToolbar group-by control", () => {
+ const MANY_MODES = [
+ { id: "none", icon: "mdi-view-agenda-outline", title: "Flat view" },
+ {
+ id: "letter",
+ icon: "mdi-alphabetical-variant",
+ title: "Group by letter",
+ },
+ { id: "family", icon: "mdi-family-tree", title: "Group by family" },
+ ];
+
+ it("keeps the segmented slider for the default two modes", () => {
+ const wrapper = mountToolbar({}, RMenuPassthrough);
+
+ expect(
+ wrapper
+ .findAllComponents({ name: "RSegmentedControl" })
+ .some((c) => c.props("items")?.length === 2),
+ ).toBe(true);
+ wrapper.unmount();
+ });
+
+ it("lists more than two modes in a labelled menu with the active one checked", () => {
+ const wrapper = mountToolbar(
+ { groupBy: "family", groupByItems: MANY_MODES },
+ RMenuPassthrough,
+ );
+
+ expect(
+ wrapper
+ .findAllComponents({ name: "RSegmentedControl" })
+ .some((c) => c.props("items") === MANY_MODES),
+ ).toBe(false);
+ const family = wrapper
+ .findAllComponents({ name: "RMenuItem" })
+ .filter((item) => item.props("label") === "Group by family");
+ expect(family.length).toBeGreaterThan(0);
+ expect(family.some((item) => item.props("variant") === "active")).toBe(
+ true,
+ );
+ wrapper.unmount();
+ });
+});
diff --git a/frontend/src/components/Gallery/GalleryToolbar.vue b/frontend/src/components/Gallery/GalleryToolbar.vue
index f974c7c47..825497a24 100644
--- a/frontend/src/components/Gallery/GalleryToolbar.vue
+++ b/frontend/src/components/Gallery/GalleryToolbar.vue
@@ -228,6 +228,14 @@ const autofocusSearchField = computed(
shouldAutofocusSearch(),
);
+// Two modes fit a segmented slider; more read better as a labelled menu.
+const groupByAsMenu = computed(() => effectiveGroupByItems.value.length > 2);
+const activeGroupByIcon = computed(
+ () =>
+ effectiveGroupByItems.value.find((i) => i.id === groupByValue.value)
+ ?.icon ?? "mdi-format-list-group",
+);
+
function setGroupBy(value: GroupByMode) {
emit("update:groupBy", value);
}
@@ -335,13 +343,37 @@ const { smAndUp } = useBreakpoint();
+
+
+
+
+
+
diff --git a/frontend/src/components/GameDetails/MetadataTab.test.ts b/frontend/src/components/GameDetails/MetadataTab.test.ts
index 691f13a90..ddd695eef 100644
--- a/frontend/src/components/GameDetails/MetadataTab.test.ts
+++ b/frontend/src/components/GameDetails/MetadataTab.test.ts
@@ -78,3 +78,30 @@ describe("MetadataTab verification chips", () => {
expect(raChipTone(linkedOnly)).toBe("neutral");
});
});
+
+describe("MetadataTab Switch title id", () => {
+ function text(r: DetailedRom) {
+ return shallowMount(MetadataTab, { props: { rom: r } }).text();
+ }
+
+ it("explains a missing title id on a Switch game", () => {
+ expect(text(rom({ platform_slug: "switch", title_id: null }))).toContain(
+ "rom.title-id-missing-switch",
+ );
+ });
+
+ it("shows no explanation once the title id is known", () => {
+ const body = text(
+ rom({ platform_slug: "switch", title_id: "0100ABCD12340000" }),
+ );
+
+ expect(body).toContain("0100ABCD12340000");
+ expect(body).not.toContain("rom.title-id-missing-switch");
+ });
+
+ it("leaves other platforms without a title id row", () => {
+ expect(text(rom({ platform_slug: "psx", title_id: null }))).not.toContain(
+ "rom.title-id",
+ );
+ });
+});
diff --git a/frontend/src/components/GameDetails/MetadataTab.vue b/frontend/src/components/GameDetails/MetadataTab.vue
index 66d176340..0742cb825 100644
--- a/frontend/src/components/GameDetails/MetadataTab.vue
+++ b/frontend/src/components/GameDetails/MetadataTab.vue
@@ -13,7 +13,7 @@ import ProviderGrid from "@/components/GameDetails/ProviderGrid.vue";
import HashChip from "@/components/shared/HashChip.vue";
import { RTag } from "@/lib";
import type { DetailedRom } from "@/stores/roms";
-import { formatBytes } from "@/utils";
+import { formatBytes, isSwitchSystem } from "@/utils";
import { VERIFICATION_DATABASES } from "@/utils/romVerification";
defineOptions({ inheritAttrs: false });
@@ -22,7 +22,7 @@ const props = defineProps<{ rom: DetailedRom }>();
const { t } = useI18n();
-type Row = { label: string; value: string };
+type Row = { label: string; value: string; hint?: string };
const fileRows = computed(() => {
const r = props.rom;
@@ -31,7 +31,16 @@ const fileRows = computed(() => {
{ label: t("rom.filename"), value: r.fs_name },
{ label: t("common.size"), value: size },
];
- if (r.title_id) rows.push({ label: t("rom.title-id"), value: r.title_id });
+ if (r.title_id) {
+ rows.push({ label: t("rom.title-id"), value: r.title_id });
+ } else if (isSwitchSystem(r.platform_slug)) {
+ // Most retail Switch dumps are encrypted, and RomM never reads the keys.
+ rows.push({
+ label: t("rom.title-id"),
+ value: "—",
+ hint: t("rom.title-id-missing-switch"),
+ });
+ }
if (r.save_target)
rows.push({ label: t("rom.save-target"), value: r.save_target });
return rows;
@@ -103,6 +112,7 @@ const downloadUrls = computed(() => {
@@ -197,6 +207,11 @@ const downloadUrls = computed(() => {
word-break: break-all;
}
+.metadata-tab__hint {
+ font-size: 12px;
+ color: var(--r-color-fg-muted);
+}
+
/* Hashes & Verification: inline row, wraps when narrow. */
.metadata-tab__inline {
display: flex;
diff --git a/frontend/src/components/Platforms/PlatformFilterDrawer.vue b/frontend/src/components/Platforms/PlatformFilterDrawer.vue
new file mode 100644
index 000000000..85680bb3f
--- /dev/null
+++ b/frontend/src/components/Platforms/PlatformFilterDrawer.vue
@@ -0,0 +1,122 @@
+
+
+