mirror of
https://github.com/photoprism/photoprism.git
synced 2026-07-18 00:59:38 +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> |
||
|---|---|---|
| .. | ||
| testdata | ||
| acl.go | ||
| acl_test.go | ||
| album.go | ||
| customize.go | ||
| defaults.go | ||
| download.go | ||
| feature.go | ||
| features_default.go | ||
| features_default_test.go | ||
| import.go | ||
| import_test.go | ||
| index.go | ||
| maps.go | ||
| README.md | ||
| scope.go | ||
| scope_test.go | ||
| search.go | ||
| settings.go | ||
| settings_test.go | ||
| share.go | ||
| stack.go | ||
| template.go | ||
| ui.go | ||
PhotoPrism — Customize Package
Last Updated: June 9, 2026
Overview
The customize package defines user-facing configuration defaults for PhotoPrism’s Web UI, search, maps, imports, indexing, and feature flags. The settings are assembled by NewDefaultSettings() / NewSettings() and serialized through YAML so they can be stored or loaded at runtime.
Feature Defaults
- Feature flags live in
FeatureSettingsand are initialized via the newDefaultFeaturesvariable. NewFeatures()returns a copy ofDefaultFeatures, letting callers mutate per-request or per-user state without modifying the shared defaults.
Environment Overrides
- Set
PHOTOPRISM_DISABLE_FEATURESto disable specific features at startup. - The value may be comma- or space-separated (case-insensitive); hyphens/underscores are ignored.
- Tokens are inflected so singular/plural variants match (for example,
albums,album, orAlbumall disable the Albums flag).
Per-Role & Per-Scope Gating
Settings.ApplyACL(rules, role)andSettings.ApplyScope(scope)return a per-session copy of the feature flags, switching off features the session may not use. A flag is enabled only when both the global default and the relevant permission/scope allow it.- The
AccountandAppPasswordsflags require permission (and scope) to update the password (ResourcePassword/ActionUpdate), so a share-token visitor without an account does not see the account or app-password affordances. - This per-session gating shapes only the client config the Web UI reads; server-side enforcement of disabled app passwords uses the global
AppPasswordsflag viaConfig.DisableAppPasswords().
Settings Lifecycle
NewDefaultSettings()seeds UI, search, maps, imports, indexing, templates, downloads, and features from the defaults in this package.Settings.Load()/Save()round-trip YAML configuration files.Settings.Propagate()ensures required defaults (language, timezone, start page, map style) remain populated after loading.
Testing
- Unit tests cover feature default copying, environment-based disabling, scope application, and ACL interactions.
- Run
go test ./internal/config/customize/...or the lints viagolangci-lint run ./internal/config/customize/....