]> OzVa Git service - ozva-cloud/commitdiff
fix: ui path table show move action (#219)
authorsigoden <sigoden@gmail.com>
Thu, 1 Jun 2023 12:33:21 +0000 (20:33 +0800)
committerGitHub <noreply@github.com>
Thu, 1 Jun 2023 12:33:21 +0000 (20:33 +0800)
assets/index.css
assets/index.js

index 4bc1ff42d22db01cbc42d3bdc11608ab258306e9..c68f139aa8af30f3b563bd48ad50729c02ba07e6 100644 (file)
@@ -148,7 +148,7 @@ body {
 }
 
 .paths-table .cell-actions {
-  width: 75px;
+  width: 90px;
   display: flex;
   padding-left: 0.6em;
 }
index fa9259e35fa75d83136104649a21935a2c7cf02c..56c400c6e54949ecc9918be9abfa8cc7b1d5d65c 100644 (file)
@@ -379,9 +379,8 @@ function addPath(file, index) {
   }
   if (DATA.allow_delete) {
     if (DATA.allow_upload) {
-      if (isDir) {
-        actionMove = `<div onclick="movePath(${index})" class="action-btn" id="moveBtn${index}" title="Move to new path">${ICONS.move}</div>`;
-      } else {
+      actionMove = `<div onclick="movePath(${index})" class="action-btn" id="moveBtn${index}" title="Move to new path">${ICONS.move}</div>`;
+      if (!isDir) {
         actionEdit = `<a class="action-btn" title="Edit file" target="_blank" href="${url}?edit">${ICONS.edit}</a>`;
       }
     }
@@ -392,8 +391,8 @@ function addPath(file, index) {
   <td class="cell-actions">
     ${actionDownload}
     ${actionMove}
-    ${actionEdit}
     ${actionDelete}
+    ${actionEdit}
   </td>`
 
   $pathsTableBody.insertAdjacentHTML("beforeend", `