📋 Add copy-to-clipboard feature for service URLs: Enhance user experience by allowing easy copying of clearnet, onion, I2P, and pkdns links.

This commit is contained in:
HolgerHatGarKeineNode
2025-12-07 06:28:06 +01:00
parent c4cea2ae7a
commit 14c1d9df15

View File

@@ -107,6 +107,7 @@ class extends Component {
<flux:table.cell>
<div class="flex flex-col gap-1">
@if($service->url_clearnet)
<div class="flex items-center gap-2">
<flux:tooltip content="{{ $service->url_clearnet }}">
<flux:link :href="$service->url_clearnet" external
class="text-blue-600 dark:text-blue-400">
@@ -114,8 +115,15 @@ class extends Component {
Clearnet
</flux:link>
</flux:tooltip>
<div x-copy-to-clipboard="'{{ $service->url_clearnet }}'">
<flux:button icon="clipboard" size="xs" variant="ghost" class="cursor-pointer">
{{ __('Copy') }}
</flux:button>
</div>
</div>
@endif
@if($service->url_onion)
<div class="flex items-center gap-2">
<flux:tooltip content="{{ $service->url_onion }}">
<flux:link :href="$service->url_onion" external
class="text-purple-600 dark:text-purple-400">
@@ -123,8 +131,15 @@ class extends Component {
Onion
</flux:link>
</flux:tooltip>
<div x-copy-to-clipboard="'{{ $service->url_onion }}'">
<flux:button icon="clipboard" size="xs" variant="ghost" class="cursor-pointer">
{{ __('Copy') }}
</flux:button>
</div>
</div>
@endif
@if($service->url_i2p)
<div class="flex items-center gap-2">
<flux:tooltip content="{{ $service->url_i2p }}">
<flux:link :href="$service->url_i2p" external
class="text-green-600 dark:text-green-400">
@@ -132,8 +147,15 @@ class extends Component {
I2P
</flux:link>
</flux:tooltip>
<div x-copy-to-clipboard="'{{ $service->url_i2p }}'">
<flux:button icon="clipboard" size="xs" variant="ghost" class="cursor-pointer">
{{ __('Copy') }}
</flux:button>
</div>
</div>
@endif
@if($service->url_pkdns)
<div class="flex items-center gap-2">
<flux:tooltip content="{{ $service->url_pkdns }}">
<flux:link :href="$service->url_pkdns" external
class="text-orange-600 dark:text-orange-400">
@@ -141,6 +163,12 @@ class extends Component {
pkdns
</flux:link>
</flux:tooltip>
<div x-copy-to-clipboard="'{{ $service->url_pkdns }}'">
<flux:button icon="clipboard" size="xs" variant="ghost" class="cursor-pointer">
{{ __('Copy') }}
</flux:button>
</div>
</div>
@endif
@if($service->ip)
<div class="flex items-center gap-2">