瀏覽代碼

auto update script executed

Toby Chui 1 年之前
父節點
當前提交
8dc8ef506d
共有 4 個文件被更改,包括 29 次插入5 次删除
  1. 2 2
      web/index.html
  2. 3 2
      web/main.css
  3. 5 1
      web/snippet/basicAuthEditor.html
  4. 19 0
      web/snippet/placeholder.html

+ 2 - 2
web/index.html

@@ -135,7 +135,7 @@
             <div class="fadingBackground" onclick="hideSideWrapper();"></div>
             <div class="content">
                 <div class="sideWrapperMenu"></div>
-                <iframe src=""></iframe>
+                <iframe src="snippet/placeholder.html"></iframe>
             </div>
         </div>
         <br><br>
@@ -299,7 +299,7 @@
 
             function hideSideWrapper(discardFrameContent = false){
                 if (discardFrameContent){
-                    $(".sideWrapper iframe").attr("src", "about:blank");
+                    $(".sideWrapper iframe").attr("src", "snippet/placeholder.html");
                 }
                 if ($(".sideWrapper .content").transition("is animating") || !$(".sideWrapper .content").transition("is visible")){
                     return

+ 3 - 2
web/main.css

@@ -129,6 +129,7 @@ body{
     height: 100%;
     width: calc(100% - 5em);
     max-width: 500px;
+    z-index: 10;
 }
 
 .sideWrapper .content{
@@ -146,10 +147,10 @@ body{
 
 .sideWrapper .fadingBackground{
     position: fixed;
-    top: 0;
+    top: 52px;
     left: 0;
     width: 100%;
-    height: 100%;
+    height: calc(100% - 52px);
     background-color: rgba(38,38,38,0.26);
 }
 

+ 5 - 1
web/snippet/basicAuthEditor.html

@@ -40,7 +40,11 @@
                             <input id="inlineEditBasicAuthCredPassword" type="password" placeholder="Password" autocomplete="off">
                         </div>
                         <div class="field" >
-                            <button class="ui basic button" style="float: right;" onclick="addCredentialsToEditingList();"><i class="blue add icon"></i> Add Credential</button>
+                            <button class="ui basic button" onclick="addCredentialsToEditingList();"><i class="blue add icon"></i> Add Credential</button>
+                        </div>
+                        <div class="ui divider"></div>
+                        <div class="field" >
+                            <button class="ui basic button"  style="float: right;" onclick="saveCredentials();"><i class="green save icon"></i> Save</button>
                             <button class="ui basic button"  style="float: right;" onclick="cancelCredentialEdit();"><i class="remove icon"></i> Cancel</button>
                         </div>
                     </div>

+ 19 - 0
web/snippet/placeholder.html

@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+    <head>
+        <link rel="stylesheet" href="../script/semantic/semantic.min.css">
+        <script src="../script/jquery-3.6.0.min.js"></script>
+        <script src="../script/semantic/semantic.min.js"></script>
+        <style>
+            body{
+                height: 100%;
+                width: 100%;
+            }
+        </style>
+    </head>
+    <body>
+        <div class="ui active inverted dimmer">
+            <div class="ui text loader">Loading Snippet</div>
+        </div>
+    </body>
+</html>