Skip to content

Commit

Permalink
Fix #61 - Add modal to modify expiration delay from "myfiles" page
Browse files Browse the repository at this point in the history
  • Loading branch information
ldidry committed Jul 29, 2018
1 parent 9ea2234 commit ee936c1
Show file tree
Hide file tree
Showing 23 changed files with 660 additions and 53 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
Expand Up @@ -20,6 +20,7 @@ Revision history for Lutim
- Allow to use a fixed domain
- Add localStorage export and import feature
- Add link to generate random file in collection
- Add modal to modify expiration delay from "myfiles" page

0.10.4 2018-05-07
- Fix bug in cache system that would allow someone to view an image with an incorrect decryption key
Expand Down
58 changes: 35 additions & 23 deletions themes/default/lib/Lutim/I18N/lutim.pot
Expand Up @@ -19,7 +19,7 @@ msgstr ""
#. (30)
#. ($delay)
#. (config('max_delay')
#: lib/Lutim/Command/cron/stats.pm:147 lib/Lutim/Command/cron/stats.pm:148 lib/Lutim/Command/cron/stats.pm:161 lib/Lutim/Command/cron/stats.pm:162 lib/Lutim/Command/cron/stats.pm:178 lib/Lutim/Command/cron/stats.pm:179 themes/default/templates/partial/for_my_delay.html.ep:13 themes/default/templates/partial/for_my_delay.html.ep:14 themes/default/templates/partial/for_my_delay.html.ep:4 themes/default/templates/partial/lutim.js.ep:140 themes/default/templates/partial/lutim.js.ep:149 themes/default/templates/partial/lutim.js.ep:150 themes/default/templates/partial/raw.js.ep:23 themes/default/templates/partial/raw.js.ep:24 themes/default/templates/partial/raw.js.ep:6 themes/default/templates/partial/raw.js.ep:7 themes/default/templates/raw.html.ep:8 themes/default/templates/raw.html.ep:9
#: lib/Lutim/Command/cron/stats.pm:147 lib/Lutim/Command/cron/stats.pm:148 lib/Lutim/Command/cron/stats.pm:161 lib/Lutim/Command/cron/stats.pm:162 lib/Lutim/Command/cron/stats.pm:178 lib/Lutim/Command/cron/stats.pm:179 themes/default/templates/myfiles.html.ep:24 themes/default/templates/myfiles.html.ep:33 themes/default/templates/myfiles.html.ep:34 themes/default/templates/partial/for_my_delay.html.ep:13 themes/default/templates/partial/for_my_delay.html.ep:14 themes/default/templates/partial/for_my_delay.html.ep:4 themes/default/templates/partial/lutim.js.ep:140 themes/default/templates/partial/lutim.js.ep:149 themes/default/templates/partial/lutim.js.ep:150 themes/default/templates/partial/raw.js.ep:23 themes/default/templates/partial/raw.js.ep:24 themes/default/templates/partial/raw.js.ep:6 themes/default/templates/partial/raw.js.ep:7 themes/default/templates/raw.html.ep:8 themes/default/templates/raw.html.ep:9
msgid "%1 days"
msgstr ""

Expand All @@ -32,15 +32,15 @@ msgstr ""
msgid "-or-"
msgstr ""

#: lib/Lutim.pm:221 lib/Lutim/Command/cron/stats.pm:149 lib/Lutim/Command/cron/stats.pm:163 lib/Lutim/Command/cron/stats.pm:180 themes/default/templates/index.html.ep:5 themes/default/templates/partial/raw.js.ep:25 themes/default/templates/partial/raw.js.ep:8 themes/default/templates/raw.html.ep:10
#: lib/Lutim.pm:221 lib/Lutim/Command/cron/stats.pm:149 lib/Lutim/Command/cron/stats.pm:163 lib/Lutim/Command/cron/stats.pm:180 themes/default/templates/index.html.ep:5 themes/default/templates/myfiles.html.ep:5 themes/default/templates/partial/raw.js.ep:25 themes/default/templates/partial/raw.js.ep:8 themes/default/templates/raw.html.ep:10
msgid "1 year"
msgstr ""

#: lib/Lutim.pm:220 lib/Lutim/Command/cron/stats.pm:146 lib/Lutim/Command/cron/stats.pm:160 lib/Lutim/Command/cron/stats.pm:177 themes/default/templates/index.html.ep:4 themes/default/templates/partial/for_my_delay.html.ep:13 themes/default/templates/partial/lutim.js.ep:149 themes/default/templates/partial/raw.js.ep:22 themes/default/templates/partial/raw.js.ep:5 themes/default/templates/raw.html.ep:7
#: lib/Lutim.pm:220 lib/Lutim/Command/cron/stats.pm:146 lib/Lutim/Command/cron/stats.pm:160 lib/Lutim/Command/cron/stats.pm:177 themes/default/templates/index.html.ep:4 themes/default/templates/myfiles.html.ep:33 themes/default/templates/myfiles.html.ep:4 themes/default/templates/partial/for_my_delay.html.ep:13 themes/default/templates/partial/lutim.js.ep:149 themes/default/templates/partial/raw.js.ep:22 themes/default/templates/partial/raw.js.ep:5 themes/default/templates/raw.html.ep:7
msgid "24 hours"
msgstr ""

#: themes/default/templates/partial/myfiles.js.ep:124
#: themes/default/templates/partial/myfiles.js.ep:180
msgid ": Error while trying to get the counter."
msgstr ""

Expand All @@ -60,14 +60,18 @@ msgstr ""
msgid "Archives download"
msgstr ""

#: themes/default/templates/about.html.ep:44 themes/default/templates/myfiles.html.ep:87 themes/default/templates/stats.html.ep:25
#: themes/default/templates/about.html.ep:44 themes/default/templates/myfiles.html.ep:135 themes/default/templates/stats.html.ep:25
msgid "Back to homepage"
msgstr ""

#: themes/default/templates/index.html.ep:211 themes/default/templates/index.html.ep:212
msgid "Click to open the file browser"
msgstr ""

#: themes/default/templates/myfiles.html.ep:51
msgid "Close"
msgstr ""

#: themes/default/templates/gallery.html.ep:29
msgid "Close (Esc)"
msgstr ""
Expand All @@ -84,11 +88,11 @@ msgstr ""
msgid "Copy all view links to clipboard"
msgstr ""

#: themes/default/templates/index.html.ep:103 themes/default/templates/index.html.ep:111 themes/default/templates/index.html.ep:18 themes/default/templates/index.html.ep:36 themes/default/templates/index.html.ep:54 themes/default/templates/index.html.ep:87 themes/default/templates/index.html.ep:95 themes/default/templates/myfiles.html.ep:20 themes/default/templates/myfiles.html.ep:38 themes/default/templates/myfiles.html.ep:56 themes/default/templates/partial/common.js.ep:186 themes/default/templates/partial/lutim.js.ep:106 themes/default/templates/partial/lutim.js.ep:121 themes/default/templates/partial/lutim.js.ep:80 themes/default/templates/partial/lutim.js.ep:92 themes/default/templates/partial/myfiles.js.ep:92
#: themes/default/templates/index.html.ep:103 themes/default/templates/index.html.ep:111 themes/default/templates/index.html.ep:18 themes/default/templates/index.html.ep:36 themes/default/templates/index.html.ep:54 themes/default/templates/index.html.ep:87 themes/default/templates/index.html.ep:95 themes/default/templates/myfiles.html.ep:104 themes/default/templates/myfiles.html.ep:68 themes/default/templates/myfiles.html.ep:86 themes/default/templates/partial/common.js.ep:186 themes/default/templates/partial/lutim.js.ep:106 themes/default/templates/partial/lutim.js.ep:121 themes/default/templates/partial/lutim.js.ep:80 themes/default/templates/partial/lutim.js.ep:92 themes/default/templates/partial/myfiles.js.ep:142
msgid "Copy to clipboard"
msgstr ""

#: themes/default/templates/myfiles.html.ep:75
#: themes/default/templates/myfiles.html.ep:123
msgid "Counter"
msgstr ""

Expand All @@ -100,7 +104,7 @@ msgstr ""
msgid "Delay repartition chart for enabled images"
msgstr ""

#: themes/default/templates/index.html.ep:133 themes/default/templates/index.html.ep:165 themes/default/templates/index.html.ep:196 themes/default/templates/myfiles.html.ep:76 themes/default/templates/partial/lutim.js.ep:161
#: themes/default/templates/index.html.ep:133 themes/default/templates/index.html.ep:165 themes/default/templates/index.html.ep:196 themes/default/templates/myfiles.html.ep:124 themes/default/templates/myfiles.html.ep:45 themes/default/templates/partial/lutim.js.ep:161
msgid "Delete at first view?"
msgstr ""

Expand All @@ -112,7 +116,7 @@ msgstr ""
msgid "Deleted images in 30 days"
msgstr ""

#: themes/default/templates/index.html.ep:116 themes/default/templates/myfiles.html.ep:79 themes/default/templates/partial/common.js.ep:178 themes/default/templates/partial/common.js.ep:181
#: themes/default/templates/index.html.ep:116 themes/default/templates/myfiles.html.ep:127 themes/default/templates/partial/common.js.ep:178 themes/default/templates/partial/common.js.ep:181
msgid "Deletion link"
msgstr ""

Expand All @@ -124,7 +128,7 @@ msgstr ""
msgid "Download link"
msgstr ""

#: themes/default/templates/index.html.ep:28 themes/default/templates/index.html.ep:31 themes/default/templates/myfiles.html.ep:30 themes/default/templates/myfiles.html.ep:33
#: themes/default/templates/index.html.ep:28 themes/default/templates/index.html.ep:31 themes/default/templates/myfiles.html.ep:78 themes/default/templates/myfiles.html.ep:81
msgid "Download zip link"
msgstr ""

Expand All @@ -140,23 +144,23 @@ msgstr ""
msgid "Encrypt the image (Lutim does not keep the key)."
msgstr ""

#: themes/default/templates/partial/lutim.js.ep:45
#: themes/default/templates/partial/lutim.js.ep:45 themes/default/templates/partial/myfiles.js.ep:113
msgid "Error while trying to modify the image."
msgstr ""

#: themes/default/templates/stats.html.ep:10
msgid "Evolution of total files"
msgstr ""

#: themes/default/templates/myfiles.html.ep:78
#: themes/default/templates/myfiles.html.ep:126
msgid "Expires at"
msgstr ""

#: themes/default/templates/myfiles.html.ep:64
#: themes/default/templates/myfiles.html.ep:112
msgid "Export localStorage data"
msgstr ""

#: themes/default/templates/myfiles.html.ep:73
#: themes/default/templates/myfiles.html.ep:121
msgid "File name"
msgstr ""

Expand All @@ -168,7 +172,7 @@ msgstr ""
msgid "Fork me!"
msgstr ""

#: themes/default/templates/index.html.ep:10 themes/default/templates/index.html.ep:13 themes/default/templates/myfiles.html.ep:12 themes/default/templates/myfiles.html.ep:15
#: themes/default/templates/index.html.ep:10 themes/default/templates/index.html.ep:13 themes/default/templates/myfiles.html.ep:60 themes/default/templates/myfiles.html.ep:63
msgid "Gallery link"
msgstr ""

Expand Down Expand Up @@ -212,7 +216,7 @@ msgstr ""
msgid "Image not found."
msgstr ""

#: themes/default/templates/myfiles.html.ep:65
#: themes/default/templates/myfiles.html.ep:113
msgid "Import localStorage data"
msgstr ""

Expand Down Expand Up @@ -276,23 +280,27 @@ msgstr ""
msgid "Markdown syntax"
msgstr ""

#: themes/default/templates/myfiles.html.ep:2 themes/default/templates/partial/navbar.html.ep:18
#: themes/default/templates/partial/myfiles.js.ep:149
msgid "Modify expiration delay"
msgstr ""

#: themes/default/templates/myfiles.html.ep:7 themes/default/templates/partial/navbar.html.ep:18
msgid "My images"
msgstr ""

#: themes/default/templates/gallery.html.ep:45
msgid "Next (arrow right)"
msgstr ""

#: themes/default/templates/partial/myfiles.js.ep:82
#: themes/default/templates/partial/myfiles.js.ep:105 themes/default/templates/partial/myfiles.js.ep:132
msgid "No limit"
msgstr ""

#: themes/default/templates/index.html.ep:183 themes/default/templates/index.html.ep:216
msgid "Only images are allowed"
msgstr ""

#: themes/default/templates/myfiles.html.ep:6
#: themes/default/templates/myfiles.html.ep:11
msgid "Only the images sent with this browser will be listed here. The details are stored in localStorage: if you delete your localStorage data, you'll loose these details."
msgstr ""

Expand All @@ -313,14 +321,18 @@ msgstr ""
msgid "Previous (arrow left)"
msgstr ""

#: themes/default/templates/index.html.ep:46 themes/default/templates/index.html.ep:49 themes/default/templates/myfiles.html.ep:48 themes/default/templates/myfiles.html.ep:51
#: themes/default/templates/index.html.ep:46 themes/default/templates/index.html.ep:49 themes/default/templates/myfiles.html.ep:96 themes/default/templates/myfiles.html.ep:99
msgid "Random image link"
msgstr ""

#: themes/default/templates/stats.html.ep:22
msgid "Raw stats"
msgstr ""

#: themes/default/templates/myfiles.html.ep:52
msgid "Save changes"
msgstr ""

#: themes/default/templates/index.html.ep:176
msgid "Send an image"
msgstr ""
Expand Down Expand Up @@ -462,7 +474,7 @@ msgstr ""
msgid "Upload an image with its URL"
msgstr ""

#: themes/default/templates/myfiles.html.ep:77
#: themes/default/templates/myfiles.html.ep:125
msgid "Uploaded at"
msgstr ""

Expand All @@ -475,7 +487,7 @@ msgstr ""
msgid "Uploading is currently disabled, please try later or contact the administrator (%1)."
msgstr ""

#: themes/default/templates/index.html.ep:83 themes/default/templates/index.html.ep:85 themes/default/templates/myfiles.html.ep:74 themes/default/templates/partial/lutim.js.ep:72 themes/default/templates/partial/lutim.js.ep:76
#: themes/default/templates/index.html.ep:83 themes/default/templates/index.html.ep:85 themes/default/templates/myfiles.html.ep:122 themes/default/templates/partial/lutim.js.ep:72 themes/default/templates/partial/lutim.js.ep:76
msgid "View link"
msgstr ""

Expand Down Expand Up @@ -523,7 +535,7 @@ msgstr ""
msgid "core developer"
msgstr ""

#: lib/Lutim.pm:219 lib/Lutim/Command/cron/stats.pm:145 lib/Lutim/Command/cron/stats.pm:159 lib/Lutim/Command/cron/stats.pm:176 themes/default/templates/index.html.ep:3 themes/default/templates/partial/raw.js.ep:21 themes/default/templates/partial/raw.js.ep:4 themes/default/templates/raw.html.ep:6
#: lib/Lutim.pm:219 lib/Lutim/Command/cron/stats.pm:145 lib/Lutim/Command/cron/stats.pm:159 lib/Lutim/Command/cron/stats.pm:176 themes/default/templates/index.html.ep:3 themes/default/templates/myfiles.html.ep:3 themes/default/templates/partial/raw.js.ep:21 themes/default/templates/partial/raw.js.ep:4 themes/default/templates/raw.html.ep:6
msgid "no time limit"
msgstr ""

Expand Down
133 changes: 131 additions & 2 deletions themes/default/public/css/bootstrap.css
Expand Up @@ -4029,6 +4029,129 @@ button.close {
border: 0;
-webkit-appearance: none;
}
.modal-open {
overflow: hidden;
}
.modal {
display: none;
overflow: hidden;
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 1050;
-webkit-overflow-scrolling: touch;
outline: 0;
}
.modal.fade .modal-dialog {
-webkit-transform: translate(0, -25%);
-ms-transform: translate(0, -25%);
-o-transform: translate(0, -25%);
transform: translate(0, -25%);
-webkit-transition: -webkit-transform 0.3s ease-out;
-o-transition: -o-transform 0.3s ease-out;
transition: transform 0.3s ease-out;
}
.modal.in .modal-dialog {
-webkit-transform: translate(0, 0);
-ms-transform: translate(0, 0);
-o-transform: translate(0, 0);
transform: translate(0, 0);
}
.modal-open .modal {
overflow-x: hidden;
overflow-y: auto;
}
.modal-dialog {
position: relative;
width: auto;
margin: 10px;
}
.modal-content {
position: relative;
background-color: #ffffff;
border: 1px solid #999999;
border: 1px solid rgba(0, 0, 0, 0.2);
border-radius: 6px;
-webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);
box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);
-webkit-background-clip: padding-box;
background-clip: padding-box;
outline: 0;
}
.modal-backdrop {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 1040;
background-color: #000000;
}
.modal-backdrop.fade {
opacity: 0;
filter: alpha(opacity=0);
}
.modal-backdrop.in {
opacity: 0.5;
filter: alpha(opacity=50);
}
.modal-header {
padding: 15px;
border-bottom: 1px solid #e5e5e5;
}
.modal-header .close {
margin-top: -2px;
}
.modal-title {
margin: 0;
line-height: 1.42857143;
}
.modal-body {
position: relative;
padding: 20px;
}
.modal-footer {
padding: 20px;
text-align: right;
border-top: 1px solid #e5e5e5;
}
.modal-footer .btn + .btn {
margin-left: 5px;
margin-bottom: 0;
}
.modal-footer .btn-group .btn + .btn {
margin-left: -1px;
}
.modal-footer .btn-block + .btn-block {
margin-left: 0;
}
.modal-scrollbar-measure {
position: absolute;
top: -9999px;
width: 50px;
height: 50px;
overflow: scroll;
}
@media (min-width: 768px) {
.modal-dialog {
width: 600px;
margin: 30px auto;
}
.modal-content {
-webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}
.modal-sm {
width: 300px;
}
}
@media (min-width: 992px) {
.modal-lg {
width: 900px;
}
}
.clearfix:before,
.clearfix:after,
.dl-horizontal dd:before,
Expand All @@ -4052,7 +4175,11 @@ button.close {
.navbar-header:before,
.navbar-header:after,
.navbar-collapse:before,
.navbar-collapse:after {
.navbar-collapse:after,
.modal-header:before,
.modal-header:after,
.modal-footer:before,
.modal-footer:after {
content: " ";
display: table;
}
Expand All @@ -4067,7 +4194,9 @@ button.close {
.nav:after,
.navbar:after,
.navbar-header:after,
.navbar-collapse:after {
.navbar-collapse:after,
.modal-header:after,
.modal-footer:after {
clear: both;
}
.center-block {
Expand Down
2 changes: 1 addition & 1 deletion themes/default/public/css/bootstrap.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion themes/default/public/css/common.min.css

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion themes/default/public/css/fontello-codes.css
Expand Up @@ -13,4 +13,5 @@
.icon-cancel:before { content: '\e80b'; } /* '' */
.icon-picture:before { content: '\e80c'; } /* '' */
.icon-file-archive:before { content: '\e80d'; } /* '' */
.icon-language:before { content: '\e80e'; } /* '' */
.icon-language:before { content: '\e80e'; } /* '' */
.icon-edit:before { content: '\e80f'; } /* '' */

0 comments on commit ee936c1

Please sign in to comment.