mirror of https://gitlab.com/bashrc2/epicyon
Reset theme when removing custom font
parent
84def5e4aa
commit
80a9634572
30
daemon.py
30
daemon.py
|
@ -5792,22 +5792,20 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
|
|
||||||
if fields.get('removeCustomFont'):
|
if fields.get('removeCustomFont'):
|
||||||
if fields['removeCustomFont'] == 'on':
|
if fields['removeCustomFont'] == 'on':
|
||||||
if os.path.isfile(self.server.baseDir +
|
fontExt = ('woff', 'woff2', 'otf', 'ttf')
|
||||||
'/fonts/custom.woff'):
|
for ext in fontExt:
|
||||||
os.remove(self.server.baseDir +
|
if os.path.isfile(self.server.baseDir +
|
||||||
'/fonts/custom.woff')
|
'/fonts/custom.' + ext):
|
||||||
elif os.path.isfile(self.server.baseDir +
|
os.remove(self.server.baseDir +
|
||||||
'/fonts/custom.woff2'):
|
'/fonts/custom.' + ext)
|
||||||
os.remove(self.server.baseDir +
|
setTheme(self.server.baseDir,
|
||||||
'/fonts/custom.woff2')
|
getTheme(self.server.baseDir))
|
||||||
elif os.path.isfile(self.server.baseDir +
|
if os.path.isfile(self.server.baseDir +
|
||||||
'/fonts/custom.otf'):
|
'/fonts/custom.' + ext +
|
||||||
os.remove(self.server.baseDir +
|
'.etag'):
|
||||||
'/fonts/custom.otf')
|
os.remove(self.server.baseDir +
|
||||||
elif os.path.isfile(self.server.baseDir +
|
'/fonts/custom.' + ext +
|
||||||
'/fonts/custom.ttf'):
|
'.etag')
|
||||||
os.remove(self.server.baseDir +
|
|
||||||
'/fonts/custom.ttf')
|
|
||||||
|
|
||||||
if fields.get('mediaInstance'):
|
if fields.get('mediaInstance'):
|
||||||
self.server.mediaInstance = False
|
self.server.mediaInstance = False
|
||||||
|
|
Loading…
Reference in New Issue