Frontend: Add settings for albums, favorites, folders, and media features

This commit is contained in:
Ömer Duran 2026-01-22 05:21:42 +01:00
parent 26b5cbafcd
commit 98a6a452ae
No known key found for this signature in database
GPG key ID: 2550B0D579890013
3 changed files with 99 additions and 0 deletions

View file

@ -72,6 +72,66 @@
<v-card v-if="!isPortal && !hasScope && (isDemo || isSuperAdmin)" flat tile class="mt-0 px-1 bg-background">
<v-card-actions>
<v-row align="start" dense>
<v-col cols="12" sm="6" lg="3" class="px-2 pb-2 pt-2">
<v-checkbox
v-model="settings.features.albums"
:disabled="busy"
class="ma-0 pa-0 input-albums"
density="compact"
:label="$gettext('Albums')"
:hint="$gettext('Show the Albums section to create and manage photo albums.')"
prepend-icon="mdi-bookmark"
persistent-hint
@update:model-value="onChange"
>
</v-checkbox>
</v-col>
<v-col cols="12" sm="6" lg="3" class="px-2 pb-2 pt-2">
<v-checkbox
v-model="settings.features.favorites"
:disabled="busy"
class="ma-0 pa-0 input-favorites"
density="compact"
:label="$gettext('Favorites')"
:hint="$gettext('Show the Favorites section to quickly access your starred photos.')"
prepend-icon="mdi-star"
persistent-hint
@update:model-value="onChange"
>
</v-checkbox>
</v-col>
<v-col cols="12" sm="6" lg="3" class="px-2 pb-2 pt-2">
<v-checkbox
v-model="settings.features.folders"
:disabled="busy"
class="ma-0 pa-0 input-folders"
density="compact"
:label="$gettext('Folders')"
:hint="$gettext('Show the Folders section to browse pictures by directory structure.')"
prepend-icon="mdi-folder"
persistent-hint
@update:model-value="onChange"
>
</v-checkbox>
</v-col>
<v-col cols="12" sm="6" lg="3" class="px-2 pb-2 pt-2">
<v-checkbox
v-model="settings.features.videos"
:disabled="busy"
class="ma-0 pa-0 input-videos"
density="compact"
:label="$gettext('Media')"
:hint="$gettext('Show the Media section to browse videos, live photos, and animations.')"
prepend-icon="mdi-play-circle"
persistent-hint
@update:model-value="onChange"
>
</v-checkbox>
</v-col>
<v-col v-if="!config.disable.faces" cols="12" sm="6" lg="3" class="px-2 pb-2 pt-2">
<v-checkbox
v-model="settings.features.people"

View file

@ -652,3 +652,38 @@ test.meta("testID", "settings-general-007").meta({ type: "short", mode: "auth" }
await t.expect(getPageUrl()).contains("browse");
}
);
test.meta("testID", "settings-general-008").meta({ type: "short", mode: "auth" })(
"Common: Disable albums, favorites, folders, and media",
async (t) => {
await menu.checkMenuItemAvailability("albums", true);
await menu.checkMenuItemAvailability("favorites", true);
await menu.checkMenuItemAvailability("folders", true);
await menu.checkMenuItemAvailability("media", true);
await menu.openPage("settings");
await t
.click(settings.albumsCheckbox)
.click(settings.favoritesCheckbox)
.click(settings.foldersCheckbox)
.click(settings.videosCheckbox);
await t.eval(() => location.reload());
await menu.checkMenuItemAvailability("albums", false);
await menu.checkMenuItemAvailability("favorites", false);
await menu.checkMenuItemAvailability("folders", false);
await menu.checkMenuItemAvailability("media", false);
await menu.openPage("settings");
await t
.click(settings.albumsCheckbox)
.click(settings.favoritesCheckbox)
.click(settings.foldersCheckbox)
.click(settings.videosCheckbox);
await menu.checkMenuItemAvailability("albums", true);
await menu.checkMenuItemAvailability("favorites", true);
await menu.checkMenuItemAvailability("folders", true);
await menu.checkMenuItemAvailability("media", true);
}
);

View file

@ -25,6 +25,10 @@ export default class Page {
this.peopleCheckbox = Selector(".input-people div.v-selection-control__input");
this.deleteCheckbox = Selector(".input-delete div.v-selection-control__input");
this.libraryCheckbox = Selector(".input-library div.v-selection-control__input");
this.albumsCheckbox = Selector(".input-albums div.v-selection-control__input");
this.favoritesCheckbox = Selector(".input-favorites div.v-selection-control__input");
this.foldersCheckbox = Selector(".input-folders div.v-selection-control__input");
this.videosCheckbox = Selector(".input-videos div.v-selection-control__input");
this.libraryTab = Selector("#tab-settings_content");
this.reviewCheckbox = Selector(".input-review div.v-selection-control__input");