Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge gallery, view and frame Into a Unified Frontend #1522

Merged
merged 28 commits into from
Nov 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
e365dc7
Added missing localization and settings for WUI, synced frontend.
nagmat84 Sep 18, 2022
2e2cd0f
Fixed NSFW banner
nagmat84 Sep 18, 2022
1861261
Enable redirection to #frame
nagmat84 Sep 18, 2022
4e2c3f8
Fixed spelling of frame settings
nagmat84 Sep 19, 2022
7632d6f
Preliminary cleanup of backend
nagmat84 Sep 19, 2022
5f0db18
Fix broken tests
nagmat84 Sep 20, 2022
fc39740
Removed browser identification from backend
nagmat84 Sep 21, 2022
b754182
Cleaning up Blade templates
nagmat84 Sep 21, 2022
b673025
Removed Larapass from Landing Page
nagmat84 Sep 27, 2022
d99f6bc
Synced frontend
nagmat84 Oct 21, 2022
d57cdd0
Merge branch 'master' into merge_modes
nagmat84 Oct 21, 2022
92a3b97
Also work when Lychee is not at the root URL
kamil4 Oct 21, 2022
6b8f27f
Make NSFW customizable
nagmat84 Oct 22, 2022
368ee0e
Moved compiled frontend.html to dist-folder
nagmat84 Oct 22, 2022
7c92d41
Merge branch 'master' into merge_modes
nagmat84 Oct 23, 2022
40a0842
Added RSS feeds
nagmat84 Oct 23, 2022
f3f2f6c
Pre-render HTML header on server-side
nagmat84 Oct 23, 2022
ab899cf
Synced frontend
nagmat84 Oct 27, 2022
c1d3e7e
Fixed path error in tests and synced frontend
nagmat84 Oct 27, 2022
5cd1741
Synced frontend
nagmat84 Oct 27, 2022
98d3dc1
Synced frontend
nagmat84 Oct 27, 2022
7ffbe0e
Add visibility tweak again
nagmat84 Oct 28, 2022
6cadacb
Synced frontend
nagmat84 Nov 1, 2022
fa63da5
Merge branch 'master' into merge_modes
nagmat84 Nov 6, 2022
5451795
sync front
ildyria Nov 21, 2022
4baa505
Merge branch 'master' into merge_modes
ildyria Nov 21, 2022
daa6104
fix phpstan & formatting
ildyria Nov 21, 2022
3417d3f
merge master
ildyria Nov 26, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/Actions/Diagnostics/Info.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public function get(): array
// About Imagick version
$imagick = extension_loaded('imagick');
if ($imagick === true) {
$imagickVersion = Imagick::getVersion();
$imagickVersion = \Imagick::getVersion();
} else {
// @codeCoverageIgnoreStart
$imagick = '-';
Expand Down
4 changes: 4 additions & 0 deletions app/Actions/Import/FromServer.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ protected function determineMemLimit(): int
$value = 0;
$suffix = '';
if (sscanf(ini_get('memory_limit'), '%d%c', $value, $suffix) === 2) {
/** @var int $value */
/** @var string $suffix */
switch (strtolower($suffix)) {
// @codeCoverageIgnoreStart
case 'k':
Expand All @@ -68,6 +70,8 @@ protected function determineMemLimit(): int
break;
// @codeCoverageIgnoreEnd
}
} else {
$value = 0;
}

// We set the warning threshold at 90% of the limit.
Expand Down
3 changes: 1 addition & 2 deletions app/Actions/Photo/Archive.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
use App\Models\Configs;
use App\Models\Photo;
use App\Models\SizeVariant;
use DateTimeInterface;
use Illuminate\Database\Eloquent\Collection;
use Safe\Exceptions\InfoException;
use function Safe\fclose;
Expand Down Expand Up @@ -160,7 +159,7 @@ protected function file(Photo $photo, string $variant): StreamedResponse
$photo->updated_at->toAtomString() .
$archiveFileInfo->getFile()->getFilesize())
);
$response->headers->set('Last-Modified', $photo->updated_at->format(DateTimeInterface::RFC7231));
$response->headers->set('Last-Modified', $photo->updated_at->format(\DateTimeInterface::RFC7231));

return $response;
} catch (\InvalidArgumentException $e) {
Expand Down
29 changes: 0 additions & 29 deletions app/Assets/Helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,9 @@
namespace App\Assets;

use App\Exceptions\Internal\ZeroModuloException;
use Illuminate\Contracts\Container\BindingResolutionException;
use Illuminate\Support\Facades\File;
use function Safe\getallheaders;
use function Safe\ini_get;
use function Safe\parse_url;
use WhichBrowser\Parser as BrowserParser;

class Helpers
{
Expand Down Expand Up @@ -42,32 +39,6 @@ public function cacheBusting(string $filePath): string
return $filePath;
}

/**
* Returns the device type as string:
* desktop, mobile, pda, dect, tablet, gaming, ereader,
* media, headset, watch, emulator, television, monitor,
* camera, printer, signage, whiteboard, devboard, inflight,
* appliance, gps, car, pos, bot, projector.
*
* This method is only used to report the type of device back to the
* client.
* This is totally insane, because the client knows its own type anyway.
* This could be completely done in JS code and CSS on the client side.
* See also {@link ConfigFunctions::get_config_device()}.
*
* TODO: Remove this method.
*
* @return string
*
* @throws BindingResolutionException
*/
public function getDeviceType(): string
{
$result = new BrowserParser(getallheaders(), ['cache' => app('cache.store')]);

return $result->getType();
}

/**
* Return the 32bit truncated version of a number seen as string.
*
Expand Down
2 changes: 1 addition & 1 deletion app/Console/Commands/Sync.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public function handle(): int
foreach ($directories as $directory) {
try {
$exec->do($directory, $album);
} catch (Exception $e) {
} catch (\Exception $e) {
$this->error($e);
}
}
Expand Down
6 changes: 2 additions & 4 deletions app/DTO/ArrayableDTO.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

use App\Exceptions\Internal\LycheeLogicException;
use Illuminate\Contracts\Support\Arrayable;
use ReflectionClass;
use ReflectionProperty;

/**
* In some cases, when a DTO does not need to apply casts on attributes
Expand All @@ -22,8 +20,8 @@ class ArrayableDTO extends DTO
public function toArray(): array
{
$result = [];
$cls = new ReflectionClass($this);
$props = $cls->getProperties(ReflectionProperty::IS_PUBLIC);
$cls = new \ReflectionClass($this);
$props = $cls->getProperties(\ReflectionProperty::IS_PUBLIC);
foreach ($props as $prop) {
$value = $prop->getValue($this);
if (is_object($value)) {
Expand Down
1 change: 0 additions & 1 deletion app/Facades/Helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
* Keep the list of documented method in sync with {@link \App\Assets\Helpers}.
*
* @method static string cacheBusting(string $filePath)
* @method static string getDeviceType()
* @method static string trancateIf32(string $id, int $prevShortId = 0)
* @method static string getExtension(string $filename, bool $isURI = false)
* @method static bool hasPermissions(string $path)
Expand Down
79 changes: 0 additions & 79 deletions app/Http/Controllers/FrameController.php

This file was deleted.

Loading