Fixes #3 - Add list of of user's images in localstorage

This commit is contained in:
Luc Didry
2015-09-18 00:12:15 +02:00
parent af9323365c
commit a64808f206
25 changed files with 545 additions and 158 deletions
+10 -2
View File
@@ -50,7 +50,15 @@ The details on how to contribute are on the [wiki](https://git.framasoft.org/luc
## Others projects dependancies
Lutim is written in Perl with the [Mojolicious](http://mojolicio.us) framework, uses the [Twitter bootstrap](http://getbootstrap.com) framework to look not too ugly, [JQuery](http://jquery.com) and [JQuery File Uploader](https://github.com/danielm/uploader/) (slightly modified) to add some modernity, [Raphaël](http://raphaeljs.com/) and [morris.js](http://www.oesmith.co.uk/morris.js/) for stats graphs and [freezeframe.js](http://freezeframe.chrisantonellis.com/) (slightly modified) to be able to freeze animated gifs in twitter card.
Lutim is written in Perl with the [Mojolicious](http://mojolicio.us) framework.
Licenses for the icons fonts are in `public/font/LICENSE.txt` except for the [markdown font](https://github.com/dcurtis/markdown-mark/).
It uses:
* [Twitter bootstrap](http://getbootstrap.com) framework to look not too ugly
* [JQuery](http://jquery.com) and [JQuery File Uploader](https://github.com/danielm/uploader/) (slightly modified) to add some modernity
* [Raphaël](http://raphaeljs.com/) and [morris.js](http://www.oesmith.co.uk/morris.js/) for stats graphs
* [freezeframe.js](http://freezeframe.chrisantonellis.com/) (slightly modified) to be able to freeze animated gifs in twitter card
* [Moment.js](http://momentjs.com/) for displaying real dates instead of unix timestamps.
* [Fontello](http://fontello.com/) and the [markdown font](https://github.com/dcurtis/markdown-mark/) for the icons, licenses for the fontello icons fonts are in `public/font/LICENSE.txt`
* [Henny Penny](https://www.google.com/fonts/specimen/Henny+Penny) font designed by Olga Umpeleva for [Brownfox](http://brownfox.org)
+12
View File
@@ -6,6 +6,12 @@
"units_per_em": 1000,
"ascent": 850,
"glyphs": [
{
"uid": "12f4ece88e46abd864e40b35e05b11cd",
"css": "ok",
"code": 59402,
"src": "fontawesome"
},
{
"uid": "c5fd349cbd3d23e4ade333789c29c729",
"css": "eye",
@@ -65,6 +71,12 @@
"css": "flattr",
"code": 59394,
"src": "zocial"
},
{
"uid": "499b745a2e2485bdd059c3a53d048e5f",
"css": "cancel",
"code": 59403,
"src": "elusive"
}
]
}
+10
View File
@@ -317,6 +317,12 @@ sub startup {
to('Controller#stats')->
name('stats');
$r->get('/myfiles' => sub {
shift->render(
template => 'myfiles'
);
})->name('myfiles');
$r->get('/manifest.webapp')->
to('Controller#webapp')->
name('manifest.webapp');
@@ -333,6 +339,10 @@ sub startup {
to('Controller#modify')->
name('modify');
$r->post('/c')->
to('Controller#get_counter')->
name('counter');
$r->get('/(:short).(:f)')->
to('Controller#short')->
name('short');
+36 -7
View File
@@ -3,6 +3,7 @@ package Lutim::Controller;
use Mojo::Base 'Mojolicious::Controller';
use Mojo::Util qw(url_unescape b64_encode);
use Mojo::Asset::Memory;
use Mojo::JSON qw(true false);
use DateTime;
use Digest::file qw(digest_file_hex);
use Text::Unidecode;
@@ -62,6 +63,28 @@ sub webapp {
);
}
sub get_counter {
my $c = shift;
my $short = $c->param('short');
my $token = $c->param('token');
my @images = LutimModel::Lutim->select('WHERE short = ? AND path IS NOT NULL AND mod_token = ?', ($short, $token));
if (scalar(@images)) {
return $c->render(
json => {
success => true,
counter => $images[0]->counter
}
);
}
$c->render(
json => {
success => false,
msg => $c->l('Unable to get counter')
}
);
}
sub modify {
my $c = shift;
my $short = $c->param('short');
@@ -257,7 +280,7 @@ sub add {
my $ip = $c->ip;
my ($msg, $short, $real_short, $token, $thumb);
my ($msg, $short, $real_short, $token, $thumb, $limit, $created);
# Check file type
if (index($mediatype, 'image/') >= 0) {
# Create directory if needed
@@ -360,6 +383,9 @@ sub add {
}
$token = $records[0]->mod_token;
$short .= '/'.$key if (defined($key));
$limit = $records[0]->delete_at_day;
$created = $records[0]->created_at;
} else {
# Houston, we have a problem
$msg = $c->l('There is no more available URL. Retry or contact the administrator. %1', $c->config->{contact});
@@ -373,12 +399,15 @@ sub add {
if (defined($c->param('format')) && $c->param('format') eq 'json') {
if (defined($short)) {
$msg = {
filename => $upload->filename,
short => $short,
real_short => $real_short,
token => $token,
ext => $ext || extensions($mediatype),
thumb => $thumb
filename => $upload->filename,
short => $short,
real_short => $real_short,
token => $token,
ext => $ext || extensions($mediatype),
thumb => $thumb,
del_at_view => ($c->param('first-view')) ? true : false,
limit => $limit,
created_at => $created
};
} else {
$msg = {
+82 -39
View File
@@ -18,9 +18,9 @@ msgstr ""
#. ($delay)
#. (config('max_delay')
#: templates/partial/lutim.js.ep:139
#: templates/partial/lutim.js.ep:148
#: templates/partial/lutim.js.ep:149
#: templates/partial/lutim.js.ep:116
#: templates/partial/lutim.js.ep:125
#: templates/partial/lutim.js.ep:126
msgid "%1 days"
msgstr ""
@@ -38,15 +38,20 @@ msgid "1 year"
msgstr "1 year"
#: templates/index.html.ep:4
#: templates/partial/lutim.js.ep:148
#: templates/partial/lutim.js.ep:125
msgid "24 hours"
msgstr "24 hours"
#: lib/Lutim/Controller.pm:215
#: templates/myfiles.html.ep:72
msgid ": Error while trying to get the counter."
msgstr ""
#: lib/Lutim/Controller.pm:238
msgid "An error occured while downloading the image."
msgstr "An error occured while downloading the image."
#: templates/about.html.ep:40
#: templates/myfiles.html.ep:27
#: templates/stats.html.ep:13
msgid "Back to homepage"
msgstr "Back to homepage"
@@ -60,7 +65,9 @@ msgstr "Click to open the file browser"
msgid "Contributors"
msgstr "Contributors"
#: templates/partial/lutim.js.ep:187
#: templates/partial/lutim.js.ep:164
#: templates/partial/lutim.js.ep:201
#: templates/partial/lutim.js.ep:263
msgid "Copy all view links to clipboard"
msgstr ""
@@ -68,28 +75,34 @@ msgstr ""
#: templates/index.html.ep:41
#: templates/index.html.ep:49
#: templates/index.html.ep:57
#: templates/partial/lutim.js.ep:127
#: templates/partial/lutim.js.ep:129
#: templates/partial/lutim.js.ep:131
#: templates/partial/lutim.js.ep:133
#: templates/partial/lutim.js.ep:104
#: templates/partial/lutim.js.ep:106
#: templates/partial/lutim.js.ep:108
#: templates/partial/lutim.js.ep:110
msgid "Copy to clipboard"
msgstr "Copy to clipboard"
#: templates/myfiles.html.ep:15
msgid "Counter"
msgstr ""
#: templates/index.html.ep:111
#: templates/index.html.ep:142
#: templates/index.html.ep:79
#: templates/partial/lutim.js.ep:157
#: templates/myfiles.html.ep:16
#: templates/partial/lutim.js.ep:134
msgid "Delete at first view?"
msgstr "Delete at first view?"
#: templates/index.html.ep:62
#: templates/partial/lutim.js.ep:9
#: templates/myfiles.html.ep:19
#: templates/partial/common.js.ep:12
msgid "Deletion link"
msgstr "Deletion link"
#: templates/index.html.ep:45
#: templates/index.html.ep:47
#: templates/partial/lutim.js.ep:129
#: templates/partial/lutim.js.ep:106
msgid "Download link"
msgstr "Download link"
@@ -106,7 +119,7 @@ msgstr "Drag and drop an image in the appropriate area or use the traditional wa
msgid "Encrypt the image (Lutim does not keep the key)."
msgstr "Encrypt the image (Lutim does not keep the key)."
#: templates/partial/lutim.js.ep:47
#: templates/partial/lutim.js.ep:24
msgid "Error while trying to modify the image."
msgstr ""
@@ -114,6 +127,14 @@ msgstr ""
msgid "Evolution of total files"
msgstr "Evolution of total files"
#: templates/myfiles.html.ep:18
msgid "Expires at"
msgstr ""
#: templates/myfiles.html.ep:13
msgid "File name"
msgstr ""
#: templates/about.html.ep:24
msgid "For more details, see the <a href=\"https://git.framasoft.org/luc/lutim\">homepage of the project</a>."
msgstr "For more details, see the <a href=\"https://git.framasoft.org/luc/lutim\">homepage of the project</a>."
@@ -122,8 +143,8 @@ msgstr "For more details, see the <a href=\"https://git.framasoft.org/luc/lutim\
msgid "Fork me!"
msgstr "Fork me!"
#: templates/partial/lutim.js.ep:111
#: templates/partial/lutim.js.ep:77
#: templates/partial/lutim.js.ep:54
#: templates/partial/lutim.js.ep:88
msgid "Hit Enter, then Ctrl+C to copy the short link"
msgstr ""
@@ -156,7 +177,7 @@ msgstr "Image URL"
msgid "Informations"
msgstr "Informations"
#: templates/layouts/default.html.ep:54
#: templates/layouts/default.html.ep:55
msgid "Install webapp"
msgstr "Install webapp"
@@ -180,7 +201,7 @@ msgstr "Keep EXIF tags"
#: templates/index.html.ep:130
#: templates/index.html.ep:170
#: templates/index.html.ep:82
#: templates/partial/lutim.js.ep:159
#: templates/partial/lutim.js.ep:136
msgid "Let's go!"
msgstr "Let's go!"
@@ -190,7 +211,7 @@ msgstr "License:"
#: templates/index.html.ep:53
#: templates/index.html.ep:55
#: templates/partial/lutim.js.ep:131
#: templates/partial/lutim.js.ep:108
msgid "Link for share on social networks"
msgstr "Link for share on social networks"
@@ -204,15 +225,28 @@ msgstr "Main developers"
#: templates/index.html.ep:37
#: templates/index.html.ep:39
#: templates/partial/lutim.js.ep:127
#: templates/partial/lutim.js.ep:104
msgid "Markdown syntax"
msgstr "Markdown syntax"
#: templates/layouts/default.html.ep:54
#: templates/myfiles.html.ep:2
msgid "My images"
msgstr ""
#: templates/myfiles.html.ep:38
msgid "No limit"
msgstr ""
#: templates/index.html.ep:129
#: templates/index.html.ep:162
msgid "Only images are allowed"
msgstr "Only images are allowed"
#: templates/myfiles.html.ep:6
msgid "Only the images sent with this browser will be listed here. The informations are stored in localStorage: if you delete your localStorage data, you'll loose this informations."
msgstr ""
#: templates/about.html.ep:16
msgid "Only the uploader! (well, only if he's the only owner of the images' rights before the upload)"
msgstr "Only the uploader! (well, only if he's the only owner of the images' rights before the upload)"
@@ -225,7 +259,7 @@ msgstr "Please contact the administrator: %1"
msgid "Send an image"
msgstr "Send an image"
#: templates/partial/lutim.js.ep:29
#: templates/partial/lutim.js.ep:6
msgid "Share it!"
msgstr ""
@@ -234,7 +268,7 @@ msgid "Share on Twitter"
msgstr "Share on Twitter"
#: templates/index.html.ep:97
#: templates/partial/lutim.js.ep:162
#: templates/partial/lutim.js.ep:139
msgid "Something bad happened"
msgstr "Something bad happened"
@@ -246,26 +280,26 @@ msgstr "The IP address of the image's sender is retained for a delay which depen
msgid "The Lutim software is a <a href=\"http://en.wikipedia.org/wiki/Free_software\">free software</a>, which allows you to download and install it on you own server. Have a look at the <a href=\"https://www.gnu.org/licenses/agpl-3.0.html\">AGPL</a> to see what you can do."
msgstr "The Lutim software is a <a href=\"http://en.wikipedia.org/wiki/Free_software\">free software</a>, which allows you to download and install it on you own server. Have a look at the <a href=\"https://www.gnu.org/licenses/agpl-3.0.html\">AGPL</a> to see what you can do."
#: lib/Lutim/Controller.pm:234
#: lib/Lutim/Controller.pm:257
msgid "The URL is not valid."
msgstr "The URL is not valid."
#: lib/Lutim/Controller.pm:145
#: lib/Lutim/Controller.pm:76
#: lib/Lutim/Controller.pm:168
#: lib/Lutim/Controller.pm:99
msgid "The delete token is invalid."
msgstr "The delete token is invalid."
#. ($upload->filename)
#: lib/Lutim/Controller.pm:370
#: lib/Lutim/Controller.pm:396
msgid "The file %1 is not an image."
msgstr "The file %1 is not an image."
#. ($max_file_size)
#. ($tx->res->max_message_size)
#. ($c->req->max_message_size)
#: lib/Lutim/Controller.pm:198
#: lib/Lutim/Controller.pm:267
#: templates/partial/lutim.js.ep:195
#: lib/Lutim/Controller.pm:221
#: lib/Lutim/Controller.pm:290
#: templates/partial/lutim.js.ep:177
msgid "The file exceed the size limit (%1)"
msgstr "The file exceed the size limit (%1)"
@@ -274,16 +308,16 @@ msgid "The graph's datas are not updated in real-time."
msgstr "The graph's datas are not updated in real-time."
#. ($image->filename)
#: lib/Lutim/Controller.pm:147
#: lib/Lutim/Controller.pm:170
msgid "The image %1 has already been deleted."
msgstr "The image %1 has already been deleted."
#. ($image->filename)
#: lib/Lutim/Controller.pm:153
#: lib/Lutim/Controller.pm:176
msgid "The image %1 has been successfully deleted"
msgstr "The image %1 has been successfully deleted"
#: lib/Lutim/Controller.pm:84
#: lib/Lutim/Controller.pm:107
msgid "The image's delay has been successfully modified"
msgstr "The image's delay has been successfully modified"
@@ -296,27 +330,31 @@ msgid "The images you post on Lutim can be stored indefinitely or be deleted at
msgstr "The images you post on Lutim can be stored indefinitely or be deleted at first view or after a delay selected from those proposed."
#. ($c->config->{contact})
#: lib/Lutim/Controller.pm:365
#: lib/Lutim/Controller.pm:391
msgid "There is no more available URL. Retry or contact the administrator. %1"
msgstr "There is no more available URL. Retry or contact the administrator. %1"
#: templates/index.html.ep:24
#: templates/partial/lutim.js.ep:27
#: templates/partial/lutim.js.ep:4
msgid "Tweet it!"
msgstr "Tweet it!"
#. ($short)
#: lib/Lutim/Controller.pm:118
#: lib/Lutim/Controller.pm:141
msgid "Unable to find the image %1."
msgstr "Unable to find the image %1."
#: lib/Lutim.pm:52
#: lib/Lutim/Controller.pm:451
#: lib/Lutim/Controller.pm:497
#: lib/Lutim/Controller.pm:541
#: lib/Lutim/Controller.pm:480
#: lib/Lutim/Controller.pm:526
#: lib/Lutim/Controller.pm:570
msgid "Unable to find the image: it has been deleted."
msgstr "Unable to find the image: it has been deleted."
#: lib/Lutim/Controller.pm:83
msgid "Unable to get counter"
msgstr ""
#: templates/about.html.ep:17
msgid "Unlike many image sharing services, you don't give us rights on uploaded images."
msgstr "Unlike many image sharing services, you don't give us rights on uploaded images."
@@ -326,6 +364,10 @@ msgstr "Unlike many image sharing services, you don't give us rights on uploaded
msgid "Upload an image with its URL"
msgstr "Upload an image with its URL"
#: templates/myfiles.html.ep:17
msgid "Uploaded at"
msgstr ""
#: templates/stats.html.ep:6
msgid "Uploaded files by days"
msgstr "Uploaded files by days"
@@ -337,7 +379,8 @@ msgstr "Uploading is currently disabled, please try later or contact the adminis
#: templates/index.html.ep:29
#: templates/index.html.ep:31
#: templates/partial/lutim.js.ep:125
#: templates/myfiles.html.ep:14
#: templates/partial/lutim.js.ep:102
msgid "View link"
msgstr "View link"
+69 -33
View File
@@ -9,7 +9,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Lutim\n"
"POT-Creation-Date: YEAR-MO-DA HO:MI+ZONE\n"
"PO-Revision-Date: 2015-09-17 10:04+0000\n"
"PO-Revision-Date: 2015-09-17 21:53+0000\n"
"Last-Translator: Luc Didry <luc@didry.org>\n"
"Language-Team: Spanish (http://www.transifex.com/fiat-tux/lutim/language/es/)\n"
"MIME-Version: 1.0\n"
@@ -20,8 +20,8 @@ msgstr ""
#. ($delay)
#. (config('max_delay')
#: templates/partial/lutim.js.ep:139 templates/partial/lutim.js.ep:148
#: templates/partial/lutim.js.ep:149
#: templates/partial/lutim.js.ep:116 templates/partial/lutim.js.ep:125
#: templates/partial/lutim.js.ep:126
msgid "%1 days"
msgstr "%1 días"
@@ -38,15 +38,20 @@ msgstr "-o-"
msgid "1 year"
msgstr "1 año"
#: templates/index.html.ep:4 templates/partial/lutim.js.ep:148
#: templates/index.html.ep:4 templates/partial/lutim.js.ep:125
msgid "24 hours"
msgstr "24 horas"
#: lib/Lutim/Controller.pm:215
#: templates/myfiles.html.ep:68
msgid ": Error while trying to get the counter."
msgstr ": Error al intentar obtener el contador."
#: lib/Lutim/Controller.pm:238
msgid "An error occured while downloading the image."
msgstr "Error al intentar modificar la imagen."
#: templates/about.html.ep:40 templates/stats.html.ep:13
#: templates/about.html.ep:40 templates/myfiles.html.ep:23
#: templates/stats.html.ep:13
msgid "Back to homepage"
msgstr "Volver a la página inicial"
@@ -58,28 +63,35 @@ msgstr "Clic para abrir el explorador de archivos"
msgid "Contributors"
msgstr "Contribuidores"
#: templates/partial/lutim.js.ep:187
#: templates/partial/lutim.js.ep:164 templates/partial/lutim.js.ep:201
#: templates/partial/lutim.js.ep:263
msgid "Copy all view links to clipboard"
msgstr "Copiar todos los enlaces de visualización al portapapeles"
#: templates/index.html.ep:33 templates/index.html.ep:41
#: templates/index.html.ep:49 templates/index.html.ep:57
#: templates/partial/lutim.js.ep:127 templates/partial/lutim.js.ep:129
#: templates/partial/lutim.js.ep:131 templates/partial/lutim.js.ep:133
#: templates/partial/lutim.js.ep:104 templates/partial/lutim.js.ep:106
#: templates/partial/lutim.js.ep:108 templates/partial/lutim.js.ep:110
msgid "Copy to clipboard"
msgstr "Copiar al portapapeles"
#: templates/myfiles.html.ep:11
msgid "Counter"
msgstr "Contador"
#: templates/index.html.ep:111 templates/index.html.ep:142
#: templates/index.html.ep:79 templates/partial/lutim.js.ep:157
#: templates/index.html.ep:79 templates/myfiles.html.ep:12
#: templates/partial/lutim.js.ep:134
msgid "Delete at first view?"
msgstr "¿Borrar en la primera vista?"
#: templates/index.html.ep:62 templates/partial/lutim.js.ep:9
#: templates/index.html.ep:62 templates/myfiles.html.ep:15
#: templates/partial/common.js.ep:12
msgid "Deletion link"
msgstr "Enlace para borrar"
#: templates/index.html.ep:45 templates/index.html.ep:47
#: templates/partial/lutim.js.ep:129
#: templates/partial/lutim.js.ep:106
msgid "Download link"
msgstr "Enlace de descarga"
@@ -99,7 +111,7 @@ msgstr "Arrastre y suelte una imagen en el área apropiada, o use el método tra
msgid "Encrypt the image (Lutim does not keep the key)."
msgstr "Las imágenes se cifran en el servidor (Lutim no guarda la clave)."
#: templates/partial/lutim.js.ep:47
#: templates/partial/lutim.js.ep:24
msgid "Error while trying to modify the image."
msgstr "Error al intentar modificar la imagen."
@@ -107,6 +119,14 @@ msgstr "Error al intentar modificar la imagen."
msgid "Evolution of total files"
msgstr "Evolución de archivos en total"
#: templates/myfiles.html.ep:14
msgid "Expires at"
msgstr "Expira"
#: templates/myfiles.html.ep:9
msgid "File name"
msgstr "Nombre de archivo"
#: templates/about.html.ep:24
msgid ""
"For more details, see the <a "
@@ -117,7 +137,7 @@ msgstr "Para más detalles, vea la <a href=\"https://git.framasoft.org/luc/lutim
msgid "Fork me!"
msgstr "¡Clóname!"
#: templates/partial/lutim.js.ep:111 templates/partial/lutim.js.ep:77
#: templates/partial/lutim.js.ep:54 templates/partial/lutim.js.ep:88
msgid "Hit Enter, then Ctrl+C to copy the short link"
msgstr "Presione Ingresar, entonces Ctrl + C para copiar el enlace"
@@ -174,7 +194,7 @@ msgid "Keep EXIF tags"
msgstr "Mantener las etiquetas EXIF"
#: templates/index.html.ep:130 templates/index.html.ep:170
#: templates/index.html.ep:82 templates/partial/lutim.js.ep:159
#: templates/index.html.ep:82 templates/partial/lutim.js.ep:136
msgid "Let's go!"
msgstr "¡Vamos allá!"
@@ -183,7 +203,7 @@ msgid "License:"
msgstr "Licencia:"
#: templates/index.html.ep:53 templates/index.html.ep:55
#: templates/partial/lutim.js.ep:131
#: templates/partial/lutim.js.ep:108
msgid "Link for share on social networks"
msgstr "Enlace para compartir en redes sociales"
@@ -199,10 +219,18 @@ msgid "Main developers"
msgstr "Desarrolladores principales"
#: templates/index.html.ep:37 templates/index.html.ep:39
#: templates/partial/lutim.js.ep:127
#: templates/partial/lutim.js.ep:104
msgid "Markdown syntax"
msgstr "Sintaxis de Markdown"
#: templates/myfiles.html.ep:2
msgid "My images"
msgstr "Mis Imágenes"
#: templates/myfiles.html.ep:34
msgid "No limit"
msgstr "Sin fecha de caducidad"
#: templates/index.html.ep:129 templates/index.html.ep:162
msgid "Only images are allowed"
msgstr "Sólo se admiten imágenes"
@@ -221,7 +249,7 @@ msgstr "Por favor, contacte con el administrador: %1"
msgid "Send an image"
msgstr "Enviar una imagen"
#: templates/partial/lutim.js.ep:29
#: templates/partial/lutim.js.ep:6
msgid "Share it!"
msgstr "¡Compártelo!"
@@ -229,7 +257,7 @@ msgstr "¡Compártelo!"
msgid "Share on Twitter"
msgstr "Compartir en Twitter"
#: templates/index.html.ep:97 templates/partial/lutim.js.ep:162
#: templates/index.html.ep:97 templates/partial/lutim.js.ep:139
msgid "Something bad happened"
msgstr "Algo malo ha pasado"
@@ -249,24 +277,24 @@ msgid ""
" you can do."
msgstr "El software Lutim es <a href=\"http://es.wikipedia.org/wiki/Software_libre\">software libre</a>, lo que le permite descargarlo e instalarlo en su propio servidor. Eche un vistazo a la licencia <a href=\"https://www.gnu.org/licenses/agpl-3.0.html\">AGPL</a> para ver qué puede hacer."
#: lib/Lutim/Controller.pm:234
#: lib/Lutim/Controller.pm:257
msgid "The URL is not valid."
msgstr "La URL no es válida."
#: lib/Lutim/Controller.pm:145 lib/Lutim/Controller.pm:76
#: lib/Lutim/Controller.pm:168 lib/Lutim/Controller.pm:99
msgid "The delete token is invalid."
msgstr "El código de borrado no es válido."
#. ($upload->filename)
#: lib/Lutim/Controller.pm:370
#: lib/Lutim/Controller.pm:396
msgid "The file %1 is not an image."
msgstr "El archivo %1 no es una imagen."
#. ($max_file_size)
#. ($tx->res->max_message_size)
#. ($c->req->max_message_size)
#: lib/Lutim/Controller.pm:198 lib/Lutim/Controller.pm:267
#: templates/partial/lutim.js.ep:195
#: lib/Lutim/Controller.pm:221 lib/Lutim/Controller.pm:290
#: templates/partial/lutim.js.ep:177
msgid "The file exceed the size limit (%1)"
msgstr "El archivo supera el límite de tamaño (%1)"
@@ -275,16 +303,16 @@ msgid "The graph's datas are not updated in real-time."
msgstr "Los datos del gráfico no se actualizan en tiempo real."
#. ($image->filename)
#: lib/Lutim/Controller.pm:147
#: lib/Lutim/Controller.pm:170
msgid "The image %1 has already been deleted."
msgstr "La imagen %1 ya se ha borrado."
#. ($image->filename)
#: lib/Lutim/Controller.pm:153
#: lib/Lutim/Controller.pm:176
msgid "The image %1 has been successfully deleted"
msgstr "La imagen %1 se ha borrado correctamente"
#: lib/Lutim/Controller.pm:84
#: lib/Lutim/Controller.pm:107
msgid "The image's delay has been successfully modified"
msgstr "Se ha modificado correctamente el tiempo de la imagen"
@@ -299,24 +327,28 @@ msgid ""
msgstr "Puede, opcionalmente, solicitar que la imagen publicada en Lutim se elimine con la primera vista (o descarga) o tras un tiempo seleccionado de entre varios propuestos."
#. ($c->config->{contact})
#: lib/Lutim/Controller.pm:365
#: lib/Lutim/Controller.pm:391
msgid "There is no more available URL. Retry or contact the administrator. %1"
msgstr "No más URL disponibles. Inténtelo de nuevo o contacte con el administrador. %1"
#: templates/index.html.ep:24 templates/partial/lutim.js.ep:27
#: templates/index.html.ep:24 templates/partial/lutim.js.ep:4
msgid "Tweet it!"
msgstr "¡Tuitéalo!"
#. ($short)
#: lib/Lutim/Controller.pm:118
#: lib/Lutim/Controller.pm:141
msgid "Unable to find the image %1."
msgstr "No se ha podido encontrar la imagen %1."
#: lib/Lutim.pm:52 lib/Lutim/Controller.pm:451 lib/Lutim/Controller.pm:497
#: lib/Lutim/Controller.pm:541
#: lib/Lutim.pm:52 lib/Lutim/Controller.pm:480 lib/Lutim/Controller.pm:526
#: lib/Lutim/Controller.pm:570
msgid "Unable to find the image: it has been deleted."
msgstr "No se ha podido encontrar la imagen: ha sido borrada."
#: lib/Lutim/Controller.pm:83
msgid "Unable to get counter"
msgstr "Imposible recuperar el contador"
#: templates/about.html.ep:17
msgid ""
"Unlike many image sharing services, you don't give us rights on uploaded "
@@ -327,6 +359,10 @@ msgstr "A diferencia de muchos servicios de compartición de imágenes, usted no
msgid "Upload an image with its URL"
msgstr "Subir una imagen con la URL"
#: templates/myfiles.html.ep:13
msgid "Uploaded at"
msgstr "Enviado el"
#: templates/stats.html.ep:6
msgid "Uploaded files by days"
msgstr "Archivos enviados por día"
@@ -339,7 +375,7 @@ msgid ""
msgstr "La carga está deshabilitada en estos momentos, por favor inténtelo más tarde o contacte con el administrador (%1)."
#: templates/index.html.ep:29 templates/index.html.ep:31
#: templates/partial/lutim.js.ep:125
#: templates/myfiles.html.ep:10 templates/partial/lutim.js.ep:102
msgid "View link"
msgstr "Enlace de visualización"
+77 -34
View File
@@ -9,7 +9,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Lutim\n"
"POT-Creation-Date: YEAR-MO-DA HO:MI+ZONE\n"
"PO-Revision-Date: 2015-09-17 09:56+0000\n"
"PO-Revision-Date: 2015-09-17 22:02+0000\n"
"Last-Translator: Luc Didry <luc@didry.org>\n"
"Language-Team: French (http://www.transifex.com/fiat-tux/lutim/language/fr/)\n"
"MIME-Version: 1.0\n"
@@ -20,8 +20,8 @@ msgstr ""
#. ($delay)
#. (config('max_delay')
#: templates/partial/lutim.js.ep:139 templates/partial/lutim.js.ep:148
#: templates/partial/lutim.js.ep:149
#: templates/partial/lutim.js.ep:116 templates/partial/lutim.js.ep:125
#: templates/partial/lutim.js.ep:126
msgid "%1 days"
msgstr "%1 jours"
@@ -38,15 +38,20 @@ msgstr "-ou-"
msgid "1 year"
msgstr "1 an"
#: templates/index.html.ep:4 templates/partial/lutim.js.ep:148
#: templates/index.html.ep:4 templates/partial/lutim.js.ep:125
msgid "24 hours"
msgstr "24 heures"
#: lib/Lutim/Controller.pm:215
#: templates/myfiles.html.ep:72
msgid ": Error while trying to get the counter."
msgstr " : Erreur en essayant de récupérer le compteur."
#: lib/Lutim/Controller.pm:238
msgid "An error occured while downloading the image."
msgstr "Une erreur est survenue lors du téléchargement de l'image."
#: templates/about.html.ep:40 templates/stats.html.ep:13
#: templates/about.html.ep:40 templates/myfiles.html.ep:27
#: templates/stats.html.ep:13
msgid "Back to homepage"
msgstr "Retour à la page d'accueil"
@@ -58,28 +63,35 @@ msgstr "Cliquez pour utiliser le navigateur de fichier"
msgid "Contributors"
msgstr "Contributeurs"
#: templates/partial/lutim.js.ep:187
#: templates/partial/lutim.js.ep:164 templates/partial/lutim.js.ep:201
#: templates/partial/lutim.js.ep:263
msgid "Copy all view links to clipboard"
msgstr "Copier tous les liens de visualisation dans le presse-papier"
#: templates/index.html.ep:33 templates/index.html.ep:41
#: templates/index.html.ep:49 templates/index.html.ep:57
#: templates/partial/lutim.js.ep:127 templates/partial/lutim.js.ep:129
#: templates/partial/lutim.js.ep:131 templates/partial/lutim.js.ep:133
#: templates/partial/lutim.js.ep:104 templates/partial/lutim.js.ep:106
#: templates/partial/lutim.js.ep:108 templates/partial/lutim.js.ep:110
msgid "Copy to clipboard"
msgstr "Copier dans le presse-papier"
#: templates/myfiles.html.ep:15
msgid "Counter"
msgstr "Compteur"
#: templates/index.html.ep:111 templates/index.html.ep:142
#: templates/index.html.ep:79 templates/partial/lutim.js.ep:157
#: templates/index.html.ep:79 templates/myfiles.html.ep:16
#: templates/partial/lutim.js.ep:134
msgid "Delete at first view?"
msgstr "Supprimer au premier accès ?"
#: templates/index.html.ep:62 templates/partial/lutim.js.ep:9
#: templates/index.html.ep:62 templates/myfiles.html.ep:19
#: templates/partial/common.js.ep:12
msgid "Deletion link"
msgstr "Lien de suppression"
#: templates/index.html.ep:45 templates/index.html.ep:47
#: templates/partial/lutim.js.ep:129
#: templates/partial/lutim.js.ep:106
msgid "Download link"
msgstr "Lien de téléchargement"
@@ -99,7 +111,7 @@ msgstr "Faites glisser des images dans la zone prévue à cet effet ou sélectio
msgid "Encrypt the image (Lutim does not keep the key)."
msgstr "Chiffrer l'image (Lutim ne stocke pas la clé)."
#: templates/partial/lutim.js.ep:47
#: templates/partial/lutim.js.ep:24
msgid "Error while trying to modify the image."
msgstr "Une erreur est survenue en essayant de modifier l'image."
@@ -107,6 +119,14 @@ msgstr "Une erreur est survenue en essayant de modifier l'image."
msgid "Evolution of total files"
msgstr "Évolution du nombre total de fichiers"
#: templates/myfiles.html.ep:18
msgid "Expires at"
msgstr "Expire le"
#: templates/myfiles.html.ep:13
msgid "File name"
msgstr "Nom du fichier"
#: templates/about.html.ep:24
msgid ""
"For more details, see the <a "
@@ -117,7 +137,7 @@ msgstr "Pour plus de détails, consultez la page <a href=\"https://git.framasoft
msgid "Fork me!"
msgstr "Créez un fork !"
#: templates/partial/lutim.js.ep:111 templates/partial/lutim.js.ep:77
#: templates/partial/lutim.js.ep:54 templates/partial/lutim.js.ep:88
msgid "Hit Enter, then Ctrl+C to copy the short link"
msgstr "Appuyez sur la touche Entrée puis faites Ctrl+C pour copier le lien"
@@ -151,7 +171,7 @@ msgstr "URL de l'image"
msgid "Informations"
msgstr "Informations"
#: templates/layouts/default.html.ep:54
#: templates/layouts/default.html.ep:55
msgid "Install webapp"
msgstr "Installer la webapp"
@@ -174,7 +194,7 @@ msgid "Keep EXIF tags"
msgstr "Conserver les données EXIF"
#: templates/index.html.ep:130 templates/index.html.ep:170
#: templates/index.html.ep:82 templates/partial/lutim.js.ep:159
#: templates/index.html.ep:82 templates/partial/lutim.js.ep:136
msgid "Let's go!"
msgstr "Allons-y !"
@@ -183,7 +203,7 @@ msgid "License:"
msgstr "Licence :"
#: templates/index.html.ep:53 templates/index.html.ep:55
#: templates/partial/lutim.js.ep:131
#: templates/partial/lutim.js.ep:108
msgid "Link for share on social networks"
msgstr "Lien pour partager sur les réseaux sociaux"
@@ -199,14 +219,29 @@ msgid "Main developers"
msgstr "Développeurs de l'application"
#: templates/index.html.ep:37 templates/index.html.ep:39
#: templates/partial/lutim.js.ep:127
#: templates/partial/lutim.js.ep:104
msgid "Markdown syntax"
msgstr "Syntaxe Markdown"
#: templates/layouts/default.html.ep:54 templates/myfiles.html.ep:2
msgid "My images"
msgstr "Mes images"
#: templates/myfiles.html.ep:38
msgid "No limit"
msgstr "Pas de date d'expiration"
#: templates/index.html.ep:129 templates/index.html.ep:162
msgid "Only images are allowed"
msgstr "Seules les images sont acceptées"
#: templates/myfiles.html.ep:6
msgid ""
"Only the images sent with this browser will be listed here. The informations"
" are stored in localStorage: if you delete your localStorage data, you'll "
"loose this informations."
msgstr "Seules les images envoyées avec ce navigateur seront listées ici. Les informations sont stockées en localStorage : si vous supprimez vos données localStorage, vous perdrez ces informations."
#: templates/about.html.ep:16
msgid ""
"Only the uploader! (well, only if he's the only owner of the images' rights "
@@ -221,7 +256,7 @@ msgstr "Veuillez contacter ladministrateur : %1"
msgid "Send an image"
msgstr "Envoyer une image"
#: templates/partial/lutim.js.ep:29
#: templates/partial/lutim.js.ep:6
msgid "Share it!"
msgstr "Partagez !"
@@ -229,7 +264,7 @@ msgstr "Partagez !"
msgid "Share on Twitter"
msgstr "Partager sur Twitter"
#: templates/index.html.ep:97 templates/partial/lutim.js.ep:162
#: templates/index.html.ep:97 templates/partial/lutim.js.ep:139
msgid "Something bad happened"
msgstr "Un problème est survenu"
@@ -249,24 +284,24 @@ msgid ""
" you can do."
msgstr "Le logiciel Lutim est un <a href=\"https://fr.wikipedia.org/wiki/Logiciel_libre\">logiciel libre</a>, ce qui vous permet de le télécharger et de linstaller sur votre propre serveur. Jetez un coup d’œil à l<a href=\"https://www.gnu.org/licenses/agpl-3.0.html\">AGPL</a> pour voir quels sont vos droits"
#: lib/Lutim/Controller.pm:234
#: lib/Lutim/Controller.pm:257
msgid "The URL is not valid."
msgstr "L'URL n'est pas valide."
#: lib/Lutim/Controller.pm:145 lib/Lutim/Controller.pm:76
#: lib/Lutim/Controller.pm:168 lib/Lutim/Controller.pm:99
msgid "The delete token is invalid."
msgstr "Le jeton de suppression est invalide."
#. ($upload->filename)
#: lib/Lutim/Controller.pm:370
#: lib/Lutim/Controller.pm:396
msgid "The file %1 is not an image."
msgstr "Le fichier %1 n'est pas une image."
#. ($max_file_size)
#. ($tx->res->max_message_size)
#. ($c->req->max_message_size)
#: lib/Lutim/Controller.pm:198 lib/Lutim/Controller.pm:267
#: templates/partial/lutim.js.ep:195
#: lib/Lutim/Controller.pm:221 lib/Lutim/Controller.pm:290
#: templates/partial/lutim.js.ep:177
msgid "The file exceed the size limit (%1)"
msgstr "Le fichier dépasse la limite de taille (%1)"
@@ -275,16 +310,16 @@ msgid "The graph's datas are not updated in real-time."
msgstr "Les données du graphique ne sont pas mises à jour en temps réél."
#. ($image->filename)
#: lib/Lutim/Controller.pm:147
#: lib/Lutim/Controller.pm:170
msgid "The image %1 has already been deleted."
msgstr "L'image %1 a déjà été supprimée."
#. ($image->filename)
#: lib/Lutim/Controller.pm:153
#: lib/Lutim/Controller.pm:176
msgid "The image %1 has been successfully deleted"
msgstr "L'image %1 a été supprimée avec succès."
#: lib/Lutim/Controller.pm:84
#: lib/Lutim/Controller.pm:107
msgid "The image's delay has been successfully modified"
msgstr "Le délai de l'image a été modifié avec succès."
@@ -299,24 +334,28 @@ msgid ""
msgstr "Les images déposées sur Lutim peuvent être stockées indéfiniment, ou seffacer dès le premier affichage ou au bout du délai choisi parmi ceux proposés."
#. ($c->config->{contact})
#: lib/Lutim/Controller.pm:365
#: lib/Lutim/Controller.pm:391
msgid "There is no more available URL. Retry or contact the administrator. %1"
msgstr "Il n'y a plus d'URL disponible. Veuillez réessayer ou contacter l'administrateur. %1."
#: templates/index.html.ep:24 templates/partial/lutim.js.ep:27
#: templates/index.html.ep:24 templates/partial/lutim.js.ep:4
msgid "Tweet it!"
msgstr "Tweetez !"
#. ($short)
#: lib/Lutim/Controller.pm:118
#: lib/Lutim/Controller.pm:141
msgid "Unable to find the image %1."
msgstr "Impossible de trouver l'image %1."
#: lib/Lutim.pm:52 lib/Lutim/Controller.pm:451 lib/Lutim/Controller.pm:497
#: lib/Lutim/Controller.pm:541
#: lib/Lutim.pm:52 lib/Lutim/Controller.pm:480 lib/Lutim/Controller.pm:526
#: lib/Lutim/Controller.pm:570
msgid "Unable to find the image: it has been deleted."
msgstr "Impossible de trouver l'image : elle a été supprimée."
#: lib/Lutim/Controller.pm:83
msgid "Unable to get counter"
msgstr "Impossible de récupérer le compteur"
#: templates/about.html.ep:17
msgid ""
"Unlike many image sharing services, you don't give us rights on uploaded "
@@ -327,6 +366,10 @@ msgstr "Au contraire de la majorité des services de partages d'image, vous ne n
msgid "Upload an image with its URL"
msgstr "Déposer une image par son URL"
#: templates/myfiles.html.ep:17
msgid "Uploaded at"
msgstr "Envoyé le"
#: templates/stats.html.ep:6
msgid "Uploaded files by days"
msgstr "Fichiers envoyés, par jour"
@@ -339,7 +382,7 @@ msgid ""
msgstr "L'envoi d'images est actuellement désactivé, veuillez réessayer plus tard ou contacter l'administrateur (%1)."
#: templates/index.html.ep:29 templates/index.html.ep:31
#: templates/partial/lutim.js.ep:125
#: templates/myfiles.html.ep:14 templates/partial/lutim.js.ep:102
msgid "View link"
msgstr "Lien d'affichage"
+3 -1
View File
@@ -8,4 +8,6 @@
.icon-spinner:before { content: '\e806'; } /* '' */
.icon-eye:before { content: '\e807'; } /* '' */
.icon-share:before { content: '\e808'; } /* '' */
.icon-clipboard:before { content: '\e809'; } /* '' */
.icon-clipboard:before { content: '\e809'; } /* '' */
.icon-ok:before { content: '\e80a'; } /* '' */
.icon-cancel:before { content: '\e80b'; } /* '' */
+9 -7
View File
File diff suppressed because one or more lines are too long
+3 -1
View File
@@ -8,4 +8,6 @@
.icon-spinner { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe806;&nbsp;'); }
.icon-eye { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe807;&nbsp;'); }
.icon-share { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe808;&nbsp;'); }
.icon-clipboard { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe809;&nbsp;'); }
.icon-clipboard { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe809;&nbsp;'); }
.icon-ok { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe80a;&nbsp;'); }
.icon-cancel { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe80b;&nbsp;'); }
+3 -1
View File
@@ -19,4 +19,6 @@
.icon-spinner { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe806;&nbsp;'); }
.icon-eye { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe807;&nbsp;'); }
.icon-share { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe808;&nbsp;'); }
.icon-clipboard { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe809;&nbsp;'); }
.icon-clipboard { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe809;&nbsp;'); }
.icon-ok { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe80a;&nbsp;'); }
.icon-cancel { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe80b;&nbsp;'); }
+9 -7
View File
@@ -1,10 +1,10 @@
@font-face {
font-family: 'fontello';
src: url('../font/fontello.eot?5320554');
src: url('../font/fontello.eot?5320554#iefix') format('embedded-opentype'),
url('../font/fontello.woff?5320554') format('woff'),
url('../font/fontello.ttf?5320554') format('truetype'),
url('../font/fontello.svg?5320554#fontello') format('svg');
src: url('../font/fontello.eot?14873744');
src: url('../font/fontello.eot?14873744#iefix') format('embedded-opentype'),
url('../font/fontello.woff?14873744') format('woff'),
url('../font/fontello.ttf?14873744') format('truetype'),
url('../font/fontello.svg?14873744#fontello') format('svg');
font-weight: normal;
font-style: normal;
}
@@ -14,7 +14,7 @@
@media screen and (-webkit-min-device-pixel-ratio:0) {
@font-face {
font-family: 'fontello';
src: url('../font/fontello.svg?5320554#fontello') format('svg');
src: url('../font/fontello.svg?14873744#fontello') format('svg');
}
}
*/
@@ -63,4 +63,6 @@
.icon-spinner:before { content: '\e806'; } /* '' */
.icon-eye:before { content: '\e807'; } /* '' */
.icon-share:before { content: '\e808'; } /* '' */
.icon-clipboard:before { content: '\e809'; } /* '' */
.icon-clipboard:before { content: '\e809'; } /* '' */
.icon-ok:before { content: '\e80a'; } /* '' */
.icon-cancel:before { content: '\e80b'; } /* '' */
+9
View File
@@ -37,3 +37,12 @@ Font license info
Homepage: http://typicons.com/
## Elusive
Copyright (C) 2013 by Aristeides Stathopoulos
Author: Aristeides Stathopoulos
License: SIL (http://scripts.sil.org/OFL)
Homepage: http://aristeides.com/
Binary file not shown.
+2
View File
@@ -16,6 +16,8 @@
<glyph glyph-name="eye" unicode="&#xe807;" d="m929 314q-85 132-213 197 34-58 34-125 0-104-73-177t-177-73-177 73-73 177q0 67 34 125-128-65-213-197 75-114 187-182t242-68 242 68 187 182z m-402 215q0 11-8 19t-19 7q-70 0-120-50t-50-119q0-12 8-19t19-8 19 8 8 19q0 48 34 82t82 34q11 0 19 8t8 19z m473-215q0-19-11-38-78-129-210-206t-279-77-279 77-210 206q-11 19-11 38t11 39q78 128 210 205t279 78 279-78 210-205q11-20 11-39z" horiz-adv-x="1000" />
<glyph glyph-name="share" unicode="&#xe808;" d="m679 279q74 0 126-53t52-126-52-126-126-53-127 53-52 126q0 7 1 19l-201 100q-51-48-121-48-75 0-127 53t-52 126 52 126 127 53q70 0 121-48l201 100q-1 12-1 19 0 74 52 126t127 53 126-53 52-126-52-126-126-53q-71 0-122 48l-201-100q1-12 1-19t-1-19l201-100q51 48 122 48z" horiz-adv-x="857.1" />
<glyph glyph-name="clipboard" unicode="&#xe809;" d="m678 819q65 0 110-46t46-110l0-625q0-65-46-111t-110-46l-522 0q-65 0-110 46t-46 111l0 625q0 65 46 110t110 46l522 0z m-418-104l0-52q0-21 16-37t37-16l208 0q22 0 37 16t15 37l0 52-313 0z m469-677l0 625q0 21-15 37t-36 15l-53 0 0-52q0-43-30-73t-74-31l-208 0q-43 0-74 31t-30 73l0 52-53 0q-21 0-37-15t-15-37l0-625q0-21 15-37t37-16l522 0q21 0 36 16t15 37z m-104 52l-416 0q-26 0-26 25 0 12 7 19t19 8l416 0q11 0 19-8t7-19q0-25-26-25z m0 157l-416 0q-11 0-19 7t-7 19q0 25 26 25l416 0q26 0 26-25 0-11-7-19t-19-7z m0 156l-416 0q-26 0-26 25 0 11 7 19t19 7l416 0q11 0 19-7t7-19q0-25-26-25z" horiz-adv-x="834" />
<glyph glyph-name="ok" unicode="&#xe80a;" d="m932 534q0-22-15-38l-404-404-76-76q-16-15-38-15t-38 15l-76 76-202 202q-15 16-15 38t15 38l76 76q16 16 38 16t38-16l164-165 366 367q16 16 38 16t38-16l76-76q15-16 15-38z" horiz-adv-x="1000" />
<glyph glyph-name="cancel" unicode="&#xe80b;" d="m0 71l279 279-279 279 221 221 279-279 279 279 221-221-279-279 279-279-221-221-279 279-279-279z" horiz-adv-x="1000" />
</font>
</defs>
</svg>

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.
Binary file not shown.
+16 -11
View File
@@ -5,6 +5,7 @@ function addItem(item) {
} else {
files = JSON.parse(files);
}
delete item['thumb'];
files.push(item);
localStorage.setItem('images', JSON.stringify(files));
}
@@ -63,17 +64,21 @@ $('document').ready(function() {
}
}
}
var firstview = ($('#first-view').prop('checked')) ? 1 : 0;
var deleteday = ($('#delete-day').prop('checked')) ? 1 : 0;
if ($('#first-view').length !== 0) {
var firstview = ($('#first-view').prop('checked')) ? 1 : 0;
var deleteday = ($('#delete-day').prop('checked')) ? 1 : 0;
bindddz(firstview, deleteday);
bindddz(firstview, deleteday);
$('#file-url-button').on('click', upload_url);
$('#lutim-file-url').keydown( function(e) {
var key = e.charCode ? e.charCode : e.keyCode ? e.keyCode : 0;
if(key == 13) {
e.preventDefault();
upload_url();
}
});
$('#file-url-button').on('click', upload_url);
$('#lutim-file-url').keydown( function(e) {
var key = e.charCode ? e.charCode : e.keyCode ? e.keyCode : 0;
if(key == 13) {
e.preventDefault();
upload_url();
}
});
} else if ($('#myfiles').length !== 0) {
populateFilesTable();
}
});
File diff suppressed because one or more lines are too long
+1
View File
@@ -172,4 +172,5 @@
</div>
<!-- /D&D Zone -->
%= include 'partial/common', format => 'js'
%= include 'partial/lutim', format => 'js', d => \%d
+2 -1
View File
@@ -50,7 +50,8 @@
<%= link_to 'https://git.framasoft.org/luc/lutim' => (title => l('Fork me!')) => begin %><i class="lead icon icon-git"></i><% end %> 
<%= link_to $twitter_url => (title => l('Share on Twitter')) => begin %><i class="lead icon icon-twitter"></i><% end %> 
<%= link_to 'https://flattr.com/submit/auto?user_id=_SKy_&url='.$url.'&title=Lutim&category=software' => (title => 'Flattr this') => begin %><i class="lead icon icon-flattr"></i><% end %> 
<%= link_to 'bitcoin:1JCEtmx9pyzWfitMQj2pKAk8GNgyix7RmA?label=lutim' => (title => 'Give Bitcoins') => begin %><i class="lead icon icon-bitcoin"></i><% end %> 
<%= link_to 'bitcoin:1JCEtmx9pyzWfitMQj2pKAk8GNgyix7RmA?label=lutim' => (title => 'Give Bitcoins') => begin %><i class="lead icon icon-bitcoin"></i><% end %> 
<%= link_to url_for('myfiles') => begin %><%= l('My images') %><% end %> — 
<a class="btn btn-default btn-xs" href="#" id="install-app"><img src="<%= url_for('/img/rocket.png') %>" alt="mozilla rocket logo"> <%= l('Install webapp') %></a>
</p>
</div>
+78
View File
@@ -0,0 +1,78 @@
% # vim:set sts=4 sw=4 ts=4 ft=html.epl expandtab:
<h4><%= l('My images') %></h4>
<hr>
<p>
<%= l('Only the images sent with this browser will be listed here. The informations are stored in localStorage: if you delete your localStorage data, you\'ll loose this informations.') %>
</p>
<div class="table-responsive">
<table class="table table-hover">
<thead>
<tr>
<th class="text-center"><%= l('File name') %></th>
<th class="text-center"><%= l('View link') %></th>
<th class="text-center"><%= l('Counter') %></th>
<th class="text-center"><%= l('Delete at first view?') %></th>
<th class="text-center"><%= l('Uploaded at') %></th>
<th class="text-center"><%= l('Expires at') %></th>
<th class="text-center"><%= l('Deletion link') %></th>
</tr>
</thead>
<tbody id="myfiles">
</tbody>
</table>
</div>
<%= link_to url_for('/') => ( class => "btn btn-primary btn-lg" ) => begin %><%= l('Back to homepage') %><% end%>
%= include 'partial/common', format => 'js'
%= javascript begin
function populateFilesTable() {
var files = JSON.parse(localStorage.getItem('images'));
files.reverse();
files.forEach(function(element, index, array) {
var vlink = link(element.short+'.'+element.ext, '');
var del_view = (element.del_at_view) ? '<span class="icon icon-ok"></span>' : '<span class="icon icon-cancel"></span>';
var dlink = link(element.short, 'dl', element.token, false, true);
var limit = (element.limit === 0) ? '<%= l('No limit') %>' : moment.unix(element.limit * 86400 + element.created_at).locale(window.navigator.language).format('LLLL');
var created_at = moment.unix(element.created_at).locale(window.navigator.language).format('LLLL');
var tr = '<tr><td>'
+element.filename
+'</td><td>'
+'<a href="'+vlink+'">'+vlink+'</a>'
+'</td><td id="count-'+element.real_short+'" class="text-center">'
+'</td><td class="text-center">'
+del_view
+'</td><td>'
+created_at
+'</td><td>'
+limit
+'</td><td>'
+'<a href="'+dlink+'">'+dlink+'</a>'
+'</td></tr>';
$('#myfiles').append(tr);
$.ajax({
url : '<%== url_for('counter') %>',
type : 'POST',
data : {
'short': element.real_short,
'token': element.token
},
success: function(data) {
if (data.success) {
$('#count-'+element.real_short).text(data.counter);
} else {
alert(data.msg);
}
},
error: function() {
alert(element.filename+'<%= l(': Error while trying to get the counter.') %>');
}
});
});
}
% end
%= javascript '/js/moment-with-locales.min.js'
+18
View File
@@ -0,0 +1,18 @@
% # vim:set sw=4 ts=4 sts=4 ft=javascript expandtab:
%= javascript begin
function link(url, dl, token, modify, only_url) {
if (token !== undefined) {
if (modify !== undefined && modify === true) {
return '<%== url_for('/m/')->to_abs() %>'+url+'/'+token;
}
url = '<%== url_for('/')->to_abs() %>d/'+url+'/'+token;
if (only_url !== undefined && only_url === true) {
return url;
}
return '<a class="btn btn-default col-xs-12 text-left" href="'+url+'" title="<%= l('Deletion link') %>"><span class="icon icon-trash"></span> '+url+'</a>';
} else if (dl !== '') {
url = url+'?'+dl;
}
return '<%== url_for('/')->to_abs() %>'+url;
}
% end
+14 -14
View File
@@ -1,17 +1,5 @@
% # vim:set sw=4 ts=4 sts=4 ft=javascript expandtab:
%= javascript begin
function link(url, dl, token, modify) {
if (token !== undefined) {
if (modify !== undefined && modify === true) {
return '<%== url_for('/m/')->to_abs() %>'+url+'/'+token;
}
url = 'd/'+url+'/'+token;
return '<a class="btn btn-default col-xs-12 text-left" href="<%== url_for('/')->to_abs() %>'+url+'" title="<%= l('Deletion link') %>"><span class="icon icon-trash"></span> <%== url_for('/')->to_abs() %>'+url+'</a>';
} else if (dl !== '') {
url = url+'?'+dl;
}
return '<%== url_for('/')->to_abs() %>'+url;
}
function tw_url(url) {
var btn = '&nbsp;&nbsp;&nbsp;<a title="<%= l('Tweet it!') %>" target="_blank" href="https://twitter.com/share?url=<%== url_for('/')->to_abs() %>'+url+'?t"><span class="icon icon-twitter"></span></a>';
if (navigator.mozSetMessageHandler !== undefined) {
@@ -176,8 +164,11 @@
$('.messages').prepend('<div class="col-xs-12 col-sm-11 col-sm-offset-1"><a id="copy-all" href="#" class="btn btn-info" onClick="copyAllToClipboard();"><%= l('Copy all view links to clipboard') %></a></div>');
}
$('.messages').append(buildMessage(data.success, data.msg));
$('.close').unbind('click', evaluateCopyAll);
$('.close').on('click', evaluateCopyAll);
if (data.success) {
$('.close').unbind('click', evaluateCopyAll);
$('.close').on('click', evaluateCopyAll);
addItem(data.msg);
}
},
onUploadError: function(id, message){
$('.messages').append(buildMessage(false, ''));
@@ -212,6 +203,7 @@
$('#lutim-file-url').val('');
$('.close').unbind('click', evaluateCopyAll);
$('.close').on('click', evaluateCopyAll);
addItem(data.msg);
}
},
error: function() {
@@ -267,7 +259,15 @@
},
success: function (data, message, xhr){
$('#1-div').remove();
if ($('#copy-all').length === 0 && data.success) {
$('.messages').prepend('<div class="col-xs-12 col-sm-11 col-sm-offset-1"><a id="copy-all" href="#" class="btn btn-info" onClick="copyAllToClipboard();"><%= l('Copy all view links to clipboard') %></a></div>');
}
$('.messages').append(buildMessage(data.success, data.msg));
if (data.success) {
$('.close').unbind('click', evaluateCopyAll);
$('.close').on('click', evaluateCopyAll);
addItem(data.msg);
}
},
error: function (xhr, status, errMsg){
$('.messages').append(buildMessage(false, ''));
+2
View File
@@ -1,7 +1,9 @@
templates/about.html.ep
templates/index.html.ep
templates/stats.html.ep
templates/myfiles.html.ep
templates/layouts/default.html.ep
templates/partial/common.js.ep
templates/partial/lutim.js.ep
lib/Lutim.pm
lib/Lutim/Controller.pm