Skip to content

Commit 68eaec5

Browse files
committed
Merge branch 'main' into ds_store
2 parents ea8b9fa + bb299a4 commit 68eaec5

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

resources/views/livewire/video-player.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div>
2-
<div wire:ignore id="target"></div>
2+
<div style="max-height:80vh; max-width:160vh" wire:ignore id="target"></div>
33
</div>
44

55
@assets

src/FilamentLmsServiceProvider.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ public function configurePackage(Package $package): void
2323
{
2424
$package
2525
->name('filament-lms')
26+
// TODO how do we get the views working without making them publishable?
2627
->hasViews()
2728
->hasAssets()
2829
->hasConfigFile('filament-lms')

src/Resources/CourseResource.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,13 @@ public static function form(Form $form): Form
5858
->options(config('filament-lms.awards'))
5959
->required()
6060
->hint(function ($record) {
61-
$link = route('filament-lms::certificates.show', ['course' => $record->id, 'user' => auth()->id()]);
61+
if ($record?->id) {
62+
$link = route('filament-lms::certificates.show', ['course' => $record->id, 'user' => auth()->id()]);
6263

63-
return new HtmlString("<a rel='noopener noreferrer' target='_blank' href='{$link}'>Click to Preview</a>");
64+
return new HtmlString("<a rel='noopener noreferrer' target='_blank' href='{$link}'>Click to Preview</a>");
65+
}
66+
67+
return null;
6468
})
6569
->helperText('Form must be saved before previewing.'),
6670
Forms\Components\Checkbox::make('hidden'),

0 commit comments

Comments
 (0)