Merge pull request #386 from electerious/develop

Lychee 3.0.5
This commit is contained in:
Tobias Reich 2015-08-09 14:57:38 +02:00
commit b00b1d9772
7 changed files with 33 additions and 17 deletions

BIN
dist/main.js vendored

Binary file not shown.

BIN
dist/view.js vendored Executable file → Normal file

Binary file not shown.

View File

@ -1,3 +1,9 @@
## v3.0.5
Released August 9, 2015
- `Fixed` view.php not displaying photos
## v3.0.4
Released July 17, 2015

View File

@ -20,7 +20,7 @@ All settings are stored in the database. You can change the properties manually,
username = Username for Lychee (hashed)
password = Password for Lychee (hashed)
Your photos and albums are protected by an username and password. If both rows are empty, Lychee will prompt you to set them.
Your photos and albums are protected by a username and password. If both rows are empty, Lychee will prompt you to set them.
#### Thumb Quality

View File

@ -1,6 +1,6 @@
{
"name": "Lychee",
"version": "3.0.4",
"version": "3.0.5",
"description": "Self-hosted photo-management done right.",
"authors": "Tobias Reich <tobias@electerious.com>",
"license": "MIT",
@ -14,13 +14,13 @@
"basicmodal": "^3.1.1",
"gulp": "^3.9.0",
"gulp-autoprefixer": "2.3.1",
"gulp-babel": "^5.1.0",
"gulp-babel": "^5.2.0",
"gulp-concat": "^2.6.0",
"gulp-inject": "^1.3.1",
"gulp-inject": "^1.5.0",
"gulp-load-plugins": "^1.0.0-rc",
"gulp-minify-css": "^1.2.0",
"gulp-rimraf": "^0.1.1",
"gulp-sass": "^2.0.3",
"gulp-sass": "^2.0.4",
"gulp-uglify": "^1.2.0",
"jquery": "^2.1.4",
"mousetrap": "^1.5.3"

View File

@ -6,8 +6,8 @@
lychee = {
title : document.title,
version : '3.0.4',
version_code : '030004',
version : '3.0.5',
version_code : '030005',
update_path : 'http://lychee.electerious.com/version/index.php',
updateURL : 'https://github.com/electerious/Lychee',

View File

@ -3,15 +3,25 @@
* @copyright 2015 by Tobias Reich
*/
let lychee = { content: $('#content') },
loadingBar = { show() {}, hide() {} }
let lychee = {
content: $('#content'),
getEventName() {
let touchendSupport = (/Android|iPhone|iPad|iPod/i).test(navigator.userAgent || navigator.vendor || window.opera) && ('ontouchend' in document.documentElement),
eventName = (touchendSupport===true ? 'touchend' : 'click')
return eventName
}
}
let loadingBar = { show() {}, hide() {} },
imageview = $('#imageview')
$(document).ready(function() {
// Event Name
let touchendSupport = (/Android|iPhone|iPad|iPod/i).test(navigator.userAgent || navigator.vendor || window.opera) && ('ontouchend' in document.documentElement),
eventName = (touchendSupport===true ? 'touchend' : 'click')
let eventName = lychee.getEventName()
// Set API error handler
api.onError = error
@ -41,13 +51,13 @@ const getPhotoSize = function(photo) {
hasMedium = photo.medium!=='',
pixelRatio = window.devicePixelRatio,
view = {
width: $(window).width() - 60,
height: $(window).height() - 100
width : $(window).width() - 60,
height : $(window).height() - 100
}
// Detect if the photo will be shown scaled,
// because the screen size is smaller than the photo
if (photo.json.width>view.width || photo.json.height>view.height) scaled = true
if (photo.width>view.width || photo.height>view.height) scaled = true
// Calculate pixel ratio of screen
if (pixelRatio!=null && pixelRatio>1) {
@ -61,7 +71,7 @@ const getPhotoSize = function(photo) {
// Photo not scaled
// Photo smaller then screen
if (scaled===false && (photo.json.width<view.width&& photo.json.width<view.height)) size = 'small'
if (scaled===false && (photo.width<view.width&& photo.width<view.height)) size = 'small'
return size
@ -71,8 +81,8 @@ const loadPhotoInfo = function(photoID) {
let params = {
photoID,
albumID: 0,
password: ''
albumID : 0,
password : ''
}
api.post('Photo::get', params, function(data) {