mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-15 10:14:47 +00:00
fix(ui): gate copy button on clipboard API support
Only show the copy control when isSecureContext and clipboard.writeText are available, and style the empty internal hostname state as a readonly input to match adjacent fields.
This commit is contained in:
1 parent
9fd2a21f24
commit
a6ab360ac2
4 files changed
+15
-9
No files matched your search
@@ -96,11 +96,12 @@
|
||||
@if ($currentInternalHostname)
|
||||
<x-forms.copy-button label="Internal hostname" :text="$currentInternalHostname" />
|
||||
@else
|
||||
<div>
|
||||
<p class="mb-1 text-sm font-medium text-black dark:text-white">Internal hostname</p>
|
||||
<p class="flex min-h-10 items-center rounded border border-neutral-300 px-3 text-sm text-neutral-500 dark:border-coolgray-300 dark:text-fg-dim">
|
||||
{{ $currentInternalHostnameLoaded ? 'No deployed container found' : 'Loading…' }}
|
||||
</p>
|
||||
<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>
|
||||
<input type="text"
|
||||
value="{{ $currentInternalHostnameLoaded ? 'No deployed container found' : 'Loading…' }}"
|
||||
class="input input-with-copy-button bg-white dark:bg-coolgray-100 dark:read-only:bg-coolgray-100 dark:read-only:text-white"
|
||||
readonly aria-live="polite">
|
||||
</div>
|
||||
@endif
|
||||
<x-forms.copy-button label="Docker network" :text="$application->destination->network" />
|
||||
|
||||
Reference in new issue
Block a user