diff --git a/console-ui/public/portal/index.html b/console-ui/public/portal/index.html index adf04ad..5b94be2 100644 --- a/console-ui/public/portal/index.html +++ b/console-ui/public/portal/index.html @@ -334,6 +334,12 @@
+ +
+ 你的知識庫網址(小幫手連線用) + + +
同步小幫手
把你電腦上的資料夾變成知識庫。換電腦或重裝時可以再下載一次。
@@ -374,6 +380,11 @@
載入中…
庫目錄管理
+
+ 你的知識庫網址(小幫手連線用) + + +
@@ -787,6 +798,30 @@ function taipeiMonthDay(ms) { var d = new Date(ms + TAIPEI_OFFSET_MS); return { dropSession(); }); + // t87 07-28 leo:知識庫網址 helper(只有 origin,不含 /portal/# 後綴),兩處 UI 共用 + function copyOriginUrl(btn) { + var url = location.origin; + var orig = btn.textContent; + if (!navigator.clipboard || !navigator.clipboard.writeText) { + alert('請手動選取並複製:' + url); + return; + } + navigator.clipboard.writeText(url).then(function () { + btn.textContent = '已複製'; + setTimeout(function () { btn.textContent = orig; }, 1500); + }).catch(function () { + alert('請手動選取並複製:' + url); + }); + } + (function () { + ['st-origin-url', 'ad-origin-url'].forEach(function (id) { + var el = $(id); if (el) el.textContent = location.origin; + }); + ['st-copy-url', 'ad-copy-url'].forEach(function (id) { + var el = $(id); if (el) el.addEventListener('click', function () { copyOriginUrl(this); }); + }); + })(); + // ── t53 完成安裝清單(進站必見,三件做完才消失)───────────────────────────── function setupSteps() { try { return JSON.parse(localStorage.getItem('arcrun_setup_steps') || '{}'); } catch (e) { return {}; }