about summary refs log tree commit diff stats
path: root/src/pages/options/general
diff options
context:
space:
mode:
authorManeraKai <manerakai@protonmail.com>2022-02-27 16:18:21 +0300
committerManeraKai <manerakai@protonmail.com>2022-02-27 16:18:21 +0300
commit795c760d8ee2d3217c0fd8e27942aa161a900973 (patch)
tree21e9312b51e65086d17ff389ff3b828978d9cd77 /src/pages/options/general
parentMerge branch 'master' of https://github.com/libredirect/libredirect (diff)
downloadlibredirect-795c760d8ee2d3217c0fd8e27942aa161a900973.zip
Improving the design #60
Diffstat (limited to 'src/pages/options/general')
-rw-r--r--src/pages/options/general/general.html29
-rw-r--r--src/pages/options/general/general.js3
2 files changed, 28 insertions, 4 deletions
diff --git a/src/pages/options/general/general.html b/src/pages/options/general/general.html
index 6860264a..79b8dfb9 100644
--- a/src/pages/options/general/general.html
+++ b/src/pages/options/general/general.html
@@ -12,9 +12,10 @@
 <body class="option">
   <section class="links">
     <div class="title">
-      <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
-        <path d="M0 0h24v24H0V0z" fill="none" />
-        <path d="M12 5.69l5 4.5V18h-2v-6H9v6H7v-7.81l5-4.5M12 3L2 12h3v8h6v-6h2v6h6v-8h3L12 3z" />
+      <svg xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24" height="26px" viewBox="0 0 24 24"
+        width="26px" fill="currentColor">
+        <path
+          d="M19.14,12.94c0.04-0.3,0.06-0.61,0.06-0.94c0-0.32-0.02-0.64-0.07-0.94l2.03-1.58c0.18-0.14,0.23-0.41,0.12-0.61 l-1.92-3.32c-0.12-0.22-0.37-0.29-0.59-0.22l-2.39,0.96c-0.5-0.38-1.03-0.7-1.62-0.94L14.4,2.81c-0.04-0.24-0.24-0.41-0.48-0.41 h-3.84c-0.24,0-0.43,0.17-0.47,0.41L9.25,5.35C8.66,5.59,8.12,5.92,7.63,6.29L5.24,5.33c-0.22-0.08-0.47,0-0.59,0.22L2.74,8.87 C2.62,9.08,2.66,9.34,2.86,9.48l2.03,1.58C4.84,11.36,4.8,11.69,4.8,12s0.02,0.64,0.07,0.94l-2.03,1.58 c-0.18,0.14-0.23,0.41-0.12,0.61l1.92,3.32c0.12,0.22,0.37,0.29,0.59,0.22l2.39-0.96c0.5,0.38,1.03,0.7,1.62,0.94l0.36,2.54 c0.05,0.24,0.24,0.41,0.48,0.41h3.84c0.24,0,0.44-0.17,0.47-0.41l0.36-2.54c0.59-0.24,1.13-0.56,1.62-0.94l2.39,0.96 c0.22,0.08,0.47,0,0.59-0.22l1.92-3.32c0.12-0.22,0.07-0.47-0.12-0.61L19.14,12.94z M12,15.6c-1.98,0-3.6-1.62-3.6-3.6 s1.62-3.6,3.6-3.6s3.6,1.62,3.6,3.6S13.98,15.6,12,15.6z" />
       </svg>
       <a href="../general/general.html" class="selected">General</a>
     </div>
@@ -125,19 +126,41 @@
 
     <div class="buttons buttons-inline">
       <a class="button button-inline" id="update-instances">
+        <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
+          <path d="M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z" />
+        </svg>
         Update Instances
       </a>
       &nbsp; &nbsp;
       <label for="import-settings" class="button button-inline">
+        <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
+          <path
+            d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z" />
+        </svg>&nbsp;
         Import Settings
         <input type="file" class="button button-inline" style="display:none;" id="import-settings">
       </label>
       &nbsp; &nbsp;
       <a class="button button-inline" id="export-settings">
+        <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
+          <path
+            d="M10.09 15.59L11.5 17l5-5-5-5-1.41 1.41L12.67 11H3v2h9.67l-2.58 2.59zM19 3H5c-1.11 0-2 .9-2 2v4h2V5h14v14H5v-4H3v4c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z" />
+        </svg>&nbsp;
         Export Settings
       </a>
       &nbsp; &nbsp;
       <a class="button button-inline" id="reset-settings">
+        <svg xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24" height="24px" viewBox="0 0 24 24"
+          width="24px" fill="currentColor">
+          <g>
+            <g>
+              <path
+                d="M12,5V2L8,6l4,4V7c3.31,0,6,2.69,6,6c0,2.97-2.17,5.43-5,5.91v2.02c3.95-0.49,7-3.85,7-7.93C20,8.58,16.42,5,12,5z" />
+              <path
+                d="M6,13c0-1.65,0.67-3.15,1.76-4.24L6.34,7.34C4.9,8.79,4,10.79,4,13c0,4.08,3.05,7.44,7,7.93v-2.02 C8.17,18.43,6,15.97,6,13z" />
+            </g>
+          </g>
+        </svg>
         Reset Settings
       </a>
     </div>
diff --git a/src/pages/options/general/general.js b/src/pages/options/general/general.js
index f8a6e46a..08b356e1 100644
--- a/src/pages/options/general/general.js
+++ b/src/pages/options/general/general.js
@@ -21,11 +21,12 @@ themeElement.addEventListener("change", (event) => {
 });
 
 document.getElementById("update-instances").addEventListener("click", () => {
+  let oldHtml = document.getElementById("update-instances").innerHTML
   document.getElementById("update-instances").innerHTML = '...';
   if (commonHelper.updateInstances()) {
     document.getElementById("update-instances").innerHTML = 'Done!';
     new Promise(resolve => setTimeout(resolve, 1500)).then( // sleep 1500ms
-      () => document.getElementById("update-instances").innerHTML = 'Update Instances'
+      () => document.getElementById("update-instances").innerHTML = oldHtml
     )
   }
   else