feat: Markdown, Rich text, Code, and Checklist note types have been moved to the new Plugins preferences pane. Previous notes created using these types will not experience any disruption. To create new notes using these types, you can reinstall them from the Plugins preferences screen. It is recommended to use the Super note type in place of these replaced note types. (#2630)

This commit is contained in:
Mo
2023-11-29 10:18:55 -06:00
committed by GitHub
parent bd971d5473
commit c43b593c60
58 changed files with 1106 additions and 680 deletions

View File

@@ -15,6 +15,7 @@ export const Web_TYPES = {
RouteService: Symbol.for('RouteService'),
ThemeManager: Symbol.for('ThemeManager'),
VaultDisplayService: Symbol.for('VaultDisplayService'),
PluginsService: Symbol.for('PluginsService'),
// Controllers
AccountMenuController: Symbol.for('AccountMenuController'),

View File

@@ -9,6 +9,7 @@ import {
IsNativeIOS,
IsNativeMobileWeb,
KeyboardService,
PluginsService,
RouteService,
ThemeManager,
ToastService,
@@ -145,6 +146,17 @@ export class WebDependencies extends DependencyContainer {
return new ChangelogService(application.environment, application.storage)
})
this.bind(Web_TYPES.PluginsService, () => {
return new PluginsService(
application.items,
application.mutator,
application.sync,
application.legacyApi,
application.alerts,
application.options.crypto,
)
})
this.bind(Web_TYPES.IsMobileDevice, () => {
return new IsMobileDevice(this.get<IsNativeMobileWeb>(Web_TYPES.IsNativeMobileWeb))
})

View File

@@ -38,6 +38,7 @@ import {
IsNativeIOS,
IsNativeMobileWeb,
KeyboardService,
PluginsServiceInterface,
RouteServiceInterface,
ThemeManager,
VaultDisplayServiceInterface,
@@ -575,6 +576,10 @@ export class WebApplication extends SNApplication implements WebApplicationInter
return this.deps.get<ChangelogService>(Web_TYPES.ChangelogService)
}
get pluginsService(): PluginsServiceInterface {
return this.deps.get<PluginsServiceInterface>(Web_TYPES.PluginsService)
}
get momentsService(): MomentsService {
return this.deps.get<MomentsService>(Web_TYPES.MomentsService)
}