fix: login broken by sync/async mismatch, register missing home link, top bar contrast
This commit is contained in:
@@ -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() {
|
||||
|
||||
@@ -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>`;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user