feat: rtl display + dark theme improvements
This commit is contained in:
@@ -31,6 +31,7 @@ defaults:
|
||||
autoUpdate: true
|
||||
namespaces: []
|
||||
namespacing: false
|
||||
rtl: false
|
||||
telemetry:
|
||||
clientId: ''
|
||||
isEnabled: false
|
||||
|
@@ -57,6 +57,10 @@ module.exports = {
|
||||
WIKI.config.lang.autoUpdate = args.autoUpdate
|
||||
WIKI.config.lang.namespacing = args.namespacing
|
||||
WIKI.config.lang.namespaces = args.namespaces
|
||||
|
||||
const newLocale = await WIKI.models.locales.query().select('isRTL').where('code', args.locale).first()
|
||||
WIKI.config.lang.rtl = newLocale.isRTL
|
||||
|
||||
await WIKI.configSvc.saveToDb(['lang'])
|
||||
|
||||
await WIKI.lang.setCurrentLocale(args.locale)
|
||||
|
@@ -29,7 +29,7 @@ html
|
||||
|
||||
//- Site Properties
|
||||
script.
|
||||
var siteConfig = !{JSON.stringify({ title: config.title, theme: config.theming.theme, darkMode: config.theming.darkMode, lang: config.lang.code, company: config.company })}
|
||||
var siteConfig = !{JSON.stringify({ title: config.title, theme: config.theming.theme, darkMode: config.theming.darkMode, lang: config.lang.code, rtl: config.lang.rtl, company: config.company })}
|
||||
|
||||
//- CSS
|
||||
|
||||
|
Reference in New Issue
Block a user