feat: make user defaults global + add accessible view docs / refresh labels in admin

This commit is contained in:
NGPixel
2023-05-01 07:46:59 +00:00
parent e8cb5f9773
commit 9ecaebba32
34 changed files with 364 additions and 88 deletions
+4 -3
View File
@@ -58,9 +58,10 @@ export class Site extends Model {
footerExtra: '',
pageExtensions: ['md', 'html', 'txt'],
defaults: {
timezone: 'America/New_York',
dateFormat: 'YYYY-MM-DD',
timeFormat: '12h'
tocDepth: {
min: 1,
max: 2
}
},
features: {
ratings: false,
+3 -3
View File
@@ -588,10 +588,10 @@ export class User extends Model {
},
prefs: {
cvd: 'none',
timezone: 'America/New_York',
timezone: WIKI.config.userDefaults.timezone || 'America/New_York',
appearance: 'site',
dateFormat: 'YYYY-MM-DD',
timeFormat: '12h'
dateFormat: WIKI.config.userDefaults.dateFormat || 'YYYY-MM-DD',
timeFormat: WIKI.config.userDefaults.timeFormat || '12h'
}
})