mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-03 15:02:34 +00:00
Merge (#127)
This commit is contained in:
20
resources/views/site-settings/index.blade.php
Normal file
20
resources/views/site-settings/index.blade.php
Normal file
@ -0,0 +1,20 @@
|
||||
<x-site-layout :site="$site">
|
||||
<x-slot name="pageTitle">{{ __("Settings") }}</x-slot>
|
||||
|
||||
@include("site-settings.partials.change-php-version")
|
||||
|
||||
@include("site-settings.partials.update-v-host")
|
||||
|
||||
<x-card>
|
||||
<x-slot name="title">{{ __("Delete Site") }}</x-slot>
|
||||
<x-slot name="description">
|
||||
{{ __("Permanently delete the site from server") }}
|
||||
</x-slot>
|
||||
<p>
|
||||
{{ __("Once your site is deleted, all of its files will be deleted from the server.") }}
|
||||
</p>
|
||||
<div class="mt-5">
|
||||
@include("site-settings.partials.delete-site")
|
||||
</div>
|
||||
</x-card>
|
||||
</x-site-layout>
|
@ -0,0 +1,38 @@
|
||||
<x-card>
|
||||
<x-slot name="title">{{ __("Change PHP Version") }}</x-slot>
|
||||
|
||||
<x-slot name="description">
|
||||
{{ __("You can change your site's PHP version here") }}
|
||||
</x-slot>
|
||||
|
||||
<form
|
||||
id="change-php-version"
|
||||
hx-post="{{ route("servers.sites.settings.php", ["server" => $server, "site" => $site]) }}"
|
||||
hx-swap="outerHTML"
|
||||
hx-select="#change-php-version"
|
||||
hx-ext="disable-element"
|
||||
hx-disable-element="#btn-change-php-version"
|
||||
class="space-y-6"
|
||||
>
|
||||
<div>
|
||||
<x-input-label for="version" :value="__('PHP Version')" />
|
||||
<x-select-input id="version" name="version" class="mt-1 w-full">
|
||||
<option value="" disabled selected>{{ __("Select") }}</option>
|
||||
@foreach ($site->server->installedPHPVersions() as $php)
|
||||
<option value="{{ $php }}" @if($php == old('version', $site->php_version)) selected @endif>
|
||||
{{ $php }}
|
||||
</option>
|
||||
@endforeach
|
||||
</x-select-input>
|
||||
@error("version")
|
||||
<x-input-error class="mt-2" :messages="$message" />
|
||||
@enderror
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<x-slot name="actions">
|
||||
<x-primary-button id="btn-change-php-version" form="change-php-version" hx-disable>
|
||||
{{ __("Save") }}
|
||||
</x-primary-button>
|
||||
</x-slot>
|
||||
</x-card>
|
12
resources/views/site-settings/partials/delete-site.blade.php
Normal file
12
resources/views/site-settings/partials/delete-site.blade.php
Normal file
@ -0,0 +1,12 @@
|
||||
<div x-data="">
|
||||
<x-danger-button x-on:click="$dispatch('open-modal', 'delete-site')">
|
||||
{{ __("Delete Site") }}
|
||||
</x-danger-button>
|
||||
<x-confirmation-modal
|
||||
name="delete-site"
|
||||
:title="__('Confirm')"
|
||||
:description="__('Are you sure that you want to delete this site?')"
|
||||
method="delete"
|
||||
:action="route('servers.sites.destroy', ['server' => $server, 'site' => $site])"
|
||||
/>
|
||||
</div>
|
@ -0,0 +1,40 @@
|
||||
<x-card>
|
||||
<x-slot name="title">{{ __("Update VHost") }}</x-slot>
|
||||
|
||||
<x-slot name="description">
|
||||
{{ __("You can change your site's VHost configuration") }}
|
||||
</x-slot>
|
||||
|
||||
<form
|
||||
id="update-vhost"
|
||||
hx-post="{{ route("servers.sites.settings.vhost", ["server" => $server, "site" => $site]) }}"
|
||||
hx-swap="outerHTML"
|
||||
hx-select="#update-vhost"
|
||||
class="space-y-6"
|
||||
hx-ext="disable-element"
|
||||
hx-disable-element="#btn-update-vhost"
|
||||
>
|
||||
<div
|
||||
hx-get="{{ route("servers.sites.settings.vhost", ["server" => $server, "site" => $site]) }}"
|
||||
hx-trigger="load"
|
||||
hx-target="#vhost-container"
|
||||
hx-select="#vhost-container"
|
||||
hx-swap="outerHTML"
|
||||
>
|
||||
<div id="vhost-container">
|
||||
<x-code-editor id="vhost" name="vhost" rows="10" class="mt-1 block w-full">
|
||||
{{ session()->has("vhost") ? session()->get("vhost") : "Loading..." }}
|
||||
</x-code-editor>
|
||||
</div>
|
||||
@error("vhost")
|
||||
<x-input-error class="mt-2" :messages="$message" />
|
||||
@enderror
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<x-slot name="actions">
|
||||
<x-primary-button form="update-vhost" id="btn-update-vhost" hx-disable>
|
||||
{{ __("Save") }}
|
||||
</x-primary-button>
|
||||
</x-slot>
|
||||
</x-card>
|
Reference in New Issue
Block a user