Live (In a Volcano) community card game.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

102 lines
5.0 KiB

extends ../layouts/main
block vendorcss
link(rel='stylesheet', href=`/cropperjs/cropper.min.css?v=${pkg.version}`)
block vendorjs
script(src=`/cropperjs/cropper.min.js?v=${pkg.version}`)
block content
include ../components/file-upload-image
section.uk-section.uk-section-default.uk-section-small
.uk-container
div(uk-grid)
div(class="uk-width-1-1 uk-width-1-3@m")
-
var currentProfile = null;
if (user.picture && user.picture.large) {
currentProfile = user.picture.large;
}
.uk-margin
.uk-card.uk-card-default.uk-card-small
.uk-card-header.uk-text-center
h1.uk-card-title Profile Photo
.uk-card-body
+renderFileUploadImage(
`/user/${user._id}/profile-photo`,
'profile-picture-upload',
'profile-picture-file',
'site-profile-picture',
`/img/default-member.png`,
currentProfile,
{ aspectRatio: 1 },
)
.uk-margin
.uk-card.uk-card-default.uk-card-small
.uk-card-header.uk-text-center
h1.uk-card-title Two-Factor Authentication
.uk-card-body
p Enabling Two-Factor Authentication (2FA) with a One-Time Password authenticator app can help protect your account and settings from unauthorized access.
.uk-card-footer.uk-text-center
if hasOtpAccount
a(href=`/user/${user._id}/otp-disable`).uk-button.dtp-button-danger Disable 2FA
else
a(href=`/user/${user._id}/otp-setup`).uk-button.dtp-button-default Enable 2FA
div(class="uk-width-1-1 uk-width-expand@m")
h1 Settings
form(method="POST", action=`/user/${user._id}/settings`, onsubmit="return dtp.app.submitForm(event, 'user account update');").uk-form
.uk-margin
label(for="username").uk-form-label Username
input(id="username", name="username", type="text", placeholder="Enter username", value= user.username).uk-input
.uk-margin
label(for="display-name").uk-form-label Display Name
input(id="display-name", name="displayName", type="text", placeholder="Enter display name", value= user.displayName).uk-input
.uk-margin
div(uk-grid).uk-grid-small
.uk-width-1-2
.uk-margin
label(for="password").uk-form-label New Password
input(id="password", name="password", type="password", placeholder="Enter new password", autocomplete= "new-password").uk-input
.uk-width-1-2
.uk-margin
label(for="passwordv").uk-form-label Verify New Password
input(id="passwordv", name="passwordv", type="password", placeholder="Enter new password again", autocomplete= "new-password").uk-input
fieldset
legend Email Preferences
.uk-margin
label(for="email").uk-form-label
span Email Address
if user.flags.isEmailVerified
span (verified)
div(uk-grid).uk-grid-small
div(class="uk-width-1-1 uk-width-expand@s")
.uk-margin-small
input(id="email", name="email", type="email", placeholder="Enter email address", value= user.email).uk-input
if user.flags.isEmailVerified
.uk-text-small.uk-text-muted Changing your email address will un-verify you and send a new verification email. Check your spam folder!
else
.uk-text-small.uk-text-muted Changing your email address will send a new verification email. Check your spam folder!
div(class="uk-width-1-1 uk-width-auto@s")
button(type="button", onclick="return dtp.app.resendWelcomeEmail(event);").uk-button.dtp-button-default Resend Welcome Email
.uk-margin
div(uk-grid).uk-grid-small
label
input(id="optin-system", name="optIn.system", type="checkbox", checked= user.optIn ? user.optIn.system : false).uk-checkbox
| System messages
label
input(id="optin-marketing", name="optIn.marketing", type="checkbox", checked= user.optIn ? user.optIn.marketing : false).uk-checkbox
| Sales / Marketing
.uk-margin
label(for="theme").uk-form-label UI Theme
select(id="theme", name="theme").uk-select
option(value="dtp-light", selected= user ? user.theme === 'dtp-light' : true) Light Mode
option(value="dtp-dark", selected= user ? user.theme === 'dtp-dark' : false) Dark Mode
.uk-margin
button(type="submit").uk-button.dtp-button-primary Update account settings