fix(preview): respect preview_archives_by_default and add bulk enable/disable in preview management - #314
Open
okatu-loli wants to merge 2 commits into
Open
fix(preview): respect preview_archives_by_default and add bulk enable/disable in preview management#314okatu-loli wants to merge 2 commits into
okatu-loli wants to merge 2 commits into
Conversation
β¦enable/disable The per-extension preview management refactor appended Download after every candidate, so turning off preview_archives_by_default only demoted Archive Preview below the other previews and it still opened by default. Download now takes a fixed rank between iframe previews and non-prior built-ins, restoring the previous behaviour while explicit ordering from preview management still wins. Preview management gains bulk actions: disable/enable every preview for all listed extensions (confirmed in a modal, one save request) and disable/enable all previews for the current extension. Extensions that already carry overrides are included in the picker so they stay reachable after a bulk disable.
video_types/audio_types/image_types/text_types are PRIVATE settings and never reach /public/settings, so the preview management page could not match the built-in Video/Audio/Image/Text previewers to any extension and silently omitted them. The page now loads the preview group through the admin settings API and uses those values for type matching, so those rows appear and bulk disable/enable covers them.
β Deploy Preview for alist-web ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Since the per-extension preview management refactor, turning off Preview archives by default no longer works: archives still open in the archive previewer. The renderer appends Download after every candidate, so a non-default preview is only demoted below the other previews and still ends up ahead of Download. Admins had to disable the archive previewer per extension by hand.
The preview management page also never listed the built-in Video / Audio / Image / Text previewers, because
video_types/audio_types/image_types/text_typesare PRIVATE settings and are absent from/public/settings.Changes
Verification
Manually tested against a local v3 backend:
preview_settings, archive files show only Download.preview_settingsback to{}.mp4now lists Video and Video 360 and bulk disable covers them.prettier --checkandvite buildpass.