Skip to content

Commit

Permalink
fix: ui path table show move action (sigoden#219)
Browse files Browse the repository at this point in the history
  • Loading branch information
sigoden authored Jun 1, 2023
1 parent f8ea416 commit 4622c48
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion assets/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ body {
}

.paths-table .cell-actions {
width: 75px;
width: 90px;
display: flex;
padding-left: 0.6em;
}
Expand Down
7 changes: 3 additions & 4 deletions assets/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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>`;
}
}
Expand All @@ -392,8 +391,8 @@ function addPath(file, index) {
<td class="cell-actions">
${actionDownload}
${actionMove}
${actionEdit}
${actionDelete}
${actionEdit}
</td>`

$pathsTableBody.insertAdjacentHTML("beforeend", `
Expand Down

0 comments on commit 4622c48

Please sign in to comment.