mirror of
https://github.com/Fabio286/antares.git
synced 2025-06-05 21:59:22 +02:00
fix(Linux): ctrl+space shortcut not working
This commit is contained in:
@ -26,7 +26,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { defineAsyncComponent, onBeforeUnmount, onMounted, Ref, ref } from 'vue';
|
||||
import { defineAsyncComponent, onMounted, Ref, ref } from 'vue';
|
||||
import { storeToRefs } from 'pinia';
|
||||
import { ipcRenderer } from 'electron';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
@ -67,14 +67,9 @@ const { changeApplicationTheme } = settingsStore;
|
||||
|
||||
const isAllConnectionsModal: Ref<boolean> = ref(false);
|
||||
|
||||
const onKey = (e: KeyboardEvent) => {
|
||||
if (e.ctrlKey || e.metaKey) {
|
||||
if (e.code === 'Space') {
|
||||
isAllConnectionsModal.value = true;
|
||||
e.stopPropagation();
|
||||
}
|
||||
}
|
||||
};
|
||||
ipcRenderer.on('open-connections-modal', () => {
|
||||
isAllConnectionsModal.value = true;
|
||||
});
|
||||
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
setTimeout(() => {
|
||||
@ -82,8 +77,6 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
}, 1000);
|
||||
});
|
||||
|
||||
window.addEventListener('keypress', onKey);
|
||||
|
||||
onMounted(() => {
|
||||
ipcRenderer.send('check-for-updates');
|
||||
checkVersionUpdate();
|
||||
@ -126,10 +119,6 @@ onMounted(() => {
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
onBeforeUnmount(() => {
|
||||
window.removeEventListener('keydown', onKey);
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
Reference in New Issue
Block a user