UX: Add copy button to theme public key (#13690)

This commit is contained in:
Kris 2021-07-12 14:34:08 -04:00 committed by GitHub
parent 2f5e63fd7f
commit 729a9856f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 2 deletions

View File

@ -78,7 +78,10 @@
{{#if showPublicKey}} {{#if showPublicKey}}
<div class="public-key"> <div class="public-key">
<div class="label">{{i18n "admin.customize.theme.public_key"}}</div> <div class="label">{{i18n "admin.customize.theme.public_key"}}</div>
{{textarea readonly=true value=publicKey}} <div class="public-key-text-wrapper">
{{textarea class="public-key-value" readonly=true value=publicKey}}
{{copy-button selector="textarea.public-key-value"}}
</div>
</div> </div>
{{else}} {{else}}
{{#if privateChecked}} {{#if privateChecked}}

View File

@ -596,7 +596,6 @@
} }
label input { label input {
width: auto; width: auto;
margin: 3px 0;
} }
} }
.public-key { .public-key {
@ -604,7 +603,17 @@
textarea { textarea {
cursor: auto; cursor: auto;
min-height: 220px; min-height: 220px;
margin-bottom: 0;
} }
button {
position: absolute;
top: 0;
right: 0;
}
}
.public-key-text-wrapper {
position: relative;
} }
.public-key-note { .public-key-note {