mirror of
https://github.com/usetrmnl/byos_laravel.git
synced 2026-01-13 23:18:10 +00:00
fix: show contents of liquid recipes
This commit is contained in:
parent
a13d24a82d
commit
82ec221a87
1 changed files with 20 additions and 6 deletions
|
|
@ -29,8 +29,19 @@ new class extends Component {
|
||||||
|
|
||||||
if ($this->plugin->render_markup_view) {
|
if ($this->plugin->render_markup_view) {
|
||||||
try {
|
try {
|
||||||
$viewPath = resource_path('views/' . str_replace('.', '/', $this->plugin->render_markup_view) . '.blade.php');
|
$basePath = resource_path('views/' . str_replace('.', '/', $this->plugin->render_markup_view));
|
||||||
$this->view_content = file_get_contents($viewPath);
|
$paths = [
|
||||||
|
$basePath . '.blade.php',
|
||||||
|
$basePath . '.liquid',
|
||||||
|
];
|
||||||
|
|
||||||
|
$this->view_content = null;
|
||||||
|
foreach ($paths as $path) {
|
||||||
|
if (file_exists($path)) {
|
||||||
|
$this->view_content = file_get_contents($path);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
$this->view_content = null;
|
$this->view_content = null;
|
||||||
}
|
}
|
||||||
|
|
@ -285,7 +296,8 @@ HTML;
|
||||||
<flux:modal name="delete-plugin" class="min-w-[22rem] space-y-6">
|
<flux:modal name="delete-plugin" class="min-w-[22rem] space-y-6">
|
||||||
<div>
|
<div>
|
||||||
<flux:heading size="lg">Delete {{ $plugin->name }}?</flux:heading>
|
<flux:heading size="lg">Delete {{ $plugin->name }}?</flux:heading>
|
||||||
<p class="mt-2 text-sm text-zinc-600 dark:text-zinc-400">This will remove this plugin from your account.</p>
|
<p class="mt-2 text-sm text-zinc-600 dark:text-zinc-400">This will remove this plugin from your
|
||||||
|
account.</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex gap-2">
|
<div class="flex gap-2">
|
||||||
|
|
@ -327,7 +339,8 @@ HTML;
|
||||||
placeholder="https://example.com/api"
|
placeholder="https://example.com/api"
|
||||||
class="block mt-1 w-full" type="text" name="polling_url" autofocus>
|
class="block mt-1 w-full" type="text" name="polling_url" autofocus>
|
||||||
<x-slot name="iconTrailing">
|
<x-slot name="iconTrailing">
|
||||||
<flux:button size="sm" variant="subtle" icon="cloud-arrow-down" wire:click="updateData"
|
<flux:button size="sm" variant="subtle" icon="cloud-arrow-down"
|
||||||
|
wire:click="updateData"
|
||||||
tooltip="Fetch data now" class="-mr-1"/>
|
tooltip="Fetch data now" class="-mr-1"/>
|
||||||
</x-slot>
|
</x-slot>
|
||||||
</flux:input>
|
</flux:input>
|
||||||
|
|
@ -363,9 +376,10 @@ HTML;
|
||||||
</flux:input>
|
</flux:input>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<p>Send JSON payload with key <code>merge_variables</code> to the webhook URL. The payload will be merged with the plugin data.</p>
|
<p>Send JSON payload with key <code>merge_variables</code> to the webhook URL. The payload
|
||||||
|
will be merged with the plugin data.</p>
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
<div class="flex">
|
<div class="flex">
|
||||||
<flux:spacer/>
|
<flux:spacer/>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue