Skip to content

Commit 3ffd216

Browse files
author
Bot
committed
prevent popUp overlap
1 parent ae64dd3 commit 3ffd216

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

src/components/CodeEditor.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
@blur="onUnFocus"
1616
/>
1717
</div>
18-
<div class="pop-up" :class="{hidden: !showPopUp, clickable: popUpClickable, 'small-font': popUpText.length > 15}">
18+
<div class="pop-up" :class="{hidden: !showPopUp || room.newGameRequest, clickable: popUpClickable && !room.newGameRequest, 'small-font': popUpText.length > 15}">
1919
<div>
2020
<p v-show="popUpText === 'Try again'" class="hardcore-info">
2121
We can't generate accurate results from this round.
@@ -490,7 +490,7 @@ export default {
490490
},
491491
onUnFocus(_, ev) {
492492
if (ev) {
493-
if (DEV) ev.preventDefault();
493+
if (!DEV) ev.preventDefault(); // dev
494494
if (!this.isCompleted && this.popUpText !== 'Try again' && ev) {
495495
if (DEV) this.cm.focus();
496496
if (ev.relatedTarget !== null) {
@@ -501,7 +501,7 @@ export default {
501501
}
502502
} else {
503503
// eslint-disable-next-line no-lonely-if
504-
if (!DEV) this.popUp(true, 'Resume');
504+
if (DEV) this.popUp(true, 'Resume'); // dev
505505
}
506506
}
507507
}

src/components/LanguagesList.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
type="text"
77
placeholder="Search"
88
class="searchInput"
9+
:disabled="room.connected && !room.admin"
910
maxlength="12"
1011
autofocus
1112
@keydown.enter.stop="selectFirstFromSearch"
@@ -83,7 +84,7 @@ export default {
8384
const filtered = this.languagesList
8485
.filter((language) => language.name.toLowerCase().includes(search))
8586
.sort((a, b) => (b.name.toLowerCase().startsWith(search) ? 1 : -1));
86-
return filtered.length === 0 || (this.room.connected && !this.room.admin) ? this.languagesList : filtered;
87+
return filtered.length === 0 ? this.languagesList : filtered;
8788
}
8889
return [...Array(33)].map(() => ({ name: '...' }));
8990
},

src/components/RoomPanel.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,7 @@ export default {
260260
this.$store.commit('SET_ROOM_PROPERTY', ['connected', false]);
261261
this.$store.commit('SET_ROOM_PROPERTY', ['name', '']);
262262
this.$store.commit('SET_ROOM_PROPERTY', ['owner', false]);
263+
this.$store.commit('SET_ROOM_PROPERTY', ['newGameRequest', false]);
263264
if (action) {
264265
this.askForPlayerName = false;
265266
this.roomName = '';

0 commit comments

Comments
 (0)