mirror of https://gitlab.com/bashrc2/epicyon
Tidying
parent
e6be96c492
commit
38c1d68816
|
@ -396,36 +396,42 @@ def _getAnnounceIconHtml(nickname: str, domainFull: str,
|
||||||
"""Returns html for announce icon/button
|
"""Returns html for announce icon/button
|
||||||
"""
|
"""
|
||||||
announceStr = ''
|
announceStr = ''
|
||||||
if not isModerationPost and showRepeatIcon:
|
|
||||||
# don't allow announce/repeat of your own posts
|
if not showRepeatIcon:
|
||||||
announceIcon = 'repeat_inactive.png'
|
return announceStr
|
||||||
announceLink = 'repeat'
|
|
||||||
announceEmoji = ''
|
if isModerationPost:
|
||||||
|
return announceStr
|
||||||
|
|
||||||
|
# don't allow announce/repeat of your own posts
|
||||||
|
announceIcon = 'repeat_inactive.png'
|
||||||
|
announceLink = 'repeat'
|
||||||
|
announceEmoji = ''
|
||||||
|
if not isPublicRepeat:
|
||||||
|
announceLink = 'repeatprivate'
|
||||||
|
announceTitle = translate['Repeat this post']
|
||||||
|
|
||||||
|
if announcedByPerson(postJsonObject, nickname, domainFull):
|
||||||
|
announceIcon = 'repeat.png'
|
||||||
|
announceEmoji = '🔁 '
|
||||||
|
announceLink = 'unrepeat'
|
||||||
if not isPublicRepeat:
|
if not isPublicRepeat:
|
||||||
announceLink = 'repeatprivate'
|
announceLink = 'unrepeatprivate'
|
||||||
announceTitle = translate['Repeat this post']
|
announceTitle = translate['Undo the repeat']
|
||||||
|
|
||||||
if announcedByPerson(postJsonObject, nickname, domainFull):
|
announceStr = \
|
||||||
announceIcon = 'repeat.png'
|
' <a class="imageAnchor" href="/users/' + \
|
||||||
announceEmoji = '🔁 '
|
nickname + '?' + announceLink + \
|
||||||
announceLink = 'unrepeat'
|
'=' + postJsonObject['object']['id'] + pageNumberParam + \
|
||||||
if not isPublicRepeat:
|
'?actor=' + postJsonObject['actor'] + \
|
||||||
announceLink = 'unrepeatprivate'
|
'?bm=' + timelinePostBookmark + \
|
||||||
announceTitle = translate['Undo the repeat']
|
'?tl=' + boxName + '" title="' + announceTitle + '">\n'
|
||||||
|
|
||||||
announceStr = \
|
announceStr += \
|
||||||
' <a class="imageAnchor" href="/users/' + \
|
' ' + \
|
||||||
nickname + '?' + announceLink + \
|
'<img loading="lazy" title="' + translate['Repeat this post'] + \
|
||||||
'=' + postJsonObject['object']['id'] + pageNumberParam + \
|
'" alt="' + announceEmoji + translate['Repeat this post'] + \
|
||||||
'?actor=' + postJsonObject['actor'] + \
|
' |" src="/icons/' + announceIcon + '"/></a>\n'
|
||||||
'?bm=' + timelinePostBookmark + \
|
|
||||||
'?tl=' + boxName + '" title="' + announceTitle + '">\n'
|
|
||||||
|
|
||||||
announceStr += \
|
|
||||||
' ' + \
|
|
||||||
'<img loading="lazy" title="' + translate['Repeat this post'] + \
|
|
||||||
'" alt="' + announceEmoji + translate['Repeat this post'] + \
|
|
||||||
' |" src="/icons/' + announceIcon + '"/></a>\n'
|
|
||||||
return announceStr
|
return announceStr
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue