localization support
This commit is contained in:
parent
f99d6f88c3
commit
d91128274b
29 changed files with 396 additions and 194 deletions
|
@ -1,9 +1,9 @@
|
|||
extends layout.pug
|
||||
|
||||
block content
|
||||
h2 Wishlist Deletion
|
||||
p This will instantly <b>irreversibly delete all wishlists!</b> Consider making a backup of the database before using this.
|
||||
h2= lang('ADMIN_CLEAR_WISHLISTS_HEADER')
|
||||
p!= lang('ADMIN_CLEAR_WISHLISTS_DESCRIPTION')
|
||||
form(method='POST', action=`${_CC.config.base}admin-settings/clear-wishlists`)
|
||||
.field
|
||||
.control
|
||||
input.button.is-danger(type='submit' value=`Clear all wishlists`)
|
||||
input.button.is-danger(type='submit' value=lang('ADMIN_CLEAR_WISHLISTS_BUTTON'))
|
|
@ -4,7 +4,7 @@ block title
|
|||
h1(style="margin-bottom: 0;")
|
||||
a(href='..') <
|
||||
| #{config.siteTitle}
|
||||
p Editing user "#{user._id}"
|
||||
p= lang('ADMIN_USER_EDIT_EDITING_USER', user._id)
|
||||
|
||||
block content
|
||||
.columns
|
||||
|
@ -14,94 +14,94 @@ block content
|
|||
.box(style='overflow: hidden;')
|
||||
.columns(style='margin-bottom: 0;')
|
||||
.column.is-narrow(style='padding-bottom: 0;')
|
||||
h2 Confirmation Link
|
||||
h2= lang('ADMIN_USER_EDIT_CONFIRMATION_LINK')
|
||||
.column(style='padding-bottom: 0;')
|
||||
p
|
||||
span This account hasn't been confirmed.
|
||||
span= lang('ADMIN_USER_EDIT_ACCOUNT_UNCONFIRMED')
|
||||
br
|
||||
if user.expiry > new Date().getTime()
|
||||
span= `The following link expires ${_CC.require('moment')(user.expiry).fromNow()}`
|
||||
span= lang('ADMIN_USER_EDIT_LINK_EXPIRY_FUTURE', _CC.moment(user.expiry).fromNow())
|
||||
else
|
||||
span.has-text-weight-bold(style='color: red;')= `The following link expired ${_CC.require('moment')(user.expiry).fromNow()}`
|
||||
span.has-text-weight-bold(style='color: red;')= lang('ADMIN_USER_EDIT_LINK_EXPIRY_PAST', _CC.moment(user.expiry).fromNow())
|
||||
h3(style='margin-bottom: 0; margin-top: 0;')
|
||||
.level
|
||||
.level-left
|
||||
.level-item
|
||||
form(method='POST', action=`${_CC.config.base}admin-settings/edit/refresh-signup-token/${user._id}`)
|
||||
input.button.is-rounded(type='submit', value='Generate New Link')
|
||||
input.button.is-rounded(type='submit', value=lang('ADMIN_USER_EDIT_GENERATE_NEW_LINK'))
|
||||
.level-item
|
||||
a(href=signupLink, style='font-family: monospaced; word-break: break-all;')= signupLink
|
||||
.columns
|
||||
.column.is-narrow
|
||||
h2 Change Name
|
||||
h2= lang('ADMIN_USER_EDIT_CHANGE_NAME')
|
||||
form(action=`${_CC.config.base}admin-settings/edit/rename/${user._id}`, method='POST')
|
||||
.field
|
||||
label.label Username
|
||||
label.label= lang('ADMIN_USER_EDIT_USERNAME')
|
||||
.control.has-icons-left
|
||||
input.input(type='text', name='newUsername', placeholder=user._id, value=user._id)
|
||||
span.icon.is-small.is-left
|
||||
i.fas.fa-user
|
||||
.field
|
||||
.control
|
||||
input.button.is-primary(type='submit' value='Change Username')
|
||||
input.button.is-primary(type='submit' value=lang('ADMIN_USER_EDIT_CHANGE_USERNAME'))
|
||||
.column.is-narrow
|
||||
h2 Admin
|
||||
h2= lang('ADMIN_USER_EDIT_ADMIN')
|
||||
//- Yes, ternary exists, but I think the code is cleaner with a more "naive" style :)
|
||||
//- p.is-marginless #{user._id} is #{user.admin ? '' : 'not '}an admin.
|
||||
//- vs.
|
||||
if user.admin
|
||||
p.is-marginless #{user._id} is an admin.
|
||||
p.is-marginless= lang('ADMIN_USER_EDIT_ADMIN_ISADMIN', user._id)
|
||||
form(action=`${_CC.config.base}admin-settings/edit/demote/${user._id}`, method='POST')
|
||||
.field
|
||||
.control
|
||||
if user._id === req.user._id
|
||||
input.input.button(disabled, type='submit', value=`You cannot demote yourself`, style='margin-top: 1em;')
|
||||
input.input.button(disabled, type='submit', value=lang('ADMIN_USER_EDIT_DEMOTE_SELF'), style='margin-top: 1em;')
|
||||
else
|
||||
input.input.button(type='submit', value=`Demote ${user._id}`, style='margin-top: 1em;')
|
||||
input.input.button(type='submit', value=lang('ADMIN_USER_EDIT_DEMOTE', user._id), style='margin-top: 1em;')
|
||||
else
|
||||
p.is-marginless #{user._id} is not an admin.
|
||||
p.is-marginless= lang('ADMIN_USER_EDIT_ADMIN_NOTADMIN', user._id)
|
||||
form(action=`${_CC.config.base}admin-settings/edit/promote/${user._id}`, method='POST')
|
||||
.field
|
||||
.control
|
||||
input.input.button(type='submit', value=`Promote ${user._id}`, style='margin-top: 1em;')
|
||||
input.input.button(type='submit', value=lang('ADMIN_USER_EDIT_PROMOTE', user._id), style='margin-top: 1em;')
|
||||
if user._id !== req.user._id
|
||||
.column.is-narrow
|
||||
h2 Impersonate
|
||||
h2= lang('ADMIN_USER_EDIT_IMPERSONATE_HEADER')
|
||||
form(action=`${_CC.config.base}admin-settings/edit/impersonate/${user._id}`, method='POST')
|
||||
.field
|
||||
.control
|
||||
input.input.button.is-warning(type='submit', value=`Log in as ${user._id}`, style='margin-top: 1em;')
|
||||
h2(style='margin-bottom: 1em;') Reset Password
|
||||
input.input.button.is-warning(type='submit', value=lang('ADMIN_USER_EDIT_IMPERSONATE_BUTTON', user._id), style='margin-top: 1em;')
|
||||
h2(style='margin-bottom: 1em;')= lang('ADMIN_USER_EDIT_RESET_PASSWORD_HEADER')
|
||||
if user.pwToken
|
||||
- const resetLink = `${_CC.config.base}resetpw/${user.pwToken}`
|
||||
p There is a reset password link for this user.
|
||||
p= lang('ADMIN_USER_EDIT_RESET_PASSWORD_HASLINK')
|
||||
if user.pwExpiry > new Date().getTime()
|
||||
span It expires #{_CC.require('moment')(user.pwExpiry).fromNow()}
|
||||
span= lang('ADMIN_USER_EDIT_RESET_PASSWORD_HASLINK_EXPIRY_FUTURE', _CC.moment(user.pwExpiry).fromNow())
|
||||
else
|
||||
span.has-text-weight-bold.has-text-danger It expired #{_CC.require('moment')(user.pwExpiry).fromNow()}
|
||||
span.has-text-weight-bold.has-text-danger= lang('ADMIN_USER_EDIT_RESET_PASSWORD_HASLINK_EXPIRY_PAST', _CC.moment(user.pwExpiry).fromNow())
|
||||
a(href=resetLink)= resetLink
|
||||
.columns
|
||||
.column.is-narrow
|
||||
form(method='POST', action=`${_CC.config.base}admin-settings/edit/resetpw/${user._id}`)
|
||||
.field
|
||||
.control
|
||||
input.button.is-primary(type='submit' value='Refresh Password Reset Link')
|
||||
input.button.is-primary(type='submit' value=lang('ADMIN_USER_EDIT_RESET_PASSWORD_LINK_REFRESH'))
|
||||
.column.is-narrow
|
||||
form(method='POST', action=`${_CC.config.base}admin-settings/edit/cancelresetpw/${user._id}`)
|
||||
.field
|
||||
.control
|
||||
input.button.is-info(type='submit' value='Cancel Password Reset Link')
|
||||
input.button.is-info(type='submit' value=lang('ADMIN_USER_EDIT_RESET_PASSWORD_LINK_CANCEL'))
|
||||
else
|
||||
form(method='POST', action=`${_CC.config.base}admin-settings/edit/resetpw/${user._id}`)
|
||||
.field
|
||||
.control
|
||||
input.button.is-danger(type='submit' value='Create Password Reset Link')
|
||||
input.button.is-danger(type='submit' value=lang('ADMIN_USER_EDIT_RESET_PASSWORD_LINK_CREATE'))
|
||||
.column.is-narrow
|
||||
h2 Irreversible Deletion
|
||||
h2= lang('ADMIN_USER_EDIT_DELETE_HEADER')
|
||||
form(method='POST', action=`${_CC.config.base}admin-settings/edit/remove/${user._id}`)
|
||||
.field
|
||||
.control
|
||||
if user.admin
|
||||
input.button.is-danger(disabled, type='submit' value=`User is admin`)
|
||||
input.button.is-danger(disabled, type='submit' value=lang('ADMIN_USER_EDIT_DELETE_ADMIN'))
|
||||
else
|
||||
input.button.is-danger(type='submit' value=`Remove user ${user._id}`)
|
||||
input.button.is-danger(type='submit' value=lang('ADMIN_USER_EDIT_DELETE_USER', user._id))
|
|
@ -1,30 +1,30 @@
|
|||
extends layout.pug
|
||||
|
||||
block content
|
||||
h2 Users
|
||||
h2= lang('ADMIN_SETTINGS_USERS_HEADER')
|
||||
each user in users
|
||||
span.is-size-6.inline= user.id
|
||||
a(href=`${_CC.config.base}admin-settings/edit/${user.id}`)
|
||||
span.is-size-7.icon.has-text-info
|
||||
i.fas.fa-edit
|
||||
span.is-sr-only
|
||||
| Edit
|
||||
= lang('ADMIN_SETTINGS_USERS_EDIT')
|
||||
br
|
||||
h3 Add user
|
||||
h3= lang('ADMIN_SETTINGS_USERS_ADD_HEADER')
|
||||
form(action=`${_CC.config.base}admin-settings/add`, method='POST')
|
||||
.field
|
||||
label.label Username
|
||||
label.label= lang('ADMIN_SETTINGS_USERS_ADD_USERNAME')
|
||||
.control.has-icons-left
|
||||
input.input(type='text', name='newUserUsername', placeholder='john')
|
||||
input.input(type='text', name='newUserUsername', placeholder=lang('ADMIN_SETTINGS_USERS_ADD_PLACEHOLDER'))
|
||||
span.icon.is-small.is-left
|
||||
i.fas.fa-user
|
||||
.field
|
||||
.control
|
||||
input.button.is-primary(type='submit' value='Add User')
|
||||
h3 Data Destruction
|
||||
p <b>Warning</b>: These options <b>destroy data</b>! You may want to back up the database before using these options.
|
||||
a.button.is-danger(href=`${_CC.config.base}admin-settings/clear-wishlists`) Clear Wishlists
|
||||
h3 Version Info
|
||||
input.button.is-primary(type='submit' value=lang('ADMIN_SETTINGS_USERS_ADD_BUTTON'))
|
||||
h3= lang('ADMIN_SETTINGS_CLEARDB_HEADER')
|
||||
p!= lang('ADMIN_SETTINGS_CLEARDB_DESCRIPTION')
|
||||
a.button.is-danger(href=`${_CC.config.base}admin-settings/clear-wishlists`)= lang('ADMIN_SETTINGS_CLEARDB_BUTTON')
|
||||
h3= lang('ADMIN_SETTINGS_VERSION_INFO')
|
||||
p Christmas Community: v#{_CC.package.version}
|
||||
p Get Product Data: v#{_CC.require('get-product-name/package.json').version}
|
||||
p Node: #{process.version}
|
||||
|
|
|
@ -9,26 +9,26 @@ mixin icon(c, text)
|
|||
|
||||
block title
|
||||
if doc
|
||||
h1 #{config.siteTitle} | Confirm Account
|
||||
h1= lang('CONFIRM_ACCOUNT_HEADER_VALID')
|
||||
else
|
||||
h1 #{config.siteTitle} | Confirmation Link Invalid
|
||||
h1= lang('CONFIRM_ACCOUNT_HEADER_INVALID')
|
||||
|
||||
block content
|
||||
if doc
|
||||
if doc.expiry > new Date().getTime()
|
||||
+icon('fas fa-smile-beam', `Hello ${doc._id}! Please set your password here.`)
|
||||
+icon('fas fa-smile-beam', lang('CONFIRM_ACCOUNT_SET_PW_TEXT', doc._id))
|
||||
form(method='POST')
|
||||
.field
|
||||
label.label Password
|
||||
.control.has-icons-left
|
||||
input.input(type='password', name='password', placeholder='pa$$word!')
|
||||
input.input(type='password', name='password', placeholder=lang('CONFIRM_ACCOUNT_SET_PW_PLACEHOLDER'))
|
||||
span.icon.is-small.is-left
|
||||
i.fas.fa-lock
|
||||
.field
|
||||
.control
|
||||
input.button.is-primary(type='submit' value=`Join ${_CC.config.siteTitle}`)
|
||||
input.button.is-primary(type='submit' value=lang('CONFIRM_ACCOUNT_SET_PW_BUTTON'))
|
||||
else
|
||||
+icon('fas fa-frown-open', 'Your confirmation link has expired. Please ask for a new one.')
|
||||
+icon('fas fa-frown-open', lang('CONFIRM_ACCOUNT_EXPIRED'))
|
||||
else
|
||||
+icon('fas fa-frown-open', "This confirmation link isn't valid, perhaps the account was deleted or some characters at the end got cut off?")
|
||||
+icon('fas fa-frown-open', lang('CONFIRM_ACCOUNT_INVALID'))
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@ mixin navBarLink(href, title)
|
|||
a.is-active.navbar-item(href=href)= title
|
||||
else
|
||||
a.navbar-item(href=href)= title
|
||||
|
||||
nav.navbar.is-fixed-top(role='navigation', aria-label='main navigation',style='box-shadow: 0px 0px 7px rgb(14, 15, 17);')
|
||||
.navbar-brand
|
||||
if _CC.config.base === req.path
|
||||
|
@ -22,17 +23,17 @@ nav.navbar.is-fixed-top(role='navigation', aria-label='main navigation',style='b
|
|||
if req.isAuthenticated()
|
||||
if req.user._id === 'Unknown'
|
||||
.navbar-item
|
||||
a.button.is-primary(href='/login') Log In
|
||||
a.button.is-primary(href='/login')= lang('NAVBAR_')
|
||||
else
|
||||
.navbar-item.has-dropdown.is-hoverable
|
||||
a.navbar-link= req.user._id
|
||||
.navbar-dropdown
|
||||
+navBarLink(`${_CC.config.base}wishlist/${req.user._id}`, 'My Wishlist')
|
||||
+navBarLink(`${_CC.config.base}profile`, 'Profile')
|
||||
+navBarLink(`${_CC.config.base}wishlist/${req.user._id}`, lang('NAVBAR_WISHLIST'))
|
||||
+navBarLink(`${_CC.config.base}profile`, lang('NAVBAR_PROFILE'))
|
||||
if req.user.admin
|
||||
+navBarLink(`${_CC.config.base}admin-settings`, 'Admin settings')
|
||||
+navBarLink(`${_CC.config.base}admin-settings`, lang('NAVBAR_ADMIN'))
|
||||
hr.navbar-divider
|
||||
.navbar-item
|
||||
form#logoutForm(action=`${_CC.config.base}logout`, method='POST')
|
||||
button.button.is-warning(type='submit') Log Out
|
||||
button.button.is-warning(type='submit')= lang('NAVBAR_LOGOUT')
|
||||
script(src=`${_CC.config.base}js/nav.js`)
|
||||
|
|
|
@ -2,13 +2,4 @@ if req.user && req.user.admin && _CC.updateNotice
|
|||
.columns
|
||||
.column
|
||||
.column.is-narrow
|
||||
.box
|
||||
span.has-text-danger.is-size-4.has-text-weight-bold Christmas Community is out of date. There may be new features or bug fixes. Consider updating! :)
|
||||
br
|
||||
span (you can turn this off with <code>UPDATE_CHECK=false</code>)
|
||||
br
|
||||
br
|
||||
span Current: #{_CC.updateNotice.current}
|
||||
br
|
||||
span Latest: #{_CC.updateNotice.latest}
|
||||
span.has-text-info(style='float: right;') This message is only visible to admins
|
||||
.box!= lang('UPDATE_NOTICE', _CC.updateNotice.current, _CC.updateNotice.latest)
|
|
@ -36,7 +36,7 @@ html(lang='en')
|
|||
div.container.is-marginless.fullwidth
|
||||
block title
|
||||
if title
|
||||
h1= config.siteTitle + ' - ' + title
|
||||
h1= title
|
||||
else if title !== false
|
||||
h1 #{config.siteTitle}
|
||||
include includes/messages.pug
|
||||
|
|
|
@ -3,18 +3,18 @@ extends layout.pug
|
|||
block content
|
||||
form(method='POST')
|
||||
.field
|
||||
label.label Username
|
||||
label.label= lang('LOGIN_USERNAME')
|
||||
.control.has-icons-left
|
||||
input.input(type='text', name='username', placeholder='john')
|
||||
input.input(type='text', name='username', placeholder=lang('LOGIN_USERNAME_PLACEHOLDER'))
|
||||
span.icon.is-small.is-left
|
||||
i.fas.fa-user
|
||||
.field
|
||||
label.label Password
|
||||
label.label= lang('LOGIN_PASSWORD')
|
||||
.control.has-icons-left
|
||||
input.input(type='password', name='password', placeholder='pa$$word!')
|
||||
input.input(type='password', name='password', placeholder=lang('LOGIN_PASSWORD_PLACEHOLDER'))
|
||||
span.icon.is-small.is-left
|
||||
i.fas.fa-lock
|
||||
.field
|
||||
.control
|
||||
input.button.is-primary(type='submit' value='Log In')
|
||||
input.button.is-primary(type='submit' value=lang('LOGIN_BUTTON'))
|
||||
|
||||
|
|
|
@ -4,4 +4,4 @@ block content
|
|||
form(method='POST')
|
||||
.field
|
||||
.control
|
||||
input.button.is-primary(type='submit' value='Log Out')
|
||||
input.button.is-primary(type='submit' value=lang('LOGOUT_BUTTON'))
|
|
@ -1,40 +1,40 @@
|
|||
extends layout.pug
|
||||
|
||||
block content
|
||||
a(href='..') <i class="fas fa-arrow-left"></i> Back to #{req.params.user}'s wishlist
|
||||
a(href='..') <i class="fas fa-arrow-left"></i> #{lang('NOTE_BACK', req.params.user)}
|
||||
form(id='refreshform', method='POST', action=`${_CC.config.base}wishlist/${req.params.user}/refresh/${req.params.id}`)
|
||||
form.inline(method='POST', action=`${_CC.config.base}wishlist/${req.params.user}/note/${req.params.id}`)
|
||||
.columns
|
||||
.column
|
||||
.field
|
||||
label.label Name
|
||||
label.label= lang('NOTE_NAME')
|
||||
.control
|
||||
input.input(name='name', value=item.name)
|
||||
.column
|
||||
.field
|
||||
label.label URL
|
||||
label.label= lang('NOTE_URL')
|
||||
.control
|
||||
input.input(name='url', value=item.url)
|
||||
.column
|
||||
.field
|
||||
label.label Price
|
||||
label.label= lang('NOTE_PRICE')
|
||||
.control
|
||||
input.input(name='price', value=item.price)
|
||||
.column
|
||||
.field
|
||||
label.label Image URL
|
||||
label.label= lang('NOTE_IMAGE_URL')
|
||||
.control
|
||||
input.input(name='image', value=item.image)
|
||||
.column.is-narrow
|
||||
.field
|
||||
label.label Get Product Data
|
||||
input.is-ghost.button(type='submit', value='Refresh Data' style='width: 100%;', form='refreshform')
|
||||
label.label= lang('NOTE_GET_PRODUCT_DATA')
|
||||
input.is-ghost.button(type='submit', value=lang('NOTE_REFRESH_DATA') style='width: 100%;', form='refreshform')
|
||||
.field
|
||||
label.label Note
|
||||
label.label= lang('NOTE_NOTE')
|
||||
.control
|
||||
textarea.textarea(
|
||||
name='note'
|
||||
)= item.note
|
||||
.field.inline
|
||||
.control.inline
|
||||
input.button.is-primary(type='submit' value='Save Item')
|
||||
input.button.is-primary(type='submit' value=lang('NOTE_SAVE_BUTTON'))
|
|
@ -1,21 +1,21 @@
|
|||
extends layout.pug
|
||||
|
||||
block content
|
||||
a.button(href=`${_CC.config.base}profile`) Back
|
||||
a.button(href=`${_CC.config.base}profile`)= lang('BACK_BUTTON')
|
||||
form(method='POST')
|
||||
.field
|
||||
label.label Old Password (Required if changing password)
|
||||
label.label= lang('PROFILE_PASSWORD_OLD')
|
||||
.control.has-icons-left
|
||||
input.input(type='password', name='oldPassword', placeholder='pa$$word!')
|
||||
input.input(type='password', name='oldPassword', placeholder=lang('PROFILE_PASSWORD_PLACEHOLDER'))
|
||||
span.icon.is-small.is-left
|
||||
i.fas.fa-lock
|
||||
.field
|
||||
label.label New Password (Leave blank if not changing password)
|
||||
label.label= lang('PROFILE_PASSWORD_NEW')
|
||||
.control.has-icons-left
|
||||
input.input(type='password', name='newPassword', placeholder='pa$$word!')
|
||||
input.input(type='password', name='newPassword', placeholder=lang('PROFILE_PASSWORD_PLACEHOLDER'))
|
||||
span.icon.is-small.is-left
|
||||
i.fas.fa-lock
|
||||
.field
|
||||
.control
|
||||
input.button.is-primary(type='submit' value='Save')
|
||||
input.button.is-primary(type='submit' value=lang('PROFILE_PASSWORD_BUTTON'))
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ extends layout.pug
|
|||
|
||||
block content
|
||||
if config.pfp
|
||||
h2 Profile
|
||||
h2= lang('PROFILE_HEADER')
|
||||
div(style='margin-top: 1em;')
|
||||
.columns(style='margin-top: 1em;')
|
||||
.column.is-narrow
|
||||
|
@ -17,7 +17,7 @@ block content
|
|||
br
|
||||
br
|
||||
form(action=`${_CC.config.base}profile/pfp`, method='POST')
|
||||
label.label Image URL
|
||||
label.label= lang('PROFILE_PFP_IMAGE_URL')
|
||||
.field.has-addons
|
||||
.control
|
||||
input.input(name='image', value=req.user.pfp)
|
||||
|
@ -25,8 +25,8 @@ block content
|
|||
button.button.is-primary(type='submit')
|
||||
span.icon
|
||||
i.fas.fa-save
|
||||
h2 Security
|
||||
h2= lang('PROFILE_SECURITY')
|
||||
a.button.is-primary(href=`${_CC.config.base}profile/password`)
|
||||
span.icon
|
||||
i.fas.fa-shield-alt
|
||||
span Change Password
|
||||
span= lang('PROFILE_SECURITY_CHANGE_PASSWORD')
|
||||
|
|
|
@ -9,26 +9,26 @@ mixin icon(c, text)
|
|||
|
||||
block title
|
||||
if doc
|
||||
h1 #{config.siteTitle} | Reset Password
|
||||
h1= lang('RESET_PASSWORD_HEADER_VALID')
|
||||
else
|
||||
h1 #{config.siteTitle} | Reset Link Invalid
|
||||
h1= lang('RESET_PASSWORD_HEADER_INVALID')
|
||||
|
||||
block content
|
||||
if doc
|
||||
if doc.pwExpiry > new Date().getTime()
|
||||
+icon('fas fa-smile-beam', `Hello ${doc._id}! Please set your password here.`)
|
||||
+icon('fas fa-smile-beam', lang('RESET_PASSWORD_GREETING_VALID', doc._id))
|
||||
form(method='POST')
|
||||
.field
|
||||
label.label Password
|
||||
label.label= lang('RESET_PASSWORD_PASSWORD')
|
||||
.control.has-icons-left
|
||||
input.input(type='password', name='password', placeholder='pa$$word!')
|
||||
input.input(type='password', name='password', placeholder=lang('RESET_PASSWORD_PASSWORD_PLACEHOLDER'))
|
||||
span.icon.is-small.is-left
|
||||
i.fas.fa-lock
|
||||
.field
|
||||
.control
|
||||
input.button.is-primary(type='submit' value=`Reset Password`)
|
||||
else
|
||||
+icon('fas fa-frown-open', 'Your reset link has expired. Please ask for a new one.')
|
||||
+icon('fas fa-frown-open', lang('RESET_PASSWORD_GREETING_EXPIRED'))
|
||||
else
|
||||
+icon('fas fa-frown-open', "This reset link isn't valid, perhaps the link was canceled or some characters at the end got cut off?")
|
||||
+icon('fas fa-frown-open', lang('RESET_PASSWORD_INVALID'))
|
||||
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
extends layout.pug
|
||||
|
||||
block content
|
||||
h2 Admin User
|
||||
h2= lang('SETUP_ADMIN_USER')
|
||||
form(action=`${_CC.config.base}setup`, method='POST')
|
||||
.field
|
||||
label.label Username
|
||||
label.label= lang('SETUP_USERNAME')
|
||||
.control.has-icons-left
|
||||
input.input(type='text', name='adminUsername', placeholder='john')
|
||||
input.input(type='text', name='adminUsername', placeholder=lang('SETUP_USERNAME_PLACEHOLDER'))
|
||||
span.icon.is-small.is-left
|
||||
i.fas.fa-user
|
||||
.field
|
||||
label.label Password
|
||||
label.label= lang('SETUP_PASSWORD')
|
||||
.control.has-icons-left
|
||||
input.input(type='password', name='adminPassword', placeholder='pa$$word!')
|
||||
input.input(type='password', name='adminPassword', placeholder=lang('SETUP_PASSWORD_PLACEHOLDER'))
|
||||
span.icon.is-small.is-left
|
||||
i.fas.fa-lock
|
||||
.field
|
||||
.control
|
||||
input.button.is-primary(type='submit' value='Set up!')
|
||||
input.button.is-primary(type='submit' value=lang('SETUP_BUTTON'))
|
|
@ -3,8 +3,8 @@ extends layout.pug
|
|||
block content
|
||||
if req.headers.referer
|
||||
span.is-size-3(style='margin-top: 0; padding-top: 0;')
|
||||
a(href=req.headers.referer) < Back
|
||||
a(href=req.headers.referer) < #{lang('BACK_BUTTON')}
|
||||
ul
|
||||
for site of _CC.require('get-product-name').sites
|
||||
li= site.name
|
||||
p Is a site missing or broken? Open an issue <a href="https://gitlab.com/wingysam/get-product-name/-/issues/new">here</a>! :)
|
||||
p!= lang('SUPPORTED_SITES_TEXT')
|
|
@ -9,7 +9,7 @@ block title
|
|||
span.icon
|
||||
i.fas.fa-sync-alt
|
||||
.level-item
|
||||
span #{config.siteTitle} - #{title}
|
||||
span= lang('WISHLIST_TITLE', name)
|
||||
|
||||
block content
|
||||
script(type='data/user_id')= req.user._id
|
||||
|
@ -18,19 +18,19 @@ block content
|
|||
table.table.has-mobile-cards
|
||||
thead
|
||||
th #
|
||||
th(style='width: 15%;') Image
|
||||
th(style='width: 25%;') Name
|
||||
th(style='width: 50%;') Note
|
||||
th(style='width: 10%;') Price
|
||||
th Edit Item
|
||||
th Added By
|
||||
th(style='width: 15%;')= lang('WISHLIST_IMAGE')
|
||||
th(style='width: 25%;')= lang('WISHLIST_NAME')
|
||||
th(style='width: 50%;')= lang('WISHLIST_NOTE')
|
||||
th(style='width: 10%;')= lang('WISHLIST_PRICE')
|
||||
th= lang('WISHLIST_EDIT_ITEM')
|
||||
th= lang('WISHLIST_ADDED_BY')
|
||||
if req.params.user === req.user._id
|
||||
th Move Top
|
||||
th Move Up
|
||||
th Move Down
|
||||
th= lang('WISHLIST_MOVE_TOP')
|
||||
th= lang('WISHLIST_MOVE_UP')
|
||||
th= lang('WISHLIST_MOVE_DOWN')
|
||||
else
|
||||
th Pledge
|
||||
th Delete
|
||||
th= lang('WISHLIST_PLEDGE')
|
||||
th= lang('WIDHLIST_DELETE')
|
||||
tbody
|
||||
each item, index in wishlist
|
||||
if req.user._id === item.addedBy || req.params.user !== req.user._id
|
||||
|
@ -47,14 +47,14 @@ block content
|
|||
target='_blank'
|
||||
)= (item.name ? item.name : item.url)
|
||||
else
|
||||
td.ugc(data-label='Name')= item.name
|
||||
td.ugc(data-label=lang('WISHLIST_NAME'))= item.name
|
||||
if _CC.config.wishlist.note.markdown
|
||||
td.ugc(data-label='Note')
|
||||
td.ugc(data-label=lang('WISHLIST_NOTE'))
|
||||
div!= item.note
|
||||
else
|
||||
td.ugc(data-label='Note')= item.note
|
||||
td.ugc(data-label='Price')= item.price
|
||||
td(data-label='Edit Item')
|
||||
td.ugc(data-label=lang('WISHLIST_NOTE'))= item.note
|
||||
td.ugc(data-label=lang('WISHLIST_PRICE'))= item.price
|
||||
td(data-label=lang('WISHLIST_EDIT_ITEM'))
|
||||
form.inline(method='GET', action=`${_CC.config.base}wishlist/${req.params.user}/note/${item.id}`)
|
||||
.field.inline
|
||||
.control.inline
|
||||
|
@ -65,9 +65,9 @@ block content
|
|||
)
|
||||
span.icon
|
||||
i.far.fa-edit
|
||||
td.ugc(data-label='Added By')= item.addedBy
|
||||
td.ugc(data-label=lang('WISHLIST_ADDED_BY'))= item.addedBy
|
||||
if req.params.user === req.user._id
|
||||
td(data-label='Move Item Top')
|
||||
td(data-label=lang('WISHLIST_MOVE_ITEM_TOP'))
|
||||
form.topForm.inline(method='POST', action=`${_CC.config.base}wishlist/${req.params.user}/move/top/${item.id}`)
|
||||
.field.inline
|
||||
.control.inline
|
||||
|
@ -78,7 +78,7 @@ block content
|
|||
)
|
||||
span.icon
|
||||
i.fas.fa-angle-double-up
|
||||
td(data-label='Move Item Up')
|
||||
td(data-label=lang('WISHLIST_MOVE_ITEM_UP'))
|
||||
form.upForm.inline(method='POST', action=`${_CC.config.base}wishlist/${req.params.user}/move/up/${item.id}`)
|
||||
.field.inline
|
||||
.control.inline
|
||||
|
@ -89,7 +89,7 @@ block content
|
|||
)
|
||||
span.icon
|
||||
i.fas.fa-arrow-up
|
||||
td(data-label='Move Item Down')
|
||||
td(data-label=lang('WISHLIST_MOVE_ITEM_DOWN'))
|
||||
form.downForm.inline(method='POST', action=`${_CC.config.base}wishlist/${req.params.user}/move/down/${item.id}`)
|
||||
.field.inline
|
||||
.control.inline
|
||||
|
@ -101,7 +101,7 @@ block content
|
|||
span.icon
|
||||
i.fas.fa-arrow-down
|
||||
else
|
||||
td(data-label='Pledge')
|
||||
td(data-label=lang('WISHLIST_PLEDGE'))
|
||||
if req.params.user !== req.user._id && !item.pledgedBy
|
||||
form.inline(method='POST', action=`${_CC.config.base}wishlist/${req.params.user}/pledge/${item.id}`)
|
||||
.field.inline
|
||||
|
@ -113,7 +113,7 @@ block content
|
|||
.control.inline
|
||||
input.inline.button(type='submit' value='Unpledge')
|
||||
if item.pledgedBy && item.pledgedBy !== req.user._id
|
||||
span.ugc Pledged for by #{item.pledgedBy}
|
||||
span.ugc=lang('WISHLIST_PLEDGED', item.pledgedBy)
|
||||
td(data-label='Delete Item')
|
||||
form.inline(
|
||||
method='POST',
|
||||
|
@ -161,60 +161,60 @@ block content
|
|||
style='height: 100%;'
|
||||
readonly
|
||||
)= item.note
|
||||
span.overflowWrap Added by: #{item.addedBy}
|
||||
span.overflowWrap=lang('WISHLIST_ADDED_BY', item.addedBy)
|
||||
hr
|
||||
div
|
||||
if req.params.user !== req.user._id && !item.pledgedBy
|
||||
form.inline(method='POST', action=`${_CC.config.base}wishlist/${req.params.user}/pledge/${item.id}`)
|
||||
.field.inline
|
||||
.control.inline
|
||||
input.inline.button.is-primary(type='submit' value='Pledge')
|
||||
input.inline.button.is-primary(type='submit' value=lang('WISHLIST_PLEDGE'))
|
||||
if item.pledgedBy === req.user._id
|
||||
form.inline(method='POST', action=`${_CC.config.base}wishlist/${req.params.user}/unpledge/${item.id}`)
|
||||
.field.inline
|
||||
.control.inline
|
||||
input.inline.button(type='submit' value='Unpledge')
|
||||
input.inline.button(type='submit' value=lang('WISHLIST_UNPLEDGE'))
|
||||
if req.user._id === req.params.user
|
||||
form.inline(method='POST', action=`${_CC.config.base}wishlist/${req.params.user}/remove/${item.id}`)
|
||||
.field.inline
|
||||
.control.inline
|
||||
input.inline.button.is-warning(type='submit' value='Remove')
|
||||
input.inline.button.is-warning(type='submit' value=lang('WISHLIST_DELETE'))
|
||||
if req.user._id === req.params.user || req.user._id === item.addedBy
|
||||
form.inline(method='GET', action=`${_CC.config.base}wishlist/${req.params.user}/note/${item.id}`)
|
||||
.field.inline
|
||||
.control.inline
|
||||
input.inline.button(type='submit', value='Edit item')
|
||||
input.inline.button(type='submit', value=lang('WISHLIST_EDIT_ITEM'))
|
||||
if index !== firstCanSee && req.user._id === req.params.user
|
||||
form.inline(method='POST', action=`${_CC.config.base}wishlist/${req.params.user}/move/up/${item.id}`)
|
||||
.field.inline
|
||||
.control.inline
|
||||
input.inline.button(type='submit' value='Move item up')
|
||||
input.inline.button(type='submit' value=lang('WISHLIST_MOVE_ITEM_UP'))
|
||||
if index !== lastCanSee && req.user._id === req.params.user
|
||||
form.inline(method='POST', action=`${_CC.config.base}wishlist/${req.params.user}/move/down/${item.id}`)
|
||||
.field.inline
|
||||
.control.inline
|
||||
input.inline.button(type='submit' value='Move item down')
|
||||
input.inline.button(type='submit' value=lang('WISHLIST_MOVE_ITEM_DOWN'))
|
||||
form(method='POST')
|
||||
.field
|
||||
label.label Item URL or Name (<a href="/supported-sites">Supported Sites</a>)
|
||||
label.label!=lang('WISHLIST_URL_LABEL')
|
||||
.control.has-icons-left
|
||||
input.input(
|
||||
type='text',
|
||||
name='itemUrlOrName',
|
||||
placeholder='https://www.amazon.com/dp/B00ZV9RDKK'
|
||||
placeholder=lang('WISHLIST_URL_PLACEHOLDER')
|
||||
)
|
||||
span.icon.is-small.is-left
|
||||
i.fas.fa-gift
|
||||
.field
|
||||
label.label Note
|
||||
label.label= lang('WISHLIST_NOTE')
|
||||
.control
|
||||
textarea.textarea(
|
||||
name='note',
|
||||
placeholder='Optional'
|
||||
placeholder=lang('WISHLIST_OPTIONAL')
|
||||
)
|
||||
.field
|
||||
.control
|
||||
input.button(type='submit' value=(req.user._id === req.params.user ? 'Add item to wishlist' : 'Pledge item'))
|
||||
input.button(type='submit' value=(req.user._id === req.params.user ? lang('WISHLIST_ADD') : lang('WISHLIST_PLEDGE_ITEM')))
|
||||
script(src=`${_CC.config.base}js/wishlist.js`)
|
||||
|
||||
block print
|
||||
|
|
|
@ -12,8 +12,8 @@ block content
|
|||
figure.image.is-square.is-fullwidth.is-marginless(style='display: inline-block;')
|
||||
img.is-rounded.is-fullwidth(src=req.user.pfp, style='object-fit: cover;')
|
||||
.column
|
||||
span=req.user._id
|
||||
span : ???/???
|
||||
span
|
||||
span=lang('WISHLISTS_COUNTS_SELF', req.user._id)
|
||||
progress.progress(value=1, max=1)
|
||||
each user in users
|
||||
if req.user._id !== user.id
|
||||
|
@ -26,6 +26,5 @@ block content
|
|||
figure.image.is-square.is-fullwidth.is-marginless(style='display: inline-block;')
|
||||
img.is-rounded.is-fullwidth(src=user.doc.pfp, style='object-fit: cover;')
|
||||
.column
|
||||
span= user.id
|
||||
span : #{totals(user.doc.wishlist).pledged}/#{user.doc.wishlist.length}
|
||||
span= lang('WISHLISTS_COUNTS', user.id, totals(user.doc.wishlist).pledged, user.doc.wishlist.length)
|
||||
progress.progress.is-info(value=totals(user.doc.wishlist).pledged, max=user.doc.wishlist.length)
|
Loading…
Add table
Add a link
Reference in a new issue