-
-
Notifications
You must be signed in to change notification settings - Fork 251
Improve image_upload plugin UI with preview gallery and refresh controls #191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…ols (#1) * Improve image_upload plugin UI with preview gallery and refresh controls - Add image preview gallery to display all images in the plugin instance - Images shown in responsive grid with hover effects and click-to-view - Add refresh timing controls directly on plugin settings page for existing instances - Support both interval-based (minutes/hours/days) and scheduled (daily at specific time) refresh - Update backend to properly save and retrieve refresh settings - Pre-populate refresh settings when editing existing instances * Fix playlist image cycling and individual plugin refresh intervals - Persist plugin settings (including image_index) after each refresh to enable proper image rotation - Honor individual plugin refresh intervals instead of only using global plugin_cycle_interval_seconds - Optimize refresh loop to check at the minimum interval among active plugins - Fix plugin cycling logic to find the next plugin that needs refreshing This resolves issues where: - Images in playlists wouldn't cycle even with refresh intervals set - The system would wait for the global interval before checking plugin-specific intervals - The Display Now button would show an image but not advance the rotation * Improve image_upload gallery layout to better utilize screen space - Move "Image Preview Gallery:" title between file list and gallery - Remove scrolling constraint, allow gallery to expand naturally - Increase minimum image preview size from 120px to 150px - Ensure gallery fills entire container width - Improve spacing with larger gaps and padding * Add rejection of duplicates to uploaded files * Active playlist settings take effect immediately * Undo ruff linting changes
Hi @andrewginns, I've been running your modifications and they are looking good; I really like the images preview, and the ability to update the refresh settings on playlist entries. Just got one note so far. The "Refresh Settings" section has the fields 'spreading out' when there is space: ![]() Could you consider updating this so the fields are aligned to the top of the section? Thanks. |
Will do! Haven't had as much time as I wanted and also was using it daily to ensure no bugs. Will implement your suggestion when I push other changes. Thanks! |
@phattmatt newest changes are more efficient with space used in the "Refresh Settings" UI |
I'm new to this project and found this PR. I will exclusively be using this fork until it's merged since these are much needed improvements to the image upload plugin. The PR has been open for 3 months. Please review it when you get a chance @fatihak. |
|
||
// Display existing files | ||
existingFiles.forEach(filePath => { | ||
const fileName = filePath.split('/').pop(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When running the dev environment on Windows, this path parsing doesn't work. I suggest updating all the uses of split('/').pop()
to below to support both Windows and Unix paths.
const fileName = filePath.split('/').pop(); | |
const fileName = filePath.replace(/^.*[\\/]/, ''); |
} | ||
|
||
selectedImages.forEach(key => { | ||
const [type, identifier] = key.split('-', 2); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did some testing, and this doesn't work if a '-' is anywhere in the path to the image or the image filename. Might be better to just find the first occurrence of '-', then separate the string by that index.
const [type, identifier] = key.split('-', 2); | |
const idx = key.indexOf('-'); | |
const [type, identifier] = [key.slice(0, idx), key.slice(idx + 1)]; |
Found your Youtube channel and have been following the video series. Thanks for putting up the code on the repo. Thought I'd contribute a QoL improvement to the Playlist feature.
Initial UI after uploading photos:

UI for changing settings of uploaded photo sets:

Problem:
Solution:
Unlocks:
Detailed breakdown of changes: