Merge branch 'master' into downloadable
Conflicts: assets/min/main.js
This commit is contained in:
commit
9676556a05
@ -98,7 +98,7 @@
|
||||
margin: 2px;
|
||||
}
|
||||
.album .overlay {
|
||||
background: linear-gradient(to bottom, rgba(0,0,0,0) 0%,rgba(0,0,0,0) 20%,rgba(0,0,0,0.9) 100%);
|
||||
background: linear-gradient(to bottom, rgba(0,0,0,0) 0%,rgba(0,0,0,0) 40%,rgba(0,0,0,0.85) 100%);
|
||||
}
|
||||
.photo .overlay {
|
||||
background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0) 60%, rgba(0,0,0,0.5) 80%, rgba(0,0,0,0.9) 100%);
|
||||
@ -229,7 +229,7 @@
|
||||
left: 50%;
|
||||
height: 160px;
|
||||
width: 180px;
|
||||
margin-top: -80px;
|
||||
margin-top: -60px;
|
||||
margin-left: -90px;
|
||||
padding-top: 20px;
|
||||
color: rgba(20, 20, 20, 1);
|
||||
@ -237,8 +237,9 @@
|
||||
text-align: center;
|
||||
}
|
||||
.no_content .icon {
|
||||
font-size: 120px;
|
||||
font-size: 80px;
|
||||
}
|
||||
.no_content p {
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
}
|
@ -42,6 +42,7 @@
|
||||
text-align: center;
|
||||
}
|
||||
.upload_message .close {
|
||||
display: none;
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
right: 0px;
|
||||
@ -118,4 +119,15 @@
|
||||
|
||||
.upload_message .rows .row a.status.success {
|
||||
color: rgb(42, 213, 0);
|
||||
}
|
||||
}
|
||||
|
||||
.upload_message .rows .row p.notice {
|
||||
display: none;
|
||||
float: left;
|
||||
padding: 2px 10px 5px;
|
||||
width: calc(100% - 20px);
|
||||
color: rgba(255,255,255,.5);
|
||||
font-size: 12px;
|
||||
overflow: hidden;
|
||||
line-height: 16px;
|
||||
}
|
@ -56,9 +56,9 @@ build = {
|
||||
if (!lychee.publicMode) {
|
||||
|
||||
if(albumJSON.star==1) album += "<a class='badge red icon-star'></a>";
|
||||
if(albumJSON.public==1) album += "<a class='badge red icon-share'></a>";
|
||||
if(albumJSON.public==1) album += "<a class='badge red icon-share'></a>";
|
||||
if(albumJSON.unsorted==1) album += "<a class='badge red icon-reorder'></a>";
|
||||
if(albumJSON.recent==1) album += "<a class='badge red icon-time'></a>";
|
||||
if(albumJSON.recent==1) album += "<a class='badge red icon-time'></a>";
|
||||
|
||||
}
|
||||
|
||||
@ -139,9 +139,9 @@ build = {
|
||||
no_content += "<div class='no_content fadeIn'>";
|
||||
no_content += "<a class='icon icon-" + typ + "'></a>";
|
||||
|
||||
if (typ==="search") no_content += "<p>No results</p>";
|
||||
else if (typ==="picture") no_content += "<p>No public albums</p>";
|
||||
else if (typ==="cog") no_content += "<p>No Configuration!</p>";
|
||||
if (typ==="search") no_content += "<p>No results</p>";
|
||||
else if (typ==="share") no_content += "<p>No public albums</p>";
|
||||
else if (typ==="cog") no_content += "<p>No configuration</p>";
|
||||
|
||||
no_content += "</div>";
|
||||
|
||||
@ -214,27 +214,21 @@ build = {
|
||||
modal += "<div class='upload_overlay fadeIn'>";
|
||||
modal += "<div class='upload_message center'>";
|
||||
modal += "<h1>" + title + "</h1>";
|
||||
modal += "<a class='close icon-remove-sign'></a>";
|
||||
modal += "<div class='rows'>";
|
||||
|
||||
for (var i = 0; i < files.length; i++) {
|
||||
|
||||
if (files[i].name.length>40) files[i].name = files[i].name.substr(0, 17) + "..." + files[i].name.substr(files[i].name.length-20, 20);
|
||||
|
||||
if (files[i].supported===true) {
|
||||
modal += "<div class='row'>";
|
||||
modal += "<a class='name'>" + lychee.escapeHTML(files[i].name) + "</a>";
|
||||
|
||||
modal += "<div class='row'>"
|
||||
modal += "<a class='name'>" + lychee.escapeHTML(files[i].name) + "</a>"
|
||||
modal += "<a class='status'></a>"
|
||||
modal += "</div>";
|
||||
if (files[i].supported===true) modal += "<a class='status'></a>";
|
||||
else modal += "<a class='status error'>Not supported</a>";
|
||||
|
||||
} else {
|
||||
|
||||
modal += "<div class='row'>"
|
||||
modal += "<a class='name'>" + lychee.escapeHTML(files[i].name) + "</a>"
|
||||
modal += "<a class='status error'>Not supported</a>"
|
||||
modal += "</div>";
|
||||
|
||||
}
|
||||
modal += "<p class='notice'></p>";
|
||||
modal += "</div>";
|
||||
|
||||
}
|
||||
|
||||
|
@ -164,9 +164,6 @@ $(document).ready(function(){
|
||||
/* Add Dialog */
|
||||
.on(event_name, ".button_add", function(e) { contextMenu.add(e) })
|
||||
|
||||
/* Upload */
|
||||
.on("change", "#upload_files", function() { modal.close(); upload.start.local(this.files) })
|
||||
|
||||
/* Context Menu */
|
||||
.on("contextmenu", ".photo", function(e) { contextMenu.photo(photo.getID(), e) })
|
||||
.on("contextmenu", ".album", function(e) { contextMenu.album(album.getID(), e) })
|
||||
@ -177,12 +174,14 @@ $(document).ready(function(){
|
||||
.on(event_name, "#infobox_overlay", view.infobox.hide)
|
||||
|
||||
/* Upload */
|
||||
.on("change", "#upload_files", function() { modal.close(); upload.start.local(this.files) })
|
||||
.on(event_name, ".upload_message a.close", upload.close)
|
||||
.on("dragover", function(e) { e.preventDefault(); }, false)
|
||||
.on("drop", function(e) {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
if (e.originalEvent.dataTransfer.files.length>0) upload.start.local(e.originalEvent.dataTransfer.files);
|
||||
else if (e.originalEvent.dataTransfer.getData('Text').length>3) upload.start.url(e.originalEvent.dataTransfer.getData('Text'));
|
||||
if (e.originalEvent.dataTransfer.files.length>0) upload.start.local(e.originalEvent.dataTransfer.files);
|
||||
else if (e.originalEvent.dataTransfer.getData('Text').length>3) upload.start.url(e.originalEvent.dataTransfer.getData('Text'));
|
||||
return true;
|
||||
});
|
||||
|
||||
|
@ -354,9 +354,12 @@ var lychee = {
|
||||
|
||||
error: function(errorThrown, params, data) {
|
||||
|
||||
console.log("Error Description: " + errorThrown);
|
||||
console.log("Error Params: " + params);
|
||||
console.log("Server Response: " + data);
|
||||
console.error({
|
||||
description: errorThrown,
|
||||
params: params,
|
||||
response: data
|
||||
});
|
||||
|
||||
loadingBar.show("error", errorThrown);
|
||||
|
||||
}
|
||||
|
@ -16,36 +16,18 @@ upload = {
|
||||
|
||||
},
|
||||
|
||||
setIcon: function(icon) {
|
||||
|
||||
$(".upload_message a").remove();
|
||||
$(".upload_message").prepend("<a class='icon-" + icon + "'></a>");
|
||||
|
||||
},
|
||||
|
||||
setProgress: function(progress) {
|
||||
|
||||
$(".progressbar div").css("width", progress + "%");
|
||||
|
||||
},
|
||||
|
||||
setText: function(text) {
|
||||
|
||||
$(".progressbar").remove();
|
||||
$(".upload_message").append("<p>" + text + "</p>");
|
||||
|
||||
},
|
||||
|
||||
notify: function(title) {
|
||||
notify: function(title, text) {
|
||||
|
||||
var popup;
|
||||
|
||||
if (!text||text==="") text = "You can now manage your new photo(s).";
|
||||
|
||||
if (!window.webkitNotifications) return false;
|
||||
|
||||
if (window.webkitNotifications.checkPermission()!==0) window.webkitNotifications.requestPermission();
|
||||
|
||||
if (window.webkitNotifications.checkPermission()===0&&title) {
|
||||
popup = window.webkitNotifications.createNotification("", title, "You can now manage your new photo(s).");
|
||||
popup = window.webkitNotifications.createNotification("", title, text);
|
||||
popup.show();
|
||||
}
|
||||
|
||||
@ -56,6 +38,7 @@ upload = {
|
||||
local: function(files) {
|
||||
|
||||
var albumID = album.getID(),
|
||||
error = false,
|
||||
process = function(files, file) {
|
||||
|
||||
var formData = new FormData(),
|
||||
@ -68,7 +51,19 @@ upload = {
|
||||
|
||||
$("#upload_files").val("");
|
||||
|
||||
upload.close();
|
||||
if (error===false) {
|
||||
|
||||
// Success
|
||||
upload.close();
|
||||
upload.notify("Upload complete");
|
||||
|
||||
} else {
|
||||
|
||||
// Error
|
||||
$(".upload_message a.close").show();
|
||||
upload.notify("Upload complete", "Failed to upload one or more photos.");
|
||||
|
||||
}
|
||||
|
||||
if (album.getID()===false) lychee.goto("0");
|
||||
else album.load(albumID);
|
||||
@ -112,34 +107,49 @@ upload = {
|
||||
|
||||
xhr.onload = function() {
|
||||
|
||||
// On success
|
||||
if (xhr.status===200) {
|
||||
var wait = false;
|
||||
|
||||
var wait;
|
||||
file.ready = true;
|
||||
|
||||
// Set status to finished
|
||||
// Set status
|
||||
if (xhr.status===200&&xhr.responseText==="1") {
|
||||
|
||||
// Success
|
||||
$(".upload_message .rows .row:nth-child(" + (file.num+1) + ") .status")
|
||||
.html("Finished")
|
||||
.addClass("success");
|
||||
|
||||
file.ready = true;
|
||||
wait = false;
|
||||
} else {
|
||||
|
||||
// Check if there are file which are not finished
|
||||
for (var i = 0; i < files.length; i++) {
|
||||
// Error
|
||||
$(".upload_message .rows .row:nth-child(" + (file.num+1) + ") .status")
|
||||
.html("Error")
|
||||
.addClass("error");
|
||||
$(".upload_message .rows .row:nth-child(" + (file.num+1) + ") p.notice")
|
||||
.html("Server returned an unknown response. Please take a look at the console of your browser for further details.")
|
||||
.show();
|
||||
|
||||
if (files[i].ready===false) {
|
||||
wait = true;
|
||||
break;
|
||||
}
|
||||
// Set global error
|
||||
error = true;
|
||||
|
||||
}
|
||||
|
||||
// Finish upload when all files are finished
|
||||
if (wait===false) finish();
|
||||
// Throw error
|
||||
lychee.error("Upload failed. Server returned the status code " + xhr.status + "!", xhr, xhr.responseText);
|
||||
|
||||
}
|
||||
|
||||
// Check if there are file which are not finished
|
||||
for (var i = 0; i < files.length; i++) {
|
||||
|
||||
if (files[i].ready===false) {
|
||||
wait = true;
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Finish upload when all files are finished
|
||||
if (wait===false) finish();
|
||||
|
||||
};
|
||||
|
||||
xhr.upload.onprogress = function(e) {
|
||||
@ -374,7 +384,6 @@ upload = {
|
||||
if (force===true) {
|
||||
$(".upload_overlay").remove();
|
||||
} else {
|
||||
upload.setProgress(100);
|
||||
$(".upload_overlay").removeClass("fadeIn").css("opacity", 0);
|
||||
setTimeout(function() { $(".upload_overlay").remove() }, 300);
|
||||
}
|
||||
|
@ -146,7 +146,7 @@ view = {
|
||||
|
||||
if (smartData===""&&albumsData==="") {
|
||||
lychee.content.html('');
|
||||
$("body").append(build.no_content("picture"));
|
||||
$("body").append(build.no_content("share"));
|
||||
} else {
|
||||
lychee.content.html(smartData + albumsData);
|
||||
}
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "Lychee",
|
||||
"version": "2.5.6",
|
||||
"version": "2.6.0",
|
||||
"description": "Self-hosted photo-management done right.",
|
||||
"authors": "Tobias Reich <tobias.reich.ich@gmail.com>",
|
||||
"license": "MIT",
|
||||
|
@ -1,10 +1,12 @@
|
||||
## v2.6
|
||||
|
||||
Released August ??, 2014
|
||||
Released August 16, 2014
|
||||
|
||||
- `New` Uploader (#101)
|
||||
- `New` Rewritten and redesigned Uploader (#101)
|
||||
- `New` Custom server-import directory (#187)
|
||||
- `New` Plugin documentation
|
||||
- `Improved` Database and installation process (#202 #195)
|
||||
- `Improved` "No public albums" now easier to read (#205)
|
||||
- `Fixed` Don't show EXIF info when not available (#194)
|
||||
|
||||
## v2.5.6
|
||||
|
Loading…
Reference in New Issue
Block a user