ec-web 0.0.27 → 0.0.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/static/app.js +4 -2
- package/dist/static/index.html +1 -1
- package/package.json +1 -1
package/dist/static/app.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/* EC Web — 前端 WS 客户端 + 多视图渲染 */
|
|
2
2
|
|
|
3
3
|
const $ = (sel) => document.querySelector(sel);
|
|
4
|
-
const TOKEN_KEY = 'ecWatchToken';
|
|
5
4
|
const LANG_KEY = 'ecWatchLang';
|
|
6
5
|
const VIEW_KEY = 'ecWatchCurrentView';
|
|
7
6
|
const ROLE_SUBVIEW_KEY = 'ecWatchRoleSubview';
|
|
@@ -1939,7 +1938,7 @@ function toggleLang() {
|
|
|
1939
1938
|
}
|
|
1940
1939
|
|
|
1941
1940
|
// ── 基础路径 ──
|
|
1942
|
-
// 本地直连时页面在 "/",经 AUN Service Proxy 时页面在 "
|
|
1941
|
+
// 本地直连时页面在 "/",经 AUN Service Proxy 时页面在 "/<host>/ecweb/"。
|
|
1943
1942
|
// 取当前页面所在目录(含尾斜杠)作为所有 API/WS 的前缀,使绝对路径在两种
|
|
1944
1943
|
// 部署下都正确(proxy-server 用首段路径选服务,前缀不能丢)。
|
|
1945
1944
|
const BASE = (() => {
|
|
@@ -1952,6 +1951,9 @@ const BASE = (() => {
|
|
|
1952
1951
|
}
|
|
1953
1952
|
return location.pathname.replace(/[^/]*$/, '');
|
|
1954
1953
|
})();
|
|
1954
|
+
// 同源的不同主机共享 localStorage,token 必须按完整代理路径隔离。
|
|
1955
|
+
// 旧 ecWatchToken 无法确定所属主机,不迁移;远程访问需重新配对一次。
|
|
1956
|
+
const TOKEN_KEY = `ecWatchToken:${BASE}`;
|
|
1955
1957
|
const apiUrl = (p) => BASE + p.replace(/^\/+/, '');
|
|
1956
1958
|
const authApiUrl = (p) => {
|
|
1957
1959
|
const token = localStorage.getItem(TOKEN_KEY);
|
package/dist/static/index.html
CHANGED
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
|
|
50
50
|
</nav>
|
|
51
51
|
<span style="flex:1"></span>
|
|
52
|
-
<span class="build-ts" style="font-size:10px;color:var(--dim)" data-i18n-title="common.buildTime" title="构建时间">2026-09-24
|
|
52
|
+
<span class="build-ts" style="font-size:10px;color:var(--dim)" data-i18n-title="common.buildTime" title="构建时间">2026-09-24 23:01</span>
|
|
53
53
|
<span id="conn-status" class="conn-status" data-i18n="status.connecting">连接中…</span>
|
|
54
54
|
<button id="lang-btn" class="theme-btn" data-i18n-title="language.buttonTitle" title="切换语言">🌐</button>
|
|
55
55
|
<button id="theme-btn" class="theme-btn" data-i18n-title="theme.buttonTitle" title="主题">🌗</button>
|