Add svelte as a view engine to swaf #33

Merged
ashpie merged 97 commits from svelte into develop 2021-11-09 19:31:22 +01:00
2 changed files with 2 additions and 1 deletions
Showing only changes of commit 64cec2987d - Show all commits

View File

@ -58,6 +58,7 @@ export default class AccountController extends Controller {
const nameChangeRemainingTime = new Date(nameChangedAt + nameChangeWaitPeriod);
res.render('auth/account/account', {
user_personal_info_fields: user.getPersonalInfoFields(),
main_email: await user.mainEmail.get(),
emails: await user.emails.get(),
display_email_warning: config.get('app.display_email_warning'),

View File

@ -43,7 +43,7 @@ export default class User extends Model {
return !User.isApprovalMode() || this.as(UserApprovedComponent).approved;
}
protected getPersonalInfoFields(): { name: string, value: string }[] {
public getPersonalInfoFields(): { name: string, value: string }[] {
const fields: { name: string, value: string }[] = [];
const nameComponent = this.asOptional(UserNameComponent);
if (nameComponent && nameComponent.hasName()) {