Files
SoonDesign/frontend-web/pages/login.web.html
T
24kycj ce76bb8018 fix(web): 修复 .soon/模板加载、旧文件兼容与另存为离开提示
- 删除 design1 ui 遗留代码,修复加载竞态与新建不弹保存提示
- cloud-files 归一化旧版 .soon,IndexedDB 写入完成后再跳转设计页
- 模板/本地 .soon 首次保存须另存为,离开前统一确认
- 发版缓存 bust(version.js、soon-cache.js)及宝塔 Nginx 配置文档

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-29 00:30:20 +08:00

68 lines
3.0 KiB
HTML

<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<script src="../config/version.js"></script>
<script src="../js/common/soon-cache.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="SoonDesign 在线卡证设计">
<link rel="icon" href="../assets/images/favicon.ico">
<title>登录 · SoonDesign</title>
<link rel="stylesheet" href="../assets/css/auth.css">
<link rel="stylesheet" href="../assets/css/portal.css">
</head>
<body>
<div id="portal-topbar"></div>
<div class="soon-auth-page">
<div class="soon-auth-shell">
<div class="soon-auth-brand">
<img class="soon-auth-brand__logo" src="../assets/images/logo.png" alt="SoonDesign">
<h1>SoonDesign</h1>
<p>在线卡证设计</p>
</div>
<div class="soon-auth-form">
<h2>登录账号</h2>
<p class="soon-auth-form__subtitle">登录后同步云端文件</p>
<form id="loginForm">
<div class="soon-input-wrap">
<span class="soon-input-icon" aria-hidden="true"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M4 6h16v12H4z"/><path d="M4 8l8 5 8-5"/></svg></span>
<input type="email" name="email" required class="soon-input" placeholder="邮箱" id="email" autocomplete="email">
</div>
<div class="soon-input-wrap">
<span class="soon-input-icon" aria-hidden="true"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="5" y="11" width="14" height="10" rx="1"/><path d="M8 11V8a4 4 0 118 0v3"/></svg></span>
<input type="password" name="password" required class="soon-input" placeholder="密码" id="password" autocomplete="current-password">
<button type="button" class="soon-pwd-toggle" id="pwdToggle" aria-label="显示或隐藏密码">显示</button>
</div>
<div class="soon-auth-error-box" id="loginError" role="alert"></div>
<button type="submit" class="soon-btn soon-btn--block">登录</button>
</form>
<p class="soon-auth-links">还没有账号?<a href="register.web.html" id="registerLink">立即注册</a></p>
</div>
</div>
</div>
<script src="../js/common/soon-cache.js"></script>
<script src="../config/local.js"></script>
<script src="../js/common/portal-topbar.js"></script>
<script>SoonPortalTopbar.mount('#portal-topbar', { variant: 'auth' });</script>
<script src="../js/common/auth-redirect.js"></script>
<script src="../js/auth-form.js"></script>
<script>
soonInitAuthForm({
formId: 'loginForm',
errorId: 'loginError',
endpoint: '/auth/login',
failMsg: '登录失败',
linkId: 'registerLink',
linkHrefBase: 'register.web.html',
getBody: function () {
return {
email: document.getElementById('email').value.trim(),
password: document.getElementById('password').value,
};
},
});
</script>
</body>
</html>