diff --git a/kinode/src/http/login.html b/kinode/src/http/login.html index 1709a2d93..dce382e63 100644 --- a/kinode/src/http/login.html +++ b/kinode/src/http/login.html @@ -1138,6 +1138,35 @@ --tw-grayscale: grayscale(100%); filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow); } + + .top-left-button { + position: absolute; + top: 2rem; + left: 2rem; + width: 3rem; + height: 3rem; + border-radius: 50%; + background-color: transparent; + display: flex; + align-items: center; + justify-content: center; + transition: background-color 0.3s; + border: 1px solid white; + } + + .top-left-button img { + width: 2.5rem; + height: 2.5rem; + border-radius: 50%; + } + + .top-left-button:hover { + background-color: black; + } + + .hidden { + display: none; + } @@ -1145,6 +1174,11 @@ style="background-color: #22211f; background-image: linear-gradient(-55deg, #f75a2977 0%, transparent 72.05%),linear-gradient(-11deg, #86000172 3%, transparent 57.05%);"> +
Logging in... document.getElementById("fake-or-not").innerHTML = "To change your networking info, please restart your node."; } + if (isHosted(window.location.host)) { + document.getElementById("valet-button").classList.remove("hidden"); + } + const firstPathItem = window.location.pathname.split('/')[1]; const expectedSecureSubdomain = generateSecureSubdomain(firstPathItem); const maybeSecureSubdomain = window.location.host.split('.')[0]; @@ -1243,6 +1281,18 @@

Logging in...

return subdomain; } + function isHosted(host) { + const parts = host.split('.'); + if (parts.length < 3) { + return false; + } + const [thirdLast, secondLast, last] = parts.slice(-3); + if (thirdLast === 'hosting' && secondLast === 'kinode' && last === 'net') { + return true; + } + return false; + } + document.addEventListener("DOMContentLoaded", () => { const form = document.getElementById("signup-form"); form.addEventListener("submit", (e) => {