Separate base database initialization from test data seeding
This commit is contained in:
@@ -120,12 +120,6 @@ document.addEventListener('click', async event => {
|
||||
state.user = null; state.profile = null; state.pageData = null; state.permissions = []; state.scopeLabel = '';
|
||||
await refreshPublic(); navigate('home'); toast('已安全退出', '期待下次见面'); return;
|
||||
}
|
||||
if (action === 'fill-demo') {
|
||||
const form = document.querySelector('[data-form="login"]');
|
||||
const accounts = { admin: ['admin', 'Admin123!'], school: ['school_admin', 'School123!'], class: ['class_admin', 'Class123!'], candidate: ['2026-HZ01-F-0001', 'Candidate123!'] };
|
||||
[form.username.value, form.password.value] = accounts[target.dataset.type] || accounts.candidate;
|
||||
return;
|
||||
}
|
||||
if (action === 'open-notice') {
|
||||
const notice = state.publicData.notices.find(item => item.id === target.dataset.id) || (await api(`/api/public/notices/${target.dataset.id}`)).notice;
|
||||
const contentHtml = notice.contentHtml || `<p>${h(notice.content).replace(/\r?\n/g, '</p><p>')}</p>`;
|
||||
|
||||
Reference in New Issue
Block a user