Merge branch 'development'

This commit is contained in:
Luc Didry 2019-08-12 08:24:26 +02:00
commit ae731726c8
No known key found for this signature in database
GPG Key ID: EA868E12D0257E3C
25 changed files with 180 additions and 24 deletions

View File

@ -79,8 +79,8 @@ variables:
## ##
# #
include: include:
- 'https://framagit.org/fiat-tux/gitlabci-snippets/raw/master/publish_changelog.yml' - 'https://framagit.org/fiat-tux/gitlabci-snippets/raw/4e4e03322e95e9b0124c714456ebf1bdc02ad43f/publish_changelog.gitlab-ci.yml'
- 'https://framagit.org/fiat-tux/gitlabci-snippets/raw/master/pouet-it-from-ci.yml' - 'https://framagit.org/fiat-tux/gitlabci-snippets/raw/4e4e03322e95e9b0124c714456ebf1bdc02ad43f/pouet-it-from-ci.gitlab-ci.yml'
### Podcheck ### Podcheck
## ##

View File

@ -28,6 +28,7 @@
- alexandre.LG, http://inios.fr/ - alexandre.LG, http://inios.fr/
- Mildis (bugfix) - Mildis (bugfix)
- TECH'advantage, https://www.tech-advantage.com/ (paid for LDAP invitations feature) - TECH'advantage, https://www.tech-advantage.com/ (paid for LDAP invitations feature)
- pi2 (typo)
## Vulnerabilities / bug hunters 🐛 ## Vulnerabilities / bug hunters 🐛

View File

