import BasicWidget from "../basic_widget.js"; import protectedSessionHolder from "../../services/protected_session_holder.js"; const WIDGET_TPL = `
`; class MobileGlobalButtonsWidget extends BasicWidget { doRender() { this.$widget = $(WIDGET_TPL); this.updateSettings(); } protectedSessionStartedEvent() { this.updateSettings(); } updateSettings() { const protectedSession = protectedSessionHolder.isProtectedSessionAvailable(); this.$widget.find('[data-trigger-command="enterProtectedSession"]').toggle(!protectedSession); this.$widget.find('[data-trigger-command="leaveProtectedSession"]').toggle(protectedSession); } } export default MobileGlobalButtonsWidget;