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 () { modalActivated () {
return this.$store.state.interface.settingsModalState !== 'hidden' return this.$store.state.interface.settingsModalState !== 'hidden'
}, },
modalOpenedOnce () {
return this.$store.state.interface.settingsModalLoaded
},
modalPeeked () { modalPeeked () {
return this.$store.state.interface.settingsModalState === 'minimized' return this.$store.state.interface.settingsModalState === 'minimized'
} }

View file

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

View file

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