mirror of
https://github.com/sigoden/dufs.git
synced 2026-04-09 00:59:02 +03:00
feat: reactive webpage (#51)
This commit is contained in:
@@ -68,7 +68,7 @@ class Uploader {
|
||||
$uploadersTable.insertAdjacentHTML("beforeend", `
|
||||
<tr id="upload${idx}" class="uploader">
|
||||
<td class="path cell-name">
|
||||
<div>${getSvg("File")}</div>
|
||||
${getSvg("File")}
|
||||
<a href="${url}">${name}</a>
|
||||
</td>
|
||||
<td class="cell-status upload-status" id="uploadStatus${idx}"></td>
|
||||
@@ -188,8 +188,10 @@ function addPath(file, index) {
|
||||
|
||||
$pathsTableBody.insertAdjacentHTML("beforeend", `
|
||||
<tr id="addPath${index}">
|
||||
<td class="path cell-icon">
|
||||
${getSvg(file.path_type)}
|
||||
</td>
|
||||
<td class="path cell-name">
|
||||
<div>${getSvg(file.path_type)}</div>
|
||||
<a href="${url}" title="${file.name}">${file.name}</a>
|
||||
</td>
|
||||
<td class="cell-mtime">${formatMtime(file.mtime)}</td>
|
||||
@@ -295,7 +297,7 @@ function formatMtime(mtime) {
|
||||
const day = padZero(date.getDate(), 2);
|
||||
const hours = padZero(date.getHours(), 2);
|
||||
const minutes = padZero(date.getMinutes(), 2);
|
||||
return `${year}/${month}/${day} ${hours}:${minutes}`;
|
||||
return `${year}-${month}-${day} ${hours}:${minutes}`;
|
||||
}
|
||||
|
||||
function padZero(value, size) {
|
||||
|
||||
Reference in New Issue
Block a user