sddm-theme: Factor out properties in Battery component
Use a little helper function and a bunch of properties instead of the (traditional["JavaScript"] || syntax) : garbage.
I wonder, if this pattern of accessing properties will be considered cleaner? That's roughly what I was planning to do for the «Battery and Brightness» applet, except such function would be better suited for an importable js library.
Edited by ivan tkachenko