lufi/themes/default/templates/partial/index.js.ep

37 lines
1.8 KiB
Plaintext

const ws_url = '<%= url_for('upload')->to_abs() %>';
% if (defined($self->config('fixed_domain')) && $self->config('fixed_domain')) {
const baseURL = '<%= url_for('/')->host($self->config('fixed_domain'))->to_abs() %>';
% } else {
const baseURL = '<%= url_for('/')->to_abs() %>';
% }
const actionURL = '<%= url_for('/')->to_abs() %>';
const i18n = {
enqueued: '<%= l('XXX file has been added to upload queue.') %>',
confirmExit: '<%= l('You have attempted to leave this page. The upload will be canceled. Are you sure?') %>',
copyAll: '<%= l('Copy all links to clipboard') %>',
copySuccess: '<%= l('The link(s) has been copied to your clipboard') %>',
copyFail: '<%= l('Unable to copy the link(s) to your clipboard') %>',
cpText: '<%= l('Copy to clipboard') %>',
delText: '<%= l('Deletion link') %>',
dlText: '<%= l('Download link') %>',
download: '<%= l('Download') %>',
encrypting: '<%= l('Encrypting part XX1 of XX2') %>',
expiration: '<%= l('Expiration:') %>',
fileUploaded: '<%= l('File uploaded') %>',
hit: '<%= l('Hit Enter, then Ctrl+C to copy the download link') %>',
hits: '<%= l('Hit Enter, then Ctrl+C to copy all the download links') %>',
mailTo: '<%= l('Send all links by email') %>',
maxSize: '<%= l('(max size: XXX)') %>',
noLimit: '<%= l('No expiration delay') %>',
sending: '<%= l('Sending part XX1 of XX2. Please, be patient, the progress bar can take a while to move.') %>',
wsProblem: '<%= l('Websocket communication error') %>',
};
const maxSize = <%= config('max_file_size') || 0 %>;
% if (stash('token')) {
const isGuest = true;
const sendFilesURLsURL = '<%= url_for('guest_send_mail', token => stash('token'))->to_abs() %>';
% } else {
const isGuest = false;
% }