Add Scan Settings to the user menu Library group

Scan Settings was reachable only through the settings sidebar. Add it
to the user dropdown's Library group, mirroring the sidebar's order,
icon, and platforms.write gate.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Georges-Antoine Assi
2026-07-23 18:45:10 -04:00
parent a144d117e8
commit ee2d9ae7b6

View File

@@ -4,7 +4,8 @@
// architecture so the user has the same mental model in both places:
//
// • Account — Profile, User interface
// • Library — Library management, Metadata sources, Client API tokens
// • Library — Library management, Scan settings, Metadata sources,
// Client API tokens
// • System — Administration, Server stats
// • Tools — Controller debug
// • Actions — Scan, Upload (librarian actions, not settings)
@@ -74,6 +75,9 @@ const canUpload = computed(() => scopes.value.includes("roms.write"));
const canSeeLibraryMgmt = computed(() =>
scopes.value.includes("platforms.write"),
);
const canSeeScanSettings = computed(() =>
scopes.value.includes("platforms.write"),
);
const canSeeApiTokens = computed(() => scopes.value.includes("me.write"));
const canSeeAdmin = computed(() => scopes.value.includes("users.write"));
@@ -206,6 +210,13 @@ async function onLogout() {
:label="t('common.library-management')"
@click="open = false"
/>
<RMenuItem
v-if="canSeeScanSettings"
:to="{ name: ROUTES.SCAN_SETTINGS }"
icon="mdi-magnify-scan"
:label="t('settings.scan-settings')"
@click="open = false"
/>
<RMenuItem
v-if="isAdmin"
:to="{ name: ROUTES.METADATA_SOURCES }"