track if settings modal has been opened once

This commit is contained in:
Henry Jameson 2020-06-02 01:10:52 +03:00
parent 94436c1f85
commit 4fae2f8ea8
3 changed files with 8 additions and 1 deletions

View file

@ -30,6 +30,9 @@ const SettingsModal = {
modalActivated () {
return this.$store.state.interface.settingsModalState !== 'hidden'
},
modalOpenedOnce () {
return this.$store.state.interface.settingsModalLoaded
},
modalPeeked () {
return this.$store.state.interface.settingsModalState === 'minimized'
}

View file

@ -43,7 +43,7 @@
</button>
</div>
<div class="panel-body">
<SettingsModalContent v-if="modalActivated" />
<SettingsModalContent v-if="modalOpenedOnce" />
</div>
</div>
</Modal>

View file

@ -2,6 +2,7 @@ import { set, delete as del } from 'vue'
const defaultState = {
settingsModalState: 'hidden',
settingsModalLoaded: false,
settings: {
currentSaveStateNotice: null,
noticeClearTimeout: null,
@ -54,6 +55,9 @@ const interfaceMod = {
},
openSettingsModal (state) {
state.settingsModalState = 'visible'
if (!state.settingsModalLoaded) {
state.settingsModalLoaded = true
}
}
},
actions: {