mirror of https://gitlab.com/bashrc2/epicyon
Change blog terminology for news instances
parent
7f5dd17f48
commit
94aec1a6c4
|
@ -1822,7 +1822,8 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
pageNumber,
|
pageNumber,
|
||||||
chooserNickname,
|
chooserNickname,
|
||||||
domain,
|
domain,
|
||||||
domainFull).encode('utf-8')
|
domainFull,
|
||||||
|
self.server.defaultTimeline).encode('utf-8')
|
||||||
self._set_headers('text/html', len(msg),
|
self._set_headers('text/html', len(msg),
|
||||||
cookie, callingDomain)
|
cookie, callingDomain)
|
||||||
self._write(msg)
|
self._write(msg)
|
||||||
|
@ -1887,7 +1888,8 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
postUrl, pageNumber,
|
postUrl, pageNumber,
|
||||||
chooserNickname,
|
chooserNickname,
|
||||||
domain,
|
domain,
|
||||||
domainFull).encode('utf-8')
|
domainFull,
|
||||||
|
self.server.defaultTimeline).encode('utf-8')
|
||||||
self._set_headers('text/html', len(msg),
|
self._set_headers('text/html', len(msg),
|
||||||
cookie, callingDomain)
|
cookie, callingDomain)
|
||||||
self._write(msg)
|
self._write(msg)
|
||||||
|
@ -8415,7 +8417,8 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
shareDescription,
|
shareDescription,
|
||||||
replyPageNumber,
|
replyPageNumber,
|
||||||
nickname, domain,
|
nickname, domain,
|
||||||
domainFull).encode('utf-8')
|
domainFull,
|
||||||
|
self.server.defaultTimeline).encode('utf-8')
|
||||||
if not msg:
|
if not msg:
|
||||||
print('Error replying to ' + inReplyToUrl)
|
print('Error replying to ' + inReplyToUrl)
|
||||||
self._404()
|
self._404()
|
||||||
|
|
|
@ -2352,7 +2352,8 @@ def htmlNewPost(mediaInstance: bool, translate: {},
|
||||||
mentions: [],
|
mentions: [],
|
||||||
reportUrl: str, pageNumber: int,
|
reportUrl: str, pageNumber: int,
|
||||||
nickname: str, domain: str,
|
nickname: str, domain: str,
|
||||||
domainFull: str) -> str:
|
domainFull: str,
|
||||||
|
defaultTimeline: str) -> str:
|
||||||
"""New post screen
|
"""New post screen
|
||||||
"""
|
"""
|
||||||
iconsDir = getIconsDir(baseDir)
|
iconsDir = getIconsDir(baseDir)
|
||||||
|
@ -2490,7 +2491,10 @@ def htmlNewPost(mediaInstance: bool, translate: {},
|
||||||
if path.endswith('/newblog'):
|
if path.endswith('/newblog'):
|
||||||
placeholderSubject = translate['Title']
|
placeholderSubject = translate['Title']
|
||||||
scopeIcon = 'scope_blog.png'
|
scopeIcon = 'scope_blog.png'
|
||||||
scopeDescription = translate['Blog']
|
if defaultTimeline != 'tlnews':
|
||||||
|
scopeDescription = translate['Blog']
|
||||||
|
else:
|
||||||
|
scopeDescription = translate['Article']
|
||||||
endpoint = 'newblog'
|
endpoint = 'newblog'
|
||||||
elif path.endswith('/newunlisted'):
|
elif path.endswith('/newunlisted'):
|
||||||
scopeIcon = 'scope_unlisted.png'
|
scopeIcon = 'scope_unlisted.png'
|
||||||
|
@ -2803,12 +2807,20 @@ def htmlNewPost(mediaInstance: bool, translate: {},
|
||||||
iconsDir + '/scope_public.png"/><b>' + \
|
iconsDir + '/scope_public.png"/><b>' + \
|
||||||
translate['Public'] + '</b><br>' + \
|
translate['Public'] + '</b><br>' + \
|
||||||
translate['Visible to anyone'] + '</li></a>\n'
|
translate['Visible to anyone'] + '</li></a>\n'
|
||||||
dropDownContent += " " \
|
if defaultTimeline != 'tlnews':
|
||||||
'<a href="' + pathBase + dropdownNewBlogSuffix + \
|
dropDownContent += " " \
|
||||||
'"><li><img loading="lazy" alt="" title="" src="/' + \
|
'<a href="' + pathBase + dropdownNewBlogSuffix + \
|
||||||
iconsDir + '/scope_blog.png"/><b>' + \
|
'"><li><img loading="lazy" alt="" title="" src="/' + \
|
||||||
translate['Blog'] + '</b><br>' + \
|
iconsDir + '/scope_blog.png"/><b>' + \
|
||||||
translate['Publicly visible post'] + '</li></a>\n'
|
translate['Article'] + '</b><br>' + \
|
||||||
|
translate['Create an article'] + '</li></a>\n'
|
||||||
|
else:
|
||||||
|
dropDownContent += " " \
|
||||||
|
'<a href="' + pathBase + dropdownNewBlogSuffix + \
|
||||||
|
'"><li><img loading="lazy" alt="" title="" src="/' + \
|
||||||
|
iconsDir + '/scope_blog.png"/><b>' + \
|
||||||
|
translate['Blog'] + '</b><br>' + \
|
||||||
|
translate['Publicly visible post'] + '</li></a>\n'
|
||||||
dropDownContent += " " \
|
dropDownContent += " " \
|
||||||
'<a href="' + pathBase + dropdownUnlistedSuffix + \
|
'<a href="' + pathBase + dropdownUnlistedSuffix + \
|
||||||
'"><li><img loading="lazy" alt="" title="" src="/' + \
|
'"><li><img loading="lazy" alt="" title="" src="/' + \
|
||||||
|
@ -5987,7 +5999,7 @@ def getTimelineButtonHeader(defaultTimeline: str,
|
||||||
tlStr += \
|
tlStr += \
|
||||||
' <a href="' + usersPath + \
|
' <a href="' + usersPath + \
|
||||||
'/tlnews"><button class="' + \
|
'/tlnews"><button class="' + \
|
||||||
newsButton + '"><span>' + translate['News'] + \
|
newsButton + '"><span>' + translate['Features'] + \
|
||||||
'</span></button></a>\n'
|
'</span></button></a>\n'
|
||||||
else:
|
else:
|
||||||
tlStr += \
|
tlStr += \
|
||||||
|
@ -6034,10 +6046,13 @@ def getTimelineButtonHeader(defaultTimeline: str,
|
||||||
# but may change if this is a blogging oriented instance
|
# but may change if this is a blogging oriented instance
|
||||||
if defaultTimeline != 'tlblogs':
|
if defaultTimeline != 'tlblogs':
|
||||||
if not minimal or defaultTimeline == 'tlnews':
|
if not minimal or defaultTimeline == 'tlnews':
|
||||||
|
titleStr = translate['Blogs']
|
||||||
|
if defaultTimeline == 'tlnews':
|
||||||
|
titleStr = translate['Article']
|
||||||
tlStr += \
|
tlStr += \
|
||||||
' <a href="' + usersPath + \
|
' <a href="' + usersPath + \
|
||||||
'/tlblogs"><button class="' + \
|
'/tlblogs"><button class="' + \
|
||||||
blogsButton + '"><span>' + translate['Blogs'] + \
|
blogsButton + '"><span>' + titleStr + \
|
||||||
'</span></button></a>\n'
|
'</span></button></a>\n'
|
||||||
else:
|
else:
|
||||||
if not minimal:
|
if not minimal:
|
||||||
|
|
Loading…
Reference in New Issue