Browse Source

auto update script executed

Toby Chui 1 year ago
parent
commit
371c6aa74f
4 changed files with 164 additions and 57 deletions
  1. 27 0
      web/img/logo.ai
  2. BIN
      web/img/logo.png
  3. 36 0
      web/img/logo.svg
  4. 101 57
      web/index.html

File diff suppressed because it is too large
+ 27 - 0
web/img/logo.ai


BIN
web/img/logo.png


+ 36 - 0
web/img/logo.svg

@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg version="1.1" id="圖層_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+	 width="600px" height="200px" viewBox="0 0 600 200" enable-background="new 0 0 600 200" xml:space="preserve">
+<g>
+	<path fill="#213040" d="M138.761,47.403l-16.064,17.87c9.504,8.549,15.48,20.94,15.48,34.728c0,13.785-5.976,26.179-15.48,34.726
+		l16.063,17.871c14.393-12.945,23.445-31.717,23.445-52.597C162.206,79.115,153.155,60.351,138.761,47.403z"/>
+	<path fill="#213040" d="M44.198,152.596l16.064-17.869c-9.503-8.547-15.48-20.941-15.48-34.726c0-13.79,5.978-26.179,15.48-34.728
+		l-16.063-17.87C29.807,60.351,20.753,79.115,20.753,100C20.753,120.881,29.807,139.652,44.198,152.596z"/>
+</g>
+<polygon fill="#A9D1F3" points="106.581,38.326 91.48,56.48 76.38,38.326 "/>
+<polygon fill="#A9D1F3" points="106.581,143.52 91.48,161.674 76.379,143.52 "/>
+<circle fill="#A9D1F3" cx="91.48" cy="100" r="22.422"/>
+<g>
+	<path d="M194.194,132.898l43.232-66.846h-39.238V54.539h56.155v8.224l-43.233,66.729h43.703v11.629h-60.619V132.898z"/>
+	<path d="M263.038,108.814c0-21.499,14.45-33.951,30.544-33.951c15.977,0,30.31,12.452,30.31,33.951
+		c0,21.498-14.333,33.951-30.31,33.951C277.488,142.766,263.038,130.313,263.038,108.814z M310.029,108.814
+		c0-13.627-6.344-22.791-16.447-22.791c-10.221,0-16.564,9.164-16.564,22.791c0,13.744,6.344,22.674,16.564,22.674
+		C303.686,131.488,310.029,122.559,310.029,108.814z"/>
+	<path d="M339.869,76.391h11.042l1.176,11.629h0.234c4.582-8.223,11.396-13.156,18.444-13.156c3.173,0,5.169,0.471,7.166,1.293
+		l-2.35,11.863c-2.349-0.704-3.877-1.057-6.578-1.057c-5.287,0-11.632,3.643-15.626,13.981v40.177h-13.509V76.391z"/>
+	<path d="M380.868,123.969c0-13.98,11.748-21.146,38.649-24.082c-0.115-7.402-2.819-13.98-12.334-13.98
+		c-6.813,0-13.158,3.056-18.68,6.578l-5.052-9.162c6.696-4.23,15.742-8.459,26.08-8.459c16.096,0,23.497,10.104,23.497,27.374
+		v38.884h-11.044l-1.058-7.4h-0.469c-5.875,5.051-12.806,9.045-20.56,9.045C388.739,142.766,380.868,135.365,380.868,123.969z
+		 M419.518,124.322V108.58c-19.147,2.23-25.61,7.166-25.61,14.332c0,6.461,4.348,9.047,10.104,9.047
+		C409.649,131.959,414.231,129.256,419.518,124.322z"/>
+	<path d="M464.63,107.405l-19.383-31.015h14.686l7.636,13.039c1.996,3.643,3.995,7.285,6.109,10.927h0.587
+		c1.645-3.642,3.406-7.284,5.287-10.927l6.813-13.039h14.099l-19.386,32.424l20.795,32.307h-14.685l-8.459-13.744
+		c-2.115-3.76-4.346-7.754-6.697-11.396h-0.586c-1.997,3.643-3.995,7.52-5.992,11.396l-7.518,13.744h-14.098L464.63,107.405z"/>
+	<path d="M508.096,166.85l2.586-10.574c1.176,0.354,3.054,0.939,4.815,0.939c6.932,0,11.045-5.168,13.394-12.1l1.41-4.463
+		l-25.611-64.262h13.746l11.865,33.363c1.996,5.758,3.993,12.1,5.991,18.209h0.587c1.645-5.992,3.406-12.334,5.053-18.209
+		l10.456-33.363h13.038l-23.73,68.607c-5.051,13.863-11.865,23.143-25.375,23.143C512.914,168.141,510.329,167.672,508.096,166.85z"
+		/>
+</g>
+</svg>

+ 101 - 57
web/index.html

@@ -6,13 +6,12 @@
         <meta charset="UTF-8">
         <meta name="theme-color" content="#4b75ff">
         <link rel="icon" type="image/png" href="./favicon.png" />
-        <title>Portal | Zoraxy</title>
+        <title>Control Panel | Zoraxy</title>
         <link rel="stylesheet" href="script/semantic/semantic.min.css">
         <script src="script/jquery-3.6.0.min.js"></script>
         <script src="../script/ao_module.js"></script>
         <script src="script/semantic/semantic.min.js"></script>
         <script src="script/tablesort.js"></script>
-        <title>Reverse Proxy</title>
         <style>
             body{
                 background-color:white;
@@ -21,76 +20,113 @@
             .functiontab{
                 display:none;
             }
+
+            .menubar{
+                width: 100%;
+                padding: 0.4em;
+                padding-left: 1.2em;
+                padding-right: 1.2em;
+                background-color: #f5f5f5;
+                margin-bottom: 1em;
+            }
+
+            .menubar .logo{
+                height: 36px;
+            }
+
+            .menubar .item{
+                display: inline-block;
+                vertical-align: middle;
+            }
+
+            .wrapper{
+                display: flex;
+                flex-wrap: wrap; 
+            }
+
+            .toolbar{
+                width: 240px;
+            }
+
+            .contentWindow{
+                padding: 1em;
+                flex: 1;
+            }
         </style>
     </head>
     <body>
-        <br>
-        <div class="ui container">
-            <h3><img class="ui middle aligned mini image" src="img/small_icon.png" style="margin-right:1em;"> Reverse Proxy Settings</h3>
-            <div class="ui divider"></div>
-            <div id="errmsg" class="ui red message" style="display: none;"></div>
-            <div class="ui stackable grid">
-                <div class="four wide column">
-                    <div id="mainmenu" class="ui secondary vertical pointing menu">
-                        <a class="item active" tag="status">
-                            <i class="info circle icon"></i>Status
-                        </a>
-                        <a class="item" tag="vdir">
-                            <i class="folder icon"></i> Virtual Directory
-                        </a>
-                        <a class="item" tag="subd">
-                            <i class="sitemap icon"></i> Subdomain Proxy
-                        </a>
-                        <a class="item" tag="rules">
-                            <i class="plus square icon"></i> Create Proxy Rules
-                        </a>
-                        <a class="item" tag="setroot">
-                            <i class="home icon"></i> Set Proxy Root
-                        </a>
-                        <div class="ui divider"></div>
-                        <a class="item" tag="cert">
-                            <i class="lock icon"></i> TLS / SSL certificate
-                        </a>
-                        <a class="item" tag="redirectset">
-                            <i class="level up alternate icon"></i> Redirection
-                        </a>
-                    </div>
+        <div class="menubar">
+            <div class="item">
+                <img class="logo" src="img/logo.svg">
+            </div>
+
+            <div class="ui right floated buttons" style="padding-top: 2px;">
+                <button class="ui basic icon button" onclick="logout();"><i class="sign-out icon"></i></button>
+            </div>
+        </div>
+        <div id="errmsg" class="ui red message" style="display: none;"></div>
+        <div class="wrapper">
+            <div class="toolbar">
+                <div id="mainmenu" class="ui secondary vertical pointing menu">
+                    <a class="item active" tag="status">
+                        <i class="info circle icon"></i>Status
+                    </a>
+                    <a class="item" tag="vdir">
+                        <i class="folder icon"></i> Virtual Directory
+                    </a>
+                    <a class="item" tag="subd">
+                        <i class="sitemap icon"></i> Subdomain Proxy
+                    </a>
+                    <a class="item" tag="rules">
+                        <i class="plus square icon"></i> Create Proxy Rules
+                    </a>
+                    <a class="item" tag="setroot">
+                        <i class="home icon"></i> Set Proxy Root
+                    </a>
+                    <div class="ui divider"></div>
+                    <a class="item" tag="cert">
+                        <i class="lock icon"></i> TLS / SSL certificate
+                    </a>
+                    <a class="item" tag="redirectset">
+                        <i class="level up alternate icon"></i> Redirection
+                    </a>
+                </div>
+            </div>
+            <div class="contentWindow">
+                <!-- Status Tab -->
+                <div id="status" class="functiontab" target="status.html" style="display: block ;">
+                    <br><br><div class="ui active centered inline loader"></div>
                 </div>
-                <div class="twelve wide column">
-                    <!-- Status Tab -->
-                    <div id="status" class="functiontab" target="status.html" style="display: block ;">
-                        <br><br><div class="ui active centered inline loader"></div>
-                    </div>
 
-                    <!-- Virtual Directory Tab -->
-                    <div id="vdir" class="functiontab" target="vdir.html"></div>
+                <!-- Virtual Directory Tab -->
+                <div id="vdir" class="functiontab" target="vdir.html"></div>
 
-                    <!-- Subdomain Proxy -->
-                    <div id="subd" class="functiontab" target="subd.html"></div>
+                <!-- Subdomain Proxy -->
+                <div id="subd" class="functiontab" target="subd.html"></div>
 
-                    <!-- Create Rules -->
-                    <div id="rules" class="functiontab" target="rules.html"></div>
+                <!-- Create Rules -->
+                <div id="rules" class="functiontab" target="rules.html"></div>
 
-                    <!-- Set proxy root -->
-                    <div id="setroot" class="functiontab" target="rproot.html"></div>
+                <!-- Set proxy root -->
+                <div id="setroot" class="functiontab" target="rproot.html"></div>
 
-                    <!-- Set TLS cert -->
-                    <div id="cert" class="functiontab" target="cert.html"></div>
+                <!-- Set TLS cert -->
+                <div id="cert" class="functiontab" target="cert.html"></div>
 
-                    <!-- Redirections -->
-                    <div id="redirectset" class="functiontab" target="redirection.html"></div>
-                </div>
-              </div>
+                <!-- Redirections -->
+                <div id="redirectset" class="functiontab" target="redirection.html"></div>
             </div>
-            <br><br>
-            <div class="ui divider"></div>
-            <div class="ui container" style="color: grey; font-size: 90%">
-                <p>Reverse Proxy Subservice. CopyRight imuslab, Licensed under MIT</p>
             </div>
-           
         </div>
+        <br><br>
+        <div class="ui divider"></div>
+        <div class="ui container" style="color: grey; font-size: 90%">
+            <p>CopyRight Zoraxy project and its author, 2022 - <span class="year"></span></p>
+        </div>
+           
         <br><br>
         <script>
+            $(".year").text(new Date().getFullYear());
             /*
                 Loader function
 
@@ -151,6 +187,14 @@
                 $('table').tablesort();
             });
 
+            function logout() {
+                $.get("/api/auth/logout", function(response) {
+                    if (response === "OK") {
+                        window.location.href = "/";
+                    }
+                });
+            }
+
             function getTabButtonById(targetTabId){
                 let targetTabBtn = undefined;
                 $("#mainmenu").find(".item").each(function(){

Some files were not shown because too many files changed in this diff