mirror of
https://gitlab.com/timvisee/send.git
synced 2025-12-09 03:43:23 +00:00
Add customizable warnings shown on upload and download pages
This commit is contained in:
@@ -486,6 +486,16 @@ module.exports.empty = function(state, emit) {
|
||||
})}
|
||||
</button>
|
||||
`;
|
||||
const warning = state.WEB_UI.UPLOAD_AREA_WARNING_HTML
|
||||
? html`
|
||||
<p
|
||||
class="w-full mt-8 p-2 border-default dark:border-grey-70 rounded-default text-orange-60 bg-yellow-40 text-center leading-normal"
|
||||
>
|
||||
${raw(state.WEB_UI.UPLOAD_AREA_WARNING_HTML)}
|
||||
</p>
|
||||
`
|
||||
: '';
|
||||
|
||||
return html`
|
||||
<send-upload-area
|
||||
class="flex flex-col items-center justify-center border-2 border-dashed border-grey-transparent rounded-default px-6 py-16 h-full w-full dark:border-grey-60"
|
||||
@@ -526,7 +536,7 @@ module.exports.empty = function(state, emit) {
|
||||
>
|
||||
${state.translate('addFilesButton')}
|
||||
</label>
|
||||
${upsell}
|
||||
${upsell} ${warning}
|
||||
</send-upload-area>
|
||||
`;
|
||||
|
||||
@@ -559,6 +569,16 @@ module.exports.preview = function(state, emit) {
|
||||
${archiveDetails(state.translate, archive)}
|
||||
</div>
|
||||
`;
|
||||
const warning = state.WEB_UI.DOWNLOAD_WARNING_HTML
|
||||
? html`
|
||||
<p
|
||||
class="w-full mt-4 p-2 border-default dark:border-grey-70 rounded-default text-orange-60 bg-yellow-40 text-center leading-normal"
|
||||
>
|
||||
${raw(state.WEB_UI.DOWNLOAD_WARNING_HTML)}
|
||||
</p>
|
||||
`
|
||||
: '';
|
||||
|
||||
return html`
|
||||
<send-archive
|
||||
class="flex flex-col max-h-full bg-white p-4 w-full md:w-128 dark:bg-grey-90"
|
||||
@@ -574,6 +594,7 @@ module.exports.preview = function(state, emit) {
|
||||
>
|
||||
${state.translate('downloadButtonLabel')}
|
||||
</button>
|
||||
${warning}
|
||||
</send-archive>
|
||||
`;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user