diff --git a/daemon.py b/daemon.py index 842527b49..9b2a700a9 100644 --- a/daemon.py +++ b/daemon.py @@ -150,6 +150,7 @@ from media import removeMetaData from cache import storePersonInCache from cache import getPersonFromCache from httpsig import verifyPostHeaders +from theme import setTheme import os import sys @@ -3809,6 +3810,8 @@ class PubServer(BaseHTTPRequestHandler): if fields['displayNickname']!=actorJson['name']: actorJson['name']=fields['displayNickname'] actorChanged=True + if fields.get('themeDropdown'): + setTheme(self.server.baseDir,fields['themeDropdown']) if fields.get('donateUrl'): currentDonateUrl=getDonationUrl(actorJson) if fields['donateUrl']!=currentDonateUrl: diff --git a/translations/ar.json b/translations/ar.json index ff5a13464..3bebcc779 100644 --- a/translations/ar.json +++ b/translations/ar.json @@ -180,5 +180,11 @@ "Instance Logo": "Instance Logo", "Bookmark this post": "Bookmark this post", "Undo the bookmark": "Undo the bookmark", - "Bookmarks": "Saves" + "Bookmarks": "Saves", + "Theme": "Theme", + "Default": "Default", + "Light": "Light", + "Purple": "Purple", + "Hacker": "Hacker", + "HighVis": "HighVis" } diff --git a/translations/ca.json b/translations/ca.json index c27869bff..9dc9cc91d 100644 --- a/translations/ca.json +++ b/translations/ca.json @@ -180,5 +180,11 @@ "Instance Logo": "Instance Logo", "Bookmark this post": "Bookmark this post", "Undo the bookmark": "Undo the bookmark", - "Bookmarks": "Saves" + "Bookmarks": "Saves", + "Theme": "Theme", + "Default": "Default", + "Light": "Light", + "Purple": "Purple", + "Hacker": "Hacker", + "HighVis": "HighVis" } diff --git a/translations/cy.json b/translations/cy.json index e8ac0f6d3..0b8192473 100644 --- a/translations/cy.json +++ b/translations/cy.json @@ -180,5 +180,11 @@ "Instance Logo": "Instance Logo", "Bookmark this post": "Bookmark this post", "Undo the bookmark": "Undo the bookmark", - "Bookmarks": "Saves" + "Bookmarks": "Saves", + "Theme": "Theme", + "Default": "Default", + "Light": "Light", + "Purple": "Purple", + "Hacker": "Hacker", + "HighVis": "HighVis" } diff --git a/translations/de.json b/translations/de.json index e1c365797..15044e449 100644 --- a/translations/de.json +++ b/translations/de.json @@ -180,5 +180,11 @@ "Instance Logo": "Instance Logo", "Bookmark this post": "Bookmark this post", "Undo the bookmark": "Undo the bookmark", - "Bookmarks": "Saves" + "Bookmarks": "Saves", + "Theme": "Theme", + "Default": "Default", + "Light": "Light", + "Purple": "Purple", + "Hacker": "Hacker", + "HighVis": "HighVis" } diff --git a/translations/en.json b/translations/en.json index 40d63aaac..c8841ba7b 100644 --- a/translations/en.json +++ b/translations/en.json @@ -180,5 +180,11 @@ "Instance Logo": "Instance Logo", "Bookmark this post": "Bookmark this post", "Undo the bookmark": "Undo the bookmark", - "Bookmarks": "Saves" + "Bookmarks": "Saves", + "Theme": "Theme", + "Default": "Default", + "Light": "Light", + "Purple": "Purple", + "Hacker": "Hacker", + "HighVis": "HighVis" } diff --git a/translations/es.json b/translations/es.json index a33597507..070cdd8c5 100644 --- a/translations/es.json +++ b/translations/es.json @@ -180,5 +180,11 @@ "Instance Logo": "Instance Logo", "Bookmark this post": "Bookmark this post", "Undo the bookmark": "Undo the bookmark", - "Bookmarks": "Saves" + "Bookmarks": "Saves", + "Theme": "Theme", + "Default": "Default", + "Light": "Light", + "Purple": "Purple", + "Hacker": "Hacker", + "HighVis": "HighVis" } diff --git a/translations/fr.json b/translations/fr.json index 2cad067e4..04a2244ee 100644 --- a/translations/fr.json +++ b/translations/fr.json @@ -180,5 +180,11 @@ "Instance Logo": "Instance Logo", "Bookmark this post": "Bookmark this post", "Undo the bookmark": "Undo the bookmark", - "Bookmarks": "Saves" + "Bookmarks": "Saves", + "Theme": "Theme", + "Default": "Default", + "Light": "Light", + "Purple": "Purple", + "Hacker": "Hacker", + "HighVis": "HighVis" } diff --git a/translations/ga.json b/translations/ga.json index 793a6c5f2..f4a674910 100644 --- a/translations/ga.json +++ b/translations/ga.json @@ -180,5 +180,11 @@ "Instance Logo": "Instance Logo", "Bookmark this post": "Bookmark this post", "Undo the bookmark": "Undo the bookmark", - "Bookmarks": "Saves" + "Bookmarks": "Saves", + "Theme": "Theme", + "Default": "Default", + "Light": "Light", + "Purple": "Purple", + "Hacker": "Hacker", + "HighVis": "HighVis" } diff --git a/translations/hi.json b/translations/hi.json index 7647a7c67..a67d4f8a6 100644 --- a/translations/hi.json +++ b/translations/hi.json @@ -180,5 +180,11 @@ "Instance Logo": "Instance Logo", "Bookmark this post": "Bookmark this post", "Undo the bookmark": "Undo the bookmark", - "Bookmarks": "Saves" + "Bookmarks": "Saves", + "Theme": "Theme", + "Default": "Default", + "Light": "Light", + "Purple": "Purple", + "Hacker": "Hacker", + "HighVis": "HighVis" } diff --git a/translations/it.json b/translations/it.json index a64b54944..a9f72f8f9 100644 --- a/translations/it.json +++ b/translations/it.json @@ -180,5 +180,11 @@ "Instance Logo": "Instance Logo", "Bookmark this post": "Bookmark this post", "Undo the bookmark": "Undo the bookmark", - "Bookmarks": "Saves" + "Bookmarks": "Saves", + "Theme": "Theme", + "Default": "Default", + "Light": "Light", + "Purple": "Purple", + "Hacker": "Hacker", + "HighVis": "HighVis" } diff --git a/translations/ja.json b/translations/ja.json index b859743c6..715d988ec 100644 --- a/translations/ja.json +++ b/translations/ja.json @@ -180,5 +180,11 @@ "Instance Logo": "Instance Logo", "Bookmark this post": "Bookmark this post", "Undo the bookmark": "Undo the bookmark", - "Bookmarks": "Saves" + "Bookmarks": "Saves", + "Theme": "Theme", + "Default": "Default", + "Light": "Light", + "Purple": "Purple", + "Hacker": "Hacker", + "HighVis": "HighVis" } diff --git a/translations/oc.json b/translations/oc.json index 9469fb461..30b230389 100644 --- a/translations/oc.json +++ b/translations/oc.json @@ -176,5 +176,11 @@ "Instance Logo": "Instance Logo", "Bookmark this post": "Bookmark this post", "Undo the bookmark": "Undo the bookmark", - "Bookmarks": "Saves" + "Bookmarks": "Saves", + "Theme": "Theme", + "Default": "Default", + "Light": "Light", + "Purple": "Purple", + "Hacker": "Hacker", + "HighVis": "HighVis" } diff --git a/translations/pt.json b/translations/pt.json index 148c77d96..17f308cb5 100644 --- a/translations/pt.json +++ b/translations/pt.json @@ -180,5 +180,11 @@ "Instance Logo": "Instance Logo", "Bookmark this post": "Bookmark this post", "Undo the bookmark": "Undo the bookmark", - "Bookmarks": "Saves" + "Bookmarks": "Saves", + "Theme": "Theme", + "Default": "Default", + "Light": "Light", + "Purple": "Purple", + "Hacker": "Hacker", + "HighVis": "HighVis" } diff --git a/translations/ru.json b/translations/ru.json index 11b0e9cb6..c2c9dfb9c 100644 --- a/translations/ru.json +++ b/translations/ru.json @@ -180,5 +180,11 @@ "Instance Logo": "Instance Logo", "Bookmark this post": "Bookmark this post", "Undo the bookmark": "Undo the bookmark", - "Bookmarks": "Saves" + "Bookmarks": "Saves", + "Theme": "Theme", + "Default": "Default", + "Light": "Light", + "Purple": "Purple", + "Hacker": "Hacker", + "HighVis": "HighVis" } diff --git a/translations/zh.json b/translations/zh.json index 45064e349..d73bafad7 100644 --- a/translations/zh.json +++ b/translations/zh.json @@ -180,5 +180,11 @@ "Instance Logo": "Instance Logo", "Bookmark this post": "Bookmark this post", "Undo the bookmark": "Undo the bookmark", - "Bookmarks": "Saves" + "Bookmarks": "Saves", + "Theme": "Theme", + "Default": "Default", + "Light": "Light", + "Purple": "Purple", + "Hacker": "Hacker", + "HighVis": "HighVis" } diff --git a/webinterface.py b/webinterface.py index c6ec076be..6fdc8023b 100644 --- a/webinterface.py +++ b/webinterface.py @@ -593,6 +593,7 @@ def htmlEditProfile(translate: {},baseDir: str,path: str,domain: str,port: int) instanceStr='' moderatorsStr='' + themesDropdown='' adminNickname=getConfigParam(baseDir,'admin') if path.startswith('/users/'+adminNickname+'/'): instanceDescription=getConfigParam(baseDir,'instanceDescription') @@ -620,7 +621,18 @@ def htmlEditProfile(translate: {},baseDir: str,path: str,domain: str,port: int) moderatorsStr+=' '+translate['A list of moderator nicknames. One per line.'] moderatorsStr+=' ' moderatorsStr+='' - + + themesDropdown= '