From a909072dc19b2f823ee976a06b886c7389140cd1 Mon Sep 17 00:00:00 2001 From: uncle6me-web Date: Tue, 28 Jul 2026 12:04:04 +0800 Subject: [PATCH] =?UTF-8?q?feat(t87):=20portal=20=E5=85=A9=E8=99=95?= =?UTF-8?q?=E9=A1=AF=E7=A4=BA=E3=80=8C=E5=8E=BB=E5=BE=8C=E7=B6=B4=E7=9A=84?= =?UTF-8?q?=E4=B9=BE=E6=B7=A8=E7=B6=B2=E5=9D=80=E3=80=8D=EF=BC=8B=E4=B8=80?= =?UTF-8?q?=E9=8D=B5=E8=A4=87=E8=A3=BD=E2=80=94=E2=80=94=E9=80=A3=E7=B7=9A?= =?UTF-8?q?=E4=B8=8D=E5=86=8D=E8=A6=81=E4=BA=BA=E6=8A=84=E7=B6=B2=E5=9D=80?= =?UTF-8?q?=E5=88=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit leo 07-28 拍板:「一律用網址,把後綴拉掉,以免他貼了說我的網址錯了」。 設定頁「同步小幫手」卡+管理頁「庫目錄管理」各一行:location.origin(無 /portal/#/ 後綴) +複製鈕(成功短暫顯示「已複製」,失敗 fallback 提示手動選取)。共用同一 helper。 os-split 10/10、safejson 8/8 仍綠(總管親跑)。(實作=子 CC;審查+commit=總管) --- console-ui/public/portal/index.html | 35 +++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) 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 {}; }