From 0cb4aec5dfbf171c93e770b60246129f1b39dd41 Mon Sep 17 00:00:00 2001 From: Local Dev Date: Sun, 20 Sep 2026 18:48:44 +0200 Subject: [PATCH] feat(sirius-x): hosting is a choice, not a raw s3 key The s3 field asked people for a Sia bucket key. Under Content & hosting it is now a choice: not hosted on Sia, Sirius.X hosting (free, the name's own folder on Sia, filled by Studio or the upload API), or another folder for the few who host elsewhere. The raw key stays editable under the advanced option; the on-chain record is unchanged. --- docs/index.html | 2 +- i18n/de.json | 7 ++++++- i18n/el.json | 7 ++++++- i18n/es.json | 7 ++++++- i18n/fr.json | 7 ++++++- i18n/pt.json | 7 ++++++- i18n/ru.json | 7 ++++++- index.html | 2 +- js/dashboard.js | 26 +++++++++++++++++++++++++- js/i18n.js | 2 +- market/index.html | 2 +- portal.html | 14 ++++++++++---- studio.html | 2 +- tld.html | 2 +- 14 files changed, 77 insertions(+), 17 deletions(-) diff --git a/docs/index.html b/docs/index.html index 532057c..eca45ca 100644 --- a/docs/index.html +++ b/docs/index.html @@ -127,7 +127,7 @@ - + diff --git a/i18n/de.json b/i18n/de.json index 38d5d82..ec68eb6 100644 --- a/i18n/de.json +++ b/i18n/de.json @@ -604,5 +604,10 @@ "Undo last change": "Letzte Änderung rückgängig", "Stop": "Stopp", "unconfirmed · spendable now": "unbestätigt · sofort verfügbar", - "Price (BCH)": "Preis (BCH)" + "Price (BCH)": "Preis (BCH)", + "Hosting": "Hosting", + "where the page files live (the s3 record)": "wo die Seitendateien liegen (der s3-Eintrag)", + "Not hosted on Sia": "Nicht auf Sia gehostet", + "Sirius.X hosting — free, on Sia storage": "Sirius.X-Hosting — kostenlos, auf Sia-Speicher", + "Another Sia folder (advanced)": "Anderer Sia-Ordner (erweitert)" } diff --git a/i18n/el.json b/i18n/el.json index 96b0b02..5c11e5b 100644 --- a/i18n/el.json +++ b/i18n/el.json @@ -604,5 +604,10 @@ "Undo last change": "Αναίρεση τελευταίας αλλαγής", "Stop": "Στοπ", "unconfirmed · spendable now": "ανεπιβεβαίωτα · διαθέσιμα τώρα", - "Price (BCH)": "Τιμή (BCH)" + "Price (BCH)": "Τιμή (BCH)", + "Hosting": "Φιλοξενία", + "where the page files live (the s3 record)": "πού βρίσκονται τα αρχεία της σελίδας (η εγγραφή s3)", + "Not hosted on Sia": "Δεν φιλοξενείται στο Sia", + "Sirius.X hosting — free, on Sia storage": "Φιλοξενία Sirius.X — δωρεάν, στον αποθηκευτικό χώρο Sia", + "Another Sia folder (advanced)": "Άλλος φάκελος Sia (για προχωρημένους)" } diff --git a/i18n/es.json b/i18n/es.json index f0cfe5a..c0e4a44 100644 --- a/i18n/es.json +++ b/i18n/es.json @@ -604,5 +604,10 @@ "Undo last change": "Deshacer el último cambio", "Stop": "Detener", "unconfirmed · spendable now": "sin confirmar · disponibles ya", - "Price (BCH)": "Precio (BCH)" + "Price (BCH)": "Precio (BCH)", + "Hosting": "Alojamiento", + "where the page files live (the s3 record)": "dónde viven los archivos de la página (el registro s3)", + "Not hosted on Sia": "No alojado en Sia", + "Sirius.X hosting — free, on Sia storage": "Alojamiento Sirius.X — gratis, en almacenamiento Sia", + "Another Sia folder (advanced)": "Otra carpeta de Sia (avanzado)" } diff --git a/i18n/fr.json b/i18n/fr.json index 56003fe..bd7797e 100644 --- a/i18n/fr.json +++ b/i18n/fr.json @@ -604,5 +604,10 @@ "Undo last change": "Annuler la dernière modification", "Stop": "Arrêter", "unconfirmed · spendable now": "non confirmés · disponibles maintenant", - "Price (BCH)": "Prix (BCH)" + "Price (BCH)": "Prix (BCH)", + "Hosting": "Hébergement", + "where the page files live (the s3 record)": "où se trouvent les fichiers de la page (l'enregistrement s3)", + "Not hosted on Sia": "Pas hébergé sur Sia", + "Sirius.X hosting — free, on Sia storage": "Hébergement Sirius.X — gratuit, sur le stockage Sia", + "Another Sia folder (advanced)": "Un autre dossier Sia (avancé)" } diff --git a/i18n/pt.json b/i18n/pt.json index 8cd77fe..90e72f7 100644 --- a/i18n/pt.json +++ b/i18n/pt.json @@ -604,5 +604,10 @@ "Undo last change": "Anular a última alteração", "Stop": "Parar", "unconfirmed · spendable now": "por confirmar · disponíveis já", - "Price (BCH)": "Preço (BCH)" + "Price (BCH)": "Preço (BCH)", + "Hosting": "Alojamento", + "where the page files live (the s3 record)": "onde ficam os ficheiros da página (o registo s3)", + "Not hosted on Sia": "Não alojado no Sia", + "Sirius.X hosting — free, on Sia storage": "Alojamento Sirius.X — grátis, no armazenamento Sia", + "Another Sia folder (advanced)": "Outra pasta Sia (avançado)" } diff --git a/i18n/ru.json b/i18n/ru.json index 334afb0..35ba2b2 100644 --- a/i18n/ru.json +++ b/i18n/ru.json @@ -604,5 +604,10 @@ "Undo last change": "Отменить последнее изменение", "Stop": "Стоп", "unconfirmed · spendable now": "не подтверждено · доступно сейчас", - "Price (BCH)": "Цена (BCH)" + "Price (BCH)": "Цена (BCH)", + "Hosting": "Хостинг", + "where the page files live (the s3 record)": "где лежат файлы страницы (запись s3)", + "Not hosted on Sia": "Не размещено на Sia", + "Sirius.X hosting — free, on Sia storage": "Хостинг Sirius.X — бесплатно, в хранилище Sia", + "Another Sia folder (advanced)": "Другая папка Sia (для опытных)" } diff --git a/index.html b/index.html index a895351..acc56bb 100644 --- a/index.html +++ b/index.html @@ -165,7 +165,7 @@ .verify dd{margin:2px 0 0;font-family:ui-monospace,monospace;font-size:12.5px;word-break:break-all;color:var(--ink)} footer{border-top:1px solid var(--line);padding:2.4rem 0 3.5rem;color:var(--dim);font-size:13px;text-align:center;margin-top:2.5rem} - + diff --git a/js/dashboard.js b/js/dashboard.js index aa23c76..e5618e1 100644 --- a/js/dashboard.js +++ b/js/dashboard.js @@ -563,10 +563,34 @@ $("dns-publish").addEventListener("click", async () => { // ---------- content & hosting (on-chain records) ---------- const CT_KEYS = ["h", "s3", "p", "ip", "tls"]; -function fillContentForm(rec) { for (const k of CT_KEYS) $("ct-" + k).value = rec[k] || ""; updateBudget(); } +// s3 is offered as a choice: "Sirius.X hosting" is the name's own folder on +// Sia (bns//), free, filled by Studio or the upload API. The raw key +// stays reachable under "advanced" for anyone hosting from another folder. +const hostingFolder = () => `bns/${current.name}/`; +const S3_HINTS = { + off: "Nothing is served from Sia. Use inline HTML, a proxy, your own server or a redirect — or switch on Sirius.X hosting.", + sirius: "Free web hosting by Sirius.X: the files are served from your own folder on Sia storage. Build the page in Studio (Publish to Sia) or upload files yourself; only your key can write there. DNS records live in the same folder.", + custom: "Any folder key on the Sirius.X Sia bucket, with a trailing slash. Only your own folder accepts your uploads; other folders must be filled another way.", +}; +function paintS3Mode() { + const mode = $("ct-s3-mode").value; + $("ct-s3").hidden = mode !== "custom"; + $("ct-s3-hint").textContent = S3_HINTS[mode] + (mode === "sirius" ? ` Folder: ${hostingFolder()}` : ""); + if (mode === "sirius") $("ct-s3").value = hostingFolder(); + if (mode === "off") $("ct-s3").value = ""; +} +function fillContentForm(rec) { + for (const k of CT_KEYS) $("ct-" + k).value = rec[k] || ""; + const s3 = String(rec.s3 || "").trim(); + $("ct-s3-mode").value = !s3 ? "off" : s3 === hostingFolder() ? "sirius" : "custom"; + paintS3Mode(); updateBudget(); +} +$("ct-s3-mode").addEventListener("change", () => { paintS3Mode(); updateBudget(); }); function collectContent() { const r = {}; for (const k of CT_KEYS) { const v = $("ct-" + k).value.trim(); if (v) r[k] = v; } + const mode = $("ct-s3-mode").value; + if (mode === "sirius") r.s3 = hostingFolder(); else if (mode === "off") delete r.s3; const u = ($("rd-url").value || "").trim(); if (u) r.u = u; return r; } diff --git a/js/i18n.js b/js/i18n.js index e3fec6b..89dbbc3 100644 --- a/js/i18n.js +++ b/js/i18n.js @@ -22,7 +22,7 @@ (function () { var STORE = "sirius-lang"; var CACHE = "sirius-i18n:"; - var VERSION = "20260920e"; // bump when dictionaries change + var VERSION = "20260920f"; // bump when dictionaries change var LANGS = { en: "English", de: "Deutsch", diff --git a/market/index.html b/market/index.html index dddb6aa..5494038 100644 --- a/market/index.html +++ b/market/index.html @@ -97,7 +97,7 @@ footer{border-top:1px solid var(--line);padding:2rem 0 3rem;color:var(--dim);font-size:13px;text-align:center;margin-top:2.5rem} @media (max-width:560px){.row{grid-template-columns:1fr auto}.row .price{grid-column:1/-1;text-align:left}} - +