filled in size placeholder and other malarkey
This commit is contained in:
parent
7449d1c351
commit
c8e6e761d0
4 changed files with 25 additions and 20 deletions
|
@ -1,4 +1,4 @@
|
|||
/* global Android */
|
||||
/* global Android LIMITS */
|
||||
|
||||
const html = require('choo/html');
|
||||
const raw = require('choo/html/raw');
|
||||
|
@ -265,12 +265,9 @@ module.exports.wip = function(state, emit) {
|
|||
onblur="${blur}"
|
||||
onchange="${add}"
|
||||
/>
|
||||
<label
|
||||
<div
|
||||
for="file-upload"
|
||||
class="flex flex-row items-center justify-between w-full p-2 cursor-pointer"
|
||||
title="${state.translate('addFilesButtonWithSize', {
|
||||
size: bytes(1000000)
|
||||
})}"
|
||||
class="flex flex-row items-center justify-between w-full p-2"
|
||||
>
|
||||
<label
|
||||
for="file-upload"
|
||||
|
@ -278,12 +275,10 @@ module.exports.wip = function(state, emit) {
|
|||
title="${state.translate('addFilesButton')}"
|
||||
>
|
||||
<img src="${assets.get('addfiles.svg')}" class="w-6 h-6 mr-2" />
|
||||
${state.translate('addFilesButtonWithSize', {
|
||||
size: bytes(1000000)
|
||||
})}
|
||||
</div>
|
||||
${state.translate('addFilesButton')}
|
||||
</label>
|
||||
<div class="font-normal text-sm text-grey-darker">
|
||||
${state.translate('totalSizeUpdate', {
|
||||
${state.translate('totalSize', {
|
||||
size: bytes(state.archive.size)
|
||||
})}
|
||||
</div>
|
||||
|
@ -390,6 +385,15 @@ module.exports.uploading = function(state, emit) {
|
|||
};
|
||||
|
||||
module.exports.empty = function(state, emit) {
|
||||
const upsell = state.user.loggedIn
|
||||
? ''
|
||||
: html`
|
||||
<p class="center font-medium text-xs text-grey-dark mt-4 mb-2">
|
||||
${state.translate('signInSizeBump', {
|
||||
size: bytes(LIMITS.MAX_FILE_SIZE, 0)
|
||||
})}
|
||||
</p>
|
||||
`;
|
||||
return html`
|
||||
<send-upload-area
|
||||
class="flex flex-col items-center justify-center border-2 border-dashed border-grey rounded px-6 py-16 h-full w-full"
|
||||
|
@ -423,16 +427,14 @@ module.exports.empty = function(state, emit) {
|
|||
role="button"
|
||||
class="btn rounded-lg flex items-center mt-4"
|
||||
title="${state.translate('addFilesButtonWithSize', {
|
||||
size: bytes(1000000)
|
||||
size: bytes(state.user.maxSize, 0)
|
||||
})}"
|
||||
>
|
||||
${state.translate('addFilesButtonWithSize', {
|
||||
size: bytes(1000000)
|
||||
size: bytes(state.user.maxSize, 0)
|
||||
})}
|
||||
</label>
|
||||
<a class="center font-medium text-xs text-grey-dark mt-4 mb-2">
|
||||
${state.translate('signInSizeBump', { size: bytes(1000000) })}
|
||||
</a>
|
||||
${upsell}
|
||||
</send-upload-area>
|
||||
`;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue