Skip to content

Commit

Permalink
Fix merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
distantnative committed Aug 6, 2024
1 parent 6f79e89 commit 502c5ac
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 93 deletions.
49 changes: 0 additions & 49 deletions src/Panel/Ui/FilePreviews/FileDefaultPreview.php

This file was deleted.

9 changes: 7 additions & 2 deletions src/Panel/Ui/FilePreviews/FileImagePreview.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace Kirby\Panel\Ui\FilePreviews;

use Kirby\Cms\File;
use Kirby\Panel\Ui\FilePreview;
use Kirby\Toolkit\I18n;

/**
Expand All @@ -14,9 +15,13 @@
* @since 5.0.0
* @internal
*/
class FileImagePreview extends FileDefaultPreview
class FileImagePreview extends FilePreview
{
public string $component = 'k-file-image-preview';
public function __construct(
public File $file,
public string $component = 'k-file-image-preview'
) {
}

public static function accepts(File $file): bool
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Panel/Ui/FilePreviewTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function testDetails()
public function testFactory()
{
$page = new Page(['slug' => 'test']);
$file = new File(['filename' => 'test.jpg', 'parent' => $page]);
$file = new File(['filename' => 'test.pdf', 'parent' => $page]);

$preview = FilePreview::factory($file);
$this->assertInstanceOf(FilePreview::class, $preview);
Expand Down
41 changes: 0 additions & 41 deletions tests/Panel/Ui/FilePreviews/FileDefaultPreviewTest.php

This file was deleted.

0 comments on commit 502c5ac

Please sign in to comment.