import $ from 'jquery'; import Vue from 'vue'; import collapseIcon from './icons/fullscreen_collapse.svg'; import expandIcon from './icons/fullscreen_expand.svg'; export default (ModalStore, boardsStore) => { const issueBoardsContent = document.querySelector('.content-wrapper > .js-focus-mode-board'); return new Vue({ el: document.getElementById('js-toggle-focus-btn'), data: { modal: ModalStore.store, store: boardsStore.state, isFullscreen: false, }, methods: { toggleFocusMode() { $(this.$refs.toggleFocusModeButton).tooltip('hide'); issueBoardsContent.classList.toggle('is-focused'); this.isFullscreen = !this.isFullscreen; }, }, template: `
${collapseIcon} ${expandIcon}
`, }); };