Skip to content
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

Feature/Help: Change Icons #204

Open
yani66 opened this issue Sep 3, 2023 · 3 comments
Open

Feature/Help: Change Icons #204

yani66 opened this issue Sep 3, 2023 · 3 comments
Labels
enhancement New feature or request good first issue Good for newcomers question Further information is requested

Comments

@yani66
Copy link

yani66 commented Sep 3, 2023

Hi,
I wanted to change the Icons shown in the navbar, but I couldn't find the folder of the Icon-files on the raspberry.
It would be great to know where the icons are saved.
The feature to select from a greater variety of icons and/or upload own icons, would be a great addition.

Thanks in advance and for the plugin so far
yani66

@RobinTail
Copy link
Collaborator

Hello @yani66 ,

where the icons are saved

You can place your icons into the plugin's static/img folder under the OctoPrint's virtual environment.
In my particular case it is:

~/oprint/lib/python3.9/site-packages/octoprint_octorelay/static/img

Then you can specify the icon HTML tag this way:

<img width="24" height="24" src="/plugin/octorelay/static/img/3d-printer.svg">

The feature to select from a greater variety of icons and/or upload own icons, would be a great addition.

The desired variety of icons can not be included into the distribution since most of them require to comply a license.
Moreover, it would unreasonably increase the distribution weight.

Nevertheless, already now you can select from the variety of icons from the Internet.
Type printer icon svg in Google and copy the URL of the one you like.
You can place that URL into the src property of the img tag above instead of copying that file onto Raspberry Pi.

I hope this information will help you

@RobinTail RobinTail added question Further information is requested enhancement New feature or request good first issue Good for newcomers labels Sep 3, 2023
@RobinTail
Copy link
Collaborator

RobinTail commented Feb 18, 2024

Possible solution is via allowing to upload anything:

Plugin: https://plugins.octoprint.org/plugins/uploadanything/
Source: https://github.com/rlogiacco/UploadAnything/blob/master/octoprint_uploadanything/__init__.py

So after uploading an image, you can assign its URL to the control button of relay, @yani66

@SCH00N3R
Copy link

SCH00N3R commented Nov 5, 2024

It isn't strictly necessary to upload the image to octoprint. You could host it on an internal web server or link to another website that hosts the image you wish to use. Of course under that scenario you are at the mercy of the external site as to whether the site will exist years from now or if the image path will change. Nonetheless I thought I would mention it. @RobinTail 's suggestion is better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants