-
-
Notifications
You must be signed in to change notification settings - Fork 365
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
feat: pin files to top of gcode files list #1684
base: develop
Are you sure you want to change the base?
Conversation
Add the ability to pin gcode files to top of dashboard file panel and gcode files view Signed-off-by: Arno Pigeon <git@sysody.eu>
Add translation support Signed-off-by: Arno Pigeon <git@sysody.eu>
Language file analysis report:
|
Language file analysis report:
|
How does it handle gcode files with preview thumbnails? The ones you have in your examples all have the default file icon so maybe you haven't thought of the thumbnails since you aren't using them yourself? Are thumbnails replaced with the pin icon as well or are they layered? Some users may have usage for the thumbnails, removing them may not be the best option. |
Icons for dashboard status card Separated pinned files tab Small pin icon without overriding preview thumbnails Signed-off-by: Arno Pigeon <git@sysody.eu>
Language file analysis report:
|
@4rnoP sry for the late response... maybe a small icon before the filename? this would also be very prominent and easy to see. |
Description
Add the possibility to pin gcode file to the files view and file panel in dashboard
The pin/unpin action can be done through right click, and the icon of the file change to a pin icon to show that a file is currently pinned (while avoiding too much space).
The saved files list is store in the Moonraker DB under
gcodefiles.pinnedFiles
.However, I'm not sure of the implementation design.
My idea is to add a property
isPinned
to theFileStateGcodefile[]
that the panel get, and sort the files according to this property in thesortFiles
function inplugins/helpers
.I placed the actions/mutations in the
store/gui/
as thegcodefiles
db index was already accessible from there, and I also modified the gettergetGcodeFiles
to add the property to the FileStateGcodefile objects it returns, as well as thegetDeleteFile
action to remove the file from the pinnedFiles list (to avoid that if you delete a pinned file, then upload a file with the same name, it is automatically pinned).Related Tickets & Documents
Fixes #1257
Mobile & Desktop Screenshots/Recordings