From 94b801056d8f92b1103fef32959c49aa0a546390 Mon Sep 17 00:00:00 2001 From: Ylian Saint-Hilaire Date: Fri, 10 May 2019 15:49:44 -0700 Subject: [PATCH] First version of night time mode in the web app. --- public/images/views.png | Bin 2939 -> 2746 bytes public/styles/style.css | 98 ++++++++++++++++++++++++++++----- views/default-min.handlebars | 2 +- views/default.handlebars | 13 ++++- views/login-min.handlebars | 2 +- views/messenger-min.handlebars | 2 +- 6 files changed, 99 insertions(+), 18 deletions(-) diff --git a/public/images/views.png b/public/images/views.png index 927624df86b745549ed20878ab8c1aac2543c0c7..3875b05ccde6928884bd79bc22d2bfd00108cc99 100644 GIT binary patch literal 2746 zcmeIz`#%$U9{}*lZH+PaHMh-j&*nDQMb_MH7;5IOnqi2ojU_X=Oe=}>9JgdHDGHhU zCDFZ8TBTAXIp`#vQXO?dXY0r3UwEGP58viR8>_W5Qv(Zn!38WhK7cwrlyvbmbSLGj*bo#3f;DC8w>{1 zmD2k~-@w4Y(9jSLha(UOBO@au61iQ<*u=!dRLacE%-q7l!qU=m$BrFVR#qq!3XMiv zTU*=M*x1_I+S%FJOJOh=2MI?lauLmdP+)4 zYHDhl)WKiUGcqz53e4(G5`wnR=&4wuX2@p#3>#R7rg z#EBDSWo6~%<&~9{)z#HCH8r)hwRLrM_4V~ap|GK$p|P>Cxw*NerKPpCwXLn~^5x6z z?d=^M9apYg>FVkdiA3Gq-90@$y}iACeSQ7?{R0C7gM))ZLqo&E!y_Xjl3xGce^tO3 zAwMfw0RWRk4Eg!L4G^-XXe=qu)`LFb3;;kyGA}A4GVgGmqmm?)=}BgWq*0mdxQqjU zgK>$eOjPOtCfpunjdG^j8W`$LDeywJ##GgD{-%+W%aT zZln;5=qvb*b_*-$Z1-E>&vEdhtAVAZlcSHI^#*K$mez__+OjhY)x(Ysmf5;@t?NiClxb^9+Xxr?^ ztn5P5xS>heqodf}MshX6;b)bsn}+KD+)er7joRjNt_-{AF{hstZJ=Y8@(1d938cKE zSgB|J@q4uXtZ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aFSxt~lB=n=d9f*3UGTZ8`1FCIAXdrDW@2b*P {{{title}}}
{{{title}}}
{{{title2}}}

{{{logoutControl}}}

 

\ No newline at end of file + {{{title}}}
{{{title}}}
{{{title2}}}

{{{logoutControl}}}

 

\ No newline at end of file diff --git a/views/default.handlebars b/views/default.handlebars index 2cb299de..74bd78b9 100644 --- a/views/default.handlebars +++ b/views/default.handlebars @@ -90,6 +90,7 @@
+
@@ -926,6 +927,7 @@ var uiMode = parseInt(getstore('uiMode', 1)); var webPageStackMenu = false; var webPageFullScreen = true; + var nightMode = (getstore('uiMode', 1) == 1); function startup() { if ((features & 32) == 0) { @@ -944,6 +946,7 @@ QV('autoconnectbutton1', debugmode); // Desktop //QV('DeskClip', debugmode); // Clipboard feature, not completed so show in in debug mode only. + if (nightMode) { QC('body').add('night'); } toggleFullScreen(); // Setup page visuals @@ -1070,8 +1073,10 @@ Q('uiViewButton1').classList.remove('uiSelectorSel'); Q('uiViewButton2').classList.remove('uiSelectorSel'); Q('uiViewButton3').classList.remove('uiSelectorSel'); - try { Q('uiViewButton' + uiMode).classList.add('uiSelectorSel'); } catch (ex) {} + Q('uiViewButton4').classList.remove('uiSelectorSel'); + try { Q('uiViewButton' + uiMode).classList.add('uiSelectorSel'); } catch (ex) { } QV('uiMenu', (QS('uiMenu').display == 'none')); + if (nightMode) { Q('uiViewButton4').classList.add('uiSelectorSel'); } } function userInterfaceSelectMenu(s) { @@ -1082,6 +1087,12 @@ toggleStackMenu(0); } + function toggleNightMode() { + nightMode = !nightMode; + if (nightMode) { QC('body').add('night'); } else { QC('body').remove('night'); } + putstore('nightMode', nightMode?1:0); + } + // Toggle the web page to full screen function toggleFullScreen(toggle) { if (toggle === 1) { webPageFullScreen = !webPageFullScreen; putstore('webPageFullScreen', webPageFullScreen); } diff --git a/views/login-min.handlebars b/views/login-min.handlebars index d39e6160..c1e304be 100644 --- a/views/login-min.handlebars +++ b/views/login-min.handlebars @@ -1 +1 @@ -{{{title}}} - Login
{{{title}}}
{{{title2}}}

Welcome


\ No newline at end of file + {{{title}}} - Login
{{{title}}}
{{{title2}}}

Welcome


\ No newline at end of file diff --git a/views/messenger-min.handlebars b/views/messenger-min.handlebars index bf17d5af..1af3a5b4 100644 --- a/views/messenger-min.handlebars +++ b/views/messenger-min.handlebars @@ -1 +1 @@ - MeshMessenger
MeshMessenger
\ No newline at end of file + MeshMessenger
MeshMessenger
\ No newline at end of file