-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
antoine
committed
May 10, 2023
1 parent
ee494fa
commit 9829b12
Showing
4 changed files
with
16 additions
and
21 deletions.
There are no files selected for viewing
17 changes: 4 additions & 13 deletions
17
resources/views/components/extensions/custom-fields-script.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,9 @@ | ||
|
||
|
||
@if(config("sharp.extensions.activate_custom_fields", false)) | ||
@php | ||
try { | ||
$url = mix('/js/sharp-plugin.js'); | ||
} catch(\Exception $exception) {} | ||
@endphp | ||
|
||
@if($url ?? null) | ||
<script src="{{ $url }}"></script> | ||
|
||
@elseif($exception ?? null) | ||
<script> | ||
console.error(@json($exception->getMessage())); | ||
</script> | ||
@if($script = trim(view('sharp::partials.plugin-script')->render())) | ||
{!! $script !!} | ||
@else | ||
<script defer src="{{ mix('/js/sharp-plugin.js') }}"></script> | ||
@endif | ||
@endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
|
||
{{-- insert here your plugin script, e.g @vite('resources/js/sharp-plugin.js') --}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters