luci-app-frpc: fix service status bar style
authorZiMing Mo <msylgj@immortalwrt.org>
Sat, 30 Apr 2022 07:55:40 +0000 (15:55 +0800)
committerJo-Philipp Wich <jo@mein.io>
Sat, 30 Apr 2022 13:38:25 +0000 (15:38 +0200)
mod the service status bar to use normaly 'cbi-section' class style.

Signed-off-by: ZiMing Mo <msylgj@immortalwrt.org>
[squash commits, add balnk line between commit subject and message]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
applications/luci-app-frpc/htdocs/luci-static/resources/view/frpc.js
applications/luci-app-frps/htdocs/luci-static/resources/view/frps.js

index 7fe9042d424e6a5b938130332313e07ca5e60344..dc9241cec94a67034aa663cb33e6930f79207db8 100644 (file)
@@ -135,7 +135,7 @@ function getServiceStatus() {
 
 function renderStatus(isRunning) {
        var renderHTML = "";
-       var spanTemp = "<span style=\"color:%s;font-weight:bold;margin-left:15px\">%s - %s</span>";
+       var spanTemp = '<em><span style="color:%s"><strong>%s %s</strong></span></em>';
 
        if (isRunning) {
                renderHTML += String.format(spanTemp, 'green', _("frp Client"), _("RUNNING"));
@@ -163,8 +163,8 @@ return view.extend({
                        });
 
                        return E('div', { class: 'cbi-map' },
-                               E('div', { class: 'cbi-section'}, [
-                                       E('div', { id: 'service_status' },
+                               E('fieldset', { class: 'cbi-section'}, [
+                                       E('p', { id: 'service_status' },
                                                _('Collecting data ...'))
                                ])
                        );
index 83698cbe3044589c814d2667258f549d5dd076b1..27136134f46f3d4ca181cb34eea3c75716f21350 100644 (file)
@@ -110,7 +110,7 @@ function getServiceStatus() {
 
 function renderStatus(isRunning) {
        var renderHTML = "";
-       var spanTemp = "<span style=\"color:%s;font-weight:bold;margin-left:15px\">%s - %s</span>";
+       var spanTemp = '<em><span style="color:%s"><strong>%s %s</strong></span></em>';
 
        if (isRunning) {
                renderHTML += String.format(spanTemp, 'green', _("frp Server"), _("RUNNING"));
@@ -138,8 +138,8 @@ return view.extend({
                        });
 
                        return E('div', { class: 'cbi-map' },
-                               E('div', { class: 'cbi-section'}, [
-                                       E('div', { id: 'service_status' },
+                               E('fieldset', { class: 'cbi-section'}, [
+                                       E('p', { id: 'service_status' },
                                                _('Collecting data ...'))
                                ])
                        );