From a7e0985ac81fa84159f84e12b36f97fa634f5159 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 25 Feb 2021 19:07:45 +0000 Subject: [PATCH] Themed welcome screen background --- daemon.py | 12 ++++++------ theme.py | 5 ++++- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/daemon.py b/daemon.py index aef342dd7..3008469f4 100644 --- a/daemon.py +++ b/daemon.py @@ -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'): diff --git a/theme.py b/theme.py index 64caf6d2f..008d0a7f3 100644 --- a/theme.py +++ b/theme.py @@ -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'):