Themed welcome screen background

main
Bob Mottram 2021-02-25 19:07:45 +00:00
parent 7e9937cbd0
commit a7e0985ac8
2 changed files with 10 additions and 7 deletions

View File

@ -10383,12 +10383,12 @@ class PubServer(BaseHTTPRequestHandler):
nickname = nickname.split('?')[0]
if nickname == self.authorizedNickname and \
self.path != '/users/' + nickname:
if not isWelcomeScreenComplete(self.server.baseDir,
nickname,
self.server.domain):
self._redirect_headers('/users/' + nickname + '/welcome',
cookie, callingDomain)
return
if not isWelcomeScreenComplete(self.server.baseDir,
nickname,
self.server.domain):
self._redirect_headers('/users/' + nickname + '/welcome',
cookie, callingDomain)
return
if not htmlGET and \
usersInPath and self.path.endswith('/pinned'):

View File

@ -265,6 +265,8 @@ def _setThemeFromDict(baseDir: str, name: str,
_setBackgroundFormat(baseDir, name, 'options', bgParams['options'])
if bgParams.get('search'):
_setBackgroundFormat(baseDir, name, 'search', bgParams['search'])
if bgParams.get('welcome'):
_setBackgroundFormat(baseDir, name, 'welcome', bgParams['welcome'])
def _setBackgroundFormat(baseDir: str, name: str,
@ -508,7 +510,8 @@ def _setThemeImages(baseDir: str, name: str) -> None:
_setTextModeTheme(baseDir, themeNameLower)
backgroundNames = ('login', 'shares', 'delete', 'follow',
'options', 'block', 'search', 'calendar')
'options', 'block', 'search', 'calendar',
'welcome')
extensions = getImageExtensions()
for subdir, dirs, files in os.walk(baseDir + '/accounts'):