fix: move s3 storages to separate view

This commit is contained in:
Andras Bacsai
2024-04-26 14:09:54 +02:00
parent 9a9be466f7
commit f952553c76
15 changed files with 61 additions and 39 deletions

View File

@@ -156,6 +156,20 @@
Destinations
</a>
</li>
<li>
<a title="S3 Storages"
class="{{ request()->is('storages*') ? 'menu-item-active menu-item' : 'menu-item' }}"
href="{{ route('storage.index') }}">
<svg xmlns="http://www.w3.org/2000/svg" class="icon" viewBox="0 0 24 24">
<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2">
<path d="M4 6a8 3 0 1 0 16 0A8 3 0 1 0 4 6"/>
<path d="M4 6v6a8 3 0 0 0 16 0V6"/>
<path d="M4 12v6a8 3 0 0 0 16 0v-6"/>
</g>
</svg>
S3 Storages
</a>
</li>
<li>
<a title="Notifications"
class="{{ request()->is('notifications*') ? 'menu-item-active menu-item' : 'menu-item' }}"

View File

@@ -5,7 +5,7 @@
<livewire:team.create/>
</x-modal-input>
</div>
<div class="subtitle">Team settings & shared environment variables.</div>
<div class="subtitle">Team wide configurations.</div>
<nav class="navbar-main">
<a class="{{ request()->routeIs('team.index') ? 'dark:text-white' : '' }}" href="{{ route('team.index') }}">
<button>General</button>
@@ -14,10 +14,6 @@
href="{{ route('team.member.index') }}">
<button>Members</button>
</a>
<a class="{{ request()->routeIs('team.storage.index') ? 'dark:text-white' : '' }}"
href="{{ route('team.storage.index') }}">
<button>S3 Storages</button>
</a>
<a class="{{ request()->routeIs('team.shared-variables.index') ? 'dark:text-white' : '' }}"
href="{{ route('team.shared-variables.index') }}">
<button>Shared Variables</button>

View File

@@ -2,12 +2,12 @@
<form class="flex flex-col gap-2 pb-6" wire:submit='submit'>
<div class="flex items-start gap-2">
<div class="pb-4">
<h2>Storage Details</h2>
<div>{{ $storage->name }}</div>
<h1>Storage Details</h1>
<div class="subtitle">{{ $storage->name }}</div>
@if ($storage->is_usable)
<div> Usable </div>
<div>Usable</div>
@else
<div class="text-red-500"> Not Usable </div>
<div class="text-red-500">Not Usable</div>
@endif
</div>
<x-forms.button type="submit">

View File

@@ -1,13 +1,11 @@
<div>
<x-team.navbar :team="auth()->user()->currentTeam()" />
<div class="flex items-start gap-2">
<h2 class="pb-4">S3 Storages</h2>
<h1>S3 Storages</h1>
<x-modal-input buttonTitle="+ Add" title="New S3 Storage">
<livewire:team.storage.create />
<livewire:storage.create />
</x-modal-input>
{{-- <a class="dark:text-white hover:no-underline" href="/team/storages/new"> <x-forms.button>+ Add
</x-forms.button></a> --}}
</div>
<div class="subtitle">S3 storages for backups.</div>
<div class="grid gap-2 lg:grid-cols-2">
@forelse ($s3 as $storage)
<div x-data x-on:click="goto('{{ $storage->uuid }}')" @class(['gap-2 border cursor-pointer box group border-transparent'])>
@@ -27,7 +25,7 @@
</div>
<script>
function goto(uuid) {
window.location.href = '/team/storages/' + uuid;
window.location.href = '/storages/' + uuid;
}
</script>
</div>

View File

@@ -0,0 +1,3 @@
<div>
<livewire:storage.form :storage="$storage" />
</div>

View File

@@ -1,6 +0,0 @@
<div>
<x-team.navbar :team="auth()
->user()
->currentTeam()" />
<livewire:team.storage.form :storage="$storage" />
</div>

View File

@@ -1,3 +0,0 @@
<div>
{{-- If you look to others for fulfillment, you will never truly be fulfilled. --}}
</div>