feat: strikeout pledged items (#107)

* strikeout pledged items

* strikethrough in legacy card mode

* added by user fix in card view

* add strike through for non url items

* make wishlish name language specific

* only strike when not your list
This commit is contained in:
Christopher Blake 2023-12-05 12:57:22 -04:00 committed by GitHub
parent 84961b11f7
commit 34667b28d1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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