Closed ghost closed 6 months ago
Thank you for your feedback, the multi-device management feature is still in its infancy, and we will continue to further optimize the feature. The two problems you mentioned do exist, but the code you provided will conflict with our subsequent optimization, so we will cancel this request. And we will solve these problems in other ways.
These commits fix 2 bugs I found in the machine list.
One regarding the formatting of the address of printers. The current code hardcodes the "http://" prefix to the address specified by the user, so if he writes, for example, "http://1.2.3.4", it becomes "http://http://1.2.3.4", and this is an invalid address.
The second is a UI bug regarding the display of printers with a hostname (instead of an IP address) in the machine list. When adding a printer by hostname, it doesn't appear on the list (this is a UI bug, becuase the printer is saved corectly to the config file and the page loads succesfully, but it just doesn't appear on the list). Actually it's not really a bug, but an incorrect assumption by the developer, because in the code, there is a check that validates the printer's host is only an IP address, but as you can see it can also be a hostname, so this check is redundant. I removed the check and now printers with an hostname should be displayed correctly.
Disclaimer: I couldn't build the program so I actually never tried the fixes. Please check them before deciding to merge.