重构 monorepo 并完善网页端订阅与首页体验
- 迁移为 frontend-web、frontend-electron、backend-web 与 docker 部署结构 - 网页端:订阅门禁二次弹窗、套餐/支付组件化、顶栏分组对齐 - 首页:最近文件与模板库布局优化,缩略图对齐,下载与删除操作 - 新增管理后台、支付与云端文件 API,更新 README 与项目规范 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
(function () {
|
||||
'use strict';
|
||||
|
||||
var g = typeof globalThis !== 'undefined' ? globalThis : (typeof window !== 'undefined' ? window : this);
|
||||
if (g.soonAsset) return;
|
||||
|
||||
function computeAssetBase() {
|
||||
if (typeof window === 'undefined' || !window.location) {
|
||||
return '../assets/images/';
|
||||
}
|
||||
var p = window.location.pathname || '/';
|
||||
if (p.indexOf('/pages/') !== -1 || /\.html$/i.test(p)) {
|
||||
return '../assets/images/';
|
||||
}
|
||||
return 'assets/images/';
|
||||
}
|
||||
|
||||
function computeJsBase() {
|
||||
if (typeof window === 'undefined' || !window.location) {
|
||||
return '../js/';
|
||||
}
|
||||
var p = window.location.pathname || '/';
|
||||
if (p.indexOf('/pages/') !== -1 || /\.html$/i.test(p)) {
|
||||
return '../js/';
|
||||
}
|
||||
return 'js/';
|
||||
}
|
||||
|
||||
g.SOON_ASSET_BASE = computeAssetBase();
|
||||
g.SOON_JS_BASE = computeJsBase();
|
||||
|
||||
g.soonAsset = function (name) {
|
||||
var n = String(name || '').replace(/^\/+/, '');
|
||||
return g.SOON_ASSET_BASE + n;
|
||||
};
|
||||
|
||||
g.soonJs = function (rel) {
|
||||
var n = String(rel || '').replace(/^\/+/, '');
|
||||
return g.SOON_JS_BASE + n;
|
||||
};
|
||||
})();
|
||||
Reference in New Issue
Block a user