Skip to content

Commit 2a82f2e

Browse files
committed
systemDialog:
- Press '/' once: Open - Press '/' again: Close
1 parent a1bb12d commit 2a82f2e

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "emulsion",
3-
"version": "0.10.34",
3+
"version": "0.11.00",
44
"summary": "Better gaming throught chemistry",
55
"description": "Display your games collection into responsive galleries, manage game metadata, cover art and emulator configuration. Launch your games in style.",
66
"homepage": "https://yphil.gitlab.io/emulsion",

src/js/dialog.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -636,6 +636,12 @@ export async function downloadMetaDialog(imagesCount, metaCount) {
636636
}
637637

638638
export function systemDialog(focusButton = 'cancel') {
639+
640+
if (DialogManager.currentDialog && DialogManager.currentDialog.id === 'system-dialog-overlay') {
641+
closeDialog();
642+
return;
643+
}
644+
639645
const overlay = document.getElementById('system-dialog-overlay');
640646
const dialog = overlay.querySelector('.dialog');
641647
const restartButton = dialog.querySelector('.restart');
@@ -677,6 +683,10 @@ export function systemDialog(focusButton = 'cancel') {
677683
break;
678684

679685
case '/':
686+
// Close dialog instead of activating current button
687+
closeDialog();
688+
break;
689+
680690
case 'Enter':
681691
document.activeElement.click();
682692
break;

0 commit comments

Comments
 (0)