Merge branch 'develop' into feature/subalbums
This commit is contained in:
commit
5bbac75481
0
dist/main.css
vendored
Executable file → Normal file
0
dist/main.css
vendored
Executable file → Normal file
BIN
dist/main.js
vendored
BIN
dist/main.js
vendored
Binary file not shown.
BIN
dist/view.js
vendored
BIN
dist/view.js
vendored
Binary file not shown.
@ -1,3 +1,15 @@
|
||||
## v3.1.3
|
||||
|
||||
Released August 22, 2016
|
||||
|
||||
- `Improved` rotate and flip images with GD based on EXIF orientation (Thanks @qligier, #600)
|
||||
- `Improved` enter/leave fullscreen-mode by (not) moving the mouse for one second (Thanks @hrniels, #583)
|
||||
- `Improved` Prefetch the medium photo instead of the big one (Thanks @Bramas, #446)
|
||||
- `Improved` Added "session" to required extensions (#579)
|
||||
- `Improved` Added warning if Imagick is not installed/enabled (Thanks @hrniels, #590)
|
||||
- `Fixed` Don't assume that gd_info exists when running diagnostics (Thanks @hrniels, #589 #565)
|
||||
- `Fixed` Sidebar showing up in smart albums when navigating back from the photo-view
|
||||
|
||||
## v3.1.2
|
||||
|
||||
Released June 12, 2016
|
||||
|
@ -1,41 +0,0 @@
|
||||
### Installation using Docker
|
||||
|
||||
*Note: pre-installation of the latest version of [Git](http://git-scm.com/book/en/v2/Getting-Started-Installing-Git) and [Docker](https://docs.docker.com/installation/) is required to deploy Lychee using Docker.*
|
||||
|
||||
First, clone the latest version of Lychee and build it using the Dockerfile included in the repository.
|
||||
|
||||
```bash
|
||||
git clone https://github.com/electerious/Lychee.git
|
||||
cd Lychee
|
||||
docker build -t lychee .
|
||||
```
|
||||
|
||||
Once this is finished, remember to set the proper permissions on the `uploads` and `data` directories, so the container can mount these directories as volumes.
|
||||
|
||||
```
|
||||
chmod -R 777 uploads/ data/
|
||||
```
|
||||
|
||||
Now you can use the `docker run` command to run your Lychee container.
|
||||
|
||||
```bash
|
||||
docker run -v /var/lib/mysql --name lychee_data \
|
||||
-v $(pwd)/data:/app/data \
|
||||
-v $(pwd)/uploads:/app/uploads \
|
||||
-i -t -d -p 8000:80 lychee
|
||||
```
|
||||
|
||||
Browse to [localhost:8000](http://localhost:8000/) (the port can be specified via the `-p` flag) and you will see Lychee's configuration page. The default database username is `root` with no password (you can manage MySQL users by running `docker exec -i -t <container_id> mysql`). After submitting your database configuration, you can sign in and create a new username and password and start using Lychee.
|
||||
|
||||
*Note: if you are deploying on a server, you might want to forward your container to port `80` instead of `8000` so it'll be publicly accessible.*
|
||||
|
||||
### Managing Data
|
||||
|
||||
Running the container with the options above mounts three Docker [data volumes](https://docs.docker.com/userguide/dockervolumes/). The first is a named "data" volume used to store the MySQL database. The last two will mount the `/data` and `/uploads` from the container to your host `Lychee` directory. If you would like to upgrade or redeploy Lychee while preserving your data, you can kill the container and the volumes will persist. Just rebuild your new container and run it using a similar command:
|
||||
|
||||
```bash
|
||||
sudo docker run --volumes-from lychee_data \
|
||||
-v $(pwd)/data:/app/data \
|
||||
-v $(pwd)/uploads:/app/uploads \
|
||||
-i -t -d -p 8000:80 lychee
|
||||
```
|
@ -554,8 +554,7 @@ final class Photo {
|
||||
|
||||
case 2:
|
||||
// mirror
|
||||
// not yet implemented
|
||||
return false;
|
||||
imageflip($sourceImg, IMG_FLIP_HORIZONTAL);
|
||||
break;
|
||||
|
||||
case 3:
|
||||
@ -564,14 +563,16 @@ final class Photo {
|
||||
|
||||
case 4:
|
||||
// rotate 180 and mirror
|
||||
// not yet implemented
|
||||
return false;
|
||||
imageflip($sourceImg, IMG_FLIP_VERTICAL);
|
||||
break;
|
||||
|
||||
case 5:
|
||||
// rotate 90 and mirror
|
||||
// not yet implemented
|
||||
return false;
|
||||
$sourceImg = imagerotate($sourceImg, -90, 0);
|
||||
$newWidth = $info['height'];
|
||||
$newHeight = $info['width'];
|
||||
$swapSize = true;
|
||||
imageflip($sourceImg, IMG_FLIP_HORIZONTAL);
|
||||
break;
|
||||
|
||||
case 6:
|
||||
@ -583,8 +584,11 @@ final class Photo {
|
||||
|
||||
case 7:
|
||||
// rotate -90 and mirror
|
||||
// not yet implemented
|
||||
return false;
|
||||
$sourceImg = imagerotate($sourceImg, 90, 0);
|
||||
$newWidth = $info['height'];
|
||||
$newHeight = $info['width'];
|
||||
$swapSize = true;
|
||||
imageflip($sourceImg, IMG_FLIP_HORIZONTAL);
|
||||
break;
|
||||
|
||||
case 8:
|
||||
@ -1308,4 +1312,4 @@ final class Photo {
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
@ -53,10 +53,13 @@ if (hasPermissions(LYCHEE_UPLOADS)===false) $error .= ('Error: \'uploads/
|
||||
if (hasPermissions(LYCHEE_DATA)===false) $error .= ('Error: \'data/\' is missing or has insufficient read/write privileges' . PHP_EOL);
|
||||
|
||||
// About GD
|
||||
$gdVersion = gd_info();
|
||||
if (!$gdVersion['JPEG Support']) $error .= ('Error: PHP gd extension without jpeg support' . PHP_EOL);
|
||||
if (!$gdVersion['PNG Support']) $error .= ('Error: PHP gd extension without png support' . PHP_EOL);
|
||||
if (!$gdVersion['GIF Read Support'] || !$gdVersion['GIF Create Support']) $error .= ('Error: PHP gd extension without full gif support' . PHP_EOL);
|
||||
$gdVersion = array('GD Version' => '-');
|
||||
if (function_exists('gd_info')) {
|
||||
$gdVersion = gd_info();
|
||||
if (!$gdVersion['JPEG Support']) $error .= ('Error: PHP gd extension without jpeg support' . PHP_EOL);
|
||||
if (!$gdVersion['PNG Support']) $error .= ('Error: PHP gd extension without png support' . PHP_EOL);
|
||||
if (!$gdVersion['GIF Read Support'] || !$gdVersion['GIF Create Support']) $error .= ('Error: PHP gd extension without full gif support' . PHP_EOL);
|
||||
}
|
||||
|
||||
// Load config
|
||||
if (!file_exists(LYCHEE_CONFIG_FILE)) exit('Error: Configuration not found. Please install Lychee for additional tests');
|
||||
@ -96,6 +99,10 @@ if (empty(ini_get('allow_url_fopen'))) echo('Warning: You may experience problem
|
||||
// Check mysql version
|
||||
if ($database->server_version<50500) echo('Warning: Lychee uses the GBK charset to avoid sql injections on your MySQL version. Please update to MySQL 5.5 or higher to enable UTF-8 support.' . PHP_EOL);
|
||||
|
||||
// Check imagick
|
||||
if (!extension_loaded('imagick')) echo('Warning: Pictures that are rotated lose their metadata! Please install Imagick to avoid that.' . PHP_EOL);
|
||||
else if (!$settings['imagick']) echo('Warning: Pictures that are rotated lose their metadata! Please enable Imagick in settings to avoid that.' . PHP_EOL);
|
||||
|
||||
// Output
|
||||
if ($error==='') echo('No critical problems found. Lychee should work without problems!' . PHP_EOL);
|
||||
else echo $error;
|
||||
|
1967
src/npm-shrinkwrap.json
generated
1967
src/npm-shrinkwrap.json
generated
File diff suppressed because it is too large
Load Diff
@ -14,9 +14,9 @@
|
||||
"compile": "gulp"
|
||||
},
|
||||
"dependencies": {
|
||||
"babel-preset-es2015": "^6.9.0",
|
||||
"babel-preset-es2015": "^6.13.2",
|
||||
"basiccontext": "^3.5.1",
|
||||
"basicmodal": "^3.3.5",
|
||||
"basicmodal": "^3.3.7",
|
||||
"gulp": "^3.9.1",
|
||||
"gulp-autoprefixer": "3.1.0",
|
||||
"gulp-babel": "^6.1.2",
|
||||
@ -26,8 +26,8 @@
|
||||
"gulp-minify-css": "^1.2.4",
|
||||
"gulp-rimraf": "^0.2.0",
|
||||
"gulp-sass": "^2.3.2",
|
||||
"gulp-uglify": "^1.5.4",
|
||||
"jquery": "^3.0.0",
|
||||
"gulp-uglify": "^2.0.0",
|
||||
"jquery": "^3.1.0",
|
||||
"mousetrap": "^1.6.0"
|
||||
}
|
||||
}
|
||||
|
@ -67,8 +67,6 @@ header.bind = function() {
|
||||
|
||||
header.show = function() {
|
||||
|
||||
clearTimeout($(window).data('timeout'))
|
||||
|
||||
lychee.imageview.removeClass('full')
|
||||
header.dom().removeClass('header--hidden')
|
||||
|
||||
@ -76,18 +74,12 @@ header.show = function() {
|
||||
|
||||
}
|
||||
|
||||
header.hide = function(e, delay = 500) {
|
||||
header.hide = function(e) {
|
||||
|
||||
if (visible.photo() && !visible.sidebar() && !visible.contextMenu() && basicModal.visible()===false) {
|
||||
|
||||
clearTimeout($(window).data('timeout'))
|
||||
|
||||
$(window).data('timeout', setTimeout(function() {
|
||||
|
||||
lychee.imageview.addClass('full')
|
||||
header.dom().addClass('header--hidden')
|
||||
|
||||
}, delay))
|
||||
lychee.imageview.addClass('full')
|
||||
header.dom().addClass('header--hidden')
|
||||
|
||||
return true
|
||||
|
||||
|
@ -80,7 +80,7 @@ $(document).ready(function() {
|
||||
// Fullscreen on mobile
|
||||
.on('touchend', '#imageview #image', function(e) {
|
||||
if (swipe.obj==null || (swipe.offset>=-5&&swipe.offset<=5)) {
|
||||
if (visible.header()) header.hide(e, 0)
|
||||
if (visible.header()) header.hide(e)
|
||||
else header.show()
|
||||
}
|
||||
})
|
||||
|
@ -187,6 +187,7 @@ lychee.load = function() {
|
||||
|
||||
// Show Album
|
||||
if (visible.photo()) view.photo.hide()
|
||||
if (visible.sidebar() && (albumID==='0' || albumID==='f' || albumID==='s' || albumID==='r')) sidebar.toggle()
|
||||
if (album.json && albumID==album.json.id) view.album.title()
|
||||
else album.load(albumID)
|
||||
|
||||
|
@ -159,7 +159,7 @@ multiselect.resize = function(e) {
|
||||
|
||||
multiselect.stopResize = function() {
|
||||
|
||||
$(document).off('mousemove mouseup')
|
||||
if (multiselect.position.top!==null) $(document).off('mousemove mouseup')
|
||||
|
||||
}
|
||||
|
||||
|
@ -82,12 +82,12 @@ photo.preloadNext = function(photoID) {
|
||||
album.json.content[photoID].nextPhoto!='') {
|
||||
|
||||
let nextPhoto = album.json.content[photoID].nextPhoto
|
||||
let url = album.json.content[nextPhoto].url
|
||||
let medium = album.json.content[nextPhoto].medium
|
||||
let href = (medium!=null && medium!=='' ? medium : url)
|
||||
|
||||
if (medium!=null && medium!=='') {
|
||||
$('head [data-prefetch]').remove()
|
||||
$('head').append(`<link data-prefetch rel="prefetch" href="${ medium }">`)
|
||||
}
|
||||
$('head [data-prefetch]').remove()
|
||||
$('head').append(`<link data-prefetch rel="prefetch" href="${ href }">`)
|
||||
|
||||
}
|
||||
|
||||
|
@ -324,7 +324,7 @@ sidebar.createStructure.album = function(data) {
|
||||
|
||||
sidebar.render = function(structure) {
|
||||
|
||||
if (structure==null || structure==='') return false
|
||||
if (structure==null || structure==='' || structure===false) return false
|
||||
|
||||
let html = ''
|
||||
|
||||
|
@ -343,9 +343,12 @@ view.photo = {
|
||||
$('body').css('overflow', 'hidden')
|
||||
|
||||
// Fullscreen
|
||||
$(document)
|
||||
.bind('mouseenter', header.show)
|
||||
.bind('mouseleave', header.hide)
|
||||
var timeout
|
||||
$(document).bind('mousemove', function() {
|
||||
clearTimeout(timeout)
|
||||
header.show()
|
||||
timeout = setTimeout(header.hide, 1000)
|
||||
})
|
||||
|
||||
lychee.animate(lychee.imageview, 'fadeIn')
|
||||
|
||||
@ -363,8 +366,7 @@ view.photo = {
|
||||
|
||||
// Disable Fullscreen
|
||||
$(document)
|
||||
.unbind('mouseenter')
|
||||
.unbind('mouseleave')
|
||||
.unbind('mousemove')
|
||||
|
||||
// Hide Photo
|
||||
lychee.animate(lychee.imageview, 'fadeOut')
|
||||
|
Loading…
Reference in New Issue
Block a user