refactor(ui): rename forms.copy-button to forms.copy-input
This commit is contained in:
parent
595b72df6a
commit
eb9a422d9b
9 changed files with 23 additions and 23 deletions
|
|
@ -257,9 +257,9 @@ class="flex items-end gap-2">
|
|||
</form>
|
||||
<div x-data="{ showCode: false }">
|
||||
<div x-cloak x-show="showCode" class="space-y-2 pb-3">
|
||||
<x-forms.copy-button
|
||||
<x-forms.copy-input
|
||||
text="{{ decrypt(request()->user()->two_factor_secret) }}" />
|
||||
<x-forms.copy-button text="{{ request()->user()->twoFactorQrCodeUrl() }}" />
|
||||
<x-forms.copy-input text="{{ request()->user()->twoFactorQrCodeUrl() }}" />
|
||||
</div>
|
||||
<x-forms.button type="button" x-on:click="showCode = !showCode">
|
||||
<span x-text="showCode ? 'Hide manual setup' : 'Show manual setup'"></span>
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
<h3 class="mb-4 text-sm font-semibold text-black dark:text-fg">Internal access</h3>
|
||||
<div class="grid gap-4 sm:grid-cols-2 lg:grid-cols-4">
|
||||
@if ($currentInternalHostname)
|
||||
<x-forms.copy-button label="Internal hostname" :text="$currentInternalHostname" />
|
||||
<x-forms.copy-input label="Internal hostname" :text="$currentInternalHostname" />
|
||||
@else
|
||||
<div class="w-full">
|
||||
<label class="mb-1 flex items-center gap-1 text-sm font-medium text-black dark:text-white">Internal hostname</label>
|
||||
|
|
@ -25,9 +25,9 @@ class="input input-with-copy-button bg-white dark:bg-coolgray-100 dark:read-only
|
|||
readonly aria-live="polite">
|
||||
</div>
|
||||
@endif
|
||||
<x-forms.copy-button label="Docker network" :text="$application->destination->network" />
|
||||
<x-forms.copy-button label="Exposed ports" :text="$exposedPorts ?: 'None'" />
|
||||
<x-forms.copy-button label="Network aliases" :text="$networkAliases->implode(', ') ?: 'None'" />
|
||||
<x-forms.copy-input label="Docker network" :text="$application->destination->network" />
|
||||
<x-forms.copy-input label="Exposed ports" :text="$exposedPorts ?: 'None'" />
|
||||
<x-forms.copy-input label="Network aliases" :text="$networkAliases->implode(', ') ?: 'None'" />
|
||||
</div>
|
||||
<div class="mt-4 flex flex-col gap-3 border-t border-neutral-200 pt-4 sm:flex-row sm:items-center sm:justify-between dark:border-white/[0.07]">
|
||||
<p class="text-sm text-neutral-500 dark:text-fg-dim">
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@
|
|||
<div>
|
||||
<h3>Resource</h3>
|
||||
<div class="pt-2 grid grid-cols-1 gap-3 md:grid-cols-2">
|
||||
<x-forms.copy-button label="Name" :text="$resource->name ?? ''" />
|
||||
<x-forms.copy-button label="UUID" :text="$resource->uuid ?? ''" />
|
||||
<x-forms.copy-input label="Name" :text="$resource->name ?? ''" />
|
||||
<x-forms.copy-input label="UUID" :text="$resource->uuid ?? ''" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -12,8 +12,8 @@
|
|||
<div>
|
||||
<h3>Environment</h3>
|
||||
<div class="pt-2 grid grid-cols-1 gap-3 md:grid-cols-2">
|
||||
<x-forms.copy-button label="Name" :text="$environment_name ?? ''" />
|
||||
<x-forms.copy-button label="UUID" :text="$environment_uuid" />
|
||||
<x-forms.copy-input label="Name" :text="$environment_name ?? ''" />
|
||||
<x-forms.copy-input label="UUID" :text="$environment_uuid" />
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
|
@ -22,8 +22,8 @@
|
|||
<div>
|
||||
<h3>Project</h3>
|
||||
<div class="pt-2 grid grid-cols-1 gap-3 md:grid-cols-2">
|
||||
<x-forms.copy-button label="Name" :text="$project_name ?? ''" />
|
||||
<x-forms.copy-button label="UUID" :text="$project_uuid" />
|
||||
<x-forms.copy-input label="Name" :text="$project_name ?? ''" />
|
||||
<x-forms.copy-input label="UUID" :text="$project_uuid" />
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
|
@ -32,8 +32,8 @@
|
|||
<div>
|
||||
<h3>Server</h3>
|
||||
<div class="pt-2 grid grid-cols-1 gap-3 md:grid-cols-2">
|
||||
<x-forms.copy-button label="Name" :text="$server_name ?? ''" />
|
||||
<x-forms.copy-button label="UUID" :text="$server_uuid" />
|
||||
<x-forms.copy-input label="Name" :text="$server_name ?? ''" />
|
||||
<x-forms.copy-input label="UUID" :text="$server_uuid" />
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
|
@ -43,10 +43,10 @@
|
|||
<h3>Stack Sub-Resources</h3>
|
||||
<div class="pt-2 grid grid-cols-1 gap-3 md:grid-cols-2">
|
||||
@foreach ($stack_applications as $item)
|
||||
<x-forms.copy-button :label="'Application: ' . $item['name']" :text="$item['uuid']" />
|
||||
<x-forms.copy-input :label="'Application: ' . $item['name']" :text="$item['uuid']" />
|
||||
@endforeach
|
||||
@foreach ($stack_databases as $item)
|
||||
<x-forms.copy-button :label="'Database: ' . $item['name']" :text="$item['uuid']" />
|
||||
<x-forms.copy-input :label="'Database: ' . $item['name']" :text="$item['uuid']" />
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ class="data-table-row volume-backup-executions-grid min-h-16 items-center gap-x-
|
|||
</span>
|
||||
|
||||
<span class="min-w-0">
|
||||
<x-forms.copy-button :text="$execution->filename ?? 'No archive name'" />
|
||||
<x-forms.copy-input :text="$execution->filename ?? 'No archive name'" />
|
||||
</span>
|
||||
|
||||
<span class="text-[11px] text-neutral-500 dark:text-fg-faint">
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
<x-external-link />
|
||||
</a>
|
||||
</x-slot:actions>
|
||||
<x-forms.copy-button label="Deploy webhook URL" :text="$deploywebhook ?? ''" />
|
||||
<x-forms.copy-input label="Deploy webhook URL" :text="$deploywebhook ?? ''" />
|
||||
</x-application.settings-section>
|
||||
|
||||
@if ($githubManualWebhook && $gitlabManualWebhook)
|
||||
|
|
@ -70,7 +70,7 @@
|
|||
</p>
|
||||
</div>
|
||||
<div class="grid gap-4 md:grid-cols-2">
|
||||
<x-forms.copy-button label="Webhook URL" :text="$provider['url'] ?? ''" />
|
||||
<x-forms.copy-input label="Webhook URL" :text="$provider['url'] ?? ''" />
|
||||
@can('update', $resource)
|
||||
<x-forms.input type="password" :id="$provider['secret']"
|
||||
label="Webhook secret"
|
||||
|
|
@ -106,7 +106,7 @@
|
|||
<x-external-link />
|
||||
</a>
|
||||
</x-slot:actions>
|
||||
<x-forms.copy-button label="Deploy webhook URL" :text="$deploywebhook ?? ''" />
|
||||
<x-forms.copy-input label="Deploy webhook URL" :text="$deploywebhook ?? ''" />
|
||||
</x-application.settings-section>
|
||||
</div>
|
||||
@endif
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ class="server-settings-workspace application-settings-workspace mt-4 grid w-full
|
|||
|
||||
<div class="mt-4">
|
||||
<p class="mb-1.5 text-xs font-medium text-neutral-500 dark:text-fg-dim">Read-only bind mount</p>
|
||||
<x-forms.copy-button
|
||||
<x-forms.copy-input
|
||||
text="- /data/coolify/ssl/coolify-ca.crt:/etc/ssl/certs/coolify-ca.crt:ro" />
|
||||
</div>
|
||||
</x-application.settings-section>
|
||||
|
|
|
|||
|
|
@ -184,7 +184,7 @@ function createApplicationWithVolume(array $applicationAttributes = [], array $v
|
|||
->toMatch('/<x-callout[^>]*title="File-level consistency"[\s\S]*id="stopDuringBackup"[\s\S]*<\/x-callout>/');
|
||||
expect(file_get_contents(resource_path('views/livewire/project/shared/storages/volume-backups/executions.blade.php')))
|
||||
->toContain('<span>Time</span>')
|
||||
->toContain('x-forms.copy-button')
|
||||
->toContain('x-forms.copy-input')
|
||||
->toContain('col-span-6');
|
||||
|
||||
$css = file_get_contents(resource_path('css/app.css'));
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@
|
|||
});
|
||||
|
||||
it('renders copy fields as visible readonly controls with an accessible copy action', function () {
|
||||
$html = Blade::render('<x-forms.copy-button label="UUID" text="crashloop" />');
|
||||
$html = Blade::render('<x-forms.copy-input label="UUID" text="crashloop" />');
|
||||
|
||||
expect($html)
|
||||
->toContain('label class="flex gap-1 items-center mb-1 text-sm font-medium text-black dark:text-white"')
|
||||
|
|
|
|||
Loading…
Reference in a new issue