mirror of
git://f0xx.org/ac/ac-be-hub
synced 2026-07-29 02:58:26 +03:00
feat(hub): add Downloads and Documentation landing pages
Wire hub-downloads.js for stable OTA APK resolution, expand nav i18n, and add Session Studio download slot for alpha hub FR. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
67
assets/hub-downloads.js
Normal file
67
assets/hub-downloads.js
Normal file
@@ -0,0 +1,67 @@
|
||||
(function () {
|
||||
'use strict';
|
||||
|
||||
function setStatus(msg) {
|
||||
var el = document.getElementById('hub-download-apk-status');
|
||||
if (el) {
|
||||
el.textContent = msg;
|
||||
}
|
||||
}
|
||||
|
||||
function resolveStableApkUrl() {
|
||||
return fetch('/v0/ota/channel/stable.json', { cache: 'no-store' })
|
||||
.then(function (r) {
|
||||
if (!r.ok) {
|
||||
throw new Error('stable channel HTTP ' + r.status);
|
||||
}
|
||||
return r.json();
|
||||
})
|
||||
.then(function (channel) {
|
||||
var manifestUrl = channel && channel.manifestUrl;
|
||||
if (!manifestUrl) {
|
||||
throw new Error('stable.json missing manifestUrl');
|
||||
}
|
||||
return fetch(manifestUrl, { cache: 'no-store' }).then(function (r) {
|
||||
if (!r.ok) {
|
||||
throw new Error('manifest HTTP ' + r.status);
|
||||
}
|
||||
return r.json();
|
||||
});
|
||||
})
|
||||
.then(function (manifest) {
|
||||
var url = manifest && (manifest.apkUrl || manifest.bundleUrl);
|
||||
if (!url) {
|
||||
throw new Error('manifest missing apkUrl');
|
||||
}
|
||||
return url;
|
||||
});
|
||||
}
|
||||
|
||||
function wireApkButton() {
|
||||
var btn = document.getElementById('hub-download-apk');
|
||||
if (!btn) {
|
||||
return;
|
||||
}
|
||||
btn.addEventListener('click', function () {
|
||||
btn.disabled = true;
|
||||
setStatus('Resolving stable OTA channel…');
|
||||
resolveStableApkUrl()
|
||||
.then(function (url) {
|
||||
setStatus('Downloading…');
|
||||
window.location.href = url;
|
||||
})
|
||||
.catch(function (err) {
|
||||
setStatus('APK unavailable — run builder OTA publish (stable). ' + (err.message || err));
|
||||
})
|
||||
.finally(function () {
|
||||
btn.disabled = false;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
if (document.readyState === 'loading') {
|
||||
document.addEventListener('DOMContentLoaded', wireApkButton);
|
||||
} else {
|
||||
wireApkButton();
|
||||
}
|
||||
})();
|
||||
@@ -1,7 +1,7 @@
|
||||
(function () {
|
||||
'use strict';
|
||||
|
||||
var PAGE_COUNT = 10;
|
||||
var PAGE_COUNT = 13;
|
||||
var scrollEl = null;
|
||||
var railEl = null;
|
||||
var currentPage = 1;
|
||||
|
||||
@@ -3,10 +3,14 @@
|
||||
"nav.about": "About",
|
||||
"nav.why": "Why",
|
||||
"nav.tech": "Technologies",
|
||||
"nav.documentation": "Documentation",
|
||||
"nav.resources": "Resources",
|
||||
"nav.people": "People",
|
||||
"nav.culture": "Culture",
|
||||
"nav.pricing": "Pricing",
|
||||
"nav.downloads": "Downloads",
|
||||
"nav.downloads_common": "Common",
|
||||
"nav.downloads_others": "Others",
|
||||
"nav.contact": "Contact us",
|
||||
"nav.console": "Console",
|
||||
"nav.git": "Git",
|
||||
@@ -50,15 +54,34 @@
|
||||
"page4.lead": "Built for teams who need reliability, observability, and control — not another black box.",
|
||||
"page5.title": "Technologies",
|
||||
"page5.lead": "WebRTC, Opus/Speex, WireGuard remote access, PHP consoles, and Docker CI pipelines.",
|
||||
"page6.title": "Resources",
|
||||
"page6.lead": "Documentation, deployment guides, and integration patterns for your environment.",
|
||||
"page7.title": "People",
|
||||
"page7.lead": "Engineers and operators shipping cast, crash, and build workflows every day.",
|
||||
"page8.title": "Culture",
|
||||
"page8.lead": "Open tooling, green master branches, and honest postmortems.",
|
||||
"page9.title": "Pricing",
|
||||
"page9.lead": "Self-hosted core; enterprise options for SLA, SSO, and dedicated builders.",
|
||||
"page10.title": "Contact us",
|
||||
"page10.lead": "Reach the maintainer for partnerships, support, or deployment help.",
|
||||
"page6.title": "Documentation",
|
||||
"page6.lead": "Project wiki, design reviews, specs, and operator guides.",
|
||||
"page6.btn_wiki": "Project documentation",
|
||||
"page6.btn_docs": "Other documents",
|
||||
"page6.hint": "Wiki opens in Gitea; other documents lists ac-docs drafts, DRs, and specs.",
|
||||
"page7.title": "Downloads",
|
||||
"page7.lead": "Latest stable builds from the orchestration pipeline (next integration).",
|
||||
"page7.btn_apk": "Android APK",
|
||||
"page7.btn_studio": "Session Studio",
|
||||
"page7.hint": "APK matches the stable OTA channel signature and version.",
|
||||
"page8.title": "Resources",
|
||||
"page8.lead": "Source control, consoles, and integration entry points.",
|
||||
"page8.btn_git": "Git Access",
|
||||
"page8.hint": "Same Gitea browser as the left shell Git link.",
|
||||
"page9.title": "People",
|
||||
"page9.lead": "Engineers and operators shipping cast, crash, and build workflows every day.",
|
||||
"page10.title": "Culture",
|
||||
"page10.lead": "Open tooling, green master branches, and honest postmortems.",
|
||||
"page11.title": "Pricing",
|
||||
"page11.lead": "Self-hosted core; enterprise options for SLA, SSO, and dedicated builders.",
|
||||
"page12.title": "Contact us",
|
||||
"page12.lead": "Reach the maintainer for partnerships, support, or deployment help.",
|
||||
"page13.title": "Document catalog",
|
||||
"page13.lead": "ac-docs index — drafts, design reviews, specs, and operator guides.",
|
||||
"page13.cat_drs": "Design reviews (DRs)",
|
||||
"page13.cat_specs": "Specifications",
|
||||
"page13.cat_drafts": "Drafts",
|
||||
"page13.cat_guides": "Guides & ops",
|
||||
"page13.hint": "Browse full tree in Gitea under ac-docs; PDF builds live in _pdf_build/.",
|
||||
"footer.copyright": "© {holder}, {year}"
|
||||
}
|
||||
|
||||
@@ -3,10 +3,14 @@
|
||||
"nav.about": "О проекте",
|
||||
"nav.why": "Зачем",
|
||||
"nav.tech": "Технологии",
|
||||
"nav.documentation": "Документация",
|
||||
"nav.resources": "Ресурсы",
|
||||
"nav.people": "Люди",
|
||||
"nav.culture": "Культура",
|
||||
"nav.pricing": "Цены",
|
||||
"nav.downloads": "Загрузки",
|
||||
"nav.downloads_common": "Common",
|
||||
"nav.downloads_others": "Others",
|
||||
"nav.contact": "Контакты",
|
||||
"nav.console": "Консоль",
|
||||
"nav.git": "Git",
|
||||
@@ -50,15 +54,34 @@
|
||||
"page4.lead": "Для команд, которым нужны надёжность, наблюдаемость и контроль — не чёрный ящик.",
|
||||
"page5.title": "Технологии",
|
||||
"page5.lead": "WebRTC, Opus/Speex, WireGuard, PHP-консоли и Docker CI.",
|
||||
"page6.title": "Ресурсы",
|
||||
"page6.lead": "Документация, деплой и паттерны интеграции для вашей среды.",
|
||||
"page7.title": "Люди",
|
||||
"page7.lead": "Инженеры и операторы, которые каждый день развивают cast, crash и сборки.",
|
||||
"page8.title": "Культура",
|
||||
"page8.lead": "Открытые инструменты, зелёный master и честные postmortem.",
|
||||
"page9.title": "Цены",
|
||||
"page9.lead": "Self-hosted ядро; enterprise — SLA, SSO и выделенные builder-ы.",
|
||||
"page10.title": "Контакты",
|
||||
"page10.lead": "Связь с maintainer: партнёрство, поддержка, помощь с деплоем.",
|
||||
"page6.title": "Документация",
|
||||
"page6.lead": "Wiki проекта, DR, спецификации и руководства.",
|
||||
"page6.btn_wiki": "Документация проекта",
|
||||
"page6.btn_docs": "Прочие документы",
|
||||
"page6.hint": "Wiki в Gitea; каталог — черновики ac-docs, DR и specs.",
|
||||
"page7.title": "Загрузки",
|
||||
"page7.lead": "Последние stable-сборки из orchestration (ветка next).",
|
||||
"page7.btn_apk": "Android APK",
|
||||
"page7.btn_studio": "Session Studio",
|
||||
"page7.hint": "APK совпадает с stable OTA-каналом.",
|
||||
"page8.title": "Ресурсы",
|
||||
"page8.lead": "Исходники, консоли и точки интеграции.",
|
||||
"page8.btn_git": "Git Access",
|
||||
"page8.hint": "Тот же Gitea, что и ссылка Git в левой панели.",
|
||||
"page9.title": "Люди",
|
||||
"page9.lead": "Инженеры и операторы, которые каждый день развивают cast, crash и сборки.",
|
||||
"page10.title": "Культура",
|
||||
"page10.lead": "Открытые инструменты, зелёный master и честные postmortem.",
|
||||
"page11.title": "Цены",
|
||||
"page11.lead": "Self-hosted ядро; enterprise — SLA, SSO и выделенные builder-ы.",
|
||||
"page12.title": "Контакты",
|
||||
"page12.lead": "Связь с maintainer: партнёрство, поддержка, помощь с деплоем.",
|
||||
"page13.title": "Каталог документов",
|
||||
"page13.lead": "Индекс ac-docs — черновики, DR, specs и guides.",
|
||||
"page13.cat_drs": "Design reviews (DRs)",
|
||||
"page13.cat_specs": "Спецификации",
|
||||
"page13.cat_drafts": "Черновики",
|
||||
"page13.cat_guides": "Guides и ops",
|
||||
"page13.hint": "Полное дерево в Gitea (ac-docs); PDF — _pdf_build/.",
|
||||
"footer.copyright": "© {holder}, {year}"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user