Browse Source

increased the reactivity of the webpage

pull/51/head
Joe Koop 3 years ago
parent
commit
837ddb1888
No known key found for this signature in database
GPG Key ID: B2D0C6242D5AC1FF
  1. 10
      assets/index.css
  2. 6
      assets/index.html
  3. 8
      assets/index.js

10
assets/index.css

@ -4,10 +4,6 @@ html { @@ -4,10 +4,6 @@ html {
color: #24292e;
}
body {
width: 700px;
}
.hidden {
display: none;
}
@ -152,10 +148,10 @@ body { @@ -152,10 +148,10 @@ body {
height: 100%;
fill: rgba(3,47,98,0.5);
padding-right: 0.5em;
vertical-align: text-top;
}
.path {
display: flex;
list-style: none;
}
@ -166,6 +162,8 @@ body { @@ -166,6 +162,8 @@ body {
overflow: hidden;
display: block;
text-decoration: none;
max-width: calc(100vw - 375px);
min-width: 400px;
}
.path a:hover {
@ -203,7 +201,7 @@ body { @@ -203,7 +201,7 @@ body {
svg,
.path svg {
fill: #d0e6ff;
fill: #fff;
}
.searchbar {

6
assets/index.html

@ -35,7 +35,7 @@ @@ -35,7 +35,7 @@
<table class="uploaders-table hidden">
<thead>
<tr>
<th class="cell-name">Name</th>
<th class="cell-name" colspan="2">Name</th>
<th class="cell-status">Speed - Progress - Time Left</th>
</tr>
</thead>
@ -43,8 +43,8 @@ @@ -43,8 +43,8 @@
<table class="paths-table hidden">
<thead>
<tr>
<th class="cell-name">Name</th>
<th class="cell-mtime">Date modify</th>
<th class="cell-name" colspan="2">Name</th>
<th class="cell-mtime">Last modified</th>
<th class="cell-size">Size</th>
<th class="cell-actions">Actions</th>
</tr>

8
assets/index.js

@ -72,7 +72,7 @@ class Uploader { @@ -72,7 +72,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>
@ -185,8 +185,10 @@ function addPath(file, index) { @@ -185,8 +185,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>
@ -292,7 +294,7 @@ function formatMtime(mtime) { @@ -292,7 +294,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) {

Loading…
Cancel
Save