mirror of
https://github.com/marktext/marktext.git
synced 2025-05-02 21:20:36 +08:00
25 lines
863 B
JavaScript
25 lines
863 B
JavaScript
import WindowManager from '../app/windowManager'
|
|
import Preference from '../preferences'
|
|
import DataCenter from '../dataCenter'
|
|
import Keybindings from '../keyboard/shortcutHandler'
|
|
import AppMenu from '../menu'
|
|
|
|
class Accessor {
|
|
/**
|
|
* @param {AppEnvironment} appEnvironment The application environment instance.
|
|
*/
|
|
constructor (appEnvironment) {
|
|
const userDataPath = appEnvironment.paths.userDataPath
|
|
|
|
this.env = appEnvironment
|
|
this.paths = appEnvironment.paths // export paths to make it better accessible
|
|
this.preferences = new Preference(this.paths)
|
|
this.dataCenter = new DataCenter(this.paths)
|
|
this.keybindings = new Keybindings(userDataPath)
|
|
this.menu = new AppMenu(this.preferences, this.keybindings, userDataPath)
|
|
this.windowManager = new WindowManager(this.menu, this.preferences)
|
|
}
|
|
}
|
|
|
|
export default Accessor
|