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:
parent
84961b11f7
commit
34667b28d1
1 changed files with 39 additions and 14 deletions
|
@ -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')
|
||||
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
|
||||
td.ugc(data-label=lang('WISHLIST_NAME'))= item.name
|
||||
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
|
||||
if _CC.config.wishlist.note.markdown
|
||||
td.ugc(data-label=lang('WISHLIST_NOTE'))
|
||||
div!= item.note
|
||||
|
@ -143,11 +156,23 @@ 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)
|
||||
else
|
||||
if item.pledgedBy
|
||||
strike
|
||||
span= item.name
|
||||
else
|
||||
span= item.name
|
||||
hr
|
||||
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue