diff --git a/BTCPayServer/Views/Account/Login.cshtml b/BTCPayServer/Views/Account/Login.cshtml index b37f277ee..5735baa87 100644 --- a/BTCPayServer/Views/Account/Login.cshtml +++ b/BTCPayServer/Views/Account/Login.cshtml @@ -31,8 +31,9 @@ @if (env.OnionUrl != null) { - - + + + Copy Tor URL } diff --git a/BTCPayServer/Views/Account/Register.cshtml b/BTCPayServer/Views/Account/Register.cshtml index 065ad025b..d3b59fd8b 100644 --- a/BTCPayServer/Views/Account/Register.cshtml +++ b/BTCPayServer/Views/Account/Register.cshtml @@ -31,8 +31,9 @@ @if (env.OnionUrl != null) { - - + + + Copy Tor URL } diff --git a/BTCPayServer/wwwroot/main/site.css b/BTCPayServer/wwwroot/main/site.css index 7f235388e..84e9933c5 100644 --- a/BTCPayServer/wwwroot/main/site.css +++ b/BTCPayServer/wwwroot/main/site.css @@ -195,6 +195,17 @@ pre { background: none; } +.btn-onion { + color: #fff; + background-color: #59316B; + border-color: #59316B; +} + +.btn-onion:focus, +.btn-onion.focus { + box-shadow: 0 0 0 0.2rem #9065a1; +} + [class*="field-validation"]:not(:empty) { display: inline-block; margin-top: .5rem; diff --git a/BTCPayServer/wwwroot/main/site.js b/BTCPayServer/wwwroot/main/site.js index 70a94deca..7d2c7b3fe 100644 --- a/BTCPayServer/wwwroot/main/site.js +++ b/BTCPayServer/wwwroot/main/site.js @@ -74,6 +74,17 @@ } } } + + $('[data-clipboard]').on('click', function (e) { + if (navigator.clipboard) { + e.preventDefault(); + var item = e.currentTarget; + var text = item.getAttribute('data-clipboard'); + navigator.clipboard.writeText(text); + item.blur(); + } + }); + }); function switchTimeFormat() {