basic support for custom widgets

This commit is contained in:
zadam
2020-03-16 21:16:09 +01:00
parent 8ae78a9e23
commit 173030e02e
14 changed files with 99 additions and 22 deletions

View File

@@ -67,6 +67,7 @@ import ProtectedSessionTypeWidget from "./widgets/type_widgets/protected_session
import BookTypeWidget from "./widgets/type_widgets/book.js";
import contextMenu from "./services/context_menu.js";
import DesktopLayout from "./widgets/desktop_layout.js";
import bundleService from "./services/bundle.js";
if (utils.isElectron()) {
require('electron').ipcRenderer.on('globalShortcut', async function(event, actionName) {
@@ -80,8 +81,12 @@ $('[data-toggle="tooltip"]').tooltip({
macInit.init();
appContext.setLayout(new DesktopLayout());
appContext.start();
bundleService.getWidgetBundlesByParent().then(widgetBundles => {
const desktopLayout = new DesktopLayout(widgetBundles);
appContext.setLayout(desktopLayout);
appContext.start();
});
noteTooltipService.setupGlobalTooltip();