forked from extern/easydiffusion
Merge branch 'beta' into picker
This commit is contained in:
commit
d17ee88ced
@ -485,7 +485,7 @@ dialog {
|
||||
}
|
||||
|
||||
dialog::backdrop {
|
||||
background: var(--backdrop-color);
|
||||
background: rgba(32, 33, 36, 50%);
|
||||
}
|
||||
|
||||
dialog > div {
|
||||
@ -1295,7 +1295,7 @@ input::file-selector-button {
|
||||
|
||||
.popup {
|
||||
position: absolute;
|
||||
background: var(--backdrop-color);
|
||||
background: rgba(32, 33, 36, 50%);
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
right: 0px;
|
||||
@ -1575,6 +1575,7 @@ body.wait-pause {
|
||||
margin-top: 0.2em;
|
||||
margin-bottom: 0.2em;
|
||||
display: inline-block;
|
||||
width: 80%;
|
||||
}
|
||||
|
||||
#copy-cloudflare-address {
|
||||
|
@ -1,4 +1,4 @@
|
||||
:root, ::backdrop {
|
||||
:root {
|
||||
--main-hue: 222;
|
||||
--main-saturation: 4%;
|
||||
--value-base: 13%;
|
||||
@ -45,7 +45,6 @@
|
||||
--status-orange: rgb(200, 139, 0);
|
||||
--status-green: green;
|
||||
--status-red: red;
|
||||
--backdrop-color: rgba(32, 33, 36, 50%);
|
||||
}
|
||||
|
||||
.theme-light {
|
||||
|
@ -2103,7 +2103,7 @@ function tunnelUpdate(event) {
|
||||
if ("cloudflare" in event) {
|
||||
document.getElementById("cloudflare-off").classList.add("displayNone")
|
||||
document.getElementById("cloudflare-on").classList.remove("displayNone")
|
||||
cloudflareAddressField.innerHTML = event.cloudflare
|
||||
cloudflareAddressField.value = event.cloudflare
|
||||
document.getElementById("toggle-cloudflare-tunnel").innerHTML = "Stop"
|
||||
} else {
|
||||
document.getElementById("cloudflare-on").classList.add("displayNone")
|
||||
|
@ -233,7 +233,7 @@ var PARAMETERS = [
|
||||
note: `<span id="cloudflare-off">Create a VPN tunnel to share your Easy Diffusion instance with your friends. This will
|
||||
generate a web server address on the public Internet for your Easy Diffusion instance. </span>
|
||||
<div id="cloudflare-on" class="displayNone"><div>This Easy Diffusion server is available on the Internet using the
|
||||
address:</div><div><div id="cloudflare-address"></div><button id="copy-cloudflare-address">Copy</button></div></div>
|
||||
address:</div><div><input id="cloudflare-address" value="" readonly><button id="copy-cloudflare-address">Copy</button></div></div>
|
||||
<b>Anyone knowing this address can access your server.</b> The address of your server will change each time
|
||||
you share a session.<br>
|
||||
Uses <a href="https://try.cloudflare.com/" target="_blank">Cloudflare services</a>.`,
|
||||
@ -714,9 +714,17 @@ listenPortField.addEventListener("change", debounce( ()=>{
|
||||
let copyCloudflareAddressBtn = document.querySelector("#copy-cloudflare-address")
|
||||
let cloudflareAddressField = document.getElementById("cloudflare-address")
|
||||
|
||||
copyCloudflareAddressBtn.addEventListener("click", (e) => {
|
||||
navigator.clipboard.writeText(cloudflareAddressField.innerHTML)
|
||||
showToast("Copied server address to clipboard")
|
||||
})
|
||||
navigator.permissions.query({ name: "clipboard-write" }).then(function (result) {
|
||||
if (result.state === "granted") {
|
||||
// you can read from the clipboard
|
||||
copyCloudflareAddressBtn.addEventListener("click", (e) => {
|
||||
navigator.clipboard.writeText(cloudflareAddressField.innerHTML)
|
||||
showToast("Copied server address to clipboard")
|
||||
})
|
||||
} else {
|
||||
copyCloudflareAddressBtn.classList.add("displayNone")
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
document.addEventListener("system_info_update", (e) => setDeviceInfo(e.detail))
|
||||
|
Loading…
Reference in New Issue
Block a user