From 7c540b890307bd6c1a07690c49687ce7380ef9f6 Mon Sep 17 00:00:00 2001
From: Danny Coates
Date: Tue, 26 Feb 2019 17:22:45 -0800
Subject: [PATCH] updated tiles styles
---
app/ui/archiveTile.js | 178 ++++++++++++++++++++++--------------------
1 file changed, 92 insertions(+), 86 deletions(-)
diff --git a/app/ui/archiveTile.js b/app/ui/archiveTile.js
index fd9df365..eb0dd679 100644
--- a/app/ui/archiveTile.js
+++ b/app/ui/archiveTile.js
@@ -112,12 +112,25 @@ function fileInfo(file, action) {
${bytes(
file.size
)}
- ${file.type}
${action}
`;
}
+function archiveInfo(archive, action) {
+ return html`
+
+
+
+
${archive.name}
+ ${bytes(
+ archive.size
+ )}
+
+ ${action}
+ `;
+}
+
function archiveDetails(translate, archive) {
if (archive.manifest.files.length > 1) {
return html`
@@ -191,33 +204,33 @@ module.exports = function(state, emit, archive) {
`;
return html`
-
-
-
-
-
${archive.name}
- ${bytes(
- archive.size
- )}
-
-
- ${expiryInfo(state.translate, archive)}
-
- ${archiveDetails(state.translate, archive)}
-
-
- ${dl}
- ${copyOrShare}
-
- `;
+
+ ${archiveInfo(
+ archive,
+ html`
+
+ `
+ )}
+
+ ${expiryInfo(state.translate, archive)}
+
+ ${archiveDetails(state.translate, archive)}
+
+
+ ${dl} ${copyOrShare}
+
+
+ `;
function copy(event) {
event.stopPropagation();
@@ -258,7 +271,7 @@ module.exports.wip = function(state, emit) {
>
-
-
-
${archive.name}
- ${bytes(
- archive.size
- )}
-
-
- ${expiryInfo(state.translate, {
- dlimit: state.archive.dlimit,
- dtotal: 0,
- expiresAt: Date.now() + 500 + state.archive.timeLimit * 1000
- })}
-
- ${progressPercent}
-
-
- `;
+
+ ${archiveInfo(archive)}
+
+ ${expiryInfo(state.translate, {
+ dlimit: state.archive.dlimit,
+ dtotal: 0,
+ expiresAt: Date.now() + 500 + state.archive.timeLimit * 1000
+ })}
+
+
+ ${progressPercent}
+
+
+
+
+ `;
function cancel(event) {
event.stopPropagation();
@@ -420,7 +432,7 @@ module.exports.empty = function(state, emit) {
`;
return html`
-
-
-
-
-
${archive.name}
-
${bytes(
- archive.size
- )}
-
- ${details}
-
-
- `;
+
+
+ ${archiveInfo(archive)} ${details}
+
+
+
+ `;
function download(event) {
event.preventDefault();
@@ -509,15 +516,14 @@ module.exports.downloading = function(state) {
const progress = state.transfer.progressRatio;
const progressPercent = percent(progress);
return html`
-
-
-
-
${archive.name}
- ${bytes(
- archive.size
- )}
-
- ${progressPercent}
-
- `;
+
+ ${archiveInfo(archive)}
+
+ ${progressPercent}
+
+
+
+ `;
};