From ef13926091545edf9c0ece7f250ad1736b082402 Mon Sep 17 00:00:00 2001 From: Suna Ayhan <57765336+SunaAyhan@users.noreply.github.com> Date: Fri, 23 Jan 2026 16:25:11 +0100 Subject: [PATCH 1/2] Add open in app button and popup --- _sass/blocks/joinzone.scss | 90 ++++++++++++++++++- joinzone.html | 178 +++++++++++++++++++++++++++++-------- 2 files changed, 232 insertions(+), 36 deletions(-) diff --git a/_sass/blocks/joinzone.scss b/_sass/blocks/joinzone.scss index 2586a67f..59e9de50 100644 --- a/_sass/blocks/joinzone.scss +++ b/_sass/blocks/joinzone.scss @@ -35,4 +35,92 @@ .download-prompt { margin-top: 30px; } -} \ No newline at end of file + + .joinzone__actions { + display: flex; + gap: 12px; + justify-content: center; + align-items: center; + flex-wrap: wrap; + margin-top: 14px; + } + + .joinzone__status { + margin-top: 16px; + color: #54595e; + } + + .joinzone__fallback { + margin-top: 18px; + max-width: 720px; + margin-left: auto; + margin-right: auto; + } +} + +.joinzone-openapp-modal { + position: fixed; + inset: 0; + z-index: 10000; + display: flex; + align-items: center; + justify-content: center; + padding: 20px; +} + +.joinzone-openapp-modal[hidden] { + display: none; +} + +.joinzone-openapp-modal__backdrop { + position: absolute; + inset: 0; + background: rgba(0, 0, 0, 0.55); +} + +.joinzone-openapp-modal__dialog { + position: relative; + width: 100%; + max-width: 560px; + background: #ffffff; + border-radius: 14px; + padding: 24px 22px; + box-shadow: 0 18px 60px rgba(0, 0, 0, 0.3); +} + +.joinzone-openapp-modal__title { + margin-top: 0; + margin-bottom: 8px; + color: #2d3e50; +} + +.joinzone-openapp-modal__text { + margin-top: 0; + color: #54595e; +} + +.joinzone-openapp-modal__actions { + display: flex; + gap: 12px; + flex-wrap: wrap; + margin-top: 16px; +} + +.joinzone-openapp-modal__note { + margin-top: 14px; + margin-bottom: 0; + color: #54595e; + font-size: 14px; +} + +.joinzone-openapp-modal__close { + position: absolute; + top: 10px; + right: 12px; + border: 0; + background: transparent; + font-size: 28px; + line-height: 1; + cursor: pointer; + color: #2d3e50; +} diff --git a/joinzone.html b/joinzone.html index 87361bb4..db9c8d87 100644 --- a/joinzone.html +++ b/joinzone.html @@ -9,66 +9,174 @@ --- + + + + + +

Join Code


Click the "Join" button on the Zones page in Diode and enter this Join Code!

-

- -

- + +

+ +
+ Open in App + +
+ + + + + +

- how to join zone with join code + how to join zone with join code

Need Diode?

- {{ site.links.download.title }} + {{ site.links.download.title }}
- From 3d83b9ec48a5daa3d0aef9b1c6d48c4849ca4377 Mon Sep 17 00:00:00 2001 From: Suna Ayhan <57765336+SunaAyhan@users.noreply.github.com> Date: Mon, 26 Jan 2026 12:40:49 +0100 Subject: [PATCH 2/2] Clean up --- joinzone.html | 58 ++++++++++++++++++++++++++++++++------------------- 1 file changed, 37 insertions(+), 21 deletions(-) diff --git a/joinzone.html b/joinzone.html index db9c8d87..4bf298a2 100644 --- a/joinzone.html +++ b/joinzone.html @@ -39,33 +39,49 @@ var el = document.getElementById(id); var text = (el && (el.textContent || el.innerText) || "").trim(); - var tempInput = document.createElement("textarea"); - tempInput.value = text; - document.body.appendChild(tempInput); - tempInput.select(); - document.execCommand("copy"); - document.body.removeChild(tempInput); - - document.querySelector("#notify").style.display = ""; - setTimeout(function () { - document.querySelector("#notify").style.display = "none"; - }, 3000); + function showNotification() { + document.querySelector("#notify").style.display = ""; + setTimeout(function () { + document.querySelector("#notify").style.display = "none"; + }, 3000); + } + + function legacyCopy(value) { + var tempInput = document.createElement("textarea"); + tempInput.value = value; + tempInput.setAttribute("readonly", ""); + tempInput.style.position = "fixed"; + tempInput.style.top = "0"; + tempInput.style.left = "0"; + tempInput.style.opacity = "0"; + document.body.appendChild(tempInput); + tempInput.select(); + try { + document.execCommand("copy"); + showNotification(); + } catch (err) { + console.error("Could not copy text: ", err); + } + document.body.removeChild(tempInput); + } + + if (!text) return; + + if (navigator.clipboard && window.isSecureContext) { + navigator.clipboard.writeText(text).then(showNotification, function (err) { + console.error("Could not copy text: ", err); + legacyCopy(text); + }); + } else { + legacyCopy(text); + } }