photoprism/internal/config/customize
Ömer Duran 6dc0acac13
Settings: Reorganize UI and add an Accessibility section #848 #799 #5429
* 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>
2026-07-08 14:11:36 +02:00
..
testdata Settings: Reorganize UI and add an Accessibility section #848 #799 #5429 2026-07-08 14:11:36 +02:00
acl.go Metadata: Add Camera Make and Model updates via CLI & API #5663 #5656 2026-06-15 09:25:44 +00:00
acl_test.go Metadata: Add Camera Make and Model updates via CLI & API #5663 #5656 2026-06-15 09:25:44 +00:00
album.go Config: Change the order of options in settings.yml 2025-04-12 17:53:46 +02:00
customize.go Links: Use canonical trailing-slash form for website URLs 2026-06-24 17:20:30 +02:00
defaults.go Config: Apply "golangci-lint" recommendation to customize package #5330 2025-11-21 14:16:03 +01:00
download.go Config: Apply "golangci-lint" recommendation to customize package #5330 2025-11-21 14:16:03 +01:00
feature.go Metadata: Add Camera Make and Model updates via CLI & API #5663 #5656 2026-06-15 09:25:44 +00:00
features_default.go Settings: Use PHOTOPRISM_DISABLE_FEATURES to initialize default features 2025-11-21 15:19:15 +01:00
features_default_test.go Metadata: Add Camera Make and Model updates via CLI & API #5663 #5656 2026-06-15 09:25:44 +00:00
import.go Import: Fix data race in import destination settings #5607 #5652 2026-06-15 09:58:52 +00:00
import_test.go Import: Fix data race in import destination settings #5607 #5652 2026-06-15 09:58:52 +00:00
index.go Backend: Move customize, pwa, ttl, query, classify and nsfw packages 2024-07-02 07:36:52 +02:00
maps.go Backend: Move customize, pwa, ttl, query, classify and nsfw packages 2024-07-02 07:36:52 +02:00
README.md Auth: Gate app passwords behind a settings feature flag #5647 2026-06-09 17:36:24 +00:00
scope.go Metadata: Add Camera Make and Model updates via CLI & API #5663 #5656 2026-06-15 09:25:44 +00:00
scope_test.go Metadata: Add Camera Make and Model updates via CLI & API #5663 #5656 2026-06-15 09:25:44 +00:00
search.go UX: Make information shown on cards view configurable #1164 2025-03-14 16:01:05 +01:00
settings.go Settings: Reorganize UI and add an Accessibility section #848 #799 #5429 2026-07-08 14:11:36 +02:00
settings_test.go Settings: Reorganize UI and add an Accessibility section #848 #799 #5429 2026-07-08 14:11:36 +02:00
share.go Backend: Move customize, pwa, ttl, query, classify and nsfw packages 2024-07-02 07:36:52 +02:00
stack.go Backend: Move customize, pwa, ttl, query, classify and nsfw packages 2024-07-02 07:36:52 +02:00
template.go Backend: Move customize, pwa, ttl, query, classify and nsfw packages 2024-07-02 07:36:52 +02:00
ui.go Settings: Reorganize UI and add an Accessibility section #848 #799 #5429 2026-07-08 14:11:36 +02:00

PhotoPrism — Customize Package

Last Updated: June 9, 2026

Overview

The customize package defines user-facing configuration defaults for PhotoPrisms 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 FeatureSettings and are initialized via the new DefaultFeatures variable.
  • NewFeatures() returns a copy of DefaultFeatures, letting callers mutate per-request or per-user state without modifying the shared defaults.

Environment Overrides

  • Set PHOTOPRISM_DISABLE_FEATURES to 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, or Album all disable the Albums flag).

Per-Role & Per-Scope Gating

  • Settings.ApplyACL(rules, role) and Settings.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 Account and AppPasswords flags 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 AppPasswords flag via Config.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 via golangci-lint run ./internal/config/customize/....