From 312294aeefa53d6c19b4acac31deef703e8d9f77 Mon Sep 17 00:00:00 2001 From: gSpot Date: Tue, 20 Sep 2022 16:21:25 +0300 Subject: [PATCH] luci-app-internet-detector: CSS fixes --- .../luci-static/resources/view/internet-detector.js | 12 ++++++------ .../resources/view/status/include/00_internet.js | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/luci-app-internet-detector/htdocs/luci-static/resources/view/internet-detector.js b/luci-app-internet-detector/htdocs/luci-static/resources/view/internet-detector.js index 8a4ed8a..a4ec384 100644 --- a/luci-app-internet-detector/htdocs/luci-static/resources/view/internet-detector.js +++ b/luci-app-internet-detector/htdocs/luci-static/resources/view/internet-detector.js @@ -151,21 +151,21 @@ return view.extend({ setInternetStatus: function() { if(this.inetStatus === 0) { - this.inetStatusLabel.style.background = '#46a546'; + this.inetStatusLabel.style.background = '#2ea256'; this.inetStatusLabel.textContent = _('Connected') + (this.publicIp ? ' | %s: %s'.format(_('Public IP'), _(this.publicIp)) : ''); - this.inetStatusLabel.style.color = '#ffffff'; + this.inetStatusLabel.style.color = '#fff'; this.unsetInetStatusSpinner(); } else if(this.inetStatus === 1) { this.inetStatusLabel.textContent = _('Disconnected'); - this.inetStatusLabel.style.background = '#ff4953'; - this.inetStatusLabel.style.color = '#ffffff'; + this.inetStatusLabel.style.background = '#ff4e54'; + this.inetStatusLabel.style.color = '#fff'; this.unsetInetStatusSpinner(); } else { this.inetStatusLabel.textContent = _('Undefined'); - this.inetStatusLabel.style.background = '#9b9b9b'; - this.inetStatusLabel.style.color = '#ffffff'; + this.inetStatusLabel.style.background = '#8a8a8a'; + this.inetStatusLabel.style.color = '#fff'; if(this.currentAppMode !== '0' && this.appStatus !== 'stoped') { this.setInetStatusSpinner(); diff --git a/luci-app-internet-detector/htdocs/luci-static/resources/view/status/include/00_internet.js b/luci-app-internet-detector/htdocs/luci-static/resources/view/status/include/00_internet.js index 4568cf0..5cf57f6 100644 --- a/luci-app-internet-detector/htdocs/luci-static/resources/view/status/include/00_internet.js +++ b/luci-app-internet-detector/htdocs/luci-static/resources/view/status/include/00_internet.js @@ -71,18 +71,18 @@ return baseclass.extend({ if(window.internetDetectorState === 0) { internetStatus.textContent = _('Connected') + (this.publicIp ? ' | %s: %s'.format(_('Public IP'), _(this.publicIp)) : ''); - internetStatus.style.background = '#46a546'; - internetStatus.style.color = '#ffffff'; + internetStatus.style.background = '#2ea256'; + internetStatus.style.color = '#fff'; } else if(window.internetDetectorState === 1) { internetStatus.textContent = _('Disconnected'); - internetStatus.style.background = '#ff4953'; - internetStatus.style.color = '#ffffff'; + internetStatus.style.background = '#ff4e54'; + internetStatus.style.color = '#fff'; } else { internetStatus.textContent = _('Undefined'); - internetStatus.style.background = '#9b9b9b'; - internetStatus.style.color = '#ffffff'; + internetStatus.style.background = '#8a8a8a'; + internetStatus.style.color = '#fff'; }; return E('div', {