Compare commits

..

No commits in common. "castro_dec2023" and "castro" have entirely different histories.

17 changed files with 28 additions and 263 deletions

View file

@ -1,4 +1,4 @@
FROM node:20-alpine
FROM node:15-alpine
RUN apk --no-cache add curl

View file

@ -49,10 +49,6 @@ services:
# (for weddings, birthdays, etc. only the admin account's list is accessible)
# Set to 'true' to enable
SINGLE_LIST: 'false'
# Some websites (like walmart) send headers that are larger than 8MB in
# length. If issues are encountered, set the node.js limit to a higher
# number than 8192
#NODE_OPTIONS: "--max-http-header-size=32768"
restart: always
```
@ -97,9 +93,6 @@ UPDATE_CHECK=true
PFP=true
# Language of the interface, options listed in `languages` directory
LANGUAGE=en-US
# Password to enter guest mode,
# e.g. https://wishes.example.com?pw=ReplaceWithYourGuestPassword
# GUEST_PASSWORD=ReplaceWithYourGuestPassword
## Wishlist Settings
# Set to true to not allow users to have their own lists. You may want this for a birthday or wedding.

View file

@ -25,7 +25,3 @@ module.exports = {
}
if (module.exports.guestPassword) module.exports.wishlist.public = false
if (module.exports.guestPassword === 'ReplaceWithYourGuestPassword') {
console.error('Error: Guest password should be changed from default.')
process.exit(1)
}

View file

@ -98,7 +98,6 @@ app.use((req, res, next) => {
})
app.use(require('body-parser').urlencoded({ extended: true }))
app.use(require('cookie-parser')());
app.use(session({
secret: config.secret,
resave: false,
@ -109,16 +108,6 @@ app.use(session({
},
name: 'christmas_community.connect.sid'
}))
app.use((req, res, next) => {
let basepath = req.path.substring(0, req.path.lastIndexOf("/"));
// Clear cookies for paths that are not the base path. See #17
if(basepath.length > config.base.length) {
res.clearCookie('christmas_community.connect.sid', {path: req.path});
res.clearCookie('christmas_community.connect.sid', {path: basepath});
}
next();
});
app.use(flash())
app.use(passport.initialize())
app.use(passport.session())

View file

@ -125,7 +125,7 @@ module.exports.strings = {
SETUP_USERNAME_PLACEHOLDER: 'Martin',
SETUP_USERNAME: 'Uživatelské jméno',
SUPPORTED_SITES_HEADER: 'Podporované obchody',
SUPPORTED_SITES_TEXT: 'Nefunguje obchod nebo úplně chybí? Založ nový ticket <a href="https://github.com/Wingysam/get-product-data/issues/new">ZDE</a>! :)',
SUPPORTED_SITES_TEXT: 'Nefunguje obchod nebo úplně chybí? Založ nový ticket <a href="https://gitlab.com/wingysam/get-product-name/-/issues/new">ZDE</a>! :)',
UPDATE_NOTICE: (current, latest) => `
<span class="has-text-danger is-size-4 has-text-weight-bold">
Nepoužíváte poslední verzi Christmas Community. V nové verzi mohou být nové funkce nebo opravy chyb. Zvžte aktualizaci :)

View file

