refactoring leftovers

This commit is contained in:
Saeed Vaziry
2024-03-14 21:18:59 +01:00
parent 428140b931
commit f907bacdd0
22 changed files with 26 additions and 173 deletions

View File

@ -32,14 +32,19 @@ class="p-6"
<div class="mt-6">
<x-input-label for="backup_storage" :value="__('Storage')" />
<x-select-input id="backup_storage" name="backup_storage" class="mt-1 w-full">
<option value="" selected disabled>{{ __("Select") }}</option>
@foreach (auth()->user()->storageProviders as $st)
<option value="{{ $st->id }}" @if(old('backup_storage') == $st->id) selected @endif>
{{ $st->profile }} - {{ $st->provider }}
</option>
@endforeach
</x-select-input>
<div class="mt-1 flex items-center">
<x-select-input id="backup_storage" name="backup_storage" class="mt-1 w-full">
<option value="" selected disabled>{{ __("Select") }}</option>
@foreach (auth()->user()->storageProviders as $st)
<option value="{{ $st->id }}" @if(old('backup_storage') == $st->id) selected @endif>
{{ $st->profile }} - {{ $st->provider }}
</option>
@endforeach
</x-select-input>
<x-secondary-button :href="route('storage-providers')" class="ml-2 flex-none">
Connect
</x-secondary-button>
</div>
@error("backup_storage")
<x-input-error class="mt-2" :messages="$message" />
@enderror

View File

@ -5,7 +5,7 @@
<x-modal name="connect-provider">
@php
$oldProvider = old("provider", request()->input("provider") ?? "");
$oldProvider = old("provider", request()->input("provider") ?? "dropbox");
@endphp
<form
@ -33,6 +33,9 @@ class="p-6"
@if ($p !== "custom")
<option value="{{ $p }}" @if($oldProvider === $p) selected @endif>
{{ $p }}
@if ($p === "ftp")
(Beta)
@endif
</option>
@endif
@endforeach
@ -56,6 +59,14 @@ class="p-6"
@error("token")
<x-input-error class="mt-2" :messages="$message" />
@enderror
<a
class="mt-1 text-primary-500"
href="https://dropbox.tech/developers/generate-an-access-token-for-your-own-account"
target="_blank"
>
How to generate?
</a>
</div>
<div x-show="provider === 'ftp'" class="mt-6">