Cleanup CSS and drop bMobileDevice detection.

Touch devices can be any size and can use (bluetooth/usb-c mouse/keyboard) these days.
It's all about pixels and currently if the mode is mobile/no-mobile (this can be improved later).
This commit is contained in:
djmaze 2020-09-30 12:31:34 +02:00
parent 25b4c899d0
commit efcefbaf78
60 changed files with 233 additions and 379 deletions

View file

@ -147,6 +147,12 @@ class SquireUI
{
constructor(container) {
const
doClr = fn => () => {
clr.value = '';
clr.onchange = () => squire[fn](clr.value);
clr.click();
},
actions = {
mode: {
plain: {
@ -185,18 +191,12 @@ class SquireUI
colors: {
textColor: {
html: 'A<sub>▾</sub>',
cmd: () => {
clr.onchange = () => squire.setTextColour(clr.value);
clr.click();
},
cmd: doClr('setTextColour'),
hint: 'Text color'
},
backgroundColor: {
html: '🎨', /* ▧ */
cmd: () => {
clr.onchange = () => squire.setHighlightColour(clr.value);
clr.click();
},
cmd: doClr('setHighlightColour'),
hint: 'Background color'
},
},