coolify/resources/views/components/server/provider-token-picker.blade.php

53 lines
2.8 KiB
PHP
Raw Normal View History

@props([
'provider',
'providerLabel',
'routeType' => null,
'tokens',
])
<x-application.settings-section title="{{ $providerLabel }} account"
description="Choose the cloud credential MapleDeploy should use for this server." flush> {{-- MapleDeploy branding --}}
@if ($tokens->isEmpty())
<x-empty title="No {{ $providerLabel }} tokens"
description="Add an API token to continue provisioning." icon-name="keys" size="sm">
<x-slot:actions>
<x-modal-input title="Add {{ $providerLabel }} Token">
<x-slot:content>
<button type="button"
class="button button-highlighted">
<x-reicon name="plus" class="size-3.5" />
Add token
</button>
</x-slot:content>
<livewire:security.cloud-provider-token-form :modal_mode="true" :provider="$provider"
wire:key="new-server-provider-token-{{ $provider }}" />
</x-modal-input>
</x-slot:actions>
</x-empty>
@else
<div class="grid grid-cols-1 gap-3 p-3 sm:grid-cols-2 lg:grid-cols-4">
@foreach ($tokens as $token)
<a wire:key="{{ $provider }}-token-{{ $token->id }}"
feat(ui): WCAG contrast, neutral oklch surface system, and mobile nav overhaul Design tokens - Fix WCAG AA text failures: darken light muted text and lighten dark tertiary text so 13-14px copy clears 4.5:1 on every surface. - Rebuild the dark surface ladder in correct values (oklch compresses to near-black below ~15%), giving visible steps: content, chrome, cards. - Establish a 3-layer shell (deep content, lighter sidebar/topbar chrome, lifted cards) with crisp hairline rings and a restrained card shadow. - Unify every surface to one neutral temperature (pure gray); neutralize the cool-tinted sidebar text and legacy surface tokens. - Convert all color tokens to oklch (neutrals + brand). - Unify inputs to the recessed token; fix invisible dark placeholders. - One shared --shadow-dropdown for all menus/listboxes/command palette. Settings sidebar - Sticky contained-card rail with subtle scrollbar; collapsible sub-section groups (active open by default), cross-page section links. - Mobile: collapsible disclosure with animated open, outside/Escape dismiss, press feedback, and reduced-motion support. Mobile - Consolidate the resource header (title + status + links on one row). - Tighten settings-page vertical rhythm. - Rebuild the main sidebar as an animated shadcn-style sheet (slide/fade, Escape, scroll lock, in-panel close, close-on-navigate). Fixes - #11532: selected server invisible in the light-mode terminal toolbar. Docs: update DESIGN.md tokens, shell layering, and temperature rules.
2026-09-07 02:35:56 +00:00
class="group flex min-h-28 min-w-0 flex-col rounded-xl border border-neutral-200 bg-white p-3 shadow-sm transition-all hover:-translate-y-px hover:border-neutral-300 hover:no-underline hover:shadow-md dark:border-white/[0.08] dark:bg-white/[0.05] dark:hover:border-white/[0.14]"
href="{{ route('server.create.token', ['type' => $routeType ?: $provider, 'token_uuid' => $token->uuid]) }}"
{{ wireNavigate() }}>
<div class="flex items-start gap-3">
<span
class="flex size-8 shrink-0 items-center justify-center rounded-lg border border-neutral-200 bg-neutral-50 text-neutral-500 dark:border-white/[0.08] dark:bg-white/[0.04] dark:text-fg-dim">
<x-reicon name="keys" class="size-4" />
</span>
<div class="min-w-0 flex-1">
<h3 class="truncate text-[13px]! font-semibold! text-black dark:text-fg">
{{ $token->name ?? $providerLabel . ' token' }}
</h3>
<p class="mt-1 line-clamp-2 text-[11px] leading-4 text-neutral-500 dark:text-fg-faint">
{{ $token->description ?: 'Use this token to provision the server.' }}
</p>
</div>
</div>
</a>
@endforeach
</div>
@endif
</x-application.settings-section>