Files
SoonDesign/frontend-web/pages/index.web.html
T
24kycj 4ce4486b26 Web 端本地缓存、首页与会员弹窗体验优化
新增 IndexedDB 与最近文件 L1 缓存、云保存/打开链路;首页支持下载与清空本地缓存;修复清空 storage 后语言初始化报错;优化 design2 背景加载与侧栏标签样式;完善会员激活/支付弹层样式;后端补充文件缩略图字段与 thumb 接口。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-11 11:05:44 +08:00

172 lines
4.6 KiB
HTML

<!DOCTYPE html>
<html class="soon-home">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="description" content="SoonDesign 在线卡证设计">
<link rel="icon" href="../assets/images/favicon.ico">
<title>SoonDesign</title>
<link rel="stylesheet" href="../vendor/layui/css/layui.css">
<link rel="stylesheet" href="../assets/css/layer-soon.css">
<link rel="stylesheet" href="../assets/css/index.css">
</head>
<body>
<div id="portal-topbar"></div>
<div class="layui-fluid main">
<div class="layui-row">
<div class="layui-col-md2">
<aside class="soon-home-sidebar left">
<h1 class="soon-home-sidebar__title" language="m" zh="新建项目" ozh="新建項目" en="New Project"></h1>
<div class="soon-home-new-card card" id="new1">
<div class="rect">
<img src="../assets/images/bg_1.png" alt="">
<div class="tip" language="m" zh="空白光盘模板" ozh="空白光碟模闆" en="Disc Template"></div>
</div>
</div>
<div class="soon-home-new-card card" id="new2">
<div class="rect rect1">
<img src="../assets/images/bg_2.png" alt="">
<div class="tip" language="m" zh="空白卡片模板" ozh="空白卡片模闆" en="Card Template"></div>
</div>
</div>
</aside>
</div>
<div class="layui-col-md10">
<main class="right">
<section class="soon-section soon-section--recent soon-home-panel">
<div class="soon-section-title soon-section-title--bar">
<div class="soon-section-title__main">
<span language="m" zh="最近文件" ozh="最近文件" en="Recent Files"></span>
<span class="soon-badge soon-badge--active soon-section-title__badge" id="recentCount">0</span>
</div>
<p class="soon-section-title__lead" language="m" zh="新建模板,或打开已有文件" ozh="新建模板,或打開已有文件" en="New template or open a file"></p>
<button type="button" class="soon-btn soon-btn--sm" id="openfile" language="m" zh="打开文件" ozh="打開文件" en="Open file"></button>
</div>
<div class="card-list soon-home-recent-grid"></div>
<div id="filePager"></div>
</section>
<section class="soon-section soon-templates-section soon-home-panel" id="templatesSection">
<div class="soon-section-title">
<span language="m" zh="模板库" ozh="模板庫" en="Template Library"></span>
<span class="soon-badge soon-badge--active soon-section-title__badge" id="templateCount">...</span>
</div>
<div class="soon-templates-strip-wrap">
<button type="button" class="soon-templates-strip__nav" id="templatePrev" aria-label="上一页" disabled>&lsaquo;</button>
<div class="soon-templates-strip" id="templatesGrid">
<div class="soon-skeleton soon-skeleton--h120"></div>
<div class="soon-skeleton soon-skeleton--h120"></div>
<div class="soon-skeleton soon-skeleton--h120"></div>
</div>
<button type="button" class="soon-templates-strip__nav" id="templateNext" aria-label="下一页" disabled>&rsaquo;</button>
</div>
</section>
</main>
</div>
</div>
</div>
<script src="../config/local.js"></script>
<script src="../js/common/auth-redirect.js"></script>
<script src="../js/common/auth-session.js"></script>
<script src="../js/common/cloud-files.js"></script>
<script src="../js/common/soon-local-store.js"></script>
<script src="../js/common/soon-recent.js"></script>
<script src="../vendor/layui/layui.js"></script>
<script src="../vendor/js/qrcode.min.js"></script>
<script src="../js/common/asset-base.js"></script>
<script src="../js/common/portal-topbar.js"></script>
<script src="../js/common/portal-auth.js"></script>
<script src="../js/platform/web.js"></script>
<script src="../js/index.js"></script>
<script>
if (window.SoonPortalTopbar) SoonPortalTopbar.mount('#portal-topbar', { active: 'home' });
soonPortalAuth.init();
if (window.soonLoadMembership) {
window.soonLoadMembership().then(function () {
if (window.soonRefreshPortalIdentity) window.soonRefreshPortalIdentity();
if (window.soonReloadRecentFiles) window.soonReloadRecentFiles();
});
}
</script>
</body>
</html>