Explorar el Código

Optimized dark theme mode for file properties and disk prob

tobychui hace 1 año
padre
commit
11314c2740
Se han modificado 2 ficheros con 59 adiciones y 41 borrados
  1. 29 36
      web/SystemAO/disk/diskprop.html
  2. 30 5
      web/SystemAO/file_system/file_properties.html

+ 29 - 36
web/SystemAO/disk/diskprop.html

@@ -10,6 +10,7 @@
 	<script src="../../script/semantic/semantic.min.js"></script>
     <script type="text/javascript" src="../../script/ao_module.js"></script>
     <script type="text/javascript" src="../../script/applocale.js"></script>
+    <link rel="stylesheet" href="../../script/ao.css">
     <style>
         .hidden{
             display:none;
@@ -53,6 +54,30 @@
         .smallerFont{
             font-size: 98%;
         }
+
+        /* Theme overwrite */
+        body{
+            background-color: var(--body_background);
+            color: var(--text_color);
+        }
+
+        input{
+            background-color: var(--body_background_secondary) !important;
+            color: var(--text_color_secondary) !important;
+            border: 1px solid var(--body_background_active) !important;
+        }
+
+        button{
+            background-color: var(--body_background_active) !important;
+            color: var(--text_color) !important;
+        }
+        button:hover{
+            opacity: 0.8;
+        }
+
+        td,.header,p,div,span{
+            color: var(--text_color) !important;
+        }
     </style>
 </head>
 <body>
@@ -272,9 +297,9 @@
                     loadPreference("file_explorer/theme",function(data){
                         if (data.error === undefined){
                             if (data == "darkTheme"){
-                                toggleDarkTheme();
+                                $("body").addClass("darkTheme");
                             }else{
-                                //White theme. Do nothing
+                                $("body").addClass("whiteTheme");
                             }
                         }
                     });
@@ -284,41 +309,9 @@
         }
 
         function loadPreference(key, callback){
-                $.get("../../system/file_system/preference?key=" + key,function(data){
-                    callback(data);
-                });
-            }
-
-        function toggleDarkTheme(){
-            $("body").css({
-                "background-color":"#242330",
-                "color":"white",
-            });
-
-            $("input").css({
-                "background":"#242330",
-                "color":"white",
-                "border": "1px solid #e9e9e9"
+            $.get("../../system/file_system/preference?key=" + key,function(data){
+                callback(data);
             });
-
-            $("input.focus").css({
-                "background":"#242330",
-                "color":"white"
-            })
-
-            $("td,.header,p,div,span").css({
-                "color":"white",
-            });
-
-            $("button").css({
-                "background-color":"#312f42",
-                'border':"1px solid #262533",
-                "color":"white"
-            })
-
-            $("button:hover").css({
-                "background-color": "#424054"
-            })
         }
 
     </script>

+ 30 - 5
web/SystemAO/file_system/file_properties.html

@@ -8,11 +8,36 @@
         <script type="text/javascript" src="../../script/semantic/semantic.min.js"></script>
         <script type="text/javascript" src="../../script/ao_module.js"></script>
         <script type="text/javascript" src="../../script/applocale.js"></script>
+        <link rel="stylesheet" href="../../script/ao.css">
         <style>
             body{
                 overflow:hidden;
             }
 
+            #filePropertiesWindow{
+                background-color: var(--body_background);
+                color: var(--body_text);
+            }
+
+            #filePropertiesWindow td,.header,p,div{
+                color: var(--body_text) !important;
+            }
+
+            #filePropertiesWindow input{
+                background-color: var(--body_background_secondary) !important;
+                color: var(--text_color) !important;
+                font-size: 1.2em;
+            }
+
+            .small.basic.white.fluid.button{
+                border: 1px solid var(--text_color_secondary);
+                color: var(--text_color_secondary) !important;
+            }
+
+            .small.basic.white.fluid.button:hover{
+                background-color: var(--body_background_active) !important;
+            }
+
         </style>
     </head>
     <body id="filePropertiesWindow">
@@ -27,9 +52,9 @@
 
             </div>
             <br>
-            <button style="display:none;" class="ui small blue fluid button singleFileOnly" onclick="changeDefaultWebApp();" locale="button/changeDefault">Change Default WebApp</button>
-            <button style="display:none; margin-top: 4px;" class="ui small fluid button singleFileOnly" onclick="viewVersionHistory();" locale="button/versionHistory">View Version History</button>
-            <button style="margin-top: 4px;" class="ui small fluid button linuxonly" onclick="openFilePermissionPanel();" locale="button/changeFilePermission">Change File Permissions</button>
+            <button style="display:none;" class="ui small white basic fluid button singleFileOnly" onclick="changeDefaultWebApp();"><i class="ui external square alternate icon blue"></i><span locale="button/changeDefault">Change Default WebApp</span></button>
+            <button style="display:none; margin-top: 4px;" class="ui small basic white fluid button singleFileOnly" onclick="viewVersionHistory();"><i class="ui undo green icon"></i><span locale="button/versionHistory">View Version History</span></button>
+            <button style="margin-top: 4px;" class="ui small basic white fluid button linuxonly" onclick="openFilePermissionPanel();" locale="button/changeFilePermission">Change File Permissions</button>
             <br>
         </div>
         <div id="filesizeLoader" class="ui active dimmer">
@@ -97,9 +122,9 @@
                         fpw_loadPreference("file_explorer/theme",function(data){
                             if (data.error === undefined){
                                 if (data == "darkTheme"){
-                                    fpw_toggleDarkTheme();
+                                    $("body").addClass("darkTheme");
                                 }else{
-                                    //White theme. Do nothing
+                                    $("body").addClass("whiteTheme");
                                 }
                             }
                         });