mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-05 16:02:34 +00:00
Upgrade to Livewire 3 (#103)
* upgrade to livewire 3 * fix updater * fix modal events * fix modal events
This commit is contained in:
@ -3,10 +3,10 @@
|
||||
|
||||
<x-slot name="description">{{ __("You can change your site's PHP version here") }}</x-slot>
|
||||
|
||||
<form id="change-php-version" wire:submit.prevent="change" class="space-y-6">
|
||||
<form id="change-php-version" wire:submit="change" class="space-y-6">
|
||||
<div>
|
||||
<x-input-label for="version" :value="__('PHP Version')" />
|
||||
<x-select-input wire:model.defer="version" id="version" name="version" class="mt-1 w-full">
|
||||
<x-select-input wire:model="version" 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 === $version) selected @endif>{{ $php }}</option>
|
||||
|
@ -2,10 +2,10 @@
|
||||
<x-card>
|
||||
<x-slot name="title">{{ __("Create new site") }}</x-slot>
|
||||
<x-slot name="description">{{ __("Use this form to create a new site") }}</x-slot>
|
||||
<form id="create-site" wire:submit.prevent="create" class="space-y-6">
|
||||
<form id="create-site" wire:submit="create" class="space-y-6">
|
||||
<div>
|
||||
<x-input-label>{{ __("Select site type") }}</x-input-label>
|
||||
<x-select-input wire:model="inputs.type" id="type" name="type" class="mt-1 w-full">
|
||||
<x-select-input wire:model.live="inputs.type" id="type" name="type" class="mt-1 w-full">
|
||||
<option value="" selected disabled>{{ __("Select") }}</option>
|
||||
@foreach(config('core.site_types') as $t)
|
||||
<option value="{{ $t }}" @if($t === $inputs['type']) selected @endif>
|
||||
@ -20,7 +20,7 @@
|
||||
|
||||
<div>
|
||||
<x-input-label for="domain" :value="__('Domain')" />
|
||||
<x-text-input wire:model.defer="inputs.domain" id="domain" name="domain" type="text" class="mt-1 block w-full" autocomplete="domain" placeholder="example.com" />
|
||||
<x-text-input wire:model="inputs.domain" id="domain" name="domain" type="text" class="mt-1 block w-full" autocomplete="domain" placeholder="example.com" />
|
||||
@error('domain')
|
||||
<x-input-error class="mt-2" :messages="$message" />
|
||||
@enderror
|
||||
@ -28,7 +28,7 @@
|
||||
|
||||
<div>
|
||||
<x-input-label for="alias" :value="__('Alias')" />
|
||||
<x-text-input wire:model.defer="inputs.alias" id="alias" name="alias" type="text" class="mt-1 block w-full" autocomplete="alias" placeholder="www.example.com" />
|
||||
<x-text-input wire:model="inputs.alias" id="alias" name="alias" type="text" class="mt-1 block w-full" autocomplete="alias" placeholder="www.example.com" />
|
||||
@error('alias')
|
||||
<x-input-error class="mt-2" :messages="$message" />
|
||||
@enderror
|
||||
|
@ -1,6 +1,6 @@
|
||||
<div>
|
||||
<x-input-label for="branch" :value="__('Branch')" />
|
||||
<x-text-input wire:model.defer="inputs.branch" id="branch" name="branch" type="text" class="mt-1 block w-full" autocomplete="branch" placeholder="main" />
|
||||
<x-text-input wire:model="inputs.branch" id="branch" name="branch" type="text" class="mt-1 block w-full" autocomplete="branch" placeholder="main" />
|
||||
@error('branch')
|
||||
<x-input-error class="mt-2" :messages="$message" />
|
||||
@enderror
|
||||
|
@ -1,6 +1,6 @@
|
||||
<div class="mt-6">
|
||||
<label for="composer" class="inline-flex items-center">
|
||||
<input id="composer" wire:model.defer="inputs.composer" type="checkbox" class="rounded dark:bg-gray-900 border-gray-300 dark:border-gray-700 text-indigo-600 shadow-sm focus:ring-indigo-500 dark:focus:ring-indigo-600 dark:focus:ring-offset-gray-800" name="composer">
|
||||
<input id="composer" wire:model="inputs.composer" type="checkbox" class="rounded dark:bg-gray-900 border-gray-300 dark:border-gray-700 text-indigo-600 shadow-sm focus:ring-indigo-500 dark:focus:ring-indigo-600 dark:focus:ring-offset-gray-800" name="composer">
|
||||
<span class="ml-2 text-sm text-gray-600 dark:text-gray-400">{{ __('Run `composer install --no-dev`') }}</span>
|
||||
</label>
|
||||
</div>
|
||||
|
@ -3,7 +3,7 @@
|
||||
@endphp
|
||||
<div>
|
||||
<x-input-label for="php_version" :value="__('PHP Version')" />
|
||||
<x-select-input wire:model.defer="inputs.php_version" id="php_version" name="php_version" class="mt-1 w-full">
|
||||
<x-select-input wire:model="inputs.php_version" id="php_version" name="php_version" class="mt-1 w-full">
|
||||
<option value="" selected>{{ __("Select") }}</option>
|
||||
@foreach($server->installedPHPVersions() as $version)
|
||||
<option value="{{ $version }}" @if($version === $inputs['php_version']) selected @endif>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<div>
|
||||
<x-input-label for="repository" :value="__('Repository')" />
|
||||
<x-text-input wire:model.defer="inputs.repository" id="repository" name="repository" type="text" class="mt-1 block w-full" autocomplete="repository" placeholder="organization/repository" />
|
||||
<x-text-input wire:model="inputs.repository" id="repository" name="repository" type="text" class="mt-1 block w-full" autocomplete="repository" placeholder="organization/repository" />
|
||||
@error('repository')
|
||||
<x-input-error class="mt-2" :messages="$message" />
|
||||
@enderror
|
||||
|
@ -1,7 +1,7 @@
|
||||
<div>
|
||||
<x-input-label for="source_control" :value="__('Source Control')" />
|
||||
<div class="flex items-center mt-1">
|
||||
<x-select-input wire:model="inputs.source_control" id="source_control" name="source_control" class="mt-1 w-full">
|
||||
<x-select-input wire:model.live="inputs.source_control" id="source_control" name="source_control" class="mt-1 w-full">
|
||||
<option value="" selected>{{ __("Select") }}</option>
|
||||
@foreach($sourceControls as $sourceControl)
|
||||
<option value="{{ $sourceControl->id }}" @if($sourceControl->id === $inputs['source_control']) selected @endif>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<div>
|
||||
<x-input-label for="web_directory" :value="__('Web Directory')" />
|
||||
<x-text-input wire:model.defer="inputs.web_directory" id="web_directory" name="web_directory" type="text" class="mt-1 block w-full" autocomplete="web_directory" />
|
||||
<x-text-input wire:model="inputs.web_directory" id="web_directory" name="web_directory" type="text" class="mt-1 block w-full" autocomplete="web_directory" />
|
||||
<x-input-help>
|
||||
{{ __("For root, leave this blank") }}
|
||||
</x-input-help>
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
<div>
|
||||
<x-input-label for="title" :value="__('Title')" />
|
||||
<x-text-input wire:model.defer="inputs.title" id="title" name="title" type="text" class="mt-1 block w-full" autocomplete="branch" />
|
||||
<x-text-input wire:model="inputs.title" id="title" name="title" type="text" class="mt-1 block w-full" autocomplete="branch" />
|
||||
@error('title')
|
||||
<x-input-error class="mt-2" :messages="$message" />
|
||||
@enderror
|
||||
@ -11,7 +11,7 @@
|
||||
<div class="grid grid-cols-1 lg:grid-cols-3 gap-5">
|
||||
<div>
|
||||
<x-input-label for="email" :value="__('WP Admin Email')" />
|
||||
<x-text-input wire:model.defer="inputs.email" id="email" name="email" type="email" class="mt-1 block w-full" autocomplete="email" />
|
||||
<x-text-input wire:model="inputs.email" id="email" name="email" type="email" class="mt-1 block w-full" autocomplete="email" />
|
||||
@error('email')
|
||||
<x-input-error class="mt-2" :messages="$message" />
|
||||
@enderror
|
||||
@ -19,7 +19,7 @@
|
||||
|
||||
<div>
|
||||
<x-input-label for="username" :value="__('WP Admin Username')" />
|
||||
<x-text-input wire:model.defer="inputs.username" id="username" name="username" type="text" class="mt-1 block w-full" autocomplete="username" />
|
||||
<x-text-input wire:model="inputs.username" id="username" name="username" type="text" class="mt-1 block w-full" autocomplete="username" />
|
||||
@error('username')
|
||||
<x-input-error class="mt-2" :messages="$message" />
|
||||
@enderror
|
||||
@ -27,7 +27,7 @@
|
||||
|
||||
<div>
|
||||
<x-input-label for="password" :value="__('WP Admin Password')" />
|
||||
<x-text-input wire:model.defer="inputs.password" id="password" name="password" type="text" class="mt-1 block w-full" />
|
||||
<x-text-input wire:model="inputs.password" id="password" name="password" type="text" class="mt-1 block w-full" />
|
||||
@error('title')
|
||||
<x-input-error class="mt-2" :messages="$message" />
|
||||
@enderror
|
||||
@ -37,7 +37,7 @@
|
||||
<div class="grid grid-cols-1 lg:grid-cols-3 gap-5">
|
||||
<div>
|
||||
<x-input-label for="database" :value="__('Database Name')" />
|
||||
<x-text-input wire:model.defer="inputs.database" id="database" name="database" type="text" class="mt-1 block w-full" autocomplete="database" />
|
||||
<x-text-input wire:model="inputs.database" id="database" name="database" type="text" class="mt-1 block w-full" autocomplete="database" />
|
||||
<x-input-help>{{ __("It will create a database with this name") }}</x-input-help>
|
||||
@error('database')
|
||||
<x-input-error class="mt-2" :messages="$message" />
|
||||
@ -46,7 +46,7 @@
|
||||
|
||||
<div>
|
||||
<x-input-label for="database" :value="__('Database User')" />
|
||||
<x-text-input wire:model.defer="inputs.database_user" id="database_user" name="database_user" type="text" class="mt-1 block w-full" autocomplete="database_user" />
|
||||
<x-text-input wire:model="inputs.database_user" id="database_user" name="database_user" type="text" class="mt-1 block w-full" autocomplete="database_user" />
|
||||
<x-input-help>{{ __("It will create a database user with this username") }}</x-input-help>
|
||||
@error('database_user')
|
||||
<x-input-error class="mt-2" :messages="$message" />
|
||||
@ -55,7 +55,7 @@
|
||||
|
||||
<div>
|
||||
<x-input-label for="password" :value="__('Database Password')" />
|
||||
<x-text-input wire:model.defer="inputs.database_password" id="database_password" name="database_password" type="text" class="mt-1 block w-full" />
|
||||
<x-text-input wire:model="inputs.database_password" id="database_password" name="database_password" type="text" class="mt-1 block w-full" />
|
||||
@error('database_password')
|
||||
<x-input-error class="mt-2" :messages="$message" />
|
||||
@enderror
|
||||
|
@ -3,10 +3,10 @@
|
||||
|
||||
<x-slot name="description">{{ __("You can change the source control provider for this site") }}</x-slot>
|
||||
|
||||
<form id="update-source-control" wire:submit.prevent="update" class="space-y-6">
|
||||
<form id="update-source-control" wire:submit="update" class="space-y-6">
|
||||
<div>
|
||||
<x-input-label for="provider" :value="__('Source Control')" />
|
||||
<x-select-input wire:model.defer="source_control" id="source_control" name="source_control" class="mt-1 w-full">
|
||||
<x-select-input wire:model="source_control" id="source_control" name="source_control" class="mt-1 w-full">
|
||||
<option value="" selected>{{ __("Select") }}</option>
|
||||
@foreach(\App\Models\SourceControl::all() as $sourceControl)
|
||||
<option value="{{ $sourceControl->id }}" @if($sourceControl->id === $source_control) selected @endif>{{ $sourceControl->profile }} ({{ $sourceControl->provider }})</option>
|
||||
|
@ -5,14 +5,14 @@
|
||||
|
||||
<form
|
||||
id="update-vhost"
|
||||
wire:submit.prevent="update"
|
||||
wire:submit="update"
|
||||
class="space-y-6"
|
||||
>
|
||||
<div>
|
||||
<x-textarea
|
||||
id="vHost"
|
||||
wire:init="loadVHost"
|
||||
wire:model.defer="vHost"
|
||||
wire:model="vHost"
|
||||
rows="10"
|
||||
class="mt-1 block w-full"
|
||||
></x-textarea>
|
||||
|
Reference in New Issue
Block a user