Переглянути джерело

Desktop theme update and binary added

+ Desktop Theme Selector
+ function_bar config
+ arm64 binary for fsexec and fszip
Toby Chui 5 роки тому
батько
коміт
4f37525112
38 змінених файлів з 470 додано та 75 видалено
  1. 5 1
      src/Desktop/getBackgroundThemes.php
  2. BIN
      src/Desktop/img/bg/nature/1.jpg
  3. BIN
      src/Desktop/img/bg/nature/2.jpg
  4. BIN
      src/Desktop/img/bg/nature/3.jpg
  5. BIN
      src/Desktop/img/bg/nature/4.jpg
  6. BIN
      src/Desktop/img/bg/nature/5.jpg
  7. BIN
      src/Desktop/img/bg/night/0.jpg
  8. BIN
      src/Desktop/img/dummy/fsexp.png
  9. BIN
      src/Desktop/img/dummy/listmenu.png
  10. BIN
      src/Desktop/img/dummy/shutdown.png
  11. BIN
      src/Desktop/img/dummy/user.png
  12. 6 0
      src/Desktop/index.php
  13. 28 0
      src/Desktop/script/theme/README.md
  14. 1 0
      src/Desktop/script/theme/conf/Cyan Forest.config
  15. 7 0
      src/Desktop/script/theme/conf/Default.config
  16. 1 0
      src/Desktop/script/theme/conf/Oryza Sativa.config
  17. 1 0
      src/Desktop/script/theme/conf/aCloud.config
  18. 1 0
      src/Desktop/script/theme/index/Cyan Forest.json
  19. 1 0
      src/Desktop/script/theme/index/Default.json
  20. 1 0
      src/Desktop/script/theme/index/Oryza Sativa.json
  21. 1 0
      src/Desktop/script/theme/index/aCloud.json
  22. 241 0
      src/Desktop/themeSelector.php
  23. 24 15
      src/System Settings/index.php
  24. 1 0
      src/System Settings/navi.php
  25. 41 0
      src/SystemAOB/functions/badDist.php
  26. 1 1
      src/SystemAOB/functions/file_system/default/txt.csv
  27. BIN
      src/SystemAOB/functions/file_system/fsexec_arm64.elf
  28. BIN
      src/SystemAOB/functions/file_system/fszip_arm64.elf
  29. 10 1
      src/SystemAOB/functions/file_system/getDefaultApp.php
  30. 1 1
      src/SystemAOB/functions/info/version.inf
  31. 2 1
      src/SystemAOB/functions/list_menu/index.php
  32. 3 1
      src/SystemAOB/functions/personalization/defaults/function_bar.config
  33. 1 0
      src/SystemAOB/functions/personalization/sysconf/webapp_policy.config
  34. 6 1
      src/SystemAOB/functions/personalization/sysconfigUI.php
  35. 53 42
      src/SystemAOB/functions/system_management/moduleTrashBin.php
  36. 0 1
      src/SystemAOB/functions/system_statistic/WIN32_USBlist.txt
  37. 1 1
      src/function_bar.js
  38. 32 9
      src/function_bar.php

+ 5 - 1
src/Desktop/getBackgroundThemes.php

@@ -8,7 +8,11 @@ if (file_exists("img/bg")){
 			//If it is a directory as well as it has image in it
 			$images = glob($theme . "/*.{jpg,gif}", GLOB_BRACE);
 			$bgcount = count($images);
-			array_push($data,[basename($theme),$theme,$bgcount]);
+			$mode = "jpg";
+			if (file_exists(file_exists($theme . "/0.gif"))){
+			    $mode = "gif";
+			}
+			array_push($data,[basename($theme),$theme,$bgcount,$mode]);
 		}
 	}
 }else{

BIN
src/Desktop/img/bg/nature/1.jpg


BIN
src/Desktop/img/bg/nature/2.jpg


BIN
src/Desktop/img/bg/nature/3.jpg


BIN
src/Desktop/img/bg/nature/4.jpg


BIN
src/Desktop/img/bg/nature/5.jpg


BIN
src/Desktop/img/bg/night/0.jpg


BIN
src/Desktop/img/dummy/fsexp.png


BIN
src/Desktop/img/dummy/listmenu.png


BIN
src/Desktop/img/dummy/shutdown.png


BIN
src/Desktop/img/dummy/user.png


+ 6 - 0
src/Desktop/index.php

@@ -1104,12 +1104,18 @@ function loadDesktopContextMenu(){
 	appendToRightClickMenu("Upload to Desktop","desktopUploadTips");
 	appendToRightClickMenu("divider");
 	appendToRightClickMenu("Desktop Transfer <i class='exchange right icon' style='right:0;position:absolute'></i>","stateTransfer");
+	appendToRightClickMenu("Personalization <i class='paint brush icon' style='right:0;position:absolute'></i>","openThemeSelector");
 	appendToRightClickMenu("Background <i class='caret right icon' style='right:0;position:absolute'></i>","loadBackgroundTheme");
 	appendToRightClickMenu("Toggle FullScreen  <i class='maximize right icon' style='right:0;position:absolute'></i>","fullScreenMode");
 	appendToRightClickMenu("Exit Virtual Desktop","extvdi");
 	
 }
 
+function openThemeSelector(){
+	newfw("Desktop/themeSelector.php","Personalization - Theme Color","eyedropper","desktopThemeSelector",640,460,window.innerWidth/2 - 320,window.innerHeight/2 - 230,false,false);
+	hideAllContextMenu();
+}
+
 function stateTransfer(){
 	newfw("Desktop/stateTransfer.php","Desktop State Transfer","desktop","desktopStateTransfer",390,590,window.innerWidth/2 - 195,window.innerHeight/2 - 295,false,false);
 	hideAllContextMenu();

+ 28 - 0
src/Desktop/script/theme/README.md

@@ -0,0 +1,28 @@
+# ArOZ Online System Theme Manager
+Due to the fact that ArOZ Online System build in Theme changing setting is too advance and complicated for newbies, a manager is written to make changing color of the functional bar less painful.
+
+## How to add a theme
+Create an index and a System Standard Config File and put them into the index/ and conf/ directory respectivly. Beware to match their filename.
+
+The index file is a json file containing three color information.
+1. Functional Bar Color
+2. Menu Button Color
+3. Activated Menu Button Color
+
+in JSON array format. Here is an example of it.
+
+```
+["rgba(48,48,48,0.7)","rgba(68, 68, 68,1)","rgba(34, 34, 34,1)"]
+```
+
+And for the config file, it follows the System Standard Config File Format. Here is an example of the function_bar.config.
+
+```
+{"fbcolor":["Function Bar Color","Functional menu bar background color in RGBA format, e.g. rgba(48,48,48,0.7)","text","rgba(48,48,48,0.7)"],
+  "nbcolor":["Notification Bar Color","Notification Sidebar color in RGBA format  e.g. rgba(48,48,48,0.7)","text","rgba(48,48,48,0.7)"],
+  "nbfontcolor":["Notification Bar Default Font Color","The default font color for pop-up notification. Default white.","text","white"],
+  "resizeInd":["Resize Indicator Icon","Filepath for the indicator image file.","file","img/sys/scalable.png"],
+  "defBtnColor":["Default Button Color","The default color of the buttons on function bar in RGBA format. Default rgba(68, 68, 68,1). ","text","rgba(68, 68, 68,1)"],
+  "actBtnColor":["Active Button Color","The default color of activated buttons in RGBA format. Default rgba(34, 34, 34,1)", "text", "rgba(34, 34, 34,1)"]
+}
+```

+ 1 - 0
src/Desktop/script/theme/conf/Cyan Forest.config

@@ -0,0 +1 @@
+{"fbcolor":["Function Bar Color","Functional menu bar background color in RGBA format, e.g. rgba(48,48,48,0.7)","text","rgba(88, 176, 151, 0.7)"],"nbcolor":["Notification Bar Color","Notification Sidebar color in RGBA format  e.g. rgba(48,48,48,0.7)","text","rgba(88, 176, 151, 0.7)"],"nbfontcolor":["Notification Bar Default Font Color","The default font color for pop-up notification. Default white.","text","white"],"resizeInd":["Resize Indicator Icon","Filepath for the indicator image file.","file","img\/sys\/scalable.png"],"defBtnColor":["Default Button Color","The default color of the buttons on function bar in RGBA format. Default rgba(68, 68, 68,1). ","text","rgba(65, 130, 112, 0.7)"],"actBtnColor":["Active Button Color","The default color of activated buttons in RGBA format. Default rgba(34, 34, 34,1)","text","rgba(43, 87, 75, 0.7)"]}

+ 7 - 0
src/Desktop/script/theme/conf/Default.config

@@ -0,0 +1,7 @@
+{"fbcolor":["Function Bar Color","Functional menu bar background color in RGBA format, e.g. rgba(48,48,48,0.7)","text","rgba(48,48,48,0.7)"],
+  "nbcolor":["Notification Bar Color","Notification Sidebar color in RGBA format  e.g. rgba(48,48,48,0.7)","text","rgba(48,48,48,0.7)"],
+  "nbfontcolor":["Notification Bar Default Font Color","The default font color for pop-up notification. Default white.","text","white"],
+  "resizeInd":["Resize Indicator Icon","Filepath for the indicator image file.","file","img/sys/scalable.png"],
+  "defBtnColor":["Default Button Color","The default color of the buttons on function bar in RGBA format. Default rgba(68, 68, 68,1). ","text","rgba(68, 68, 68,1)"],
+  "actBtnColor":["Active Button Color","The default color of activated buttons in RGBA format. Default rgba(34, 34, 34,1)", "text", "rgba(34, 34, 34,1)"]
+}

+ 1 - 0
src/Desktop/script/theme/conf/Oryza Sativa.config

@@ -0,0 +1 @@
+{"fbcolor":["Function Bar Color","Functional menu bar background color in RGBA format, e.g. rgba(48,48,48,0.7)","text","rgba(176, 154, 46, 0.7)"],"nbcolor":["Notification Bar Color","Notification Sidebar color in RGBA format  e.g. rgba(48,48,48,0.7)","text","rgba(135, 118, 35, 0.7)"],"nbfontcolor":["Notification Bar Default Font Color","The default font color for pop-up notification. Default white.","text","white"],"resizeInd":["Resize Indicator Icon","Filepath for the indicator image file.","file","img\/sys\/scalable.png"],"defBtnColor":["Default Button Color","The default color of the buttons on function bar in RGBA format. Default rgba(68, 68, 68,1). ","text","rgba(135, 118, 35, 0.7)"],"actBtnColor":["Active Button Color","The default color of activated buttons in RGBA format. Default rgba(34, 34, 34,1)","text","rgba(74, 65, 19, 0.7)"]}

+ 1 - 0
src/Desktop/script/theme/conf/aCloud.config

@@ -0,0 +1 @@
+{"fbcolor":["Function Bar Color","Functional menu bar background color in RGBA format, e.g. rgba(48,48,48,0.7)","text","rgba(244, 66, 107,0.7)"],"nbcolor":["Notification Bar Color","Notification Sidebar color in RGBA format  e.g. rgba(48,48,48,0.7)","text","rgba(244, 66, 107,0.7)"],"nbfontcolor":["Notification Bar Default Font Color","The default font color for pop-up notification. Default white.","text","white"],"resizeInd":["Resize Indicator Icon","Filepath for the indicator image file.","file","img\/sys\/scalable.png"],"defBtnColor":["Default Button Color","The default color of the buttons on function bar in RGBA format. Default rgba(68, 68, 68,1). ","text","rgba(189, 51, 83,1)"],"actBtnColor":["Active Button Color","The default color of activated buttons in RGBA format. Default rgba(34, 34, 34,1)","text","rgba(133, 34, 57,1)"]}

+ 1 - 0
src/Desktop/script/theme/index/Cyan Forest.json

@@ -0,0 +1 @@
+["rgba(88, 176, 151, 0.7)","rgba(65, 130, 112, 0.7)","rgba(43, 87, 75, 0.7)"]

+ 1 - 0
src/Desktop/script/theme/index/Default.json

@@ -0,0 +1 @@
+["rgba(48,48,48,0.7)","rgba(68, 68, 68,1)","rgba(34, 34, 34,1)"]

+ 1 - 0
src/Desktop/script/theme/index/Oryza Sativa.json

@@ -0,0 +1 @@
+["rgba(176, 154, 46, 0.7)","rgba(135, 118, 35, 0.7)","rgba(74, 65, 19, 0.7)"]

+ 1 - 0
src/Desktop/script/theme/index/aCloud.json

@@ -0,0 +1 @@
+["rgba(244, 66, 107,0.7)","rgba(189, 51, 83,1)","rgba(133, 34, 57,1)"]

+ 241 - 0
src/Desktop/themeSelector.php

@@ -0,0 +1,241 @@
+<?php
+include_once("../auth.php");
+if (isset($_GET['load'])){
+    //Load color blocks from files.
+    $confs = glob("script/theme/index/*.json");
+    $result = [];
+    foreach ($confs as $conf){
+        $themeName = basename($conf,".json");
+        $themeContent = file_get_contents($conf);
+        array_push($result,[$themeName,$themeContent]);
+    }
+    header('Content-Type: application/json');
+    echo json_encode($result);
+    exit(0);
+}else if (isset($_GET['setTheme']) && !empty($_GET['setTheme'])){
+    include_once("../SystemAOB/functions/personalization/configIO.php");
+    $targetFile = $configPath . "function_bar.config";
+    $sourceFile = "script/theme/conf/" . $_GET['setTheme'] . ".config";
+    if (!file_exists($sourceFile)){
+        die("ERROR. Theme config file not found.");
+    }
+    file_put_contents($targetFile,file_get_contents($sourceFile));
+    echo "DONE";
+    exit(0);
+}
+?>
+<html>
+    <head>
+        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+        <title>Theme Selector</title>
+        <link rel="stylesheet" href="../script/tocas/tocas.css">
+    	<script src="../script/tocas/tocas.js"></script>
+    	<script src="../script/jquery.min.js"></script>
+    	<script src="../script/ao_module.js"></script>
+    	<style>
+        	body{
+        	    background-color:#f2f2f2;
+        	}
+    	    .previewBlock{
+    	        height:300px;
+    	        width:100%;
+    	        background:white;
+    	        background-size: 100% 100%;
+    	    }
+    	    .demoMenuBar{
+    	        height:25px;
+    	        width:100%;
+    	        position:absolute;
+    	        left:0px;
+    	        bottom:0px;
+    	        background-color:#333;
+    	        color:white;
+    	        padding-left:20px;
+    	    }
+    	    .whiteFont{
+    	        color:White;
+    	    }
+    	    .menuBarButton{
+    	        height:25px;
+    	        width:45px;
+    	        cursor:pointer;
+    	        margin:0px !important;
+    	    }
+    	    .menuBarButton.active{
+    	        background-color:#222;
+    	    }
+    	    .demoStartupMenu{
+    	        position:absolute;
+    	        left:0px;
+    	        bottom:25px;
+    	        height:220px;
+    	        width:160px;
+    	        background-color:rgba(48,48,48,0.7);
+    	    }
+    	    .dummyInterface{
+    	        background-color:white;
+    	        position:absolute;
+    	        background-size: 100% 100%;
+    	    }
+    	    .demoWindow{
+    	        position:absolute;
+    	        top:38px;
+    	        left:187px;
+    	        width:250px;
+    	        height:150px;
+    	        background-color:white;
+    	    }
+    	    .demoFloatWindow{
+    	        width:100%;
+    	        height:8px;
+    	        background-color:rgba(48,48,48,0.7);
+    	    }
+    	    .dummyWindowContent{
+    	        position:absolute;
+    	        top:8px;
+    	        width:100%;
+    	        height: calc(100% - 8px);
+    	        background-image:url(img/dummy/fsexp.png);
+    	        background-size: 100% 100%;
+    	    }
+    	    #cpRender{
+    	        border: 1px solid #333;
+    	    }
+    	    .colorblock{
+    	        width:80px;
+    	        height:80px;
+    	        margin-right:5px;
+    	        cursor:pointer;
+    	        border: 1px solid transparent;
+    	    }
+    	    .colorblock:hover{
+    	        border: 1px solid #2dadfc;
+    	    }
+    	    .colorBlockSelector{
+    	        overflow-x: scroll;
+    	        overflow-y: hidden;
+    	        height:100px !important;
+    	        white-space: nowrap;
+    	    }
+    	</style>
+    </head>
+    <body>
+        <div class="previewBlock">
+            <div class="demoStartupMenu">
+                <div class="dummyInterface" style="left:10px;top:10px;width:90px;height:200px;background-image:url(img/dummy/listmenu.png);"></div>
+                <div class="dummyInterface" style="right:10px;top:10px;width:40px;height:40px;background-image:url(img/dummy/user.png);"></div>
+                <div class="dummyInterface" style="right:10px;bottom:10px;width:40px;height:14px;background-color: #292929;background-image:url(img/dummy/shutdown.png);"></div>
+            </div>
+            <div class="demoWindow">
+                <div class="demoFloatWindow"></div>
+                <div class="dummyWindowContent"></div>
+            </div>
+            <div class="demoMenuBar">
+                <button class="menuBarButton" style="width: 55px;"><i class="cloud icon whiteFont"></i></button>
+                <button class="menuBarButton active"><i class="folder icon whiteFont"></i></button>
+            </div>
+        </div>
+        <div class="ts container">
+            <div class="ts fitted segment">Please select a color palette from the options below.</div>
+            <div id="colorBlockDisplay" class="colorBlockSelector">
+            </div>
+            
+        </div>
+        
+        <div style="display: none;">
+            <canvas id="cpRender" width="80" height="80"></canvas>
+        </div>
+        <script>
+            var currentDesktopTheme = "default";
+            var username = localStorage.getItem("ArOZusername");
+            if (localStorage.getItem("desktop-theme-" + username) !== null){
+                currentDesktopTheme = localStorage.getItem("desktop-theme-" + username);
+            }
+            
+            //Load aomodule events
+            if (ao_module_virtualDesktop){
+                ao_module_setWindowIcon("eyedropper");
+                ao_module_setWindowTitle("Personalization - Theme Color");
+                ao_module_setFixedWindowSize();
+                ao_module_setWindowSize(640,460, true);
+            }
+            
+            //Get the current theme and display the first image in the preview window
+            $.get("getBackgroundThemes.php",function(data){
+                for (var i =0; i < data.length; i++){
+                    if (data[i][0] == currentDesktopTheme){
+                        var imagePath = data[i][1] + "/0." + data[i][3];
+                        $(".previewBlock").css("background-image","url(" + imagePath + ")");
+                    }
+                }
+            });
+            
+        function changePreviewThemeColor(theme, button, activeButton){
+            $(".demoMenuBar").css("background-color",theme);
+            $(".demoStartupMenu").css("background-color",theme);
+             $(".menuBarButton").css("background-color",button);
+            $(".menuBarButton.active").css("background-color",activeButton);
+            $(".demoFloatWindow").css("background-color",theme);
+        }
+        
+        function createColorBlocks(themeName, theme, button, activeButton){
+            var canvas = document.getElementById('cpRender');
+            if (canvas.getContext) {
+              var ctx = canvas.getContext('2d');
+                //Clear the old drawing
+                ctx.clearRect(0, 0, canvas.width, canvas.height);
+                //Fill in new color blocks
+                ctx.fillStyle = theme;
+                ctx.fillRect(0, 0, 80, 27);
+                ctx.fillStyle = button;
+                ctx.fillRect(0, 27, 80, 26);
+                ctx.fillStyle = activeButton;
+                ctx.fillRect(0, 53, 80, 27);
+                ctx.fillStyle = "white";
+                ctx.font = "10px Arial";
+                ctx.fillText(themeName, 10, 70);
+                var dataURL = canvas.toDataURL();
+                $("#colorBlockDisplay").append('<img class="colorblock" name="' + themeName  + '" src="' + dataURL + '" theme="' + theme + '" button="' + button + '" act="' + activeButton  +'" onmouseover="loadPreviewObject(this);"  onClick="selectThisColorBlock(this);" >');
+            } else {
+                alert("Canvas not supported on this browser.")
+            }
+        }
+        
+        //Select this object as the color block
+        function selectThisColorBlock(object){
+            var themeName = $(object).attr("name");
+            if (confirm("Change theme to " + themeName + ". Confirm?")){
+                $.get("themeSelector.php?setTheme=" + themeName,function(result){
+                   if (result.includes("ERROR") == false){
+                       ao_module_msgbox("Refresh is needed for the settings to be effective. <br><a onClick='window.location.reload(true);'>Refresh Now</a>" ,"<i class='refresh icon'></i> Refresh Pending","",false);
+                   }else{
+                       ao_module_msgbox("Theme Selector return the following error: " + result,"Unable to set Theme");
+                   }
+                });
+            }
+            
+        }
+        
+        //Load all the theme from the page
+        $.get("themeSelector.php?load",function(data){
+            for (var i =0; i < data.length; i++){
+                var themeName = data[i][0];
+                var themeColor = JSON.parse(data[i][1]);
+                //console.log(themeColor);
+                createColorBlocks(themeName,themeColor[0],themeColor[1],themeColor[2]);
+            }
+        });
+        
+        for (var i= 0; i < 10; i++){
+           // 
+        }
+
+        function loadPreviewObject(object){
+             var theme = $(object).attr("theme");
+             var button = $(object).attr("button");
+             var activeButton = $(object).attr("act");
+             changePreviewThemeColor(theme,button,activeButton);
+        }
+        </script>
+    </body>
+</html>

+ 24 - 15
src/System Settings/index.php

@@ -1,5 +1,13 @@
 <?php
 include '../auth.php';
+include_once("../SystemAOB/functions/personalization/configIO.php");
+$theme = (getConfig("function_bar",false));
+$themeColor = "#4286f4";
+if (isset($theme["actBtnColor"][3])){
+    $themeColor = $theme["actBtnColor"][3];
+}
+
+
 ?>
 <html>
 <head>
@@ -9,9 +17,8 @@ include '../auth.php';
         setTimeout(function() { window.scrollTo(0, 1); }, 1);
       }, false);
 </script>
-<meta name="apple-mobile-web-app-capable" content="yes" />
-<meta name="viewport" content="width=device-width, initial-scale=0.7, shrink-to-fit=no">
-
+	<meta name="apple-mobile-web-app-capable" content="yes" />
+	<meta name="viewport" content="width=device-width, initial-scale=0.7, shrink-to-fit=no">
     <meta charset="UTF-8">
 	<script src="../script/jquery.min.js"></script>
     <link rel="stylesheet" href="../script/tocas/tocas.css">
@@ -39,7 +46,9 @@ include '../auth.php';
 	.sub{
 	    font-size:60% !important;
 	}
-	
+	.themeColor{
+	    color: <?php echo $themeColor;?>;
+	}
 	</style>
 </head>
 <body>
@@ -62,14 +71,14 @@ include '../auth.php';
 	<div class="doubling six column row">
         <a class="column clickable" href="navi.php?page=host">
 		<h4 class="ts center aligned icon header">
-			<i style="color:#4286f4" class="disk outline icon"></i>Host
+			<i class="disk outline icon themeColor"></i>Host
 			<div class="sub header">Host Info, WebApps, Thermal</div>
 		</h4>
 		<br>
 		</a>
         <a class="column clickable" href="navi.php?page=device">
 		<h4 class="ts center aligned icon header">
-			<i style="color:#4286f4" class="laptop icon"></i>Device
+			<i class="laptop icon themeColor"></i>Device
 			<div class="sub header">Storage, USB Mounting, IO</div>
 		</h4>
 		<br>
@@ -77,7 +86,7 @@ include '../auth.php';
 		
         <a class="column clickable" href="navi.php?page=network">
 		<h4 class="ts center aligned icon header">
-			<i style="color:#4286f4" class="wifi icon"></i>Network
+			<i class="wifi icon themeColor"></i>Network
 			<div class="sub header">WiFi Adaptor, Access Point, Ethernet</div>
 		</h4>
 		<br>
@@ -85,7 +94,7 @@ include '../auth.php';
 		
         <a class="column clickable" href="navi.php?page=theme">
 		<h4 class="ts center aligned icon header">
-			<i style="color:#4286f4" class="paint brush icon"></i>Personalization
+			<i class="paint brush icon themeColor"></i>Personalization
 			<div class="sub header">Color Scheme, Desktop Theme, Lock Screen</div>
 		</h4>
 		<br>
@@ -93,7 +102,7 @@ include '../auth.php';
 		
 		<a class="column clickable" href="navi.php?page=users">
 		<h4 class="ts center aligned icon header">
-			<i style="color:#4286f4" class="user outline icon"></i>Users
+			<i class="user outline icon themeColor"></i>Users
 			<div class="sub header">Your account, device UUID, Identification</div>
 		</h4>
 		<br>
@@ -101,7 +110,7 @@ include '../auth.php';
 		
 		<a class="column clickable" href="navi.php?page=time">
 		<h4 class="ts center aligned icon header">
-			<i style="color:#4286f4" class="clock icon"></i>Time
+			<i class="clock icon themeColor"></i>Time
 			<div class="sub header">Clock, Date Settings</div>
 		</h4>
 		<br>
@@ -109,7 +118,7 @@ include '../auth.php';
 		
 		<a class="column clickable" href="navi.php?page=file">
 		<h4 class="ts center aligned icon header">
-			<i style="color:#4286f4" class="file outline icon"></i>File & Storage
+			<i class="file outline icon themeColor"></i>File & Storage
 			<div class="sub header">File List, Clean, Search</div>
 		</h4>
 		<br>
@@ -117,7 +126,7 @@ include '../auth.php';
 		
 		<a class="column clickable" href="navi.php?page=sync">
 		<h4 class="ts center aligned icon header">
-			<i style="color:#4286f4" class="cloud upload icon"></i>ArOZ Sync
+			<i class="cloud upload icon themeColor"></i>ArOZ Sync
 			<div class="sub header">Cluster File Hosting, Disk Recovery</div>
 		</h4>
 		<br>
@@ -125,7 +134,7 @@ include '../auth.php';
 		
 		<a class="column clickable" href="navi.php?page=cluster">
 		<h4 class="ts center aligned icon header">
-			<i style="color:#4286f4" class="server icon"></i>ArOZ Clusters
+			<i class="server icon themeColor"></i>ArOZ Clusters
 			<div class="sub header">MapReduce, Cluster Settings</div>
 		</h4>
 		<br>
@@ -133,7 +142,7 @@ include '../auth.php';
 		
 		<a class="column clickable" href="navi.php?page=backup">
 		<h4 class="ts center aligned icon header">
-			<i style="color:#4286f4" class="refresh icon"></i>Backup and Restore
+			<i class="refresh icon themeColor"></i>Backup and Restore
 			<div class="sub header">Create backup, restore</div>
 		</h4>
 		<br>
@@ -141,7 +150,7 @@ include '../auth.php';
 		
 		<a class="column clickable" href="navi.php?page=about">
 		<h4 class="ts center aligned icon header">
-			<i style="color:#4286f4" class="notice icon"></i>About ArOZ
+			<i class="notice icon themeColor"></i>About ArOZ
 			<div class="sub header">More information, contact developer</div>
 		</h4>
 		<br>

+ 1 - 0
src/System Settings/navi.php

@@ -84,6 +84,7 @@ if (isset($_GET['page']) && $_GET['page']!=""){
 			array_push($sidebarContent,$lines);
 		}
 	}else{
+		header("Location: ../SystemAOB/functions/badDist.php");
 		die("[Critical Error] The defined setting menu is not found.");
 	}
 	

+ 41 - 0
src/SystemAOB/functions/badDist.php

@@ -0,0 +1,41 @@
+<html>
+	<head>
+		<title>Bad Distribution</title>
+		<meta name="apple-mobile-web-app-capable" content="yes" />
+		<meta name="viewport" content="width=device-width, initial-scale=0.7, shrink-to-fit=no">
+		<meta charset="UTF-8">
+		<script src="../../script/jquery.min.js"></script>
+		<link rel="stylesheet" href="../../script/tocas/tocas.css">
+		<script type='text/javascript' src="../../script/tocas/tocas.js"></script>
+		<style>
+			body{
+				background-color:#f7f7f7;
+			}
+		</style>
+	</head>
+	<body>
+		<div style="padding-top:100px;" class="ts container">
+			<div class="ts grid">
+				<div class="four wide column" align="right">
+					<i class="fork massive icon"></i>
+				</div>
+				<div class="twelve wide column">
+					<h1 class="ts header">
+						Bad Distribution 
+						<div class="sub header">In simple words, the function you requested do not exists in this distribution.</div>
+						<div class="sub header">
+							<details class="ts accordion">
+								<summary>
+									<i class="dropdown icon"></i> Show more details
+								</summary>
+								<div class="content">
+									<p>ArOZ Online System consists of different distributions designed to perform different tasks on different machines. Hence, each distribution has slightly different modules or system core which might lead to some invalid links pointing to a function that doesn't exists on the current distrubtions. If you encounter this message, don't panic, check the distrubtion function list and see if it is suppose to be included. If yes, seek help from our developers at <a href="http://aroz.online">aroz.online</a></p>
+								</div>
+							</details>
+						</div>
+					</h1>
+				</div>
+			</div>
+		</div>
+	</body>
+</html>

+ 1 - 1
src/SystemAOB/functions/file_system/default/txt.csv

@@ -1 +1 @@
-WriterA,embedded,file,,,1,0
+NotepadA,embedded,file,,,1,0

BIN
src/SystemAOB/functions/file_system/fsexec_arm64.elf


BIN
src/SystemAOB/functions/file_system/fszip_arm64.elf


+ 10 - 1
src/SystemAOB/functions/file_system/getDefaultApp.php

@@ -72,7 +72,16 @@ if (isset($_GET['mode']) && $_GET['mode'] != ""){
 				$data = [];
 				foreach ($content as $line){
 					$line = trim($line);
-					array_push($data,explode(",",$line));
+					$opener = explode(",",$line);
+					if (file_exists("../../../" . $opener[0])){
+					    //Only push into the list if the opening module exists
+					    array_push($data,$opener);
+					}
+					
+				}
+				if (count($data) == 0){
+				    //Opener defined but not exists in the current WebApp list
+				    die("ERROR. Defined opener do not exists.");
 				}
 				header('Content-Type: application/json');
 				echo json_encode($data);

+ 1 - 1
src/SystemAOB/functions/info/version.inf

@@ -1 +1 @@
-AOB-DEVB_v2-9-2019
+AOB-DEVB_v6-9-2019

+ 2 - 1
src/SystemAOB/functions/list_menu/index.php

@@ -252,7 +252,8 @@ if (file_exists($iconPath . $_SESSION['login'] . ".png")){
 				//If this is not Safari, hide the menu immediately
 				parent.$('#powerMenu').hide();
 			}
-			
+			$("body").css("background",parent.themeColor["theme"]);
+			$("#shutdownMenu").css("background-color",parent.themeColor["active"]);
 			$(document).ready(function(){
 			    loadModules();
                 updateUserName();

+ 3 - 1
src/SystemAOB/functions/personalization/defaults/function_bar.config

@@ -1,5 +1,7 @@
 {"fbcolor":["Function Bar Color","Functional menu bar background color in RGBA format, e.g. rgba(48,48,48,0.7)","text","rgba(48,48,48,0.7)"],
   "nbcolor":["Notification Bar Color","Notification Sidebar color in RGBA format  e.g. rgba(48,48,48,0.7)","text","rgba(48,48,48,0.7)"],
   "nbfontcolor":["Notification Bar Default Font Color","The default font color for pop-up notification. Default white.","text","white"],
-  "resizeInd":["Resize Indicator Icon","Filepath for the indicator image file.","file","img/sys/scalable.png"]
+  "resizeInd":["Resize Indicator Icon","Filepath for the indicator image file.","file","img/sys/scalable.png"],
+  "defBtnColor":["Default Button Color","The default color of the buttons on function bar in RGBA format. Default rgba(68, 68, 68,1). ","text","rgba(68, 68, 68,1)"],
+  "actBtnColor":["Active Button Color","The default color of activated buttons in RGBA format. Default rgba(34, 34, 34,1)", "text", "rgba(34, 34, 34,1)"]
 }

+ 1 - 0
src/SystemAOB/functions/personalization/sysconf/webapp_policy.config

@@ -0,0 +1 @@
+{"zipBeforeRemove":["Zip before Remove","Should the system zip and backup a module before removing a WebApp Module? (This might freeze the system on slower devices)","boolean","true"]}

+ 6 - 1
src/SystemAOB/functions/personalization/sysconfigUI.php

@@ -10,6 +10,11 @@ include_once("../../../auth.php");
         <script src="../../../script/jquery.min.js"></script>
          <script src="../../../script/ao_module.js"></script>
         <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
+        <style>
+            a{
+                cursor:pointer;
+            }
+        </style>
     </head>
     <body>
         <br><br>
@@ -37,7 +42,7 @@ include_once("../../../auth.php");
         				    foreach ($configs as $config){
         				        echo '<tr>
                                         <td>' . basename($config) . '</td>
-                                        <td><button class="ts icon basic button configEditor" configName="' .basename($config,".config") .'"><i class="external icon"></i></button></td>
+                                        <td><a class="configEditor" configName="' .basename($config,".config") .'"><i class="edit icon"></i>Edit</a></td>
                                     </tr>';
         				    }
         				

+ 53 - 42
src/SystemAOB/functions/system_management/moduleTrashBin.php

@@ -1,5 +1,10 @@
 <?php
 include '../../../auth.php';
+$settings = json_decode(file_get_contents("../personalization/sysconf/webapp_policy.config"),true);
+$requireZip = true;
+if (isset($settings["zipBeforeRemove"])){
+    $requireZip = ($settings["zipBeforeRemove"][3] == "true");
+}
 ?>
 <?php
 //A script that simulate Windows Recycle bin structure but in a self contained way
@@ -33,51 +38,57 @@ if (isset($_GET['folder']) && $_GET['folder'] != ""){
 		exit(0);
 	}
 	
-	if (isset($_GET['foldername']) && $_GET['foldername'] != ""){
-		$filename = time() . "_" . $_GET['foldername'] . ".zip";
-	}else{
-		$filename = time() . ".zip";
+	if ($requireZip){
+	    //Zip backup is needed for uninstalling modules by setting inside webapp_policy.config states
+	    if (isset($_GET['foldername']) && $_GET['foldername'] != ""){
+    		$filename = time() . "_" . $_GET['foldername'] . ".zip";
+    	}else{
+    		$filename = time() . ".zip";
+    	}
+    	if (file_exists($folder) && is_dir($folder)){
+    		//Reference from Stack Overflow
+    		//https://stackoverflow.com/questions/4914750/how-to-zip-a-whole-folder-using-php
+    		
+    		// Get real path for our folder
+    		$rootPath = realpath($folder);
+    
+    		// Initialize archive object
+    		$zip = new ZipArchive();
+    		$zip->open('TrashBin/'.$filename , ZipArchive::CREATE | ZipArchive::OVERWRITE);
+    
+    		// Create recursive directory iterator
+    		/** @var SplFileInfo[] $files */
+    		$files = new RecursiveIteratorIterator(
+    			new RecursiveDirectoryIterator($rootPath),
+    			RecursiveIteratorIterator::LEAVES_ONLY
+    		);
+    
+    		foreach ($files as $name => $file)
+    		{
+    			// Skip directories (they would be added automatically)
+    			if (!$file->isDir())
+    			{
+    				// Get real and relative path for current file
+    				$filePath = $file->getRealPath();
+    				$relativePath = substr($filePath, strlen($rootPath) + 1);
+    
+    				// Add current file to archive
+    				$zip->addFile($filePath, $relativePath);
+    			}
+    		}
+    
+    		// Zip archive will be created only after closing object
+    		$zip->close();
+    		echo $filename;
+    	}else{
+    		die('ERROR. Folder path not found or it is not a folder.');
+    	}
 	}
+	//Remove the module directory
 	if (file_exists($folder) && is_dir($folder)){
-		//Reference from Stack Overflow
-		//https://stackoverflow.com/questions/4914750/how-to-zip-a-whole-folder-using-php
-		
-		// Get real path for our folder
-		$rootPath = realpath($folder);
-
-		// Initialize archive object
-		$zip = new ZipArchive();
-		$zip->open('TrashBin/'.$filename , ZipArchive::CREATE | ZipArchive::OVERWRITE);
-
-		// Create recursive directory iterator
-		/** @var SplFileInfo[] $files */
-		$files = new RecursiveIteratorIterator(
-			new RecursiveDirectoryIterator($rootPath),
-			RecursiveIteratorIterator::LEAVES_ONLY
-		);
-
-		foreach ($files as $name => $file)
-		{
-			// Skip directories (they would be added automatically)
-			if (!$file->isDir())
-			{
-				// Get real and relative path for current file
-				$filePath = $file->getRealPath();
-				$relativePath = substr($filePath, strlen($rootPath) + 1);
-
-				// Add current file to archive
-				$zip->addFile($filePath, $relativePath);
-			}
-		}
-
-		// Zip archive will be created only after closing object
-		$zip->close();
-		echo $filename;
-		delete_directory($folder);
-
-	}else{
-		echo 'ERROR. Folder path not found or it is not a folder.';
+	    delete_directory($folder);
 	}
+	
 }else{
 	echo 'ERROR. Invalid folder path.';
 	

+ 0 - 1
src/SystemAOB/functions/system_statistic/WIN32_USBlist.txt

@@ -1 +0,0 @@
-Generic USB Hub,Standard Enhanced PCI to USB Host Controller,Realtek RTL8192CU Wireless LAN 802.11n USB 2.0 Network Adapter,Generic USB Hub,Standard Enhanced PCI to USB Host Controller,Intel(R) USB 3.0 可延伸主機控制器,USB Composite Device,USB Root Hub,USB Root Hub,Intel(R) USB 3.0 根集線器,

Різницю між файлами не показано, бо вона завелика
+ 1 - 1
src/function_bar.js


+ 32 - 9
src/function_bar.php

@@ -35,6 +35,11 @@ body{
 	background:<?php echo $theme["fbcolor"][3];?>;
 	
 }
+.fwPanelColor{
+	background:<?php echo $theme["fbcolor"][3];?>;
+}
+
+
 .notificationbar{
 	position:fixed;
 	top:0px;
@@ -44,7 +49,6 @@ body{
 	bottom: 34px;
 	background:<?php echo $theme["nbcolor"][3];?>;
 	right:0px;
-	border-left: 1px solid #4c4c4c;
 	padding: 20px;
 	padding-left: 25px;
 	color: <?php echo $theme["nbfontcolor"][3];?>;
@@ -93,7 +97,24 @@ body{
 }
 
 .selectable:hover{
-	background-color:#424242;
+	background-color:<?php echo $theme["actBtnColor"][3];?>;
+}
+
+.menuButton.active{
+	background-color:<?php echo $theme["actBtnColor"][3];?>;
+}
+
+.menuButton{
+	background-color:<?php echo $theme["defBtnColor"][3];?>;
+	width:60px;
+	height60px:
+	border: 1px solid red;
+	padding: .4em;
+}
+.toggleBtn{
+	width:59px;
+	height:49px;
+	padding-top:5px;
 }
 </style>
 <?php
@@ -119,13 +140,13 @@ foreach ($folders as $module){
 				<!-- First Left hand side system icons-->
 				<div class="eight wide column" style="left:2%;">
 					<div id="activatedModuleIcons" class="ts grid" style="line-height: 35px;" align="center">
-						<div class="one wide column" style="cursor: pointer;" onClick="ToogleMenuBar();"><i class="dropdown large icon" style="line-height: 35px;"></i></div>
-						<div class="one wide column" style="background-color:#111111;cursor: pointer;height:60px;" onClick="TooglePowerManuel(this);"><i class="cloud large icon" style="line-height: 35px;padding-top:3px;"></i></div>
-						<div id="folderBtn" class="one wide column" style="cursor: pointer;background-color: #333;height:60px;" onClick="ToogleFileExplorer();">
+						<div class="toggleBtn" style="cursor: pointer;" onClick="ToogleMenuBar();"><i class="dropdown large icon" style="line-height: 35px;"></i></div>
+						<div class="menuButton active" style="cursor: pointer;height:60px;" onClick="TooglePowerManuel(this);"><i class="cloud large icon" style="line-height: 35px;padding-top:3px;"></i></div>
+						<div id="folderBtn" class="menuButton" style="cursor: pointer;height:60px;" onClick="ToogleFileExplorer();">
 							<i class="folder outline icon" style="line-height: 35px;"></i>
 						</div>
 						<!-- New windows will be added here-->
-						<div id="moreBtn" class="one wide column" style="cursor: pointer;background-color: #333;height:60px;" onClick="AddWindows();" ><i class="plus icon" style="line-height: 35px;"></i></div>
+						<div id="moreBtn" class="menuButton" style="cursor: pointer;height:60px;" onClick="AddWindows();" ><i class="plus icon" style="line-height: 35px;"></i></div>
 					</div>
 				</div>
 				<!-- Second Right hand side tray icons -->
@@ -151,7 +172,7 @@ foreach ($folders as $module){
 	</div>
 	
 	<!-- floatWindow List Window -->
-	<div id="fwListWindow" style="overflow: hidden;position: fixed;left: 100;min-width: 250px;bottom:34px;min-height:40px;display:none;background-color:#282828;z-index:150;">
+	<div id="fwListWindow" class="fwPanelColor" style="overflow: hidden;position: fixed;left: 100;min-width: 250px;bottom:34px;min-height:40px;display:none;z-index:150;">
 	<div class="selectable" style="border:1px solid transparent;padding:10px;"><p class="ts inverted header" style="font-size:0.9em;">
 		<i class="spinner loading icon"></i>Loading...
 	</p></div>
@@ -245,13 +266,13 @@ foreach ($folders as $module){
 	
 	<!-- New Window Cloning Code -->
 	<div id="newWindow" style="border: 0px;overflow: hidden;position: fixed;left: 0;width: 720px;bottom:45px;height:480px;display:none;z-index:1;background-color:white;">
-		<div class="floatWindow" style="width:100%; position: relative; background-color:#333;color:white;left:0;top:0;height:20px;z-index:8;overflow:hidden;text-overflow: ellipsis;white-space: nowrap;cursor: context-menu;">
+		<div class="floatWindow fwPanelColor" style="width:100%; position: relative; color:white;left:0;top:0;height:20px;z-index:8;overflow:hidden;text-overflow: ellipsis;white-space: nowrap;cursor: context-menu;">
 		  <i class="folder icon"></i>%WINDOW_TITLE%
 		<div style="top:2px;right:3px;cursor: pointer;position:absolute;" class="closeWindow"><i class="remove icon"></i></div>
 		<div style="top:5px;right:25px;cursor: pointer;position:absolute;" class="maximizeWindow"><i class="small window maximize icon"></i></div>
 		<div style="top:5px;right:47px;cursor: pointer;position:absolute;" class="minimizeWindow"><i class="minus icon"></i></div>
 		</div>
-		<iframe style="width:100%;height: -webkit-calc(100% - 20px);height: -moz-calc(100% - 20px);height:calc(100% - 20px); bottom:0;position:absolute;top:20px;" src="%srcPath%" frameborder="1"></iframe>
+		<iframe style="width:100%;height: -webkit-calc(100% - 20px);height: -moz-calc(100% - 20px);height:calc(100% - 20px); bottom:0;position:absolute;top:20px;" src="about:blank" frameborder="1"></iframe>
 		<div class="resizeWindow" align="center"></div>
 	</div>
 	
@@ -280,6 +301,8 @@ foreach ($folders as $module){
 	<div style="display:none;">
 		<div id="DATA_PIPELINE_supportedModules"><?php echo json_encode($supportedModules); ?></div>
 		<div id="DATA_PIPELINE_windowID"><?php $date = date_create(); echo date_timestamp_get($date);?></div>
+		<div id="DATA_PIPELINE_themeColor"><?php echo $theme["fbcolor"][3];?></div>
+		<div id="DATA_PIPELINE_activeColor"><?php echo $theme["actBtnColor"][3];?></div>
 	</div>
 	<script src="function_bar.js"></script>
 </body>

Деякі файли не було показано, через те що забагато файлів було змінено