database backups

This commit is contained in:
Saeed Vaziry
2023-08-25 21:05:18 +02:00
parent f9ac454a7c
commit ea3f011f34
55 changed files with 1111 additions and 172 deletions

View File

@ -0,0 +1,54 @@
<div>
<x-primary-button x-data="" x-on:click.prevent="$dispatch('open-modal', 'connect-provider')">
{{ __('Connect') }}
</x-primary-button>
<x-modal name="connect-provider">
<form wire:submit.prevent="connect" class="p-6">
<h2 class="text-lg font-medium text-gray-900 dark:text-gray-100">
{{ __('Connect to a Storage Provider') }}
</h2>
<div class="mt-6">
<x-input-label for="provider" value="Provider" />
<x-select-input wire:model="provider" id="provider" name="provider" class="mt-1 w-full">
<option value="" selected disabled>{{ __("Select") }}</option>
@foreach(config('core.storage_providers') as $p)
@if($p !== 'custom')
<option value="{{ $p }}" @if($provider === $p) selected @endif>{{ $p }}</option>
@endif
@endforeach
</x-select-input>
@error('provider')
<x-input-error class="mt-2" :messages="$message" />
@enderror
</div>
<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" />
@error('name')
<x-input-error class="mt-2" :messages="$message" />
@enderror
</div>
<div class="mt-6">
<x-input-label for="token" value="API Key" />
<x-text-input wire:model.defer="token" id="token" name="token" type="text" class="mt-1 w-full" />
@error('token')
<x-input-error class="mt-2" :messages="$message" />
@enderror
</div>
<div class="mt-6 flex justify-end">
<x-secondary-button type="button" x-on:click="$dispatch('close')">
{{ __('Cancel') }}
</x-secondary-button>
<x-primary-button class="ml-3" @connected.window="$dispatch('close')">
{{ __('Connect') }}
</x-primary-button>
</div>
</form>
</x-modal>
</div>

View File

@ -0,0 +1,45 @@
<div>
<x-card-header>
<x-slot name="title">Storage Providers</x-slot>
<x-slot name="description">You can connect to your storage providers</x-slot>
<x-slot name="aside">
<livewire:storage-providers.connect-provider />
</x-slot>
</x-card-header>
<div x-data="" class="space-y-3">
@if(count($providers) > 0)
@foreach($providers as $provider)
<x-item-card>
<div class="flex-none">
<img src="{{ asset('static/images/' . $provider->provider . '.svg') }}" class="h-10 w-10" alt="">
</div>
<div class="ml-3 flex flex-grow flex-col items-start justify-center">
<span class="mb-1">{{ $provider->profile }}</span>
<span class="text-sm text-gray-400">
<x-datetime :value="$provider->created_at"/>
</span>
</div>
<div class="flex items-center">
<div class="inline">
<x-icon-button x-on:click="$wire.deleteId = '{{ $provider->id }}'; $dispatch('open-modal', 'delete-provider')">
Delete
</x-icon-button>
</div>
</div>
</x-item-card>
@endforeach
<x-confirm-modal
name="delete-provider"
:title="__('Confirm')"
:description="__('Are you sure that you want to delete this provider?')"
method="delete"
/>
@else
<x-simple-card>
<div class="text-center">
{{ __("You haven't connected to any storage providers yet!") }}
</div>
</x-simple-card>
@endif
</div>
</div>