minor ui fixes
This commit is contained in:
parent
49b9a1f452
commit
4ee497a83f
8 changed files with 58 additions and 38 deletions
|
@ -1,18 +1,22 @@
|
|||
.fileToast {
|
||||
margin: 13px 0 0;
|
||||
flex: none;
|
||||
display: block;
|
||||
margin: 6px 0 0;
|
||||
overflow: hidden;
|
||||
font-size: 11px;
|
||||
line-height: 18px;
|
||||
color: var(--lightTextColor);
|
||||
background-color: var(--pageBGColor);
|
||||
position: relative;
|
||||
box-shadow: 0 0 0 3px rgba(12, 12, 12, 0.2);
|
||||
border: 3px solid rgba(12, 12, 12, 0.2);
|
||||
background-clip: padding-box;
|
||||
box-sizing: border-box;
|
||||
height: 53px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.fileToast__content {
|
||||
height: 100%;
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
}
|
||||
|
@ -61,33 +65,35 @@
|
|||
}
|
||||
|
||||
.fileToast .fileIcon {
|
||||
margin: 2px 8px;
|
||||
margin: 0 8px;
|
||||
}
|
||||
|
||||
@media (max-device-width: 750px), (max-width: 750px) {
|
||||
.fileToast {
|
||||
height: 32px;
|
||||
width: 400px;
|
||||
}
|
||||
|
||||
.fileToast__content {
|
||||
display: flex;
|
||||
line-height: 13px;
|
||||
margin: 0;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.fileData {
|
||||
flex: auto;
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
margin-left: 8px;
|
||||
margin: 0 6px 0 0;
|
||||
}
|
||||
|
||||
.fileInfo {
|
||||
flex-shrink: 0;
|
||||
flex: none;
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.fileToast .fileIcon {
|
||||
margin: 0;
|
||||
flex: none;
|
||||
transform: scale(0.5);
|
||||
color: transparent;
|
||||
}
|
||||
|
|
|
@ -20,23 +20,23 @@ module.exports = function(file, state) {
|
|||
|
||||
const activeClass = isOnSharePage() ? 'fileToast--active' : '';
|
||||
return html`
|
||||
<a href=${toastClick()}>
|
||||
<li class="fileToast ${activeClass}" id="${file.id}">
|
||||
<div class="fileToast__content">
|
||||
${fileIcon(file.name, file._hasPassword)}
|
||||
<div class="fileData">
|
||||
<p class="fileName">${fileName}</p>
|
||||
<p class="fileInfo">
|
||||
<span>${bytes(file.size)}</span> ·
|
||||
<span>${state.translate('downloadCount', {
|
||||
num: `${number(totalDownloads)} / ${number(downloadLimit)}`
|
||||
})}</span>
|
||||
<span>${remainingTime}</span>
|
||||
</p>
|
||||
<li id="${file.id}">
|
||||
<a class="fileToast ${activeClass}" href=${toastClick()}>
|
||||
<div class="fileToast__content">
|
||||
${fileIcon(file.name, file._hasPassword)}
|
||||
<div class="fileData">
|
||||
<p class="fileName">${fileName}</p>
|
||||
<p class="fileInfo">
|
||||
<span>${bytes(file.size)}</span> ·
|
||||
<span>${state.translate('downloadCount', {
|
||||
num: `${number(totalDownloads)} / ${number(downloadLimit)}`
|
||||
})}</span>
|
||||
<span>${remainingTime}</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
</a>
|
||||
`;
|
||||
|
||||
function toastClick() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue