From 7736e664b9c2422fe4daeec58334287f57f6df6e Mon Sep 17 00:00:00 2001 From: Philipp <41761223+philipp2310@users.noreply.github.com> Date: Wed, 8 Apr 2020 22:28:26 +0200 Subject: [PATCH 1/2] reused css, reduced smell --- widgets/css/Satellites.css | 32 ++++++++++++------------------- widgets/css/common.css | 3 +-- widgets/js/Satellites.js | 2 +- widgets/templates/Satellites.html | 2 +- 4 files changed, 15 insertions(+), 24 deletions(-) diff --git a/widgets/css/Satellites.css b/widgets/css/Satellites.css index e6472c2..9e33e07 100644 --- a/widgets/css/Satellites.css +++ b/widgets/css/Satellites.css @@ -1,28 +1,10 @@ -.Satellites_satelliteContainer { - width: 100%; - display: flex; - align-items: flex-start; - padding: 5px; -} - -.Satellites_tile { - width: 150px; - height: 150px; - display: block; - margin-right: 15px; - margin-top: 15px; - background-color: #8d9191; - padding: 3px; - box-sizing: border-box; -} - .Satellites_tile_deviceName { font-family: var(--readable); } .Satellites_tile_muteUnmute { width: 100%; - height: 80px; + height: 5em; text-align: center; - margin-top: 15px; + margin-top: 1em; display: block; } @@ -30,3 +12,13 @@ width: 100%; text-align: right; } + +.Satellites_satelliteWidget .tile { + width: 9.5em; + height: 9.5em; + padding: .3em; + background-color: var(--secondary); + box-sizing: border-box; + box-shadow: none; + display: flex; +} diff --git a/widgets/css/common.css b/widgets/css/common.css index aaacab0..16fdd8f 100644 --- a/widgets/css/common.css +++ b/widgets/css/common.css @@ -1,9 +1,8 @@ .Satellites_satelliteWidget { width: 100%; height: 100%; - color: #d1d1d1; padding: 5px; box-sizing: border-box; overflow-y: hidden; - overflow-x: scroll; + overflow-x: auto; } diff --git a/widgets/js/Satellites.js b/widgets/js/Satellites.js index e3e081c..f40e1a2 100644 --- a/widgets/js/Satellites.js +++ b/widgets/js/Satellites.js @@ -19,7 +19,7 @@ let device = JSON.parse(devices[id]); let color = device['connected'] ? '--text' : 'red'; - let $tile = $('
' + + let $tile = $('
' + '
' + device['room'] + '
' + '
'); diff --git a/widgets/templates/Satellites.html b/widgets/templates/Satellites.html index 0642bbc..0561deb 100644 --- a/widgets/templates/Satellites.html +++ b/widgets/templates/Satellites.html @@ -2,5 +2,5 @@
-
+
From e4184bee770c435ee81744e5ef0b7bd4556e7852 Mon Sep 17 00:00:00 2001 From: Philipp <41761223+philipp2310@users.noreply.github.com> Date: Wed, 8 Apr 2020 23:21:41 +0200 Subject: [PATCH 2/2] bump version --- AliceSatellite.install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AliceSatellite.install b/AliceSatellite.install index ff1dbae..7632c12 100644 --- a/AliceSatellite.install +++ b/AliceSatellite.install @@ -1,6 +1,6 @@ { "name": "AliceSatellite", - "version": "1.1.0", + "version": "1.1.1", "icon": "fas fa-satellite", "category": "alice", "author": "ProjectAlice",