sync status widget

This commit is contained in:
zadam
2021-03-21 22:43:41 +01:00
parent 1a9919a866
commit 392a00ac17
9 changed files with 156 additions and 112 deletions

View File

@@ -1,6 +1,5 @@
import BasicWidget from "./basic_widget.js";
import utils from "../services/utils.js";
import syncService from "../services/sync.js";
const TPL = `
<div class="global-menu-wrapper">
@@ -45,11 +44,6 @@ const TPL = `
Options
</a>
<a class="dropdown-item sync-now-button" title="Trigger sync">
<span class="bx bx-refresh"></span>
Sync now
</a>
<a class="dropdown-item" data-trigger-command="openNewWindow">
<span class="bx bx-window-open"></span>
Open new window
@@ -121,8 +115,6 @@ export default class GlobalMenuWidget extends BasicWidget {
this.$widget.find(".show-about-dialog-button").on('click',
() => import("../dialogs/about.js").then(d => d.showDialog()));
this.$widget.find(".sync-now-button").on('click', () => syncService.syncNow());
this.$widget.find(".logout-button").toggle(!utils.isElectron());
this.$widget.find(".open-dev-tools-button").toggle(utils.isElectron());