mirror of
https://github.com/hcengineering/platform.git
synced 2024-12-23 03:22:19 +03:00
ubefr-8162: fix default language (#6621)
Signed-off-by: Alexey Zinoviev <alexey.zinoviev@xored.com>
This commit is contained in:
parent
85c285741a
commit
b5610a8bd5
@ -102,7 +102,7 @@ import print, { printId } from '@hcengineering/print'
|
|||||||
import sign from '@hcengineering/sign'
|
import sign from '@hcengineering/sign'
|
||||||
import analyticsCollector, { analyticsCollectorId } from '@hcengineering/analytics-collector'
|
import analyticsCollector, { analyticsCollectorId } from '@hcengineering/analytics-collector'
|
||||||
|
|
||||||
import { setDefaultLanguage } from '@hcengineering/theme'
|
import { setDefaultLanguage, initThemeStore } from '@hcengineering/theme'
|
||||||
import { configureNotifications } from './notifications'
|
import { configureNotifications } from './notifications'
|
||||||
import { Config, IPCMainExposed, Branding } from './types'
|
import { Config, IPCMainExposed, Branding } from './types'
|
||||||
|
|
||||||
@ -316,6 +316,8 @@ export async function configurePlatform (): Promise<void> {
|
|||||||
setMetadata(workbench.metadata.DefaultSpace, myBranding.defaultSpace ?? tracker.project.DefaultProject)
|
setMetadata(workbench.metadata.DefaultSpace, myBranding.defaultSpace ?? tracker.project.DefaultProject)
|
||||||
setMetadata(workbench.metadata.DefaultSpecial, myBranding.defaultSpecial ?? 'issues')
|
setMetadata(workbench.metadata.DefaultSpecial, myBranding.defaultSpecial ?? 'issues')
|
||||||
|
|
||||||
|
initThemeStore()
|
||||||
|
|
||||||
addEventListener(workbench.event.NotifyConnection, async (evt) => {
|
addEventListener(workbench.event.NotifyConnection, async (evt) => {
|
||||||
await ipcMain.setFrontCookie(
|
await ipcMain.setFrontCookie(
|
||||||
config.FRONT_URL,
|
config.FRONT_URL,
|
||||||
|
@ -110,7 +110,7 @@ import { coreId } from '@hcengineering/core'
|
|||||||
import presentation, { loadServerConfig, parsePreviewConfig, presentationId } from '@hcengineering/presentation'
|
import presentation, { loadServerConfig, parsePreviewConfig, presentationId } from '@hcengineering/presentation'
|
||||||
|
|
||||||
import { setMetadata } from '@hcengineering/platform'
|
import { setMetadata } from '@hcengineering/platform'
|
||||||
import { setDefaultLanguage } from '@hcengineering/theme'
|
import { setDefaultLanguage, initThemeStore } from '@hcengineering/theme'
|
||||||
|
|
||||||
import { preferenceId } from '@hcengineering/preference'
|
import { preferenceId } from '@hcengineering/preference'
|
||||||
import { uiId } from '@hcengineering/ui/src/plugin'
|
import { uiId } from '@hcengineering/ui/src/plugin'
|
||||||
@ -400,4 +400,6 @@ export async function configurePlatform() {
|
|||||||
setMetadata(workbench.metadata.DefaultApplication, myBranding.defaultApplication ?? 'tracker')
|
setMetadata(workbench.metadata.DefaultApplication, myBranding.defaultApplication ?? 'tracker')
|
||||||
setMetadata(workbench.metadata.DefaultSpace, myBranding.defaultSpace ?? tracker.project.DefaultProject)
|
setMetadata(workbench.metadata.DefaultSpace, myBranding.defaultSpace ?? tracker.project.DefaultProject)
|
||||||
setMetadata(workbench.metadata.DefaultSpecial, myBranding.defaultSpecial ?? 'issues')
|
setMetadata(workbench.metadata.DefaultSpecial, myBranding.defaultSpecial ?? 'issues')
|
||||||
|
|
||||||
|
initThemeStore()
|
||||||
}
|
}
|
||||||
|
@ -67,10 +67,14 @@ export class ThemeOptions {
|
|||||||
readonly language: string
|
readonly language: string
|
||||||
) {}
|
) {}
|
||||||
}
|
}
|
||||||
export const themeStore = writable<ThemeOptions>(
|
export const themeStore = writable<ThemeOptions>()
|
||||||
|
|
||||||
|
export function initThemeStore (): void {
|
||||||
|
themeStore.set(
|
||||||
new ThemeOptions(
|
new ThemeOptions(
|
||||||
getCurrentFontSize() === 'normal-font' ? 16 : 14,
|
getCurrentFontSize() === 'normal-font' ? 16 : 14,
|
||||||
isThemeDark(getCurrentTheme()),
|
isThemeDark(getCurrentTheme()),
|
||||||
getCurrentLanguage()
|
getCurrentLanguage()
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user