2024-09-19 17:27:25 +00:00
< div >
2023-09-04 07:44:44 +00:00
< x - security . navbar />
< div class = " flex gap-2 " >
< h2 class = " pb-4 " > Private Keys </ h2 >
2025-08-26 08:27:31 +00:00
@ can ( 'create' , App\Models\PrivateKey :: class )
< x - modal - input buttonTitle = " + Add " title = " New Private Key " >
< livewire : security . private - key . create />
</ x - modal - input >
@ endcan
@ can ( 'create' , App\Models\PrivateKey :: class )
< x - modal - confirmation title = " Confirm unused SSH Key Deletion? " buttonTitle = " Delete unused SSH Keys " isErrorButton
submitAction = " cleanupUnusedKeys " : actions = " ['All unused SSH keys (marked with unused) are permanently deleted.'] " : confirmWithText = " false " : confirmWithPassword = " false " />
@ endcan
2023-09-04 07:44:44 +00:00
</ div >
2025-06-30 06:50:17 +00:00
< div class = " grid gap-4 lg:grid-cols-2 " >
2023-06-15 07:58:17 +00:00
@ forelse ( $privateKeys as $key )
2025-10-17 21:04:24 +00:00
@ can ( 'view' , $key )
{{ -- Admin / Owner : Clickable link -- }}
2025-11-28 12:55:54 +00:00
< a class = " coolbox group "
2025-12-17 11:09:13 +00:00
href = " { { route('security.private-key.show', ['private_key_uuid' => data_get( $key , 'uuid')]) }} " {{ wireNavigate () }} >
2025-10-17 21:04:24 +00:00
< div class = " flex flex-col justify-center mx-6 " >
< div class = " box-title " >
{{ data_get ( $key , 'name' ) }}
</ div >
< div class = " box-description " >
{{ $key -> description }}
@ if ( ! $key -> isInUse ())
< span
2025-11-28 15:23:32 +00:00
class = " inline-flex items-center px-2 py-0.5 rounded-sm text-xs font-medium bg-warning-400 text-black " > Unused </ span >
2025-10-17 21:04:24 +00:00
@ endif
</ div >
2024-04-29 09:06:06 +00:00
</ div >
2025-10-17 21:04:24 +00:00
</ a >
@ else
{{ -- Member : Visible but not clickable -- }}
2025-11-28 12:55:54 +00:00
< div class = " coolbox opacity-60 !cursor-not-allowed hover:bg-transparent dark:hover:bg-transparent " title = " You don't have permission to view this private key " >
2025-10-17 21:04:24 +00:00
< div class = " flex flex-col justify-center mx-6 " >
< div class = " box-title " >
{{ data_get ( $key , 'name' ) }}
< span class = " ml-2 inline-flex items-center px-2 py-0.5 rounded-sm text-xs font-medium bg-gray-400 dark:bg-gray-600 text-white " > View Only </ span >
</ div >
< div class = " box-description " >
{{ $key -> description }}
@ if ( ! $key -> isInUse ())
< span
2025-11-28 15:23:32 +00:00
class = " inline-flex items-center px-2 py-0.5 rounded-sm text-xs font-medium bg-warning-400 text-black " > Unused </ span >
2025-10-17 21:04:24 +00:00
@ endif
</ div >
2024-04-29 09:06:06 +00:00
</ div >
2023-06-15 07:58:17 +00:00
</ div >
2025-10-17 21:04:24 +00:00
@ endcan
2023-06-15 07:58:17 +00:00
@ empty
2024-03-21 13:30:35 +00:00
< div > No private keys found .</ div >
2023-06-15 07:58:17 +00:00
@ endforelse
</ div >
2025-04-29 07:04:24 +00:00
</ div >