@ -125,7 +125,7 @@ module.exports.strings = {
SETUP_USERNAME_PLACEHOLDER: 'john',
SETUP_USERNAME: 'Brugernavn',
SUPPORTED_SITES_HEADER: 'Supporterede hjemmesider',
SUPPORTED_SITES_TEXT: 'Is a site missing or broken? Open an issue <a href="https://github.com/Wingysam/get-product-data/issues/new">here</a>! :)',
SUPPORTED_SITES_TEXT: 'Is a site missing or broken? Open an issue <a href="https://gitlab.com/wingysam/get-product-name/-/issues/new">here</a>! :)',
UPDATE_NOTICE: (current, latest) => `
<span class="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! :)

View file

@ -125,7 +125,7 @@ module.exports.strings = {
SETUP_USERNAME_PLACEHOLDER: 'john',
SETUP_USERNAME: 'Nutzername',
SUPPORTED_SITES_HEADER: 'Unterstützte Seiten',
SUPPORTED_SITES_TEXT: 'Fehlt eine Seite oder ist etwas defekt? Eröffne <a href="https://github.com/Wingysam/get-product-data/issues/new">hier</a> ein Issue! :)',
SUPPORTED_SITES_TEXT: 'Fehlt eine Seite oder ist etwas defekt? Eröffne <a href="https://gitlab.com/wingysam/get-product-name/-/issues/new">hier</a> ein Issue! :)',
UPDATE_NOTICE: (current, latest) => `
<span class="has-text-danger is-size-4 has-text-weight-bold">
Christmas Community ist veraltet. Möglicherweise gibt es neue Funktionen oder Fehler wurden beseitigt. Mach' am besten ein Update! :)

View file

@ -124,8 +124,8 @@ module.exports.strings = {
SETUP_PASSWORD: 'Password',
SETUP_USERNAME_PLACEHOLDER: 'john',
SETUP_USERNAME: 'Username',
SUPPORTED_SITES_HEADER: 'Supported Sites',
SUPPORTED_SITES_TEXT: 'Is a site missing or broken? Open an issue <a href="https://github.com/Wingysam/get-product-data/issues/new">here</a>! :)',
SUPPORTED_SITES_HEADER: 'Working Sites',
SUPPORTED_SITES_TEXT: 'You can still add items from other sites, but it can\'t autopopulate the information, so do that yourself.',
UPDATE_NOTICE: (current, latest) => `
<span class="has-text-danger is-size-4 has-text-weight-bold">
New version available! There may be new features or bug fixes. Consider updating! :)

View file

@ -125,7 +125,7 @@ module.exports.strings = {
SETUP_USERNAME_PLACEHOLDER: 'juan',
SETUP_USERNAME: 'Nombre de usuario',
SUPPORTED_SITES_HEADER: 'Sitios web compatibles',
SUPPORTED_SITES_TEXT: '¿Hay un sitio ausente o roto? Abra una propuesta <a href="https://github.com/Wingysam/get-product-data/issues/new">aquí</a>! :)',
SUPPORTED_SITES_TEXT: '¿Hay un sitio ausente o roto? Abra una propuesta <a href="https://gitlab.com/wingysam/get-product-name/-/issues/new">aquí</a>! :)',
UPDATE_NOTICE: (current, latest) => `
<span class="has-text-danger is-size-4 has-text-weight-bold">
Christmas Community es desactualizado. Puede haber nuevas functiones o correcciones. ¡Considera actualizar! :)

View file

@ -124,7 +124,7 @@ module.exports.strings = {
SETUP_USERNAME_PLACEHOLDER: 'félix',
SETUP_USERNAME: 'Nom d\'utilisateur',
SUPPORTED_SITES_HEADER: 'Sites pris en charge',
SUPPORTED_SITES_TEXT: 'Un site est-il manquant ou cassé? Reporter un problème <a href="https://github.com/Wingysam/get-product-data/issues/new">here</a>! :)',
SUPPORTED_SITES_TEXT: 'Un site est-il manquant ou cassé? Reporter un problème <a href="https://gitlab.com/wingysam/get-product-name/-/issues/new">here</a>! :)',
UPDATE_NOTICE: (current, latest) => `
<span class="has-text-danger is-size-4 has-text-weight-bold">
Christmas Community est obsolète. Il peut y avoir de nouvelles fonctionnalités ou des corrections de bugs. Pensez à mettre à jour! :)

View file

@ -125,7 +125,7 @@ module.exports.strings = {
SETUP_USERNAME_PLACEHOLDER: 'jean',
SETUP_USERNAME: "Nom d'utilisateur",
SUPPORTED_SITES_HEADER: 'Sites supportés',
SUPPORTED_SITES_TEXT: 'Un site est-il manquant ou cassé? Ouvrir une issue <a href="https://github.com/Wingysam/get-product-data/issues/new">here</a>! :)',
SUPPORTED_SITES_TEXT: 'Un site est-il manquant ou cassé? Ouvrir une issue <a href="https://gitlab.com/wingysam/get-product-name/-/issues/new">here</a>! :)',
UPDATE_NOTICE: (current, latest) => `
<span class="has-text-danger is-size-4 has-text-weight-bold">
Christmas Community est obsolète. Il peut y avoir de nouvelles fonctionnalités ou des corrections de bugs. Pensez à mettre à jour! :)

View file

@ -1,187 +0,0 @@
module.exports.momentLocale = 'nb'
module.exports.strings = {
_NOT_LOCALIZED: key => `${key} har ikke blitt oversatt til norsk enda.`,
ADMIN_CLEAR_WISHLISTS_BUTTON: 'Tøm alle ønskelister',
ADMIN_CLEAR_WISHLISTS_DESCRIPTION: 'Dette vil umiddelbart og irreversibelt <b>slette alle ønskelister!</b> Vurder å ta en sikkerhetskopi av databasen før du bruker dette.',
ADMIN_CLEAR_WISHLISTS_HEADER: 'Sletting av ønskelister',
ADMIN_SETTINGS_CLEARDB_BUTTON: 'Tøm ønskelister',
ADMIN_SETTINGS_CLEARDB_DESCRIPTION: '<b>Advarsel</b>: Disse alternativene <b>ødelegger data</b>! Du bør ta en sikkerhetskopi av databasen før du bruker disse alternativene.',
ADMIN_SETTINGS_CLEARDB_HEADER: 'Dataødeleggelse',
ADMIN_SETTINGS_CLEARDB_SUCCESS: 'Alle ønskelister ble tømt.',
ADMIN_SETTINGS_HEADER: 'Administratorinnstillinger',
ADMIN_SETTINGS_USERS_ADD_BUTTON: 'Legg til bruker',
ADMIN_SETTINGS_USERS_ADD_HEADER: 'Legg til bruker',
ADMIN_SETTINGS_USERS_ADD_PLACEHOLDER: 'Ola',
ADMIN_SETTINGS_USERS_ADD_USERNAME: 'Brukernavn',
ADMIN_SETTINGS_USERS_ADD_ERROR_USERNAME_EMPTY: 'Brukernavn kan ikke være tomt.',
ADMIN_SETTINGS_USERS_EDIT_DELETE_FAIL_ADMIN: 'Kunne ikke fjerne: bruker er administrator.',
ADMIN_SETTINGS_USERS_EDIT_DELETE_SUCCESS: name => `Brukeren ${name} ble fjernet.`,
ADMIN_SETTINGS_USERS_EDIT_DEMOTE_NOT_ADMIN: 'brukeren er ikke en administrator',
ADMIN_SETTINGS_USERS_EDIT_DEMOTE_SELF: 'Du kan ikke nedgradere egen konto.',
ADMIN_SETTINGS_USERS_EDIT_DEMOTE_SUCCESS: name => `${name} er ikke lengre en administrator.`,
ADMIN_SETTINGS_USERS_EDIT_IMPERSONATE_SUCCESS: name => `Du er nå ${name}.`,
ADMIN_SETTINGS_USERS_EDIT_NO_USERNAME_PROVIDED: 'Ingen brukernavn oppgitt',
ADMIN_SETTINGS_USERS_EDIT_PROMOTE_ALREADY_ADMIN: 'brukeren er allerede administrator',
ADMIN_SETTINGS_USERS_EDIT_PROMOTE_DEMOTE_NOT_FOUND: 'Brukeren ble ikke funnet.',
ADMIN_SETTINGS_USERS_EDIT_PROMOTE_SUCCESS: name => `${name} er nå en administrator.`,
ADMIN_SETTINGS_USERS_EDIT_RENAMED_USER: 'Brukeren er omdøpt!',
ADMIN_SETTINGS_USERS_EDIT_SAME_NAME: 'Brukernavnet er det samme som det nye brukernavnet.',
ADMIN_SETTINGS_USERS_EDIT: 'Rediger',
ADMIN_SETTINGS_USERS_HEADER: 'Brukere',
ADMIN_SETTINGS_VERSION_INFO: 'Versjonsinfo',
ADMIN_USER_EDIT_ACCOUNT_UNCONFIRMED: "Denne kontoen er ikke bekreftet.",
ADMIN_USER_EDIT_ADMIN_ISADMIN: name => `${name} er en administrator.`,
ADMIN_USER_EDIT_ADMIN_NOTADMIN: name => `${name} er ikke en administrator.`,
ADMIN_USER_EDIT_ADMIN: 'Administrator',
ADMIN_USER_EDIT_CHANGE_NAME: 'Endre navn',
ADMIN_USER_EDIT_CHANGE_USERNAME: 'Endre brukernavn',
ADMIN_USER_EDIT_CONFIRMATION_LINK: 'Bekreftelseslenke',
ADMIN_USER_EDIT_DELETE_ADMIN: 'Brukeren er administrator',
ADMIN_USER_EDIT_DELETE_HEADER: 'Irreversibel sletting',
ADMIN_USER_EDIT_DELETE_USER: name => `Fjern bruker ${name}`,
ADMIN_USER_EDIT_DEMOTE_SELF: 'Du kan ikke nedgradere deg selv',
ADMIN_USER_EDIT_DEMOTE: name => `Nedgrader ${name}`,
ADMIN_USER_EDIT_EDITING_USER: name => `Redigerer bruker "${name}"`,
ADMIN_USER_EDIT_GENERATE_NEW_LINK: 'Generer ny lenke',
ADMIN_USER_EDIT_IMPERSONATE_BUTTON: name => `Logg inn som ${name}`,
ADMIN_USER_EDIT_IMPERSONATE_HEADER: 'Logg inn som',
ADMIN_USER_EDIT_LINK_EXPIRY_FUTURE: fromNow => `Følgende lenke utløper ${fromNow}`, // fromNow is localized by moment
ADMIN_USER_EDIT_LINK_EXPIRY_PAST: fromNow => `Følgende lenke utløp ${fromNow}`,
ADMIN_USER_EDIT_PROMOTE: name => `Promoter ${name}`,
ADMIN_USER_EDIT_RESET_PASSWORD_HASLINK_EXPIRY_FUTURE: fromNow => `Den utløper ${fromNow}`,
ADMIN_USER_EDIT_RESET_PASSWORD_HASLINK_EXPIRY_PAST: fromNow => `Den utløp ${fromNow}`,
ADMIN_USER_EDIT_RESET_PASSWORD_HASLINK: 'Det finnes en gjennopprettingslenke for denne brukeren.',
ADMIN_USER_EDIT_RESET_PASSWORD_HEADER: 'Nullstill passord',
ADMIN_USER_EDIT_RESET_PASSWORD_LINK_CANCEL: 'Slett gjennopprettingslenke',
ADMIN_USER_EDIT_RESET_PASSWORD_LINK_CREATE: 'Opprett gjennopprettingslenke',
ADMIN_USER_EDIT_RESET_PASSWORD_LINK_REFRESH: 'Oppdater gjennopprettingslenke',
ADMIN_USER_EDIT_USERNAME: 'Brukernavn',
BACK_BUTTON: 'Tilbake',
CONFIRM_ACCOUNT_EXPIRED: 'Din gjenopprettingslenke er utløpt. Vennligst be om en ny.',
CONFIRM_ACCOUNT_HEADER_INVALID: `${_CC.config.siteTitle} | Ugyldig bekreftelseslenke`,
CONFIRM_ACCOUNT_HEADER_VALID: `${_CC.config.siteTitle} | Bekreft konto`,
CONFIRM_ACCOUNT_INVALID: "Denne bekreftelseslenken er ugyldig. Kanskje er den slettet, eller det mangler tegn på slutten av den?",
CONFIRM_ACCOUNT_SET_PW_BUTTON: `Bli medlem av ${_CC.config.siteTitle}`,
CONFIRM_ACCOUNT_SET_PW_PLACEHOLDER: 'pa$$ord!',
CONFIRM_ACCOUNT_SET_PW_TEXT: name => `Hei, ${name}! Vennligst sett ditt passord her.`,
CONFIRM_ACCOUNT_SUCCESS: `Velkommen til ${_CC.config.siteTitle}!`,
LOGIN_BUTTON: 'Logg inn',
LOGIN_PASSWORD_PLACEHOLDER: 'pa$$ord!',
LOGIN_PASSWORD: 'Passord',
LOGIN_USERNAME_PLACEHOLDER: 'Ola',
LOGIN_USERNAME: 'Brukernavn',
LOGOUT_BUTTON: 'Logg ut',
NAVBAR_ADMIN: 'Administratorinnstillinger',
NAVBAR_LOGIN: 'Logg inn',
NAVBAR_LOGOUT: 'Logg ut',
NAVBAR_PROFILE: 'Profil',
NAVBAR_WISHLIST: 'Min ønskeliste',
NOTE_BACK: name => `Tilbake til ${name}s ønskeliste`,
NOTE_GET_PRODUCT_DATA: 'Hent produktdata',
NOTE_GUARD: 'Ugyldig bruker',
NOTE_IMAGE_URL: 'Bildelenke',
NOTE_MISSING_PROP: prop => `Mangler egenskap ${prop}`, // not really possible to localize this unfortunately
NOTE_NAME: 'Navn',
NOTE_NOTE: 'Notat',
NOTE_PRICE: 'Pris',
NOTE_REFRESH_DATA: 'Oppdater data',
NOTE_REMOVE_GUARD: 'Ugyldig bruker',
NOTE_REMOVE_MISSING: 'Har ingen notater',
NOTE_REMOVE_SUCCESS: 'Notatet ble fjernet',
NOTE_SAVE_BUTTON: 'Lagre element',
NOTE_SUCCESS: 'Lagret!',
NOTE_URL: 'Lenke',
PROFILE_HEADER: 'Profil',
PROFILE_PASSWORD_BUTTON: 'Lagre',
PROFILE_PASSWORD_NEW: 'Nytt passord',
PROFILE_PASSWORD_OLD_MISMATCH: 'Feil gammelt passord',
PROFILE_PASSWORD_OLD: 'Nytt passord',
PROFILE_PASSWORD_PLACEHOLDER: 'pa$$ord!',
PROFILE_PASSWORD_REQUIRED_NEW: 'Nytt passord er påkrevd',
PROFILE_PASSWORD_REQUIRED_OLD: 'Gammelt passord er påkrevd',
PROFILE_PASSWORD_SUCCESS: 'Endringer ble lagret!',
PROFILE_PASSWORD_TITLE: name => `Profilinnstillinger - Passord - ${name}`,
PROFILE_PFP_IMAGE_URL: 'Bildelenke',
PROFILE_SAVE_PFP_DISABLED: 'Profilbilder er deaktivert.',
PROFILE_SAVE_PFP_SUCCESS: 'Profilbilde ble lagret!',
PROFILE_SECURITY_CHANGE_PASSWORD: 'Endre passord',
PROFILE_SECURITY: 'Sikkerhet',
PROFILE_TITLE: name => `Profilinnstillinger - ${name}`,
RESET_PASSWORD_BUTTON: 'Tilbakestill passord',
RESET_PASSWORD_GREETING_EXPIRED: 'Din gjenopprettingslenke er utløpt. Vennligst be om en ny.',
RESET_PASSWORD_GREETING_INVALID: "Denne gjenopprettingslenken er ugyldig. Kanskje er den slettet, eller det mangler tegn på slutten av den?",
RESET_PASSWORD_GREETING_VALID: name => `Hei, ${name}! Vennligst sett ditt passord her.`,
RESET_PASSWORD_HEADER_INVALID: `${_CC.config.siteTitle} | Ugyldig gjenopprettingslenke`,
RESET_PASSWORD_HEADER_VALID: `${_CC.config.siteTitle} | Nullstill passord`,
RESET_PASSWORD_PASSWORD_PLACEHOLDER: 'pa$$ord!',
RESET_PASSWORD_PASSWORD: 'Passord',
RESET_PASSWORD_SUCCESS: 'Passordet ble nullstilt!',
SETUP_ADMIN_USER: 'Administratorbruker',
SETUP_BUTTON: 'Konfigurer!',
SETUP_HEADER: 'Konfigurasjon',
SETUP_PASSWORD_PLACEHOLDER: 'pa$$ord!',
SETUP_PASSWORD: 'Passord',
SETUP_USERNAME_PLACEHOLDER: 'Ola',
SETUP_USERNAME: 'Brukernavn',
SUPPORTED_SITES_HEADER: 'Støttede nettsteder',
SUPPORTED_SITES_TEXT: 'Mangler en nettsted, eller har problemer? Skriv en feilrapport <a href="https://gitlab.com/wingysam/get-product-name/-/issues/new">her</a>! :)',
UPDATE_NOTICE: (current, latest) => `
<span class="has-text-danger is-size-4 has-text-weight-bold">
Christmas Community er utdatert. Det kan være nye funksjoner og feilrettinger. Vurder å oppdatere! :)
</span>
<br>
<span>(du kan deaktivere dette med <code>UPDATE_CHECK=false</code>)</span>
<br><br>
<span>Gjeldende: ${current}</span>
<br>
<span>Siste: ${latest}</span>
<span class="has-text-info" style="float: right;">Denne meldingen er kun synlig for administratorer</span>`,
WISHLIST_ADD: 'Legg til element i ønskelisten',
WISHLIST_ADDED_BY_USER: addedBy => `Lagt til av: ${addedBy}`,
WISHLIST_ADDED_BY: 'Lagt til av',
WISHLIST_ADDED_ITEM_TO_OWN_WISHLIST: 'Elementet ble lagt til i ønskelisten.',
WISHLIST_CONFLICT: 'Elementer blir lagt til for fort. Vennligst prøv igjen.',
WISHLIST_DELETE: 'Slett',
WISHLIST_EDIT_ITEM: 'Rediger element',
WISHLIST_FETCH_FAIL: 'Kunne ikke hente ønskeliste -- eksisterer brukeren?',
WISHLIST_IMAGE: 'Bilde',
WISHLIST_ITEM_MISSING: 'Element ikke funnet',
WISHLIST_MOVE_DOWN: 'Flytt ned',
WISHLIST_MOVE_GUARD: 'Feil bruker',
WISHLIST_MOVE_INVALID: 'Ugyldig bevegelse',
WISHLIST_MOVE_ITEM_DOWN: 'Flytt element ned',
WISHLIST_MOVE_ITEM_TOP: 'Flytt element til toppen',
WISHLIST_MOVE_ITEM_UP: 'Flytt element opp',
WISHLIST_MOVE_SUCCESS: 'Elementet ble flyttet!',
WISHLIST_MOVE_TOP: 'Flytt til toppen',
WISHLIST_MOVE_UNKNOWN_DIRECTION: 'Ukjent retning',
WISHLIST_MOVE_UP: 'Flytt opp',
WISHLIST_NAME: 'Navn',
WISHLIST_NOTE: 'Notat',
WISHLIST_OPTIONAL: 'Valgfritt',
WISHLIST_PLEDGE_DUPLICATE: 'Elementet er allerede reservert',
WISHLIST_PLEDGE_ITEM: 'Reserver element',
WISHLIST_PLEDGE_SUCCESS: 'Elementet ble reservert!',
WISHLIST_PLEDGE: 'Reserver',
WISHLIST_PLEDGED: pledgedBy => `Reservert av ${pledgedBy}`,
WISHLIST_PLEDGED_GUEST: 'Reservert av gjestebruker',
WISHLIST_PLEDGED_ITEM_FOR_USER: user => `Reserverte elementet for ${user}.`,
WISHLIST_PRICE: 'Pris',
WISHLIST_REFRESH_GUARD: 'Ugyldig bruker',
WISHLIST_REFRESH_NO_URL: 'Elementet har ingen lenke.',
WISHLIST_REFRESH_SUCCESS: 'Data ble oppdatert!',
WISHLIST_REMOVE_GUARD: 'Feil bruker',
WISHLIST_REMOVE_SUCCESS: 'Fjernet fra ønskeliste',
WISHLIST_SUGGEST: 'Foreslå element',
WISHLIST_TITLE: name => `${_CC.config.siteTitle} - Ønskeliste - ${name}`,
WISHLIST_UNPLEDGE_GUARD: 'Du har ikke reservert dette elementet', // should never happen unless someone makes their own http requests
WISHLIST_UNPLEDGE_SUCCESS: 'Reservasjonen for elementet ble trukket!',
WISHLIST_UNPLEDGE: 'Trekk reservasjon',
WISHLIST_URL_LABEL: `Elementlenke eller navn (<a href="${_CC.config.base}supported-sites">Støttede nettsteder</a>)`,
WISHLIST_URL_PLACEHOLDER: 'https://www.amazon.com/dp/B00ZV9RDKK',
WISHLIST_URL_REQUIRED: 'Elementlenke eller navn er påkrevd',
WISHLISTS_COUNTS_SELF: name => `${name}: ???/???`,
WISHLISTS_COUNTS: (name, pledged, total) => `${name}: ${pledged}/${total}`,
WISHLISTS_TITLE: `${_CC.config.siteTitle} - Ønskeliste`
}

View file

@ -125,7 +125,7 @@ module.exports.strings = {
SETUP_USERNAME_PLACEHOLDER: 'henk',
SETUP_USERNAME: 'Gebruikersnaam',
SUPPORTED_SITES_HEADER: 'Ondersteunde sites',
SUPPORTED_SITES_TEXT: 'Ontbreekt er een website of is er een kapot? Open een issue <a href="https://github.com/Wingysam/get-product-data/issues/new">hier</a>! :)',
SUPPORTED_SITES_TEXT: 'Ontbreekt er een website of is er een kapot? Open een issue <a href="https://gitlab.com/wingysam/get-product-name/-/issues/new">hier</a>! :)',
UPDATE_NOTICE: (current, latest) => `
<span class="has-text-danger is-size-4 has-text-weight-bold">
Christmas Community is niet meer up to date. Misschien zijn er nieuwe functies of bugfixes. Overweeg om te updaten :)

View file

@ -125,7 +125,7 @@ module.exports.strings = {
SETUP_USERNAME_PLACEHOLDER: 'ion',
SETUP_USERNAME: 'Nume de utilizator',
SUPPORTED_SITES_HEADER: 'Site-uri suportate',
SUPPORTED_SITES_TEXT: 'Este vreun site care lipsește sau nu funcționează corect? Sesizați problema <a href="https://github.com/Wingysam/get-product-data/issues/new">aici</a>! :)',
SUPPORTED_SITES_TEXT: 'Este vreun site care lipsește sau nu funcționează corect? Sesizați problema <a href="https://gitlab.com/wingysam/get-product-name/-/issues/new">aici</a>! :)',
UPDATE_NOTICE: (current, latest) => `
<span class="has-text-danger is-size-4 has-text-weight-bold">
Folosiți o versiune învechită a Christmas Community. Este posibil se fi adăugat noi funcții și rezolvat erori. Este recomandată actualizarea! :)

View file

@ -29,6 +29,7 @@ module.exports = ({ db, config }) => {
const router = express.Router()
router.use('/', express.static(path.join(__dirname, '../static')))
router.use(require('cookie-parser')())
router.get('/',
async (req, res, next) => {

View file

@ -161,8 +161,6 @@ class Wishlist {
}
const productData = await getProductData(item.url)
if (!productData) return; // short-circuit when there's no data
for (const key of ['name', 'price', 'image']) {
if (productData[key]) item[key] = productData[key]
}

View file

@ -39,27 +39,14 @@ block content
figure(style='width: 100%; margin: 0;')
img(src=item.image, style='width: 100%; max-height: 20em; object-fit: contain;')
if item.url
td.ugc(data-label=lang('WISHLIST_NAME'))
if item.pledgedBy && item.addedBy != req.user._id
strike
a(
href=item.url,
rel='noopener noreferrer',
target='_blank'
)= (item.name ? item.name : item.url)
else
a(
href=item.url,
rel='noopener noreferrer',
target='_blank'
)= (item.name ? item.name : item.url)
else
td.ugc(data-label='Name')
if item.pledgedBy
strike
span= item.name
else
span= item.name
a(
href=item.url,
rel='noopener noreferrer',
target='_blank'
)= (item.name ? item.name : item.url)
else
td.ugc(data-label=lang('WISHLIST_NAME'))= item.name
if _CC.config.wishlist.note.markdown
td.ugc(data-label=lang('WISHLIST_NOTE'))
div!= item.note
@ -156,25 +143,13 @@ block content
if item.price
span= ' '
if item.url
if item.pledgedBy && item.addedBy != req.user._id
strike
a(
href=item.url,
rel='noopener noreferrer',
target='_blank'
)= (item.name ? item.name : item.url)
else
a(
href=item.url,
rel='noopener noreferrer',
target='_blank'
)= (item.name ? item.name : item.url)
a(
href=item.url,
rel='noopener noreferrer',
target='_blank'
)= (item.name ? item.name : item.url)
else
if item.pledgedBy
strike
span= item.name
else
span= item.name
span= item.name
hr
if item.note || item.image
.columns
@ -188,7 +163,7 @@ block content
style='height: 100%;'
readonly
)= item.note
span.overflowWrap=lang('WISHLIST_ADDED_BY_USER', item.addedBy)
span.overflowWrap=lang('WISHLIST_ADDED_BY', item.addedBy)
hr
div
if req.params.user !== req.user._id && !item.pledgedBy