optmise register style.
Some checks failed
Deploy / Build (push) Failing after 15s

This commit is contained in:
amass 2025-01-02 17:16:52 +08:00
parent 4b90a75a51
commit 13c80a51eb
2 changed files with 50 additions and 46 deletions

View File

@ -85,10 +85,14 @@ void Application::authEvent() {
LOG(info) << "User " << u.id() << " (" << u.identity(Wt::Auth::Identity::LoginName) << ")" LOG(info) << "User " << u.id() << " (" << u.identity(Wt::Auth::Identity::LoginName) << ")"
<< " logged in."; << " logged in.";
if (m_loginPage) { if (m_loginPage) {
m_loginPageRef = m_navigationBar->addLoginItem(std::move(m_loginPage)); if (m_navigationBar != nullptr) {
m_loginPageRef = m_navigationBar->addLoginItem(std::move(m_loginPage));
}
} else if (m_loginPageRef != nullptr && m_loginPageRef->parent() == m_root) { } else if (m_loginPageRef != nullptr && m_loginPageRef->parent() == m_root) {
m_loginPage = m_loginPageRef->parent()->removeWidget(m_loginPageRef); m_loginPage = m_loginPageRef->parent()->removeWidget(m_loginPageRef);
m_loginPageRef = m_navigationBar->addLoginItem(std::move(m_loginPage)); if (m_navigationBar != nullptr) {
m_loginPageRef = m_navigationBar->addLoginItem(std::move(m_loginPage));
}
} }
setInternalPath("/", true); setInternalPath("/", true);
auto app = Amass::Singleton<WebToolkit::Server>::instance(); auto app = Amass::Singleton<WebToolkit::Server>::instance();

View File

@ -80,13 +80,13 @@
<message id="Wt.Auth.template.registration"> <message id="Wt.Auth.template.registration">
<div class="Wt-form Wt-auth-registration"> <div class="Wt-form Wt-auth-registration">
<h2>${tr:Wt.Auth.registration-form-title}</h2> <h2 class="is-hidden">${tr:Wt.Auth.registration-form-title}</h2>
<p>${tr:Wt.Auth.registration-form-info}</p> <p class="is-hidden">${tr:Wt.Auth.registration-form-info}</p>
${password-description} ${password-description}
<div class="Wt-fields"> ${<if:user-name>}
${<if:user-name>} <div class="bulma-field">
<label for="${id:user-name}" class="bulma-label"> <label for="${id:user-name}" class="bulma-label">
${user-name-label} ${user-name-label}
</label> </label>
@ -99,51 +99,51 @@
</div> </div>
${user-name-info class="Wt-info bulma-help"} ${user-name-info class="Wt-info bulma-help"}
${confirm-is-you class="Wt-info bulma-help"} ${confirm-is-you class="Wt-info bulma-help"}
${</if:user-name>} </div>
${</if:user-name>}
${<if:choose-password>} ${<if:choose-password>}
<div class="bulma-field"> <div class="bulma-field">
<label for="${id:choose-password}">${tr:Wt.Auth.choose-password} <label for="${id:choose-password}">${tr:Wt.Auth.choose-password}
${choose-password-info class="Wt-info"} </label>
</label>
<div class="bulma-control bulma-has-icons-left"> <div class="bulma-control bulma-has-icons-left">
${choose-password class="bulma-input"} ${choose-password class="bulma-input"}
<span class="bulma-icon bulma-is-small bulma-is-left"> <span class="bulma-icon bulma-is-small bulma-is-left">
<i class="fa-solid fa-lock"></i> <i class="fa-solid fa-lock"></i>
</span> </span>
</div>
</div> </div>
${</if:choose-password>} ${choose-password-info class="Wt-info bulma-help"}
</div>
${</if:choose-password>}
${<if:repeat-password>} ${<if:repeat-password>}
<div> <div class="bulma-field">
<label for="${id:repeat-password}">${tr:Wt.Auth.repeat-password} <label for="${id:repeat-password}">${tr:Wt.Auth.repeat-password}
${repeat-password-info class="Wt-info"} </label>
</label> <div class="bulma-control bulma-has-icons-left">
<div class="bulma-control bulma-has-icons-left"> ${repeat-password class="bulma-input"}
${repeat-password class="bulma-input"} <span class="bulma-icon bulma-is-small bulma-is-left">
<span class="bulma-icon bulma-is-small bulma-is-left"> <i class="fa-solid fa-lock"></i>
<i class="fa-solid fa-lock"></i> </span>
</span>
</div>
</div> </div>
${</if:repeat-password>} ${repeat-password-info class="Wt-info bulma-help"}
</div>
${</if:repeat-password>}
${<if:email>} ${<if:email>}
<div> <div class="bulma-field">
<label for="${id:email}">${tr:Wt.Auth.email} <label for="${id:email}">${tr:Wt.Auth.email}
${email-info class="Wt-info"} </label>
</label> <div class="bulma-control bulma-has-icons-left">
<div class="bulma-control bulma-has-icons-left"> ${email class="bulma-input"}
${email class="bulma-input"} <span class="bulma-icon bulma-is-small bulma-is-left">
<span class="bulma-icon bulma-is-small bulma-is-left"> <i class="fa-solid fa-envelope"></i>
<i class="fa-solid fa-envelope"></i> </span>
</span>
</div>
</div> </div>
${</if:email>} ${email-info class="Wt-info bulma-help"}
</div> </div>
${</if:email>}
${<if:oauth>} ${<if:oauth>}
<br clear="both" /> <br clear="both" />
@ -154,8 +154,8 @@
${icons} ${icons}
${</if:oauth>} ${</if:oauth>}
<div class="Wt-buttons"> <div class="bulma-field bulma-is-grouped bulma-is-grouped-right">
${ok-button} ${cancel-button} ${ok-button class="bulma-is-primary"} ${cancel-button class="bulma-is-light"}
</div> </div>
</div> </div>
</message> </message>