mirror of
https://github.com/coollabsio/coolify.git
synced 2026-08-24 10:05:47 -05:00
refactor(ui): rename forms.copy-button to forms.copy-input
This commit is contained in:
@@ -257,9 +257,9 @@
|
|||||||
</form>
|
</form>
|
||||||
<div x-data="{ showCode: false }">
|
<div x-data="{ showCode: false }">
|
||||||
<div x-cloak x-show="showCode" class="space-y-2 pb-3">
|
<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) }}" />
|
text="{{ decrypt(request()->user()->two_factor_secret) }}" />
|
||||||
<x-forms.copy-button text="{{ request()->user()->twoFactorQrCodeUrl() }}" />
|
<x-forms.copy-input text="{{ request()->user()->twoFactorQrCodeUrl() }}" />
|
||||||
</div>
|
</div>
|
||||||
<x-forms.button type="button" x-on:click="showCode = !showCode">
|
<x-forms.button type="button" x-on:click="showCode = !showCode">
|
||||||
<span x-text="showCode ? 'Hide manual setup' : 'Show manual setup'"></span>
|
<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>
|
<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">
|
<div class="grid gap-4 sm:grid-cols-2 lg:grid-cols-4">
|
||||||
@if ($currentInternalHostname)
|
@if ($currentInternalHostname)
|
||||||
<x-forms.copy-button label="Internal hostname" :text="$currentInternalHostname" />
|
<x-forms.copy-input label="Internal hostname" :text="$currentInternalHostname" />
|
||||||
@else
|
@else
|
||||||
<div class="w-full">
|
<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>
|
<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 @@
|
|||||||
readonly aria-live="polite">
|
readonly aria-live="polite">
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
<x-forms.copy-button label="Docker network" :text="$application->destination->network" />
|
<x-forms.copy-input label="Docker network" :text="$application->destination->network" />
|
||||||
<x-forms.copy-button label="Exposed ports" :text="$exposedPorts ?: 'None'" />
|
<x-forms.copy-input label="Exposed ports" :text="$exposedPorts ?: 'None'" />
|
||||||
<x-forms.copy-button label="Network aliases" :text="$networkAliases->implode(', ') ?: 'None'" />
|
<x-forms.copy-input label="Network aliases" :text="$networkAliases->implode(', ') ?: 'None'" />
|
||||||
</div>
|
</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]">
|
<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">
|
<p class="text-sm text-neutral-500 dark:text-fg-dim">
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
<div>
|
<div>
|
||||||
<h3>Resource</h3>
|
<h3>Resource</h3>
|
||||||
<div class="pt-2 grid grid-cols-1 gap-3 md:grid-cols-2">
|
<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-input label="Name" :text="$resource->name ?? ''" />
|
||||||
<x-forms.copy-button label="UUID" :text="$resource->uuid ?? ''" />
|
<x-forms.copy-input label="UUID" :text="$resource->uuid ?? ''" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -12,8 +12,8 @@
|
|||||||
<div>
|
<div>
|
||||||
<h3>Environment</h3>
|
<h3>Environment</h3>
|
||||||
<div class="pt-2 grid grid-cols-1 gap-3 md:grid-cols-2">
|
<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-input label="Name" :text="$environment_name ?? ''" />
|
||||||
<x-forms.copy-button label="UUID" :text="$environment_uuid" />
|
<x-forms.copy-input label="UUID" :text="$environment_uuid" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
@@ -22,8 +22,8 @@
|
|||||||
<div>
|
<div>
|
||||||
<h3>Project</h3>
|
<h3>Project</h3>
|
||||||
<div class="pt-2 grid grid-cols-1 gap-3 md:grid-cols-2">
|
<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-input label="Name" :text="$project_name ?? ''" />
|
||||||
<x-forms.copy-button label="UUID" :text="$project_uuid" />
|
<x-forms.copy-input label="UUID" :text="$project_uuid" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
@@ -32,8 +32,8 @@
|
|||||||
<div>
|
<div>
|
||||||
<h3>Server</h3>
|
<h3>Server</h3>
|
||||||
<div class="pt-2 grid grid-cols-1 gap-3 md:grid-cols-2">
|
<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-input label="Name" :text="$server_name ?? ''" />
|
||||||
<x-forms.copy-button label="UUID" :text="$server_uuid" />
|
<x-forms.copy-input label="UUID" :text="$server_uuid" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
@@ -43,10 +43,10 @@
|
|||||||
<h3>Stack Sub-Resources</h3>
|
<h3>Stack Sub-Resources</h3>
|
||||||
<div class="pt-2 grid grid-cols-1 gap-3 md:grid-cols-2">
|
<div class="pt-2 grid grid-cols-1 gap-3 md:grid-cols-2">
|
||||||
@foreach ($stack_applications as $item)
|
@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
|
@endforeach
|
||||||
@foreach ($stack_databases as $item)
|
@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
|
@endforeach
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
+1
-1
@@ -71,7 +71,7 @@
|
|||||||
</span>
|
</span>
|
||||||
|
|
||||||
<span class="min-w-0">
|
<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>
|
||||||
|
|
||||||
<span class="text-[11px] text-neutral-500 dark:text-fg-faint">
|
<span class="text-[11px] text-neutral-500 dark:text-fg-faint">
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
<x-external-link />
|
<x-external-link />
|
||||||
</a>
|
</a>
|
||||||
</x-slot:actions>
|
</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>
|
</x-application.settings-section>
|
||||||
|
|
||||||
@if ($githubManualWebhook && $gitlabManualWebhook)
|
@if ($githubManualWebhook && $gitlabManualWebhook)
|
||||||
@@ -70,7 +70,7 @@
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="grid gap-4 md:grid-cols-2">
|
<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)
|
@can('update', $resource)
|
||||||
<x-forms.input type="password" :id="$provider['secret']"
|
<x-forms.input type="password" :id="$provider['secret']"
|
||||||
label="Webhook secret"
|
label="Webhook secret"
|
||||||
@@ -106,7 +106,7 @@
|
|||||||
<x-external-link />
|
<x-external-link />
|
||||||
</a>
|
</a>
|
||||||
</x-slot:actions>
|
</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>
|
</x-application.settings-section>
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
|
|
||||||
<div class="mt-4">
|
<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>
|
<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" />
|
text="- /data/coolify/ssl/coolify-ca.crt:/etc/ssl/certs/coolify-ca.crt:ro" />
|
||||||
</div>
|
</div>
|
||||||
</x-application.settings-section>
|
</x-application.settings-section>
|
||||||
|
|||||||
@@ -184,7 +184,7 @@ it('renders volumes as a data table with shared column headers', function () {
|
|||||||
->toMatch('/<x-callout[^>]*title="File-level consistency"[\s\S]*id="stopDuringBackup"[\s\S]*<\/x-callout>/');
|
->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')))
|
expect(file_get_contents(resource_path('views/livewire/project/shared/storages/volume-backups/executions.blade.php')))
|
||||||
->toContain('<span>Time</span>')
|
->toContain('<span>Time</span>')
|
||||||
->toContain('x-forms.copy-button')
|
->toContain('x-forms.copy-input')
|
||||||
->toContain('col-span-6');
|
->toContain('col-span-6');
|
||||||
|
|
||||||
$css = file_get_contents(resource_path('css/app.css'));
|
$css = file_get_contents(resource_path('css/app.css'));
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ it('keeps the resource details helper text visible below the modal header', func
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('renders copy fields as visible readonly controls with an accessible copy action', function () {
|
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)
|
expect($html)
|
||||||
->toContain('label class="flex gap-1 items-center mb-1 text-sm font-medium text-black dark:text-white"')
|
->toContain('label class="flex gap-1 items-center mb-1 text-sm font-medium text-black dark:text-white"')
|
||||||
|
|||||||
Reference in New Issue
Block a user