mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-04 07:22: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:
@ -1,12 +1,12 @@
|
||||
<x-modal name="create-backup">
|
||||
<form wire:submit.prevent="create" class="p-6" x-data="{user: false, remote: false}">
|
||||
<form wire:submit="create" class="p-6" x-data="{user: false, remote: false}">
|
||||
<h2 class="text-lg font-medium text-gray-900 dark:text-gray-100">
|
||||
{{ __('Create Backup') }}
|
||||
</h2>
|
||||
|
||||
<div class="mt-6">
|
||||
<x-input-label for="database" :value="__('Database')" />
|
||||
<x-select-input wire:model="database" id="database" name="database" class="mt-1 w-full">
|
||||
<x-select-input wire:model.live="database" id="database" name="database" class="mt-1 w-full">
|
||||
<option value="" selected disabled>{{ __("Select") }}</option>
|
||||
@foreach($databases as $db)
|
||||
<option value="{{ $db->id }}" @if($database == $db->id) selected @endif>{{ $db->name }}</option>
|
||||
@ -19,7 +19,7 @@
|
||||
|
||||
<div class="mt-6">
|
||||
<x-input-label for="storage" :value="__('Storage')" />
|
||||
<x-select-input wire:model="storage" id="storage" name="storage" class="mt-1 w-full">
|
||||
<x-select-input wire:model.live="storage" id="storage" name="storage" class="mt-1 w-full">
|
||||
<option value="" selected disabled>{{ __("Select") }}</option>
|
||||
@foreach(auth()->user()->storageProviders as $st)
|
||||
<option value="{{ $st->id }}" @if($storage == $st->id) selected @endif>{{ $st->profile }} - {{ $st->provider }}</option>
|
||||
@ -33,7 +33,7 @@
|
||||
|
||||
<div class="mt-6">
|
||||
<x-input-label for="interval" :value="__('Interval')" />
|
||||
<x-select-input wire:model="interval" id="interval" name="interval" class="mt-1 w-full">
|
||||
<x-select-input wire:model.live="interval" id="interval" name="interval" class="mt-1 w-full">
|
||||
<option value="" selected disabled>{{ __("Select") }}</option>
|
||||
<option value="0 * * * *" @if($interval === '0 * * * *') selected @endif>{{ __("Hourly") }}</option>
|
||||
<option value="0 0 * * *" @if($interval === '0 0 * * *') selected @endif>{{ __("Daily") }}</option>
|
||||
@ -50,7 +50,7 @@
|
||||
@if($interval === 'custom')
|
||||
<div class="mt-6">
|
||||
<x-input-label for="custom" :value="__('Custom interval (Cron)')" />
|
||||
<x-text-input wire:model.defer="custom" id="custom" name="custom" type="text" class="mt-1 w-full" placeholder="* * * * *" />
|
||||
<x-text-input wire:model="custom" id="custom" name="custom" type="text" class="mt-1 w-full" placeholder="* * * * *" />
|
||||
@error('custom')
|
||||
<x-input-error class="mt-2" :messages="$message" />
|
||||
@enderror
|
||||
@ -59,7 +59,7 @@
|
||||
|
||||
<div class="mt-6">
|
||||
<x-input-label for="keep" :value="__('Backups to Keep')" />
|
||||
<x-text-input wire:model.defer="keep" id="keep" name="keep" type="text" class="mt-1 w-full" />
|
||||
<x-text-input wire:model="keep" id="keep" name="keep" type="text" class="mt-1 w-full" />
|
||||
@error('keep')
|
||||
<x-input-error class="mt-2" :messages="$message" />
|
||||
@enderror
|
||||
|
@ -1,12 +1,12 @@
|
||||
<x-modal name="create-database">
|
||||
<form wire:submit.prevent="create" class="p-6" x-data="{user: false, remote: false}">
|
||||
<form wire:submit="create" class="p-6" x-data="{user: false, remote: false}">
|
||||
<h2 class="text-lg font-medium text-gray-900 dark:text-gray-100">
|
||||
{{ __('Create Database') }}
|
||||
</h2>
|
||||
|
||||
<div class="mt-6">
|
||||
<x-input-label for="name" :value="__('Name')" />
|
||||
<x-text-input wire:model.defer="name" id="name" name="name" type="text" class="mt-1 w-full" />
|
||||
<x-text-input wire:model="name" id="name" name="name" type="text" class="mt-1 w-full" />
|
||||
@error('name')
|
||||
<x-input-error class="mt-2" :messages="$message" />
|
||||
@enderror
|
||||
@ -14,7 +14,7 @@
|
||||
|
||||
<div class="mt-6">
|
||||
<label for="create_user" class="inline-flex items-center">
|
||||
<input id="create_user" wire:model.defer="user" type="checkbox" x-model="user" 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="create_user">
|
||||
<input id="create_user" wire:model="user" type="checkbox" x-model="user" 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="create_user">
|
||||
<span class="ml-2 text-sm text-gray-600 dark:text-gray-400">{{ __('Create a user for this database') }}</span>
|
||||
</label>
|
||||
</div>
|
||||
@ -22,7 +22,7 @@
|
||||
<div x-show="user">
|
||||
<div class="mt-6">
|
||||
<x-input-label for="db-username" :value="__('Username')" />
|
||||
<x-text-input wire:model.defer="username" id="db-username" name="username" type="text" class="mt-1 w-full" />
|
||||
<x-text-input wire:model="username" id="db-username" name="username" type="text" class="mt-1 w-full" />
|
||||
@error('username')
|
||||
<x-input-error class="mt-2" :messages="$message" />
|
||||
@enderror
|
||||
@ -30,7 +30,7 @@
|
||||
|
||||
<div class="mt-6">
|
||||
<x-input-label for="db-password" :value="__('Password')" />
|
||||
<x-text-input wire:model.defer="password" id="db-password" name="password" type="text" class="mt-1 w-full" />
|
||||
<x-text-input wire:model="password" id="db-password" name="password" type="text" class="mt-1 w-full" />
|
||||
@error('password')
|
||||
<x-input-error class="mt-2" :messages="$message" />
|
||||
@enderror
|
||||
@ -38,7 +38,7 @@
|
||||
|
||||
<div class="mt-6">
|
||||
<label for="db-remote" class="inline-flex items-center">
|
||||
<input id="db-remote" wire:model="remote" type="checkbox" x-model="remote" 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="remote">
|
||||
<input id="db-remote" wire:model.live="remote" type="checkbox" x-model="remote" 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="remote">
|
||||
<span class="ml-2 text-sm text-gray-600 dark:text-gray-400">{{ __('Enable remote access') }}</span>
|
||||
</label>
|
||||
</div>
|
||||
@ -46,7 +46,7 @@
|
||||
<div x-show="remote">
|
||||
<div class="mt-6">
|
||||
<x-input-label for="db-host" :value="__('Host')" />
|
||||
<x-text-input wire:model.defer="host" id="db-host" name="host" type="text" class="mt-1 w-full" />
|
||||
<x-text-input wire:model="host" id="db-host" name="host" type="text" class="mt-1 w-full" />
|
||||
<x-input-label for="db-host" :value="__('You might also need to open the database port in Firewall')" class="mt-1"/>
|
||||
@error('host')
|
||||
<x-input-error class="mt-2" :messages="$message" />
|
||||
|
@ -1,12 +1,12 @@
|
||||
<x-modal name="create-database-user">
|
||||
<form wire:submit.prevent="create" class="p-6" x-data="{remote: false}">
|
||||
<form wire:submit="create" class="p-6" x-data="{remote: false}">
|
||||
<h2 class="text-lg font-medium text-gray-900 dark:text-gray-100">
|
||||
{{ __('Create Database User') }}
|
||||
</h2>
|
||||
|
||||
<div class="mt-6">
|
||||
<x-input-label for="user-username" :value="__('Username')" />
|
||||
<x-text-input wire:model.defer="username" id="user-username" name="username" type="text" class="mt-1 w-full" />
|
||||
<x-text-input wire:model="username" id="user-username" name="username" type="text" class="mt-1 w-full" />
|
||||
@error('username')
|
||||
<x-input-error class="mt-2" :messages="$message" />
|
||||
@enderror
|
||||
@ -14,7 +14,7 @@
|
||||
|
||||
<div class="mt-6">
|
||||
<x-input-label for="user-password" :value="__('Password')" />
|
||||
<x-text-input wire:model.defer="password" id="user-password" name="password" type="text" class="mt-1 w-full" />
|
||||
<x-text-input wire:model="password" id="user-password" name="password" type="text" class="mt-1 w-full" />
|
||||
@error('password')
|
||||
<x-input-error class="mt-2" :messages="$message" />
|
||||
@enderror
|
||||
@ -22,7 +22,7 @@
|
||||
|
||||
<div class="mt-6">
|
||||
<label for="user-remote" class="inline-flex items-center">
|
||||
<input id="user-remote" wire:model="remote" type="checkbox" x-model="remote" 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="remote">
|
||||
<input id="user-remote" wire:model.live="remote" type="checkbox" x-model="remote" 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="remote">
|
||||
<span class="ml-2 text-sm text-gray-600 dark:text-gray-400">{{ __('Enable remote access') }}</span>
|
||||
</label>
|
||||
</div>
|
||||
@ -30,7 +30,7 @@
|
||||
<div x-show="remote">
|
||||
<div class="mt-6">
|
||||
<x-input-label for="user-host" :value="__('Host')" />
|
||||
<x-text-input wire:model.defer="host" id="user-host" name="host" type="text" class="mt-1 w-full" />
|
||||
<x-text-input wire:model="host" id="user-host" name="host" type="text" class="mt-1 w-full" />
|
||||
<x-input-label for="user-host" :value="__('You might also need to open the database port in Firewall')" class="mt-1"/>
|
||||
@error('host')
|
||||
<x-input-error class="mt-2" :messages="$message" />
|
||||
|
@ -1,12 +1,12 @@
|
||||
<x-modal name="database-user-password">
|
||||
<form wire:submit.prevent="create" class="p-6" x-data="{remote: false}">
|
||||
<form wire:submit="create" class="p-6" x-data="{remote: false}">
|
||||
<h2 class="text-lg font-medium text-gray-900 dark:text-gray-100">
|
||||
{{ __('View Password') }}
|
||||
</h2>
|
||||
|
||||
<div class="mt-6">
|
||||
<x-input-label :value="__('Password')" />
|
||||
<x-text-input wire:model.defer="viewPassword" type="text" class="mt-1 w-full" disabled />
|
||||
<x-text-input wire:model="viewPassword" type="text" class="mt-1 w-full" disabled />
|
||||
</div>
|
||||
|
||||
<div class="mt-6 flex justify-end">
|
||||
|
@ -1,5 +1,5 @@
|
||||
<x-modal name="link-database-user">
|
||||
<form wire:submit.prevent="link" class="p-6">
|
||||
<form wire:submit="link" class="p-6">
|
||||
<h2 class="text-lg font-medium text-gray-900 dark:text-gray-100">
|
||||
{{ __('Link User to Databases') }}
|
||||
</h2>
|
||||
@ -8,7 +8,7 @@
|
||||
@foreach($databases as $database)
|
||||
<div class="mb-2">
|
||||
<label for="db-{{ $database->id }}" class="inline-flex items-center">
|
||||
<input id="db-{{ $database->id }}" wire:model.defer="link" value="{{ $database->name }}" 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="link">
|
||||
<input id="db-{{ $database->id }}" wire:model="link" value="{{ $database->name }}" 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="link">
|
||||
<span class="ml-2 text-sm text-gray-600 dark:text-gray-400">{{ $database->name }}</span>
|
||||
</label>
|
||||
</div>
|
||||
|
@ -1,12 +1,12 @@
|
||||
<x-modal name="restore-backup">
|
||||
<form wire:submit.prevent="restore" class="p-6" x-data="{}">
|
||||
<form wire:submit="restore" class="p-6" x-data="{}">
|
||||
<h2 class="text-lg font-medium text-gray-900 dark:text-gray-100">
|
||||
{{ __('Restore Backup') }}
|
||||
</h2>
|
||||
|
||||
<div class="mt-6">
|
||||
<x-input-label for="database" :value="__('Database')" />
|
||||
<x-select-input wire:model="restoreDatabaseId" id="restoreDatabaseId" name="restoreDatabaseId" class="mt-1 w-full">
|
||||
<x-select-input wire:model.live="restoreDatabaseId" id="restoreDatabaseId" name="restoreDatabaseId" class="mt-1 w-full">
|
||||
<option value="" selected disabled>{{ __("Select") }}</option>
|
||||
@foreach($databases as $db)
|
||||
<option value="{{ $db->id }}" @if($restoreDatabaseId == $db->id) selected @endif>{{ $db->name }}</option>
|
||||
|
Reference in New Issue
Block a user