aboutsummaryrefslogtreecommitdiff
path: root/src/components/settings_modal/settings_modal.js
blob: 8f55af7107f19dd0e29e02a244c6f46c7bc24b0c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import Modal from 'src/components/modal/modal.vue'

const SettingsModal = {
  components: {
    Modal,
    SettingsModalContent: () => import('./settings_modal_content.vue')
  },
  computed: {
    modalActivated () {
      return this.$store.state.interface.settingsModalState !== 'hidden'
    },
    modalPeeked () {
      return this.$store.state.interface.settingsModalState === 'minimized'
    }
  },
  methods: {
    closeModal () {
      this.$store.dispatch('closeSettingsModal')
    },
    peekModal () {
      this.$store.dispatch('togglePeekSettingsModal')
    }
  }
}

export default SettingsModal