Skip to content

Commit

Permalink
Gallery 2024 (#959)
Browse files Browse the repository at this point in the history
New gallery management UI

---------

Co-authored-by: ilestis <[email protected]>
  • Loading branch information
ilestis and ilestis authored Aug 27, 2024
1 parent 7e76080 commit 269c534
Show file tree
Hide file tree
Showing 60 changed files with 1,776 additions and 1,005 deletions.
5 changes: 5 additions & 0 deletions .phpactor.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"$schema": "/phpactor.schema.json",
"language_server_phpstan.enabled": true,
"php_code_sniffer.enabled": true
}
8 changes: 4 additions & 4 deletions app/Http/Controllers/Api/v1/CampaignImageApiController.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
use App\Models\Campaign;
use App\Models\Image;
use App\Http\Resources\ImageResource as Resource;
use App\Services\Campaign\GalleryService;
use App\Services\Gallery\SummernoteService;

class CampaignImageApiController extends ApiController
{
protected GalleryService $service;
protected SummernoteService $service;

public function __construct(GalleryService $galleryService)
public function __construct(SummernoteService $summernoteService)
{
$this->service = $galleryService;
$this->service = $summernoteService;
}

/**
Expand Down
33 changes: 0 additions & 33 deletions app/Http/Controllers/Campaign/Gallery/BulkController.php

This file was deleted.

51 changes: 0 additions & 51 deletions app/Http/Controllers/Campaign/Gallery/FocusController.php

This file was deleted.

59 changes: 0 additions & 59 deletions app/Http/Controllers/Campaign/Gallery/FolderController.php

This file was deleted.

38 changes: 0 additions & 38 deletions app/Http/Controllers/Campaign/Gallery/SearchController.php

This file was deleted.

136 changes: 0 additions & 136 deletions app/Http/Controllers/Campaign/GalleryController.php

This file was deleted.

35 changes: 0 additions & 35 deletions app/Http/Controllers/Campaign/GalleryFolderController.php

This file was deleted.

9 changes: 6 additions & 3 deletions app/Http/Controllers/Entity/ImageController.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,12 @@ public function saveFocus(StoreImageFocus $request, Campaign $campaign, Entity $
{
$this->authorize('update', $entity->child);

$entity->focus_x = (int) $request->post('focus_x');
$entity->focus_y = (int) $request->post('focus_y');
$entity->save();
// Gallery image?
$source = empty($entity->image_path) && $entity->image ? $entity->image : $entity;

$source->focus_x = (int) $request->post('focus_x');
$source->focus_y = (int) $request->post('focus_y');
$source->save();

return redirect()
->to($entity->url())
Expand Down
Loading

0 comments on commit 269c534

Please sign in to comment.