mirror of
https://github.com/vitodeploy/vito.git
synced 2025-04-19 09:51:37 +00:00
simplify firewal protocol select confusion
This commit is contained in:
parent
46d320561e
commit
f0c4fc4812
@ -14,14 +14,21 @@
|
||||
<x-input-label for="pk">
|
||||
{{ __("Public Key") }}
|
||||
</x-input-label>
|
||||
<x-input-label class="cursor-pointer" x-data="{ copied: false }">
|
||||
<x-input-label
|
||||
class="cursor-pointer"
|
||||
x-data="{ copied: false }"
|
||||
id="public-key"
|
||||
data-public-key="{{ $server->public_key }}"
|
||||
>
|
||||
<div x-show="copied" class="flex items-center">
|
||||
{{ __("Copied") }}
|
||||
</div>
|
||||
<div
|
||||
x-show="!copied"
|
||||
x-on:click="
|
||||
window.copyToClipboard('{{ $server->public_key }}')
|
||||
window.copyToClipboard(
|
||||
document.getElementById('public-key').getAttribute('data-public-key'),
|
||||
)
|
||||
copied = true
|
||||
setTimeout(() => {
|
||||
copied = false
|
||||
|
@ -18,7 +18,12 @@ class="rounded-sm border-l-4 border-yellow-500 bg-yellow-100 px-4 py-3 text-yell
|
||||
<x-input-label for="pk">
|
||||
{{ __("Run this command on your server as root user") }}
|
||||
</x-input-label>
|
||||
<x-input-label class="cursor-pointer" x-data="{ copied: false }">
|
||||
<x-input-label
|
||||
class="cursor-pointer"
|
||||
x-data="{ copied: false }"
|
||||
id="public-key"
|
||||
data-clipboard="mkdir -p /root/.ssh && touch /root/.ssh/authorized_keys && echo '{{ $key }}' >> /root/.ssh/authorized_keys"
|
||||
>
|
||||
<div x-show="copied" class="flex items-center">
|
||||
{{ __("Copied") }}
|
||||
</div>
|
||||
@ -26,7 +31,7 @@ class="rounded-sm border-l-4 border-yellow-500 bg-yellow-100 px-4 py-3 text-yell
|
||||
x-show="!copied"
|
||||
x-on:click="
|
||||
window.copyToClipboard(
|
||||
'mkdir -p /root/.ssh && touch /root/.ssh/authorized_keys && echo \'{{ $key }}\' >> /root/.ssh/authorized_keys',
|
||||
document.getElementById('public-key').getAttribute('data-clipboard'),
|
||||
)
|
||||
copied = true
|
||||
setTimeout(() => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user