diff --git a/resources/js/components/MagicBar.vue b/resources/js/components/MagicBar.vue index c7cc04686..b6727956c 100644 --- a/resources/js/components/MagicBar.vue +++ b/resources/js/components/MagicBar.vue @@ -307,54 +307,60 @@ const magicActions = [{ }, { id: 10, - name: 'Goto: Projects', + name: 'Goto: Private Keys', icon: 'goto', sequence: ['main', 'redirect'] }, { id: 11, - name: 'Goto: Sources', + name: 'Goto: Projects', icon: 'goto', sequence: ['main', 'redirect'] }, { id: 12, - name: 'Goto: Destinations', + name: 'Goto: Sources', icon: 'goto', sequence: ['main', 'redirect'] }, { id: 13, - name: 'Goto: Settings', + name: 'Goto: Destinations', icon: 'goto', sequence: ['main', 'redirect'] }, { id: 14, - name: 'Goto: Command Center', + name: 'Goto: Settings', icon: 'goto', sequence: ['main', 'redirect'] }, { id: 15, - name: 'Goto: Notifications', + name: 'Goto: Command Center', icon: 'goto', sequence: ['main', 'redirect'] }, { id: 16, - name: 'Goto: Profile', + name: 'Goto: Notifications', icon: 'goto', sequence: ['main', 'redirect'] }, { id: 17, - name: 'Goto: Teams', + name: 'Goto: Profile', icon: 'goto', sequence: ['main', 'redirect'] }, { id: 18, + name: 'Goto: Teams', + icon: 'goto', + sequence: ['main', 'redirect'] +}, +{ + id: 19, name: 'Goto: Switch Teams', icon: 'goto', sequence: ['main', 'redirect'] @@ -545,32 +551,35 @@ async function redirect() { targetUrl.pathname = `/servers` break; case 10: - targetUrl.pathname = `/projects` + targetUrl.pathname = `/private-keys` break; case 11: - targetUrl.pathname = `/sources` + targetUrl.pathname = `/projects` break; case 12: - targetUrl.pathname = `/destinations` + targetUrl.pathname = `/sources` break; case 13: - targetUrl.pathname = `/settings` + targetUrl.pathname = `/destinations` break; case 14: - targetUrl.pathname = `/command-center` + targetUrl.pathname = `/settings` break; case 15: - targetUrl.pathname = `/profile/team/notifications` + targetUrl.pathname = `/command-center` break; case 16: - targetUrl.pathname = `/profile` + targetUrl.pathname = `/profile/team/notifications` break; case 17: - targetUrl.pathname = `/profile/team` + targetUrl.pathname = `/profile` break; case 18: targetUrl.pathname = `/profile/team` break; + case 19: + targetUrl.pathname = `/profile/team` + break; } window.location.href = targetUrl; } diff --git a/resources/views/components/forms/input.blade.php b/resources/views/components/forms/input.blade.php index 4c15f47f0..50daa43d5 100644 --- a/resources/views/components/forms/input.blade.php +++ b/resources/views/components/forms/input.blade.php @@ -7,6 +7,7 @@ 'disabled' => null, 'helper' => $attributes->has('helper'), 'noDirty' => $attributes->has('noDirty'), + 'cannotPeak' => $attributes->has('cannotPeak'), ])
merge(['class' => 'w-full form-control']) }}> @if ($label) @@ -37,31 +38,52 @@ @endif @if ($type === 'password')
- $cannotPeak, + ]) @if ($id) id={{ $id }} name={{ $id }} + wire:model.defer={{ $id }} @endisset @if ($disabled !== null) disabled @endif - @if ($required !== null) required @endif @if ($readonly !== null) readonly @endif - @if (!$noDirty && $id) wire:dirty.class="input-warning" @endif {{ $attributes }} /> - - - - - -
- @else - + @if (!$cannotPeak) + @if (!$disabled) + + + + + + @else + + + + + + + @endif + @endif +
+@else + - @endif + @if ($required !== null) required @endif @if ($readonly !== null) readonly @endif + @if (!$noDirty && $id) wire:dirty.class="input-warning" @endif {{ $attributes }} /> +@endif - @error($id) - - @enderror +@error($id) + +@enderror diff --git a/resources/views/livewire/private-key/change.blade.php b/resources/views/livewire/private-key/change.blade.php index 178da8234..151892296 100644 --- a/resources/views/livewire/private-key/change.blade.php +++ b/resources/views/livewire/private-key/change.blade.php @@ -1,9 +1,28 @@ -
+
- +
+
+
Private Key *
+
+ Show +
+
+ Hide +
+
+
+ +
+
+ +
+
Save diff --git a/resources/views/private-key/all.blade.php b/resources/views/private-key/all.blade.php new file mode 100644 index 000000000..5ac8e00f6 --- /dev/null +++ b/resources/views/private-key/all.blade.php @@ -0,0 +1,19 @@ + +

Private Keys

+
All Private Keys
+
+ @forelse ($privateKeys as $key) + +
+
{{ $key->name }}
+
+
+ @empty +
+
No private keys found.
+ +
+ @endforelse +
+
diff --git a/resources/views/private-key/show.blade.php b/resources/views/private-key/show.blade.php index 9d108ecf6..a10b25fb4 100644 --- a/resources/views/private-key/show.blade.php +++ b/resources/views/private-key/show.blade.php @@ -1,4 +1,5 @@

Private Key

+
Sssh, it is private
diff --git a/routes/web.php b/routes/web.php index 462138669..d7c97e8df 100644 --- a/routes/web.php +++ b/routes/web.php @@ -92,6 +92,9 @@ Route::middleware(['auth'])->group(function () { }); Route::middleware(['auth'])->group(function () { + Route::get('/private-keys', fn () => view('private-key.all', [ + 'privateKeys' => PrivateKey::ownedByCurrentTeam()->get() + ]))->name('private-key.all'); Route::get('/private-key/new', fn () => view('private-key.new'))->name('private-key.new'); Route::get('/private-key/{private_key_uuid}', fn () => view('private-key.show', [ 'private_key' => PrivateKey::ownedByCurrentTeam()->whereUuid(request()->private_key_uuid)->firstOrFail()