yandere_fe/src/components/settings_modal/settings_modal.js

37 lines
1007 B
JavaScript
Raw Normal View History

import Modal from 'src/components/modal/modal.vue'
import PanelLoading from 'src/components/panel_loading/panel_loading.vue'
import AsyncComponentError from 'src/components/async_component_error/async_component_error.vue'
import getResettableAsyncComponent from 'src/services/resettable_async_component.js'
2020-05-03 07:36:12 -07:00
const SettingsModal = {
components: {
Modal,
SettingsModalContent: getResettableAsyncComponent(
() => import('./settings_modal_content.vue'),
{
loading: PanelLoading,
error: AsyncComponentError,
2020-05-25 06:32:32 -07:00
delay: 0
}
)
2020-05-03 07:36:12 -07:00
},
methods: {
closeModal () {
this.$store.dispatch('closeSettingsModal')
},
peekModal () {
this.$store.dispatch('togglePeekSettingsModal')
}
},
2020-05-03 07:36:12 -07:00
computed: {
modalActivated () {
return this.$store.state.interface.settingsModalState !== 'hidden'
},
modalPeeked () {
return this.$store.state.interface.settingsModalState === 'minimized'
2020-05-03 07:36:12 -07:00
}
2020-05-24 17:43:55 -07:00
}
2020-05-03 07:36:12 -07:00
}
export default SettingsModal