refactor(web): dependency management (#2386)

This commit is contained in:
Mo
2023-08-05 12:48:39 -05:00
committed by GitHub
parent b07da5b663
commit d8d4052a52
274 changed files with 4065 additions and 3873 deletions

View File

@@ -60,7 +60,7 @@ export class ThemeManager extends AbstractUIServicee {
}
override async onAppStart() {
const desktopService = this.application.getDesktopService()
const desktopService = this.application.desktopManager
if (desktopService) {
this.eventDisposers.push(
desktopService.registerUpdateObserver((component) => {
@@ -167,7 +167,7 @@ export class ThemeManager extends AbstractUIServicee {
const useDeviceThemeSettings = this.application.getPreference(PrefKey.UseSystemColorScheme, false)
if (useDeviceThemeSettings) {
const prefersDarkColorScheme = (await this.application.mobileDevice().getColorScheme()) === 'dark'
const prefersDarkColorScheme = (await this.application.mobileDevice.getColorScheme()) === 'dark'
this.setThemeAsPerColorScheme(prefersDarkColorScheme)
}
}
@@ -187,7 +187,7 @@ export class ThemeManager extends AbstractUIServicee {
let prefersDarkColorScheme = window.matchMedia('(prefers-color-scheme: dark)').matches
if (this.application.isNativeMobileWeb()) {
prefersDarkColorScheme = (await this.application.mobileDevice().getColorScheme()) === 'dark'
prefersDarkColorScheme = (await this.application.mobileDevice.getColorScheme()) === 'dark'
}
this.setThemeAsPerColorScheme(prefersDarkColorScheme)
@@ -340,9 +340,7 @@ export class ThemeManager extends AbstractUIServicee {
if (this.application.isNativeMobileWeb() && !theme.layerable) {
const packageInfo = theme.featureDescription
setTimeout(() => {
this.application
.mobileDevice()
.handleThemeSchemeChange(packageInfo.isDark ?? false, this.getBackgroundColor())
this.application.mobileDevice.handleThemeSchemeChange(packageInfo.isDark ?? false, this.getBackgroundColor())
})
}
@@ -366,7 +364,7 @@ export class ThemeManager extends AbstractUIServicee {
if (this.themesActiveInTheUI.isEmpty()) {
if (this.application.isNativeMobileWeb()) {
this.application.mobileDevice().handleThemeSchemeChange(false, '#ffffff')
this.application.mobileDevice.handleThemeSchemeChange(false, '#ffffff')
}
this.toggleTranslucentUIColors()
}