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 13, 2024
1 parent e09870c commit 9777f08
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 @@ -70,7 +70,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]);

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

This file was deleted.

0 comments on commit 9777f08

Please sign in to comment.