@ -1,6 +1,15 @@
Revision history for Lufi Revision history for Lufi
?.??.? ????-??-?? ?.??.? ????-??-??
- LocalStorage key is now prefix-dependant (#154)
This allow to not mix up files in localStorage for two instances if they
are on the same domain
- Fix bug on cookie-based language choice when using two instances on same
domain, with ones path is the beginning of the other instances path.
WARNING! You need to do a `carton install --deployment …` to have the fix.
- Fix navbar bug (there can be too much items in it, depending on Lufi
settings (LDAP, invitations…), trouble beginning at screens < 1800px)
- Add setting to customize the instance name (#156)
0.04.0 2019-08-04 0.04.0 2019-08-04
- Allow to zip the files before upload - Allow to zip the files before upload

View File

@ -6,7 +6,7 @@ requires 'Mojolicious::Plugin::Mail';
requires 'Mojolicious::Plugin::GzipStatic'; requires 'Mojolicious::Plugin::GzipStatic';
requires 'Mojolicious::Plugin::StaticCache'; requires 'Mojolicious::Plugin::StaticCache';
requires 'Mojolicious::Plugin::CSPHeader', '>= 0.06'; requires 'Mojolicious::Plugin::CSPHeader', '>= 0.06';
requires 'Mojolicious::Plugin::FiatTux::Helpers', '== 0.08', url => 'https://framagit.org/fiat-tux/mojolicious/mojolicious-plugin-fiattux-helpers/-/archive/0.08/mojolicious-plugin-fiattux-helpers-0.08.tar.gz'; requires 'Mojolicious::Plugin::FiatTux::Helpers', '== 0.10', url => 'https://framagit.org/fiat-tux/mojolicious/mojolicious-plugin-fiattux-helpers/-/archive/0.10/mojolicious-plugin-fiattux-helpers-0.10.tar.gz';
requires 'Mojolicious::Plugin::FiatTux::GrantAccess', '== 0.06', url => 'https://framagit.org/fiat-tux/mojolicious/mojolicious-plugin-fiattux-grantaccess/-/archive/0.06/mojolicious-plugin-fiattux-grantaccess-0.06.tar.gz'; requires 'Mojolicious::Plugin::FiatTux::GrantAccess', '== 0.06', url => 'https://framagit.org/fiat-tux/mojolicious/mojolicious-plugin-fiattux-grantaccess/-/archive/0.06/mojolicious-plugin-fiattux-grantaccess-0.06.tar.gz';
requires 'Mojolicious::Plugin::FiatTux::Themes', '== 0.02', url => 'https://framagit.org/fiat-tux/mojolicious/mojolicious-plugin-fiattux-themes/-/archive/0.02/mojolicious-plugin-fiattux-themes-0.02.tar.gz'; requires 'Mojolicious::Plugin::FiatTux::Themes', '== 0.02', url => 'https://framagit.org/fiat-tux/mojolicious/mojolicious-plugin-fiattux-themes/-/archive/0.02/mojolicious-plugin-fiattux-themes-0.02.tar.gz';
requires 'Filesys::DiskUsage'; requires 'Filesys::DiskUsage';

View File

@ -4,6 +4,7 @@ require Exporter;
@ISA = qw(Exporter); @ISA = qw(Exporter);
@EXPORT_OK = qw($default_config); @EXPORT_OK = qw($default_config);
our $default_config = { our $default_config = {
instance_name => 'Lufi',
prefix => '/', prefix => '/',
provisioning => 100, provisioning => 100,
provis_step => 5, provis_step => 5,

View File

@ -32,6 +32,10 @@
# optional, default is ['fdjsofjoihrei'], PLEASE, CHANGE IT # optional, default is ['fdjsofjoihrei'], PLEASE, CHANGE IT
#secrets => ['fdjsofjoihrei'], #secrets => ['fdjsofjoihrei'],
# Name of the instance, displayed next to the logo
# optional, default is Lufi
#instance_name => 'Lufi',
# Choose a theme. See the available themes in `themes` directory # Choose a theme. See the available themes in `themes` directory
# Optional, default is 'default' # Optional, default is 'default'
#theme => 'default', #theme => 'default',

View File

@ -419,6 +419,14 @@ msgid "Lufi is a free (as in free speech) file hosting software."
msgstr "" msgstr ""
"لوفي أو Lufi برنامج حر (كما هو الحال في حرية التعبير) لاستضافة الملفات." "لوفي أو Lufi برنامج حر (كما هو الحال في حرية التعبير) لاستضافة الملفات."
#: themes/default/templates/partial/files.js.ep:12
msgid ""
"Lufi recently changed its way to store files information.\\n\\nNo files have "
"been found in the new localStorage location but we found files in the old "
"one.\\nDo you want to import those informations?\\n\\nPlease note that this "
"is the only time that we will ask you this."
msgstr ""
#: themes/default/templates/files.html.ep:33 #: themes/default/templates/files.html.ep:33
msgid "Mail" msgid "Mail"
msgstr "البريد" msgstr "البريد"

View File

@ -441,6 +441,14 @@ msgstr "Sortida"
msgid "Lufi is a free (as in free speech) file hosting software." msgid "Lufi is a free (as in free speech) file hosting software."
msgstr "Lufi és programari lliure d'allotjament de fitxers." msgstr "Lufi és programari lliure d'allotjament de fitxers."
#: themes/default/templates/partial/files.js.ep:12
msgid ""
"Lufi recently changed its way to store files information.\\n\\nNo files have "
"been found in the new localStorage location but we found files in the old "
"one.\\nDo you want to import those informations?\\n\\nPlease note that this "
"is the only time that we will ask you this."
msgstr ""
#: themes/default/templates/files.html.ep:33 #: themes/default/templates/files.html.ep:33
msgid "Mail" msgid "Mail"
msgstr "Mail" msgstr "Mail"

View File

@ -451,6 +451,14 @@ msgid "Lufi is a free (as in free speech) file hosting software."
msgstr "" msgstr ""
"Lufi ist eine kostenlose (wie in der Redefreiheit) Datei-Hosting-Software." "Lufi ist eine kostenlose (wie in der Redefreiheit) Datei-Hosting-Software."
#: themes/default/templates/partial/files.js.ep:12
msgid ""
"Lufi recently changed its way to store files information.\\n\\nNo files have "
"been found in the new localStorage location but we found files in the old "
"one.\\nDo you want to import those informations?\\n\\nPlease note that this "
"is the only time that we will ask you this."
msgstr ""
#: themes/default/templates/files.html.ep:33 #: themes/default/templates/files.html.ep:33
msgid "Mail" msgid "Mail"
msgstr "E-Mail" msgstr "E-Mail"

View File

@ -8,7 +8,7 @@ msgstr ""
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"PO-Revision-Date: 2019-08-04 05:31+0000\n" "PO-Revision-Date: 2019-08-09 05:52+0000\n"
"Last-Translator: Luc Didry <luc@framasoft.org>\n" "Last-Translator: Luc Didry <luc@framasoft.org>\n"
"Language-Team: English\n" "Language-Team: English\n"
"Language: en\n" "Language: en\n"
@ -435,6 +435,18 @@ msgstr "Logout"
msgid "Lufi is a free (as in free speech) file hosting software." msgid "Lufi is a free (as in free speech) file hosting software."
msgstr "Lufi is a free (as in free speech) file hosting software." msgstr "Lufi is a free (as in free speech) file hosting software."
#: themes/default/templates/partial/files.js.ep:12
msgid ""
"Lufi recently changed its way to store files information.\\n\\nNo files have "
"been found in the new localStorage location but we found files in the old "
"one.\\nDo you want to import those informations?\\n\\nPlease note that this "
"is the only time that we will ask you this."
msgstr ""
"Lufi recently changed its way to store files information.\\n\\nNo files have "
"been found in the new localStorage location but we found files in the old "
"one.\\nDo you want to import those informations?\\n\\nPlease note that this "
"is the only time that we will ask you this."
#: themes/default/templates/files.html.ep:33 #: themes/default/templates/files.html.ep:33
msgid "Mail" msgid "Mail"
msgstr "Mail" msgstr "Mail"

View File

@ -11,7 +11,7 @@ msgstr ""
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"PO-Revision-Date: 2019-08-04 05:33+0000\n" "PO-Revision-Date: 2019-08-09 05:52+0000\n"
"Language-Team: \n" "Language-Team: \n"
"X-Generator: Zanata 4.6.2\n" "X-Generator: Zanata 4.6.2\n"
"Last-Translator: Luc Didry <luc@framasoft.org>\n" "Last-Translator: Luc Didry <luc@framasoft.org>\n"
@ -452,6 +452,19 @@ msgstr "Déconnexion"
msgid "Lufi is a free (as in free speech) file hosting software." msgid "Lufi is a free (as in free speech) file hosting software."
msgstr "Lufi est un logiciel libre dhébergement de fichiers." msgstr "Lufi est un logiciel libre dhébergement de fichiers."
#: themes/default/templates/partial/files.js.ep:12
msgid ""
"Lufi recently changed its way to store files information.\\n\\nNo files have "
"been found in the new localStorage location but we found files in the old "
"one.\\nDo you want to import those informations?\\n\\nPlease note that this "
"is the only time that we will ask you this."
msgstr ""
"Lufi a récemment changé sa façon de stocker linformation des fichiers."
"\\n\\nAucun fichier na été trouvé dans le nouvel emplacement localStorage "
"mais nous avons trouvé des fichiers dans lancien.\\nVoulez-vous importer "
"ces informations ?\\n\\nVeuillez noter que cest la seule fois que nous vous "
"poserons cette question."
#: themes/default/templates/files.html.ep:33 #: themes/default/templates/files.html.ep:33
msgid "Mail" msgid "Mail"
msgstr "Mail" msgstr "Mail"

View File

@ -11,7 +11,7 @@ msgstr ""
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"PO-Revision-Date: 2019-08-04 05:34+0000\n" "PO-Revision-Date: 2019-08-09 05:52+0000\n"
"Language-Team: \n" "Language-Team: \n"
"X-Generator: Zanata 4.6.2\n" "X-Generator: Zanata 4.6.2\n"
"Last-Translator: Luc Didry <luc@framasoft.org>\n" "Last-Translator: Luc Didry <luc@framasoft.org>\n"
@ -452,6 +452,19 @@ msgstr "Déconnexion"
msgid "Lufi is a free (as in free speech) file hosting software." msgid "Lufi is a free (as in free speech) file hosting software."
msgstr "Lufi est un logiciel libre dhébergement de fichiers." msgstr "Lufi est un logiciel libre dhébergement de fichiers."
#: themes/default/templates/partial/files.js.ep:12
msgid ""
"Lufi recently changed its way to store files information.\\n\\nNo files have "
"been found in the new localStorage location but we found files in the old "
"one.\\nDo you want to import those informations?\\n\\nPlease note that this "
"is the only time that we will ask you this."
msgstr ""
"Lufi a récemment changé sa façon de stocker linformation des fichiers."
"\\n\\nAucun fichier na été trouvé dans le nouvel emplacement localStorage "
"mais nous avons trouvé des fichiers dans lancien.\\nVoulez-vous importer "
"ces informations ?\\n\\nVeuillez noter que cest la seule fois que nous vous "
"poserons cette question."
#: themes/default/templates/files.html.ep:33 #: themes/default/templates/files.html.ep:33
msgid "Mail" msgid "Mail"
msgstr "Mail" msgstr "Mail"

View File

@ -435,6 +435,14 @@ msgstr "Logout"
msgid "Lufi is a free (as in free speech) file hosting software." msgid "Lufi is a free (as in free speech) file hosting software."
msgstr "Lufi è un software libero di file hosting." msgstr "Lufi è un software libero di file hosting."
#: themes/default/templates/partial/files.js.ep:12
msgid ""
"Lufi recently changed its way to store files information.\\n\\nNo files have "
"been found in the new localStorage location but we found files in the old "
"one.\\nDo you want to import those informations?\\n\\nPlease note that this "
"is the only time that we will ask you this."
msgstr ""
#: themes/default/templates/files.html.ep:33 #: themes/default/templates/files.html.ep:33
msgid "Mail" msgid "Mail"
msgstr "" msgstr ""

View File

@ -393,6 +393,10 @@ msgstr ""
msgid "Lufi is a free (as in free speech) file hosting software." msgid "Lufi is a free (as in free speech) file hosting software."
msgstr "" msgstr ""
#: themes/default/templates/partial/files.js.ep:12
msgid "Lufi recently changed its way to store files information.\\n\\nNo files have been found in the new localStorage location but we found files in the old one.\\nDo you want to import those informations?\\n\\nPlease note that this is the only time that we will ask you this."
msgstr ""
#: themes/default/templates/files.html.ep:33 #: themes/default/templates/files.html.ep:33
msgid "Mail" msgid "Mail"
msgstr "" msgstr ""

View File

@ -433,6 +433,14 @@ msgstr "Logout"
msgid "Lufi is a free (as in free speech) file hosting software." msgid "Lufi is a free (as in free speech) file hosting software."
msgstr "Lufi is een gratis bestand hosting software." msgstr "Lufi is een gratis bestand hosting software."
#: themes/default/templates/partial/files.js.ep:12
msgid ""
"Lufi recently changed its way to store files information.\\n\\nNo files have "
"been found in the new localStorage location but we found files in the old "
"one.\\nDo you want to import those informations?\\n\\nPlease note that this "
"is the only time that we will ask you this."
msgstr ""
#: themes/default/templates/files.html.ep:33 #: themes/default/templates/files.html.ep:33
msgid "Mail" msgid "Mail"
msgstr "" msgstr ""

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"PO-Revision-Date: 2019-08-04 05:34+0000\n" "PO-Revision-Date: 2019-08-09 05:54+0000\n"
"Last-Translator: Luc Didry <luc@framasoft.org>\n" "Last-Translator: Quentí\n"
"Language-Team: Tot en òc (totenoc.eu)\n" "Language-Team: Tot en òc (totenoc.eu)\n"
"Language: oc\n" "Language: oc\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n"
@ -450,6 +450,19 @@ msgstr "Desconnexion"
msgid "Lufi is a free (as in free speech) file hosting software." msgid "Lufi is a free (as in free speech) file hosting software."
msgstr "Lufi es un logicial liure dalbèrgament de fichièrs." msgstr "Lufi es un logicial liure dalbèrgament de fichièrs."
#: themes/default/templates/partial/files.js.ep:12
msgid ""
"Lufi recently changed its way to store files information.\\n\\nNo files have "
"been found in the new localStorage location but we found files in the old "
"one.\\nDo you want to import those informations?\\n\\nPlease note that this "
"is the only time that we will ask you this."
msgstr ""
"Lufi cambièt recentament son biais de gardar las informacions dels fichièrs."
"\\n\\nCap de fichièr es estat trobat dins emplaçament del novèl "
"localStorage mas avèm trobat de fichièrs dins lancian.\\nVolètz importar "
"aquelas informacions ?\\n\\nNotatz que serà lo sol còp que vos demandarem "
"aquò."
#: themes/default/templates/files.html.ep:33 #: themes/default/templates/files.html.ep:33
msgid "Mail" msgid "Mail"
msgstr "Corrièl" msgstr "Corrièl"

View File

@ -443,6 +443,14 @@ msgstr ""
"Lufi é um programa de reserva gratuita (como na liberdade de expressão) de " "Lufi é um programa de reserva gratuita (como na liberdade de expressão) de "
"ficheiros." "ficheiros."
#: themes/default/templates/partial/files.js.ep:12
msgid ""
"Lufi recently changed its way to store files information.\\n\\nNo files have "
"been found in the new localStorage location but we found files in the old "
"one.\\nDo you want to import those informations?\\n\\nPlease note that this "
"is the only time that we will ask you this."
msgstr ""
#: themes/default/templates/files.html.ep:33 #: themes/default/templates/files.html.ep:33
msgid "Mail" msgid "Mail"
msgstr "" msgstr ""

View File

@ -223,6 +223,31 @@ button.pulse {
.small-h1 { .small-h1 {
font-size: 2.2rem; font-size: 2.2rem;
} }
@media only screen and (max-width: 1800px) {
ul.hide-on-med-and-down {
display: none !important;
}
nav a.button-collapse {
display: block !important;
}
nav .brand-logo {
left: 50%;
transform: translateX(-50%);
}
nav .brand-logo.left, nav .brand-logo.right {
padding: 0;
transform: none;
}
nav .brand-logo.left {
left: 0.5rem;
}
nav .brand-logo.right {
right: 0.5rem;
left: auto;
}
}
.white-background { .white-background {
background-color: #FFF; background-color: #FFF;
} }

View File

@ -1,18 +1,18 @@
// vim:set sw=4 ts=4 sts=4 ft=javascript expandtab: // vim:set sw=4 ts=4 sts=4 ft=javascript expandtab:
// Add item to localStorage // Add item to localStorage
function addItem(item) { function addItem(item) {
var files = localStorage.getItem('files'); var files = localStorage.getItem(window.prefix + 'files');
if (files === null) { if (files === null) {
files = new Array(); files = new Array();
} else { } else {
files = JSON.parse(files); files = JSON.parse(files);
} }
files.push(item); files.push(item);
localStorage.setItem('files', JSON.stringify(files)); localStorage.setItem(window.prefix + 'files', JSON.stringify(files));
} }
function delItem(name) { function delItem(name) {
var files = localStorage.getItem('files'); var files = localStorage.getItem(window.prefix + 'files');
if (files === null) { if (files === null) {
files = new Array(); files = new Array();
} else { } else {
@ -24,11 +24,11 @@ function delItem(name) {
files.splice(i, 1); files.splice(i, 1);
} }
} }
localStorage.setItem('files', JSON.stringify(files)); localStorage.setItem(window.prefix + 'files', JSON.stringify(files));
} }
function itemExists(name) { function itemExists(name) {
var files = localStorage.getItem('files'); var files = localStorage.getItem(window.prefix + 'files');
if (files === null) { if (files === null) {
return false; return false;
} else { } else {
@ -45,7 +45,7 @@ function itemExists(name) {
function purgeExpired(event) { function purgeExpired(event) {
event.preventDefault(); event.preventDefault();
var files = JSON.parse(localStorage.getItem('files')); var files = JSON.parse(localStorage.getItem(window.prefix + 'files'));
files.forEach(function(element, index, array) { files.forEach(function(element, index, array) {
$.ajax({ $.ajax({
@ -74,7 +74,7 @@ function exportStorage(event) {
a.hide(); a.hide();
$('body').append(a); $('body').append(a);
var storageData = [localStorage.getItem('files')]; var storageData = [localStorage.getItem(window.prefix + 'files')];
var exportFile = new Blob(storageData, {type : 'application/json'}); var exportFile = new Blob(storageData, {type : 'application/json'});
var url = window.URL.createObjectURL(exportFile); var url = window.URL.createObjectURL(exportFile);
@ -164,9 +164,20 @@ function massDelete(event) {
function populateFilesTable() { function populateFilesTable() {
$('#myfiles').empty(); $('#myfiles').empty();
var files = localStorage.getItem('files'); var files = localStorage.getItem(window.prefix + 'files');
if (files === null) { if (files === null) {
files = new Array(); var filesWithoutPrefix = localStorage.getItem('files');
if (filesWithoutPrefix !== null) {
if (window.confirm(i18n.importFilesWithoutPrefix)) {
localStorage.setItem(window.prefix + 'files', filesWithoutPrefix);
files = JSON.parse(filesWithoutPrefix);
} else {
localStorage.setItem(window.prefix + 'files', JSON.stringify([]));
files = new Array();
}
} else {
files = new Array();
}
} else { } else {
files = JSON.parse(files); files = JSON.parse(files);
} }

View File

@ -68,14 +68,14 @@ function copyAllToClipboard(event) {
// Add item to localStorage // Add item to localStorage
function addItem(name, url, size, del_at_first_view, created_at, delay, short, token) { function addItem(name, url, size, del_at_first_view, created_at, delay, short, token) {
var files = localStorage.getItem('files'); var files = localStorage.getItem(window.prefix + 'files');
if (files === null) { if (files === null) {
files = new Array(); files = new Array();
} else { } else {
files = JSON.parse(files); files = JSON.parse(files);
} }
files.push({ name: name, short: short, url: url, size: size, del_at_first_view: del_at_first_view, created_at: created_at, delay: delay, token: token }); files.push({ name: name, short: short, url: url, size: size, del_at_first_view: del_at_first_view, created_at: created_at, delay: delay, token: token });
localStorage.setItem('files', JSON.stringify(files)); localStorage.setItem(window.prefix + 'files', JSON.stringify(files));
} }
// Remove a file block // Remove a file block

View File

@ -39,7 +39,7 @@
<label for="guest_mail"> <label for="guest_mail">
<%= l('Email address of your guest') %> <%= l('Email address of your guest') %>
</label> </label>
<input id="guest_mail" name="guest_mail" type="email" placeholder="nami@example.org" required> <input id="guest_mail" name="guest_mail" type="email" placeholder="name@example.org" required>
</div> </div>
<div class="input-field"> <div class="input-field">
<label for="expire_at"> <label for="expire_at">

View File

@ -25,7 +25,7 @@
<body> <body>
<nav class="cyan"> <nav class="cyan">
<div class="nav-wrapper container"> <div class="nav-wrapper container">
<a href="<%= url_for('/') %>" class="brand-logo">&nbsp;<img src="<%= url_for('/img/lufi-min.png') %>" alt="logo"> Lufi</a> <a href="<%= url_for('/') %>" class="brand-logo">&nbsp;<img src="<%= url_for('/img/lufi-min.png') %>" alt="logo"> <%= config('instance_name')%></a>
<a href="#" data-activates="mobile" class="button-collapse"><i class="mdi-navigation-menu"></i></a> <a href="#" data-activates="mobile" class="button-collapse"><i class="mdi-navigation-menu"></i></a>
<ul id="nav-mobile" class="right hide-on-med-and-down"> <ul id="nav-mobile" class="right hide-on-med-and-down">
<li><a href="<%= $self->config('report') %>"><%= l('Report file') %></a></li> <li><a href="<%= $self->config('report') %>"><%= l('Report file') %></a></li>

View File

@ -7,8 +7,9 @@
var actionURL = '<%= url_for('/')->to_abs() %>'; var actionURL = '<%= url_for('/')->to_abs() %>';
var counterURL = '<%== url_for('counter') %>'; var counterURL = '<%== url_for('counter') %>';
var i18n = { var i18n = {
noExpiration: '<%= l('No expiration delay') %>', noExpiration: '<%= l('No expiration delay') %>',
importProcessed: '<%= l('The data has been successfully imported.') %>', importProcessed: '<%= l('The data has been successfully imported.') %>',
importFilesWithoutPrefix: "<%= l('Lufi recently changed its way to store files information.\n\nNo files have been found in the new localStorage location but we found files in the old one.\nDo you want to import those informations?\n\nPlease note that this is the only time that we will ask you this.') %>",
}; };
$(document).ready(function() { $(document).ready(function() {
populateFilesTable(); populateFilesTable();

View File

@ -1,2 +1,3 @@
% # vim:set sts=4 sw=4 ts=4 ft=javascript expandtab: % # vim:set sts=4 sw=4 ts=4 ft=javascript expandtab:
var langUrl = '<%= url_for('lang') %>'; var langUrl = '<%= url_for('lang') %>';
var prefix = '<%= substr(config('prefix'), 1) %>';

View File

@ -1,6 +1,6 @@
% # vim:set sts=4 sw=4 ts=4 ft=javascript expandtab: % # vim:set sts=4 sw=4 ts=4 ft=javascript expandtab:
function findItem(name) { function findItem(name) {
var files = localStorage.getItem('files'); var files = localStorage.getItem(window.prefix + 'files');
if (files === null) { if (files === null) {
files = new Array(); files = new Array();
} else { } else {