mirror of
https://github.com/photoprism/photoprism.git
synced 2026-07-17 16:49:04 +00:00
* Frontend: Add settings for albums, favorites, folders, and media features * Frontend: Enhance download settings for files and albums #848 * Frontend: Enhance download settings for files and albums #848 * Frontend: Update album download settings to restrict access to super admins * Frontend: Add album sorting options to settings for super admins * Frontend: Update download settings visibility * Frontend: Refine download settings access control for user roles * Tests: Add album, folder, moment, state, and month order selection options to page-model * Frontend: Update access control for super admins in settings to include scope check * Tests: Add new tests for download name and album order settings persistence * Tests: Implement new tests for default album sort order persistence in settings * Frontend: Move default album order settings * Frontend: Add zoom accessibility option in settings #799 * Frontend: Update download name from "Share Identifier" to "Share Friendly" and refine hints for download options in settings * Tests: Add new acceptance test for disabling album downloads while allowing file downloads in settings * Frontend: Improve download options layout and hints * Frontend: Refactor download options condition in settings page * Frontend: Implement native zoom control in lightbox component * Settings: Add Collections tab and move Services to its own page #848 #5429 - Add a super-admin Collections tab after Content holding the album Download and Sort Order settings; remove those cards from Content. - Move Services from a settings tab to a dedicated page (page/services.vue) with a search toolbar and a Reload / Learn More action menu; link it from the navigation settings menu. - Implement server-side services search (acc_name filter) with tests. - De-duplicate the picture sort-order options into a shared SortOrderOptions builder in options.js. - Update acceptance/unit tests and page models to match. * Frontend: Regenerate translation catalogs #848 #5429 Ran `make gettext-extract` to pick up the new settings strings (Collections, Features, Disable Downloads, and related messages) so Weblate can translate them. Existing translations are preserved. * Frontend: Move lightbox viewport-zoom handling into the view helper - Move the viewport pinch-zoom lock/restore (disableNativeZoom / restoreNativeZoom + savedViewportContent) from lightbox.vue onto the View singleton in common/view.js. - Drive it passively from View.apply() via a disableViewportZoom flag in the PLightbox case, alongside hideScrollbar / disableScrolling / disableNavigationGestures; lightbox.vue no longer references zoom. - Make save/restore idempotent and extract the viewport constants. - Cover the helpers and the apply() wiring in view.test.js. * Settings: Add Accessibility section to General with Reduce Motion #848 #5429 - Move the page-zoom checkbox out of the feature-flags grid into a dedicated Accessibility card (super-admin only) with four toggles: Open on Hover, Reduce Motion, Hide Scrollbar, and Allow Page Zoom. - Add a UI.ReduceMotion flag (defaults false) that toggles an html.reduce-motion class via config.setReduceMotion and suppresses map fly-to animations non-destructively (util.mapAnimateDuration). - Make Open on Hover apply live by reading shouldOpenOnHover() through a reactive computed in the action/auth/lightbox menus; Zoom and Hide Scrollbar reload since they are baked into the server-rendered HTML. - Reword two feature-grid hints to the "pictures" convention and cover the new helpers with Go and Vitest tests. * Frontend: Regenerate translation catalogs #848 #5429 Ran `make gettext-extract` to pick up the new Accessibility settings strings (Accessibility, Allow Page Zoom, Open on Hover, Hide Scrollbar, Reduce Motion, and their hints) and the reworded feature-grid hints. Existing translations are preserved. --------- Co-authored-by: Michael Mayer <michael@photoprism.app>
95 lines
2.3 KiB
Vue
95 lines
2.3 KiB
Vue
<template>
|
|
<div v-if="activator" class="p-lightbox-menu">
|
|
<v-menu
|
|
:model-value="visible"
|
|
:open-on-hover="openOnHover"
|
|
:activator="activator"
|
|
:attach="attach"
|
|
class="p-action-menu action-menu action-menu--lightbox"
|
|
@update:model-value="onMenu"
|
|
>
|
|
<v-list slim nav density="compact" class="action-menu__list">
|
|
<v-list-item
|
|
v-for="action in actions"
|
|
:key="action.name"
|
|
:value="action.name"
|
|
:prepend-icon="action.icon"
|
|
:title="action.text"
|
|
:class="action.class ? action.class : 'action-' + action.name"
|
|
:to="action.to ? action.to : undefined"
|
|
:href="action.href ? action.href : undefined"
|
|
:link="true"
|
|
:target="action.target ? '_blank' : '_self'"
|
|
:disabled="action.disabled"
|
|
:nav="true"
|
|
class="action-menu__item"
|
|
@click="action.click"
|
|
>
|
|
<template v-if="action.shortcut && !$isMobile" #append>
|
|
<div class="action-menu__shortcut">{{ action.shortcut }}</div>
|
|
</template>
|
|
</v-list-item>
|
|
</v-list>
|
|
</v-menu>
|
|
</div>
|
|
</template>
|
|
<script>
|
|
export default {
|
|
name: "PLightboxMenu",
|
|
props: {
|
|
items: {
|
|
type: Function,
|
|
default: () => [],
|
|
},
|
|
activator: {
|
|
type: HTMLElement,
|
|
default: null,
|
|
},
|
|
attach: {
|
|
type: String,
|
|
default: ".v-dialog--lightbox.v-overlay--active",
|
|
},
|
|
},
|
|
emits: ["show", "hide"],
|
|
expose: ["show", "hide", "toggle"],
|
|
data() {
|
|
return {
|
|
visible: false,
|
|
actions: [],
|
|
};
|
|
},
|
|
computed: {
|
|
// openOnHover reactively reflects the user's menu open-on-hover preference so a settings
|
|
// change applies without a page reload (persistent menus keep no mount-time snapshot).
|
|
openOnHover() {
|
|
return this.$util.shouldOpenOnHover();
|
|
},
|
|
},
|
|
methods: {
|
|
show() {
|
|
this.actions = this.items().filter((action) => action.visible);
|
|
this.visible = true;
|
|
this.$emit("show");
|
|
},
|
|
hide() {
|
|
this.actions = [];
|
|
this.visible = false;
|
|
this.$emit("hide");
|
|
},
|
|
toggle() {
|
|
if (this.visible) {
|
|
this.hide();
|
|
} else {
|
|
this.show();
|
|
}
|
|
},
|
|
onMenu(show) {
|
|
if (show) {
|
|
this.show();
|
|
} else {
|
|
this.hide();
|
|
}
|
|
},
|
|
},
|
|
};
|
|
</script>
|