mirror of https://gitlab.com/bashrc2/epicyon
Support for contentMap when creating html posts
parent
9daac007f7
commit
e3e1716f1f
72
daemon.py
72
daemon.py
|
@ -2867,7 +2867,8 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.showPublishedDateOnly,
|
||||
self.server.peertubeInstances,
|
||||
self.server.allowLocalNetworkAccess,
|
||||
self.server.themeName)
|
||||
self.server.themeName,
|
||||
self.server.systemLanguage)
|
||||
if hashtagStr:
|
||||
msg = hashtagStr.encode('utf-8')
|
||||
msglen = len(msg)
|
||||
|
@ -2921,7 +2922,8 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.showPublishedDateOnly,
|
||||
self.server.peertubeInstances,
|
||||
self.server.allowLocalNetworkAccess,
|
||||
self.server.themeName, 'outbox')
|
||||
self.server.themeName, 'outbox',
|
||||
self.server.systemLanguage)
|
||||
if historyStr:
|
||||
msg = historyStr.encode('utf-8')
|
||||
msglen = len(msg)
|
||||
|
@ -2955,7 +2957,8 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.showPublishedDateOnly,
|
||||
self.server.peertubeInstances,
|
||||
self.server.allowLocalNetworkAccess,
|
||||
self.server.themeName, 'bookmarks')
|
||||
self.server.themeName, 'bookmarks',
|
||||
self.server.systemLanguage)
|
||||
if bookmarksStr:
|
||||
msg = bookmarksStr.encode('utf-8')
|
||||
msglen = len(msg)
|
||||
|
@ -3049,7 +3052,8 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.peertubeInstances,
|
||||
allowLocalNetworkAccess,
|
||||
self.server.themeName,
|
||||
accessKeys)
|
||||
accessKeys,
|
||||
self.server.systemLanguage)
|
||||
if profileStr:
|
||||
msg = profileStr.encode('utf-8')
|
||||
msglen = len(msg)
|
||||
|
@ -6173,7 +6177,8 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.showPublishedDateOnly,
|
||||
self.server.peertubeInstances,
|
||||
self.server.allowLocalNetworkAccess,
|
||||
self.server.themeName)
|
||||
self.server.themeName,
|
||||
self.server.systemLanguage)
|
||||
if hashtagStr:
|
||||
msg = hashtagStr.encode('utf-8')
|
||||
msglen = len(msg)
|
||||
|
@ -7113,7 +7118,8 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.showPublishedDateOnly,
|
||||
self.server.peertubeInstances,
|
||||
self.server.allowLocalNetworkAccess,
|
||||
self.server.themeName)
|
||||
self.server.themeName,
|
||||
self.server.systemLanguage)
|
||||
if deleteStr:
|
||||
deleteStrLen = len(deleteStr)
|
||||
self._set_headers('text/html', deleteStrLen,
|
||||
|
@ -7321,7 +7327,8 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.showPublishedDateOnly,
|
||||
peertubeInstances,
|
||||
self.server.allowLocalNetworkAccess,
|
||||
self.server.themeName)
|
||||
self.server.themeName,
|
||||
self.server.systemLanguage)
|
||||
msg = msg.encode('utf-8')
|
||||
msglen = len(msg)
|
||||
self._set_headers('text/html', msglen,
|
||||
|
@ -7409,7 +7416,8 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.showPublishedDateOnly,
|
||||
peertubeInstances,
|
||||
self.server.allowLocalNetworkAccess,
|
||||
self.server.themeName)
|
||||
self.server.themeName,
|
||||
self.server.systemLanguage)
|
||||
msg = msg.encode('utf-8')
|
||||
msglen = len(msg)
|
||||
self._set_headers('text/html', msglen,
|
||||
|
@ -7507,7 +7515,9 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.allowLocalNetworkAccess,
|
||||
self.server.textModeBanner,
|
||||
self.server.debug,
|
||||
accessKeys, city, rolesList,
|
||||
accessKeys, city,
|
||||
self.server.systemLanguage,
|
||||
rolesList,
|
||||
None, None)
|
||||
msg = msg.encode('utf-8')
|
||||
msglen = len(msg)
|
||||
|
@ -7605,7 +7615,9 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
allowLocalNetworkAccess,
|
||||
self.server.textModeBanner,
|
||||
self.server.debug,
|
||||
accessKeys, city, skills,
|
||||
accessKeys, city,
|
||||
self.server.systemLanguage,
|
||||
skills,
|
||||
None, None)
|
||||
msg = msg.encode('utf-8')
|
||||
msglen = len(msg)
|
||||
|
@ -7738,7 +7750,8 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.showPublishedDateOnly,
|
||||
self.server.peertubeInstances,
|
||||
self.server.allowLocalNetworkAccess,
|
||||
self.server.themeName)
|
||||
self.server.themeName,
|
||||
self.server.systemLanguage)
|
||||
msg = msg.encode('utf-8')
|
||||
msglen = len(msg)
|
||||
self._set_headers('text/html', msglen,
|
||||
|
@ -7947,7 +7960,8 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.peertubeInstances,
|
||||
self.server.allowLocalNetworkAccess,
|
||||
self.server.textModeBanner,
|
||||
accessKeys)
|
||||
accessKeys,
|
||||
self.server.systemLanguage)
|
||||
if GETstartTime:
|
||||
self._benchmarkGETtimings(GETstartTime, GETtimings,
|
||||
'show status done',
|
||||
|
@ -8083,7 +8097,8 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.peertubeInstances,
|
||||
self.server.allowLocalNetworkAccess,
|
||||
self.server.textModeBanner,
|
||||
accessKeys)
|
||||
accessKeys,
|
||||
self.server.systemLanguage)
|
||||
msg = msg.encode('utf-8')
|
||||
msglen = len(msg)
|
||||
self._set_headers('text/html', msglen,
|
||||
|
@ -8212,7 +8227,8 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.peertubeInstances,
|
||||
self.server.allowLocalNetworkAccess,
|
||||
self.server.textModeBanner,
|
||||
accessKeys)
|
||||
accessKeys,
|
||||
self.server.systemLanguage)
|
||||
msg = msg.encode('utf-8')
|
||||
msglen = len(msg)
|
||||
self._set_headers('text/html', msglen,
|
||||
|
@ -8342,7 +8358,8 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.peertubeInstances,
|
||||
self.server.allowLocalNetworkAccess,
|
||||
self.server.textModeBanner,
|
||||
accessKeys)
|
||||
accessKeys,
|
||||
self.server.systemLanguage)
|
||||
msg = msg.encode('utf-8')
|
||||
msglen = len(msg)
|
||||
self._set_headers('text/html', msglen,
|
||||
|
@ -8472,7 +8489,8 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.peertubeInstances,
|
||||
self.server.allowLocalNetworkAccess,
|
||||
self.server.textModeBanner,
|
||||
accessKeys)
|
||||
accessKeys,
|
||||
self.server.systemLanguage)
|
||||
msg = msg.encode('utf-8')
|
||||
msglen = len(msg)
|
||||
self._set_headers('text/html', msglen,
|
||||
|
@ -8611,7 +8629,8 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.peertubeInstances,
|
||||
self.server.allowLocalNetworkAccess,
|
||||
self.server.textModeBanner,
|
||||
accessKeys)
|
||||
accessKeys,
|
||||
self.server.systemLanguage)
|
||||
msg = msg.encode('utf-8')
|
||||
msglen = len(msg)
|
||||
self._set_headers('text/html', msglen,
|
||||
|
@ -8746,7 +8765,8 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.peertubeInstances,
|
||||
self.server.allowLocalNetworkAccess,
|
||||
self.server.textModeBanner,
|
||||
accessKeys)
|
||||
accessKeys,
|
||||
self.server.systemLanguage)
|
||||
msg = msg.encode('utf-8')
|
||||
msglen = len(msg)
|
||||
self._set_headers('text/html', msglen,
|
||||
|
@ -8842,7 +8862,8 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.peertubeInstances,
|
||||
self.server.allowLocalNetworkAccess,
|
||||
self.server.textModeBanner,
|
||||
accessKeys)
|
||||
accessKeys,
|
||||
self.server.systemLanguage)
|
||||
msg = msg.encode('utf-8')
|
||||
msglen = len(msg)
|
||||
self._set_headers('text/html', msglen,
|
||||
|
@ -8955,7 +8976,8 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.peertubeInstances,
|
||||
self.server.allowLocalNetworkAccess,
|
||||
self.server.textModeBanner,
|
||||
accessKeys)
|
||||
accessKeys,
|
||||
self.server.systemLanguage)
|
||||
msg = msg.encode('utf-8')
|
||||
msglen = len(msg)
|
||||
self._set_headers('text/html', msglen,
|
||||
|
@ -9081,7 +9103,8 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.peertubeInstances,
|
||||
self.server.allowLocalNetworkAccess,
|
||||
self.server.textModeBanner,
|
||||
accessKeys)
|
||||
accessKeys,
|
||||
self.server.systemLanguage)
|
||||
msg = msg.encode('utf-8')
|
||||
msglen = len(msg)
|
||||
self._set_headers('text/html', msglen,
|
||||
|
@ -9196,7 +9219,8 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.peertubeInstances,
|
||||
self.server.allowLocalNetworkAccess,
|
||||
self.server.textModeBanner,
|
||||
accessKeys)
|
||||
accessKeys,
|
||||
self.server.systemLanguage)
|
||||
msg = msg.encode('utf-8')
|
||||
msglen = len(msg)
|
||||
self._set_headers('text/html', msglen,
|
||||
|
@ -9312,6 +9336,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.textModeBanner,
|
||||
self.server.debug,
|
||||
accessKeys, city,
|
||||
self.server.systemLanguage,
|
||||
shares,
|
||||
pageNumber, sharesPerPage)
|
||||
msg = msg.encode('utf-8')
|
||||
|
@ -9425,6 +9450,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.textModeBanner,
|
||||
self.server.debug,
|
||||
accessKeys, city,
|
||||
self.server.systemLanguage,
|
||||
following,
|
||||
pageNumber,
|
||||
followsPerPage).encode('utf-8')
|
||||
|
@ -9538,6 +9564,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.textModeBanner,
|
||||
self.server.debug,
|
||||
accessKeys, city,
|
||||
self.server.systemLanguage,
|
||||
followers,
|
||||
pageNumber,
|
||||
followsPerPage).encode('utf-8')
|
||||
|
@ -9674,6 +9701,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.textModeBanner,
|
||||
self.server.debug,
|
||||
accessKeys, city,
|
||||
self.server.systemLanguage,
|
||||
None, None).encode('utf-8')
|
||||
msglen = len(msg)
|
||||
self._set_headers('text/html', msglen,
|
||||
|
|
6
inbox.py
6
inbox.py
|
@ -164,7 +164,7 @@ def _inboxStorePostToHtmlCache(recentPostsCache: {}, maxRecentPosts: int,
|
|||
showPublishedDateOnly: bool,
|
||||
peertubeInstances: [],
|
||||
allowLocalNetworkAccess: bool,
|
||||
themeName: str) -> None:
|
||||
themeName: str, systemLanguage: str) -> None:
|
||||
"""Converts the json post into html and stores it in a cache
|
||||
This enables the post to be quickly displayed later
|
||||
"""
|
||||
|
@ -182,7 +182,7 @@ def _inboxStorePostToHtmlCache(recentPostsCache: {}, maxRecentPosts: int,
|
|||
httpPrefix, __version__, boxname, None,
|
||||
showPublishedDateOnly,
|
||||
peertubeInstances, allowLocalNetworkAccess,
|
||||
themeName,
|
||||
themeName, systemLanguage,
|
||||
not isDM(postJsonObject),
|
||||
True, True, False, True)
|
||||
|
||||
|
@ -2593,7 +2593,7 @@ def _inboxAfterInitial(recentPostsCache: {}, maxRecentPosts: int,
|
|||
showPublishedDateOnly,
|
||||
peertubeInstances,
|
||||
allowLocalNetworkAccess,
|
||||
themeName)
|
||||
themeName, systemLanguage)
|
||||
if debug:
|
||||
timeDiff = \
|
||||
str(int((time.time() - htmlCacheStartTime) *
|
||||
|
|
17
utils.py
17
utils.py
|
@ -28,6 +28,23 @@ invalidCharacters = (
|
|||
)
|
||||
|
||||
|
||||
def getContentFromPost(postJsonObject: {}, systemLanguage: str) -> str:
|
||||
"""Returns the content from the post in the given language
|
||||
"""
|
||||
thisPostJson = postJsonObject
|
||||
if hasObjectDict(postJsonObject):
|
||||
thisPostJson = postJsonObject['object']
|
||||
if not thisPostJson.get('content'):
|
||||
return ''
|
||||
content = thisPostJson['content']
|
||||
if thisPostJson.get('contentMap'):
|
||||
if isinstance(thisPostJson['contentMap'], dict):
|
||||
if thisPostJson['contentMap'].get(systemLanguage):
|
||||
if isinstance(thisPostJson['contentMap'][systemLanguage], str):
|
||||
return thisPostJson['contentMap'][systemLanguage]
|
||||
return content
|
||||
|
||||
|
||||
def acctDir(baseDir: str, nickname: str, domain: str) -> str:
|
||||
return baseDir + '/accounts/' + nickname + '@' + domain
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ def htmlConfirmDelete(cssCache: {},
|
|||
showPublishedDateOnly: bool,
|
||||
peertubeInstances: [],
|
||||
allowLocalNetworkAccess: bool,
|
||||
themeName: str) -> str:
|
||||
themeName: str, systemLanguage: str) -> str:
|
||||
"""Shows a screen asking to confirm the deletion of a post
|
||||
"""
|
||||
if '/statuses/' not in messageId:
|
||||
|
@ -75,7 +75,7 @@ def htmlConfirmDelete(cssCache: {},
|
|||
YTReplacementDomain,
|
||||
showPublishedDateOnly,
|
||||
peertubeInstances, allowLocalNetworkAccess,
|
||||
themeName,
|
||||
themeName, systemLanguage,
|
||||
False, False, False, False, False)
|
||||
deletePostStr += '<center>'
|
||||
deletePostStr += \
|
||||
|
|
|
@ -32,7 +32,7 @@ def _htmlFrontScreenPosts(recentPostsCache: {}, maxRecentPosts: int,
|
|||
showPublishedDateOnly: bool,
|
||||
peertubeInstances: [],
|
||||
allowLocalNetworkAccess: bool,
|
||||
themeName: str) -> str:
|
||||
themeName: str, systemLanguage: str) -> str:
|
||||
"""Shows posts on the front screen of a news instance
|
||||
These should only be public blog posts from the features timeline
|
||||
which is the blog timeline of the news actor
|
||||
|
@ -73,7 +73,7 @@ def _htmlFrontScreenPosts(recentPostsCache: {}, maxRecentPosts: int,
|
|||
showPublishedDateOnly,
|
||||
peertubeInstances,
|
||||
allowLocalNetworkAccess,
|
||||
themeName,
|
||||
themeName, systemLanguage,
|
||||
False, False, False, True, False)
|
||||
if postStr:
|
||||
profileStr += postStr + separatorStr
|
||||
|
@ -98,6 +98,7 @@ def htmlFrontScreen(rssIconAtTop: bool,
|
|||
peertubeInstances: [],
|
||||
allowLocalNetworkAccess: bool,
|
||||
accessKeys: {},
|
||||
systemLanguage: str,
|
||||
extraJson: {} = None,
|
||||
pageNumber: int = None,
|
||||
maxItemsPerPage: int = None) -> str:
|
||||
|
@ -167,7 +168,7 @@ def htmlFrontScreen(rssIconAtTop: bool,
|
|||
showPublishedDateOnly,
|
||||
peertubeInstances,
|
||||
allowLocalNetworkAccess,
|
||||
theme) + licenseStr
|
||||
theme, systemLanguage) + licenseStr
|
||||
|
||||
# Footer which is only used for system accounts
|
||||
profileFooterStr = ' </td>\n'
|
||||
|
|
|
@ -47,7 +47,7 @@ def htmlModeration(cssCache: {}, defaultTimeline: str,
|
|||
theme: str, peertubeInstances: [],
|
||||
allowLocalNetworkAccess: bool,
|
||||
textModeBanner: str,
|
||||
accessKeys: {}) -> str:
|
||||
accessKeys: {}, systemLanguage: str) -> str:
|
||||
"""Show the moderation feed as html
|
||||
This is what you see when selecting the "mod" timeline
|
||||
"""
|
||||
|
@ -63,7 +63,7 @@ def htmlModeration(cssCache: {}, defaultTimeline: str,
|
|||
iconsAsButtons, rssIconAtTop, publishButtonAtTop,
|
||||
authorized, moderationActionStr, theme,
|
||||
peertubeInstances, allowLocalNetworkAccess,
|
||||
textModeBanner, accessKeys)
|
||||
textModeBanner, accessKeys, systemLanguage)
|
||||
|
||||
|
||||
def htmlAccountInfo(cssCache: {}, translate: {},
|
||||
|
|
|
@ -22,6 +22,7 @@ from posts import postIsMuted
|
|||
from posts import getPersonBox
|
||||
from posts import downloadAnnounce
|
||||
from posts import populateRepliesJson
|
||||
from utils import getContentFromPost
|
||||
from utils import hasObjectDict
|
||||
from utils import updateAnnounceCollection
|
||||
from utils import isPGPEncrypted
|
||||
|
@ -273,7 +274,7 @@ def _getAvatarImageHtml(showAvatarOptions: bool,
|
|||
def _getReplyIconHtml(nickname: str, isPublicRepeat: bool,
|
||||
showIcons: bool, commentsEnabled: bool,
|
||||
postJsonObject: {}, pageNumberParam: str,
|
||||
translate: {}) -> str:
|
||||
translate: {}, systemLanguage: str) -> str:
|
||||
"""Returns html for the reply icon/button
|
||||
"""
|
||||
replyStr = ''
|
||||
|
@ -286,9 +287,9 @@ def _getReplyIconHtml(nickname: str, isPublicRepeat: bool,
|
|||
if isinstance(postJsonObject['object']['attributedTo'], str):
|
||||
replyToLink += \
|
||||
'?mention=' + postJsonObject['object']['attributedTo']
|
||||
if postJsonObject['object'].get('content'):
|
||||
mentionedActors = \
|
||||
getMentionsFromHtml(postJsonObject['object']['content'])
|
||||
content = getContentFromPost(postJsonObject, systemLanguage)
|
||||
if content:
|
||||
mentionedActors = getMentionsFromHtml(content)
|
||||
if mentionedActors:
|
||||
for actorUrl in mentionedActors:
|
||||
if '?mention=' + actorUrl not in replyToLink:
|
||||
|
@ -1160,7 +1161,7 @@ def individualPostAsHtml(allowDownloads: bool,
|
|||
showPublishedDateOnly: bool,
|
||||
peertubeInstances: [],
|
||||
allowLocalNetworkAccess: bool,
|
||||
themeName: str,
|
||||
themeName: str, systemLanguage: str,
|
||||
showRepeats: bool = True,
|
||||
showIcons: bool = False,
|
||||
manuallyApprovesFollowers: bool = False,
|
||||
|
@ -1410,7 +1411,7 @@ def individualPostAsHtml(allowDownloads: bool,
|
|||
replyStr = _getReplyIconHtml(nickname, isPublicRepeat,
|
||||
showIcons, commentsEnabled,
|
||||
postJsonObject, pageNumberParam,
|
||||
translate)
|
||||
translate, systemLanguage)
|
||||
|
||||
_logPostTiming(enableTimingLog, postStartTime, '10')
|
||||
|
||||
|
@ -1588,20 +1589,21 @@ def individualPostAsHtml(allowDownloads: bool,
|
|||
postJsonObject['object']['content'] = \
|
||||
E2EEdecryptMessageFromDevice(postJsonObject['object'])
|
||||
|
||||
if not postJsonObject['object'].get('content'):
|
||||
contentStr = getContentFromPost(postJsonObject, systemLanguage)
|
||||
if not contentStr:
|
||||
return ''
|
||||
|
||||
isPatch = isGitPatch(baseDir, nickname, domain,
|
||||
postJsonObject['object']['type'],
|
||||
postJsonObject['object']['summary'],
|
||||
postJsonObject['object']['content'])
|
||||
contentStr)
|
||||
|
||||
_logPostTiming(enableTimingLog, postStartTime, '16')
|
||||
|
||||
if not isPGPEncrypted(postJsonObject['object']['content']):
|
||||
if not isPGPEncrypted(contentStr):
|
||||
if not isPatch:
|
||||
objectContent = \
|
||||
removeLongWords(postJsonObject['object']['content'], 40, [])
|
||||
removeLongWords(contentStr, 40, [])
|
||||
objectContent = removeTextFormatting(objectContent)
|
||||
objectContent = limitRepeatedWords(objectContent, 6)
|
||||
objectContent = \
|
||||
|
@ -1609,8 +1611,7 @@ def individualPostAsHtml(allowDownloads: bool,
|
|||
objectContent = htmlReplaceEmailQuote(objectContent)
|
||||
objectContent = htmlReplaceQuoteMarks(objectContent)
|
||||
else:
|
||||
objectContent = \
|
||||
postJsonObject['object']['content']
|
||||
objectContent = contentStr
|
||||
else:
|
||||
objectContent = '🔒 ' + translate['Encrypted']
|
||||
|
||||
|
@ -1719,7 +1720,7 @@ def htmlIndividualPost(cssCache: {},
|
|||
showPublishedDateOnly: bool,
|
||||
peertubeInstances: [],
|
||||
allowLocalNetworkAccess: bool,
|
||||
themeName: str) -> str:
|
||||
themeName: str, systemLanguage: str) -> str:
|
||||
"""Show an individual post as html
|
||||
"""
|
||||
postStr = ''
|
||||
|
@ -1761,6 +1762,7 @@ def htmlIndividualPost(cssCache: {},
|
|||
showPublishedDateOnly,
|
||||
peertubeInstances,
|
||||
allowLocalNetworkAccess, themeName,
|
||||
systemLanguage,
|
||||
False, authorized, False, False, False)
|
||||
messageId = removeIdEnding(postJsonObject['id'])
|
||||
|
||||
|
@ -1788,7 +1790,7 @@ def htmlIndividualPost(cssCache: {},
|
|||
showPublishedDateOnly,
|
||||
peertubeInstances,
|
||||
allowLocalNetworkAccess,
|
||||
themeName,
|
||||
themeName, systemLanguage,
|
||||
False, authorized,
|
||||
False, False, False) + postStr
|
||||
|
||||
|
@ -1819,7 +1821,7 @@ def htmlIndividualPost(cssCache: {},
|
|||
showPublishedDateOnly,
|
||||
peertubeInstances,
|
||||
allowLocalNetworkAccess,
|
||||
themeName,
|
||||
themeName, systemLanguage,
|
||||
False, authorized,
|
||||
False, False, False)
|
||||
cssFilename = baseDir + '/epicyon-profile.css'
|
||||
|
@ -1842,7 +1844,7 @@ def htmlPostReplies(cssCache: {},
|
|||
showPublishedDateOnly: bool,
|
||||
peertubeInstances: [],
|
||||
allowLocalNetworkAccess: bool,
|
||||
themeName: str) -> str:
|
||||
themeName: str, systemLanguage: str) -> str:
|
||||
"""Show the replies to an individual post as html
|
||||
"""
|
||||
repliesStr = ''
|
||||
|
@ -1861,7 +1863,7 @@ def htmlPostReplies(cssCache: {},
|
|||
showPublishedDateOnly,
|
||||
peertubeInstances,
|
||||
allowLocalNetworkAccess,
|
||||
themeName,
|
||||
themeName, systemLanguage,
|
||||
False, False, False, False, False)
|
||||
|
||||
cssFilename = baseDir + '/epicyon-profile.css'
|
||||
|
|
|
@ -73,7 +73,8 @@ def htmlProfileAfterSearch(cssCache: {},
|
|||
peertubeInstances: [],
|
||||
allowLocalNetworkAccess: bool,
|
||||
themeName: str,
|
||||
accessKeys: {}) -> str:
|
||||
accessKeys: {},
|
||||
systemLanguage: str) -> str:
|
||||
"""Show a profile page after a search for a fediverse address
|
||||
"""
|
||||
http = False
|
||||
|
@ -246,7 +247,7 @@ def htmlProfileAfterSearch(cssCache: {},
|
|||
YTReplacementDomain,
|
||||
showPublishedDateOnly,
|
||||
peertubeInstances, allowLocalNetworkAccess,
|
||||
themeName,
|
||||
themeName, systemLanguage,
|
||||
False, False, False, False, False)
|
||||
i += 1
|
||||
if i >= 20:
|
||||
|
@ -447,6 +448,7 @@ def htmlProfile(rssIconAtTop: bool,
|
|||
allowLocalNetworkAccess: bool,
|
||||
textModeBanner: str,
|
||||
debug: bool, accessKeys: {}, city: str,
|
||||
systemLanguage: str,
|
||||
extraJson: {} = None, pageNumber: int = None,
|
||||
maxItemsPerPage: int = None) -> str:
|
||||
"""Show the profile page as html
|
||||
|
@ -467,6 +469,7 @@ def htmlProfile(rssIconAtTop: bool,
|
|||
showPublishedDateOnly,
|
||||
newswire, theme, extraJson,
|
||||
allowLocalNetworkAccess, accessKeys,
|
||||
systemLanguage,
|
||||
pageNumber, maxItemsPerPage)
|
||||
|
||||
domain, port = getDomainFromActor(profileJson['id'])
|
||||
|
@ -796,7 +799,7 @@ def htmlProfile(rssIconAtTop: bool,
|
|||
showPublishedDateOnly,
|
||||
peertubeInstances,
|
||||
allowLocalNetworkAccess,
|
||||
theme) + licenseStr
|
||||
theme, systemLanguage) + licenseStr
|
||||
elif selected == 'following':
|
||||
profileStr += \
|
||||
_htmlProfileFollowing(translate, baseDir, httpPrefix,
|
||||
|
@ -850,7 +853,7 @@ def _htmlProfilePosts(recentPostsCache: {}, maxRecentPosts: int,
|
|||
showPublishedDateOnly: bool,
|
||||
peertubeInstances: [],
|
||||
allowLocalNetworkAccess: bool,
|
||||
themeName: str) -> str:
|
||||
themeName: str, systemLanguage: str) -> str:
|
||||
"""Shows posts on the profile screen
|
||||
These should only be public posts
|
||||
"""
|
||||
|
@ -890,7 +893,7 @@ def _htmlProfilePosts(recentPostsCache: {}, maxRecentPosts: int,
|
|||
showPublishedDateOnly,
|
||||
peertubeInstances,
|
||||
allowLocalNetworkAccess,
|
||||
themeName,
|
||||
themeName, systemLanguage,
|
||||
False, False, False, True, False)
|
||||
if postStr:
|
||||
profileStr += postStr + separatorStr
|
||||
|
|
|
@ -536,7 +536,8 @@ def htmlHistorySearch(cssCache: {}, translate: {}, baseDir: str,
|
|||
showPublishedDateOnly: bool,
|
||||
peertubeInstances: [],
|
||||
allowLocalNetworkAccess: bool,
|
||||
themeName: str, boxName: str) -> str:
|
||||
themeName: str, boxName: str,
|
||||
systemLanguage: str) -> str:
|
||||
"""Show a page containing search results for your post history
|
||||
"""
|
||||
if historysearch.startswith('!'):
|
||||
|
@ -616,7 +617,7 @@ def htmlHistorySearch(cssCache: {}, translate: {}, baseDir: str,
|
|||
showPublishedDateOnly,
|
||||
peertubeInstances,
|
||||
allowLocalNetworkAccess,
|
||||
themeName,
|
||||
themeName, systemLanguage,
|
||||
showIndividualPostIcons,
|
||||
showIndividualPostIcons,
|
||||
False, False, False)
|
||||
|
@ -640,7 +641,7 @@ def htmlHashtagSearch(cssCache: {},
|
|||
showPublishedDateOnly: bool,
|
||||
peertubeInstances: [],
|
||||
allowLocalNetworkAccess: bool,
|
||||
themeName: str) -> str:
|
||||
themeName: str, systemLanguage: str) -> str:
|
||||
"""Show a page containing search results for a hashtag
|
||||
"""
|
||||
if hashtag.startswith('#'):
|
||||
|
@ -790,7 +791,7 @@ def htmlHashtagSearch(cssCache: {},
|
|||
showPublishedDateOnly,
|
||||
peertubeInstances,
|
||||
allowLocalNetworkAccess,
|
||||
themeName,
|
||||
themeName, systemLanguage,
|
||||
showRepeats, showIcons,
|
||||
manuallyApprovesFollowers,
|
||||
showPublicOnly,
|
||||
|
|
|
@ -358,7 +358,7 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
|
|||
peertubeInstances: [],
|
||||
allowLocalNetworkAccess: bool,
|
||||
textModeBanner: str,
|
||||
accessKeys: {}) -> str:
|
||||
accessKeys: {}, systemLanguage: str) -> str:
|
||||
"""Show the timeline as html
|
||||
"""
|
||||
enableTimingLog = False
|
||||
|
@ -743,7 +743,7 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
|
|||
showPublishedDateOnly,
|
||||
peertubeInstances,
|
||||
allowLocalNetworkAccess,
|
||||
theme,
|
||||
theme, systemLanguage,
|
||||
boxName != 'dm',
|
||||
showIndividualPostIcons,
|
||||
manuallyApproveFollowers,
|
||||
|
@ -919,7 +919,7 @@ def htmlShares(cssCache: {}, defaultTimeline: str,
|
|||
peertubeInstances: [],
|
||||
allowLocalNetworkAccess: bool,
|
||||
textModeBanner: str,
|
||||
accessKeys: {}) -> str:
|
||||
accessKeys: {}, systemLanguage: str) -> str:
|
||||
"""Show the shares timeline as html
|
||||
"""
|
||||
manuallyApproveFollowers = \
|
||||
|
@ -941,7 +941,7 @@ def htmlShares(cssCache: {}, defaultTimeline: str,
|
|||
iconsAsButtons, rssIconAtTop, publishButtonAtTop,
|
||||
authorized, None, theme, peertubeInstances,
|
||||
allowLocalNetworkAccess, textModeBanner,
|
||||
accessKeys)
|
||||
accessKeys, systemLanguage)
|
||||
|
||||
|
||||
def htmlInbox(cssCache: {}, defaultTimeline: str,
|
||||
|
@ -964,7 +964,7 @@ def htmlInbox(cssCache: {}, defaultTimeline: str,
|
|||
peertubeInstances: [],
|
||||
allowLocalNetworkAccess: bool,
|
||||
textModeBanner: str,
|
||||
accessKeys: {}) -> str:
|
||||
accessKeys: {}, systemLanguage: str) -> str:
|
||||
"""Show the inbox as html
|
||||
"""
|
||||
manuallyApproveFollowers = \
|
||||
|
@ -986,7 +986,7 @@ def htmlInbox(cssCache: {}, defaultTimeline: str,
|
|||
iconsAsButtons, rssIconAtTop, publishButtonAtTop,
|
||||
authorized, None, theme, peertubeInstances,
|
||||
allowLocalNetworkAccess, textModeBanner,
|
||||
accessKeys)
|
||||
accessKeys, systemLanguage)
|
||||
|
||||
|
||||
def htmlBookmarks(cssCache: {}, defaultTimeline: str,
|
||||
|
@ -1009,7 +1009,7 @@ def htmlBookmarks(cssCache: {}, defaultTimeline: str,
|
|||
peertubeInstances: [],
|
||||
allowLocalNetworkAccess: bool,
|
||||
textModeBanner: str,
|
||||
accessKeys: {}) -> str:
|
||||
accessKeys: {}, systemLanguage: str) -> str:
|
||||
"""Show the bookmarks as html
|
||||
"""
|
||||
manuallyApproveFollowers = \
|
||||
|
@ -1031,7 +1031,7 @@ def htmlBookmarks(cssCache: {}, defaultTimeline: str,
|
|||
iconsAsButtons, rssIconAtTop, publishButtonAtTop,
|
||||
authorized, None, theme, peertubeInstances,
|
||||
allowLocalNetworkAccess, textModeBanner,
|
||||
accessKeys)
|
||||
accessKeys, systemLanguage)
|
||||
|
||||
|
||||
def htmlInboxDMs(cssCache: {}, defaultTimeline: str,
|
||||
|
@ -1054,7 +1054,7 @@ def htmlInboxDMs(cssCache: {}, defaultTimeline: str,
|
|||
peertubeInstances: [],
|
||||
allowLocalNetworkAccess: bool,
|
||||
textModeBanner: str,
|
||||
accessKeys: {}) -> str:
|
||||
accessKeys: {}, systemLanguage: str) -> str:
|
||||
"""Show the DM timeline as html
|
||||
"""
|
||||
return htmlTimeline(cssCache, defaultTimeline,
|
||||
|
@ -1071,7 +1071,7 @@ def htmlInboxDMs(cssCache: {}, defaultTimeline: str,
|
|||
iconsAsButtons, rssIconAtTop, publishButtonAtTop,
|
||||
authorized, None, theme, peertubeInstances,
|
||||
allowLocalNetworkAccess, textModeBanner,
|
||||
accessKeys)
|
||||
accessKeys, systemLanguage)
|
||||
|
||||
|
||||
def htmlInboxReplies(cssCache: {}, defaultTimeline: str,
|
||||
|
@ -1094,7 +1094,7 @@ def htmlInboxReplies(cssCache: {}, defaultTimeline: str,
|
|||
peertubeInstances: [],
|
||||
allowLocalNetworkAccess: bool,
|
||||
textModeBanner: str,
|
||||
accessKeys: {}) -> str:
|
||||
accessKeys: {}, systemLanguage: str) -> str:
|
||||
"""Show the replies timeline as html
|
||||
"""
|
||||
return htmlTimeline(cssCache, defaultTimeline,
|
||||
|
@ -1112,7 +1112,7 @@ def htmlInboxReplies(cssCache: {}, defaultTimeline: str,
|
|||
iconsAsButtons, rssIconAtTop, publishButtonAtTop,
|
||||
authorized, None, theme, peertubeInstances,
|
||||
allowLocalNetworkAccess, textModeBanner,
|
||||
accessKeys)
|
||||
accessKeys, systemLanguage)
|
||||
|
||||
|
||||
def htmlInboxMedia(cssCache: {}, defaultTimeline: str,
|
||||
|
@ -1135,7 +1135,7 @@ def htmlInboxMedia(cssCache: {}, defaultTimeline: str,
|
|||
peertubeInstances: [],
|
||||
allowLocalNetworkAccess: bool,
|
||||
textModeBanner: str,
|
||||
accessKeys: {}) -> str:
|
||||
accessKeys: {}, systemLanguage: str) -> str:
|
||||
"""Show the media timeline as html
|
||||
"""
|
||||
return htmlTimeline(cssCache, defaultTimeline,
|
||||
|
@ -1153,7 +1153,7 @@ def htmlInboxMedia(cssCache: {}, defaultTimeline: str,
|
|||
iconsAsButtons, rssIconAtTop, publishButtonAtTop,
|
||||
authorized, None, theme, peertubeInstances,
|
||||
allowLocalNetworkAccess, textModeBanner,
|
||||
accessKeys)
|
||||
accessKeys, systemLanguage)
|
||||
|
||||
|
||||
def htmlInboxBlogs(cssCache: {}, defaultTimeline: str,
|
||||
|
@ -1176,7 +1176,7 @@ def htmlInboxBlogs(cssCache: {}, defaultTimeline: str,
|
|||
peertubeInstances: [],
|
||||
allowLocalNetworkAccess: bool,
|
||||
textModeBanner: str,
|
||||
accessKeys: {}) -> str:
|
||||
accessKeys: {}, systemLanguage: str) -> str:
|
||||
"""Show the blogs timeline as html
|
||||
"""
|
||||
return htmlTimeline(cssCache, defaultTimeline,
|
||||
|
@ -1194,7 +1194,7 @@ def htmlInboxBlogs(cssCache: {}, defaultTimeline: str,
|
|||
iconsAsButtons, rssIconAtTop, publishButtonAtTop,
|
||||
authorized, None, theme, peertubeInstances,
|
||||
allowLocalNetworkAccess, textModeBanner,
|
||||
accessKeys)
|
||||
accessKeys, systemLanguage)
|
||||
|
||||
|
||||
def htmlInboxFeatures(cssCache: {}, defaultTimeline: str,
|
||||
|
@ -1218,7 +1218,7 @@ def htmlInboxFeatures(cssCache: {}, defaultTimeline: str,
|
|||
peertubeInstances: [],
|
||||
allowLocalNetworkAccess: bool,
|
||||
textModeBanner: str,
|
||||
accessKeys: {}) -> str:
|
||||
accessKeys: {}, systemLanguage: str) -> str:
|
||||
"""Show the features timeline as html
|
||||
"""
|
||||
return htmlTimeline(cssCache, defaultTimeline,
|
||||
|
@ -1236,7 +1236,7 @@ def htmlInboxFeatures(cssCache: {}, defaultTimeline: str,
|
|||
iconsAsButtons, rssIconAtTop, publishButtonAtTop,
|
||||
authorized, None, theme, peertubeInstances,
|
||||
allowLocalNetworkAccess, textModeBanner,
|
||||
accessKeys)
|
||||
accessKeys, systemLanguage)
|
||||
|
||||
|
||||
def htmlInboxNews(cssCache: {}, defaultTimeline: str,
|
||||
|
@ -1259,7 +1259,7 @@ def htmlInboxNews(cssCache: {}, defaultTimeline: str,
|
|||
peertubeInstances: [],
|
||||
allowLocalNetworkAccess: bool,
|
||||
textModeBanner: str,
|
||||
accessKeys: {}) -> str:
|
||||
accessKeys: {}, systemLanguage: str) -> str:
|
||||
"""Show the news timeline as html
|
||||
"""
|
||||
return htmlTimeline(cssCache, defaultTimeline,
|
||||
|
@ -1277,7 +1277,7 @@ def htmlInboxNews(cssCache: {}, defaultTimeline: str,
|
|||
iconsAsButtons, rssIconAtTop, publishButtonAtTop,
|
||||
authorized, None, theme, peertubeInstances,
|
||||
allowLocalNetworkAccess, textModeBanner,
|
||||
accessKeys)
|
||||
accessKeys, systemLanguage)
|
||||
|
||||
|
||||
def htmlOutbox(cssCache: {}, defaultTimeline: str,
|
||||
|
@ -1300,7 +1300,7 @@ def htmlOutbox(cssCache: {}, defaultTimeline: str,
|
|||
peertubeInstances: [],
|
||||
allowLocalNetworkAccess: bool,
|
||||
textModeBanner: str,
|
||||
accessKeys: {}) -> str:
|
||||
accessKeys: {}, systemLanguage: str) -> str:
|
||||
"""Show the Outbox as html
|
||||
"""
|
||||
manuallyApproveFollowers = \
|
||||
|
@ -1319,4 +1319,4 @@ def htmlOutbox(cssCache: {}, defaultTimeline: str,
|
|||
iconsAsButtons, rssIconAtTop, publishButtonAtTop,
|
||||
authorized, None, theme, peertubeInstances,
|
||||
allowLocalNetworkAccess, textModeBanner,
|
||||
accessKeys)
|
||||
accessKeys, systemLanguage)
|
||||
|
|
Loading…
Reference in New Issue