You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains 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
Adds the ability to directly connect to a printer via an URL query parameter, e.g. my-mainsail.net/cam?printer=myprinter.
To accomplish this, added an optional field name to the printers (in browser/json mode). Whenever the SelectPrinterDialog is mounted, it checks the URL params and connects to the printer with the matching name, if any. Otherwise the selection dialog is displayed without an error.
I added the text field for the name to the SelectPrinterDialog and SettingsPrinterRemoteTab in an expandable sub-panel. There is currently no input validation, or checks for duplicate names.
If one were to implement a duplicate check, the name could instead be used in place of the ID, so a printer ID would either be a user specified string or a UUID. I don't have opinions either way.
just a short feedback here, i would not include this feature for moonrakerDB instances... i think this is not "useful/useable" in this case. if a user will use this, should change the config.json for example.
I assumed that would be the case.
The current implementation just filters the printer list for the given name, and if there's none or multiple printers, it just shows the selection dialog (and prints the error to the console), so it should not be invasive at all.
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.
Description
Adds the ability to directly connect to a printer via an URL query parameter, e.g.
my-mainsail.net/cam?printer=myprinter
.To accomplish this, added an optional field
name
to the printers (in browser/json mode). Whenever theSelectPrinterDialog
is mounted, it checks the URL params and connects to the printer with the matching name, if any. Otherwise the selection dialog is displayed without an error.I added the text field for the name to the
SelectPrinterDialog
andSettingsPrinterRemoteTab
in an expandable sub-panel. There is currently no input validation, or checks for duplicate names.If one were to implement a duplicate check, the name could instead be used in place of the ID, so a printer ID would either be a user specified string or a UUID. I don't have opinions either way.
TODO
Related Tickets & Documents
Simple implementation for #1731
Mobile & Desktop Screenshots/Recordings
[optional] Are there any post-deployment tasks we need to perform?