Sian-Lee-SA / Home-Assistant-Switch-Manager

Switch manager is a centralised component to handle button pushes for your wireless switches. This includes anything passed through the event bus. The component relies on switch blueprints which is easily made to allow GUI configuration of your switches and their button pushes. This helps remove clutter from the automations.
Other
222 stars 84 forks source link

Add max-width to svg #151

Open noxhirsch opened 1 year ago

noxhirsch commented 1 year ago

All uploaded images should not exceed the maximum width of 800px as stated below in the checklist. But in the UI, very wide images get upscaled to full browser width instead of being limited to 800px. I solved the problem for me by adding max-width to #switch-image > svg in switch_manager_panel.js. The result you can see in the screenshot below. But I don't know if that is the cleanest solution and I also don't know if changing that in the ts file is correct. If you have a better solution, feel free to close this PR.

Before: before After: image

Blueprint Checklist

Zigbee2MQTT