mirror of https://gitlab.com/bashrc2/epicyon
Snake case
parent
8b9a53c304
commit
7e153c12b9
42
daemon.py
42
daemon.py
|
@ -5044,15 +5044,15 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.defaultTimeline = 'inbox'
|
self.server.defaultTimeline = 'inbox'
|
||||||
if fields['mediaInstance'] == 'on':
|
if fields['mediaInstance'] == 'on':
|
||||||
self.server.mediaInstance = True
|
self.server.mediaInstance = True
|
||||||
self.server.blogsInstance = False
|
self.server.blogs_instance = False
|
||||||
self.server.news_instance = False
|
self.server.news_instance = False
|
||||||
self.server.defaultTimeline = 'tlmedia'
|
self.server.defaultTimeline = 'tlmedia'
|
||||||
setConfigParam(base_dir,
|
setConfigParam(base_dir,
|
||||||
"mediaInstance",
|
"mediaInstance",
|
||||||
self.server.mediaInstance)
|
self.server.mediaInstance)
|
||||||
setConfigParam(base_dir,
|
setConfigParam(base_dir,
|
||||||
"blogsInstance",
|
"blogs_instance",
|
||||||
self.server.blogsInstance)
|
self.server.blogs_instance)
|
||||||
setConfigParam(base_dir,
|
setConfigParam(base_dir,
|
||||||
"news_instance",
|
"news_instance",
|
||||||
self.server.news_instance)
|
self.server.news_instance)
|
||||||
|
@ -5075,15 +5075,15 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.defaultTimeline = 'inbox'
|
self.server.defaultTimeline = 'inbox'
|
||||||
if fields['news_instance'] == 'on':
|
if fields['news_instance'] == 'on':
|
||||||
self.server.news_instance = True
|
self.server.news_instance = True
|
||||||
self.server.blogsInstance = False
|
self.server.blogs_instance = False
|
||||||
self.server.mediaInstance = False
|
self.server.mediaInstance = False
|
||||||
self.server.defaultTimeline = 'tlfeatures'
|
self.server.defaultTimeline = 'tlfeatures'
|
||||||
setConfigParam(base_dir,
|
setConfigParam(base_dir,
|
||||||
"mediaInstance",
|
"mediaInstance",
|
||||||
self.server.mediaInstance)
|
self.server.mediaInstance)
|
||||||
setConfigParam(base_dir,
|
setConfigParam(base_dir,
|
||||||
"blogsInstance",
|
"blogs_instance",
|
||||||
self.server.blogsInstance)
|
self.server.blogs_instance)
|
||||||
setConfigParam(base_dir,
|
setConfigParam(base_dir,
|
||||||
"news_instance",
|
"news_instance",
|
||||||
self.server.news_instance)
|
self.server.news_instance)
|
||||||
|
@ -5096,17 +5096,17 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.mediaInstance)
|
self.server.mediaInstance)
|
||||||
|
|
||||||
# change blog instance status
|
# change blog instance status
|
||||||
if fields.get('blogsInstance'):
|
if fields.get('blogs_instance'):
|
||||||
self.server.blogsInstance = False
|
self.server.blogs_instance = False
|
||||||
self.server.defaultTimeline = 'inbox'
|
self.server.defaultTimeline = 'inbox'
|
||||||
if fields['blogsInstance'] == 'on':
|
if fields['blogs_instance'] == 'on':
|
||||||
self.server.blogsInstance = True
|
self.server.blogs_instance = True
|
||||||
self.server.mediaInstance = False
|
self.server.mediaInstance = False
|
||||||
self.server.news_instance = False
|
self.server.news_instance = False
|
||||||
self.server.defaultTimeline = 'tlblogs'
|
self.server.defaultTimeline = 'tlblogs'
|
||||||
setConfigParam(base_dir,
|
setConfigParam(base_dir,
|
||||||
"blogsInstance",
|
"blogs_instance",
|
||||||
self.server.blogsInstance)
|
self.server.blogs_instance)
|
||||||
setConfigParam(base_dir,
|
setConfigParam(base_dir,
|
||||||
"mediaInstance",
|
"mediaInstance",
|
||||||
self.server.mediaInstance)
|
self.server.mediaInstance)
|
||||||
|
@ -5114,12 +5114,12 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
"news_instance",
|
"news_instance",
|
||||||
self.server.news_instance)
|
self.server.news_instance)
|
||||||
else:
|
else:
|
||||||
if self.server.blogsInstance:
|
if self.server.blogs_instance:
|
||||||
self.server.blogsInstance = False
|
self.server.blogs_instance = False
|
||||||
self.server.defaultTimeline = 'inbox'
|
self.server.defaultTimeline = 'inbox'
|
||||||
setConfigParam(base_dir,
|
setConfigParam(base_dir,
|
||||||
"blogsInstance",
|
"blogs_instance",
|
||||||
self.server.blogsInstance)
|
self.server.blogs_instance)
|
||||||
|
|
||||||
# change instance title
|
# change instance title
|
||||||
if fields.get('instanceTitle'):
|
if fields.get('instanceTitle'):
|
||||||
|
@ -15079,10 +15079,10 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
setMinimal(self.server.base_dir,
|
setMinimal(self.server.base_dir,
|
||||||
self.server.domain, nickname, notMin)
|
self.server.domain, nickname, notMin)
|
||||||
if not (self.server.mediaInstance or
|
if not (self.server.mediaInstance or
|
||||||
self.server.blogsInstance):
|
self.server.blogs_instance):
|
||||||
self.path = '/users/' + nickname + '/inbox'
|
self.path = '/users/' + nickname + '/inbox'
|
||||||
else:
|
else:
|
||||||
if self.server.blogsInstance:
|
if self.server.blogs_instance:
|
||||||
self.path = '/users/' + nickname + '/tlblogs'
|
self.path = '/users/' + nickname + '/tlblogs'
|
||||||
elif self.server.mediaInstance:
|
elif self.server.mediaInstance:
|
||||||
self.path = '/users/' + nickname + '/tlmedia'
|
self.path = '/users/' + nickname + '/tlmedia'
|
||||||
|
@ -18450,7 +18450,7 @@ def runDaemon(content_license_url: str,
|
||||||
positive_voting: bool,
|
positive_voting: bool,
|
||||||
newswire_votes_threshold: int,
|
newswire_votes_threshold: int,
|
||||||
news_instance: bool,
|
news_instance: bool,
|
||||||
blogsInstance: bool,
|
blogs_instance: bool,
|
||||||
mediaInstance: bool,
|
mediaInstance: bool,
|
||||||
maxRecentPosts: int,
|
maxRecentPosts: int,
|
||||||
enableSharedInbox: bool, registration: bool,
|
enableSharedInbox: bool, registration: bool,
|
||||||
|
@ -18608,7 +18608,7 @@ def runDaemon(content_license_url: str,
|
||||||
httpd.onionDomain = onionDomain
|
httpd.onionDomain = onionDomain
|
||||||
httpd.i2pDomain = i2pDomain
|
httpd.i2pDomain = i2pDomain
|
||||||
httpd.mediaInstance = mediaInstance
|
httpd.mediaInstance = mediaInstance
|
||||||
httpd.blogsInstance = blogsInstance
|
httpd.blogs_instance = blogs_instance
|
||||||
|
|
||||||
# load translations dictionary
|
# load translations dictionary
|
||||||
httpd.translate = {}
|
httpd.translate = {}
|
||||||
|
@ -18809,7 +18809,7 @@ def runDaemon(content_license_url: str,
|
||||||
httpd.defaultTimeline = 'inbox'
|
httpd.defaultTimeline = 'inbox'
|
||||||
if mediaInstance:
|
if mediaInstance:
|
||||||
httpd.defaultTimeline = 'tlmedia'
|
httpd.defaultTimeline = 'tlmedia'
|
||||||
if blogsInstance:
|
if blogs_instance:
|
||||||
httpd.defaultTimeline = 'tlblogs'
|
httpd.defaultTimeline = 'tlblogs'
|
||||||
if news_instance:
|
if news_instance:
|
||||||
httpd.defaultTimeline = 'tlfeatures'
|
httpd.defaultTimeline = 'tlfeatures'
|
||||||
|
|
|
@ -1014,9 +1014,9 @@ if not args.newsinstance:
|
||||||
args.mediainstance = False
|
args.mediainstance = False
|
||||||
|
|
||||||
if not args.blogsinstance:
|
if not args.blogsinstance:
|
||||||
blogsInstance = getConfigParam(base_dir, 'blogsInstance')
|
blogs_instance = getConfigParam(base_dir, 'blogs_instance')
|
||||||
if blogsInstance is not None:
|
if blogs_instance is not None:
|
||||||
args.blogsinstance = blogsInstance
|
args.blogsinstance = blogs_instance
|
||||||
if args.blogsinstance:
|
if args.blogsinstance:
|
||||||
args.mediainstance = False
|
args.mediainstance = False
|
||||||
args.newsinstance = False
|
args.newsinstance = False
|
||||||
|
|
|
@ -1297,7 +1297,7 @@ def _htmlEditProfileTwitter(base_dir: str, translate: {},
|
||||||
def _htmlEditProfileInstance(base_dir: str, translate: {},
|
def _htmlEditProfileInstance(base_dir: str, translate: {},
|
||||||
peertubeInstances: [],
|
peertubeInstances: [],
|
||||||
mediaInstanceStr: str,
|
mediaInstanceStr: str,
|
||||||
blogsInstanceStr: str,
|
blogs_instanceStr: str,
|
||||||
news_instanceStr: str) -> (str, str, str, str):
|
news_instanceStr: str) -> (str, str, str, str):
|
||||||
"""Edit profile instance settings
|
"""Edit profile instance settings
|
||||||
"""
|
"""
|
||||||
|
@ -1390,7 +1390,7 @@ def _htmlEditProfileInstance(base_dir: str, translate: {},
|
||||||
'mediaInstance', mediaInstanceStr)
|
'mediaInstance', mediaInstanceStr)
|
||||||
instanceStr += \
|
instanceStr += \
|
||||||
editCheckBox(translate['This is a blogging instance'],
|
editCheckBox(translate['This is a blogging instance'],
|
||||||
'blogsInstance', blogsInstanceStr)
|
'blogs_instance', blogs_instanceStr)
|
||||||
instanceStr += \
|
instanceStr += \
|
||||||
editCheckBox(translate['This is a news instance'],
|
editCheckBox(translate['This is a news instance'],
|
||||||
'news_instance', news_instanceStr)
|
'news_instance', news_instanceStr)
|
||||||
|
@ -2113,7 +2113,7 @@ def htmlEditProfile(cssCache: {}, translate: {}, base_dir: str, path: str,
|
||||||
isBot = isGroup = followDMs = removeTwitter = ''
|
isBot = isGroup = followDMs = removeTwitter = ''
|
||||||
notifyLikes = notifyReactions = ''
|
notifyLikes = notifyReactions = ''
|
||||||
hideLikeButton = hideReactionButton = mediaInstanceStr = ''
|
hideLikeButton = hideReactionButton = mediaInstanceStr = ''
|
||||||
blogsInstanceStr = news_instanceStr = movedTo = twitterStr = ''
|
blogs_instanceStr = news_instanceStr = movedTo = twitterStr = ''
|
||||||
bioStr = donateUrl = websiteUrl = emailAddress = ''
|
bioStr = donateUrl = websiteUrl = emailAddress = ''
|
||||||
PGPpubKey = EnigmaPubKey = ''
|
PGPpubKey = EnigmaPubKey = ''
|
||||||
PGPfingerprint = xmppAddress = matrixAddress = ''
|
PGPfingerprint = xmppAddress = matrixAddress = ''
|
||||||
|
@ -2176,18 +2176,18 @@ def htmlEditProfile(cssCache: {}, translate: {}, base_dir: str, path: str,
|
||||||
if mediaInstance:
|
if mediaInstance:
|
||||||
if mediaInstance is True:
|
if mediaInstance is True:
|
||||||
mediaInstanceStr = 'checked'
|
mediaInstanceStr = 'checked'
|
||||||
blogsInstanceStr = news_instanceStr = ''
|
blogs_instanceStr = news_instanceStr = ''
|
||||||
|
|
||||||
news_instance = getConfigParam(base_dir, "news_instance")
|
news_instance = getConfigParam(base_dir, "news_instance")
|
||||||
if news_instance:
|
if news_instance:
|
||||||
if news_instance is True:
|
if news_instance is True:
|
||||||
news_instanceStr = 'checked'
|
news_instanceStr = 'checked'
|
||||||
blogsInstanceStr = mediaInstanceStr = ''
|
blogs_instanceStr = mediaInstanceStr = ''
|
||||||
|
|
||||||
blogsInstance = getConfigParam(base_dir, "blogsInstance")
|
blogs_instance = getConfigParam(base_dir, "blogs_instance")
|
||||||
if blogsInstance:
|
if blogs_instance:
|
||||||
if blogsInstance is True:
|
if blogs_instance is True:
|
||||||
blogsInstanceStr = 'checked'
|
blogs_instanceStr = 'checked'
|
||||||
mediaInstanceStr = news_instanceStr = ''
|
mediaInstanceStr = news_instanceStr = ''
|
||||||
|
|
||||||
cssFilename = base_dir + '/epicyon-profile.css'
|
cssFilename = base_dir + '/epicyon-profile.css'
|
||||||
|
@ -2222,7 +2222,7 @@ def htmlEditProfile(cssCache: {}, translate: {}, base_dir: str, path: str,
|
||||||
_htmlEditProfileInstance(base_dir, translate,
|
_htmlEditProfileInstance(base_dir, translate,
|
||||||
peertubeInstances,
|
peertubeInstances,
|
||||||
mediaInstanceStr,
|
mediaInstanceStr,
|
||||||
blogsInstanceStr,
|
blogs_instanceStr,
|
||||||
news_instanceStr)
|
news_instanceStr)
|
||||||
systemMonitorStr = _htmlSystemMonitor(nickname, translate)
|
systemMonitorStr = _htmlSystemMonitor(nickname, translate)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue