Skip to content

Commit

Permalink
update to version 4.3.6 (#1143)
Browse files Browse the repository at this point in the history
* update to version 4.3.6
* Sync recent front-end commits

Co-authored-by: Matthias Nagel <[email protected]>
  • Loading branch information
ildyria and nagmat84 authored Nov 23, 2021
1 parent 5442b8e commit e86652f
Show file tree
Hide file tree
Showing 9 changed files with 245 additions and 132 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/Build-Dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,13 @@ on:
push:
paths-ignore:
- '**/*.md'
- 'public/dist/*.js'
- 'public/dist/**/*.js'
pull_request:
paths-ignore:
- '**/*.md'
- 'public/dist/*.js'
- 'public/dist/**/*.js'

jobs:
tests:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/Build-Full-SQL.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,13 @@ on:
push:
paths-ignore:
- '**/*.md'
- 'public/dist/*.js'
- 'public/dist/**/*.js'
pull_request:
paths-ignore:
- '**/*.md'
- 'public/dist/*.js'
- 'public/dist/**/*.js'

jobs:
tests:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Lychee/*
_ide*

.php_cs.cache
.php-cs-fixer.cache

*.log
package-lock.json
Expand Down
27 changes: 27 additions & 0 deletions database/migrations/2021_11_16_162058_bump_version040306.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php

use App\Models\Configs;
use Illuminate\Database\Migrations\Migration;

class BumpVersion040306 extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Configs::where('key', 'version')->update(['value' => '040306']);
}

/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Configs::where('key', 'version')->update(['value' => '040305']);
}
}
4 changes: 2 additions & 2 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -104,15 +104,15 @@ formatting:
fi

gen_minor:
php gen_release.php
php scripts/gen_release.php
git add database
git add version.md

release_minor: gen_minor
git commit -S -m "bump to version $(shell cat version.md)"

gen_major:
php gen_release.php major
php scripts/gen_release.php major
git add database
git add version.md

Expand Down
291 changes: 173 additions & 118 deletions public/dist/main.js

Large diffs are not rendered by default.

42 changes: 32 additions & 10 deletions public/dist/view.js
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,9 @@ $(document).ready(function () {
});

// Infobox
header.dom("#button_info").on("click", sidebar.toggle);
header.dom("#button_info").on("click", function () {
sidebar.toggle(true);
});

// Load photo
loadPhotoInfo(photoID);
Expand Down Expand Up @@ -899,8 +901,12 @@ header.bind = function () {
multiselect.bind();
lychee.load();
});
header.dom("#button_info_album").on(eventName, sidebar.toggle);
header.dom("#button_info").on(eventName, sidebar.toggle);
header.dom("#button_info_album").on(eventName, function () {
sidebar.toggle(true);
});
header.dom("#button_info").on(eventName, function () {
sidebar.toggle(true);
});
header.dom(".button--map-albums").on(eventName, function () {
lychee.gotoMap();
});
Expand Down Expand Up @@ -1161,20 +1167,29 @@ header.setMode = function (mode) {
tabindex.makeUnfocusable($("#button_nsfw_album, #button_info_album, #button_visibility_album, #button_sharing_album_users, #button_move_album"));
} else if (album.isTagAlbum()) {
$("#button_info_album").show();
$("#button_nsfw_album, #button_move_album").hide();
if (sidebar.keepSidebarVisible() && !visible.sidebar()) sidebar.toggle(false);
$("#button_move_album").hide();
$(".button_add, .header__divider", ".header__toolbar--album").hide();
tabindex.makeFocusable($("#button_info_album"));
tabindex.makeUnfocusable($("#button_nsfw_album, #button_move_album"));
tabindex.makeUnfocusable($("#button_move_album"));
tabindex.makeUnfocusable($(".button_add, .header__divider", ".header__toolbar--album"));
if (album.isUploadable()) {
$("#button_visibility_album, #button_sharing_album_users, #button_trash_album").show();
tabindex.makeFocusable($("#button_visibility_album, #button_sharing_album_users, #button_trash_album"));
$("#button_nsfw_album, #button_visibility_album, #button_sharing_album_users, #button_trash_album").show();
tabindex.makeFocusable($("#button_nsfw_album, #button_visibility_album, #button_sharing_album_users, #button_trash_album"));
if ($("#button_visibility_album").is(":hidden")) {
// This can happen with narrow screens. In that
// case we re-enable the add button which will
// contain the overflow items.
$(".button_add, .header__divider", ".header__toolbar--album").show();
tabindex.makeFocusable($(".button_add, .header__divider", ".header__toolbar--album"));
}
} else {
$("#button_visibility_album, #button_sharing_album_users, #button_trash_album").hide();
tabindex.makeUnfocusable($("#button_visibility_album, #button_sharing_album_users, #button_trash_album"));
$("#button_nsfw_album, #button_visibility_album, #button_sharing_album_users, #button_trash_album").hide();
tabindex.makeUnfocusable($("#button_nsfw_album, #button_visibility_album, #button_sharing_album_users, #button_trash_album"));
}
} else {
$("#button_info_album").show();
if (sidebar.keepSidebarVisible() && !visible.sidebar()) sidebar.toggle(false);
tabindex.makeFocusable($("#button_info_album"));
if (album.isUploadable()) {
$("#button_nsfw_album, #button_trash_album, #button_move_album, #button_visibility_album, #button_sharing_album_users, .button_add, .header__divider", ".header__toolbar--album").show();
Expand Down Expand Up @@ -1472,7 +1487,12 @@ sidebar.triggerSearch = function (search_string) {
lychee.goto("search/" + encodeURIComponent(search_string));
};

sidebar.toggle = function () {
sidebar.keepSidebarVisible = function () {
var v = sessionStorage.getItem("keepSidebarVisible");
return v !== null ? v === "true" : false;
};

sidebar.toggle = function (is_user_initiated) {
if (visible.sidebar() || visible.sidebarbutton()) {
header.dom(".button--info").toggleClass("active");
lychee.content.toggleClass("content--sidebar");
Expand All @@ -1481,6 +1501,8 @@ sidebar.toggle = function () {
sidebar.dom().toggleClass("active");
photo.updateSizeLivePhotoDuringAnimation();

if (is_user_initiated) sessionStorage.setItem("keepSidebarVisible", visible.sidebar());

return true;
}

Expand Down
2 changes: 1 addition & 1 deletion version.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.3.5
4.3.6

0 comments on commit e86652f

Please sign in to comment.