fix: login broken by sync/async mismatch, register missing home link, top bar contrast

This commit is contained in:
2026-07-12 01:50:17 +08:00
parent a4cee1c186
commit 5bb2df7b52
3 changed files with 10 additions and 6 deletions

View File

@@ -89,7 +89,7 @@ const App = {
const pub = document.getElementById('public-page');
pub.classList.remove('hidden');
const comp = page === 'login' ? LoginPage : page === 'register' ? RegisterPage : page === 'install' ? InstallPage : HomePage;
comp.render().then(html => { pub.innerHTML = html; if (comp.mount) comp.mount(); });
Promise.resolve(comp.render()).then(html => { pub.innerHTML = html; if (comp.mount) comp.mount(); });
},
showLayout() {

View File

@@ -27,7 +27,9 @@ const RegisterPage = {
<button type="submit" class="btn btn-p btn-lg w-full"><i class="fas fa-user-plus"></i> 注册</button>
</form>
<div style="margin-top:14px;text-align:center;font-size:13px">
<a href="#/login" style="color:var(--p);text-decoration:none">已有账号?登录</a>
<a href="#/login" style="color:var(--p);text-decoration:none;font-weight:600">已有账号?登录</a>
<span style="color:var(--g4);margin:0 10px">|</span>
<a href="#/home" style="color:var(--g5);text-decoration:none">匿名提交</a>
</div>
</div>`;
},