Skip to content

Commit b2d6106

Browse files
committed
Fixed hidden donate preventing controls, first donate 15 min
1 parent 5d1bd42 commit b2d6106

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

src/views/Visualizer.vue

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,7 @@
3939
</div>
4040
</div>
4141
</modal>
42-
<modal
43-
:show="settings.showDonate && showDonate && !showWelcome"
44-
:peek="!showControls"
45-
peekOffset="80px"
46-
>
42+
<modal :show="showDonate && !showWelcome" :peek="!showControls" peekOffset="80px">
4743
<donate-form h="h2" class="vis__donate" />
4844
<div class="flex">
4945
<label class="btn block" v-if="donateNumShow > 1">
@@ -139,8 +135,8 @@ export default {
139135
if (this.noMoreDonate) this.stopShowingDonate()
140136
},
141137
142-
displayDonate() {
143-
this.showDonate = true
138+
displayDonate(force = false) {
139+
this.showDonate = force || this.settings.showDonate
144140
this.donateNumShow++
145141
},
146142
@@ -168,7 +164,7 @@ export default {
168164
},
169165
170166
created() {
171-
this.showDonateTO = setTimeout(this.displayDonate, 6e4 * 20) // first at 20 min
167+
this.showDonateTO = setTimeout(this.displayDonate, 6e4 * 15) // first at 15 min
172168
this.showDonateIV = setInterval(this.displayDonate, 6e4 * 60) // then every 60 min
173169
174170
const chrome = window.chrome !== undefined
@@ -207,7 +203,7 @@ export default {
207203
208204
const onKeydown = e => {
209205
if (e.code === 'KeyD') {
210-
this.showDonate = true
206+
this.displayDonate(true)
211207
}
212208
if (e.code === 'Escape') {
213209
e.preventDefault()

0 commit comments

Comments
 (0)