Added dev tools support
This commit is contained in:
@@ -7,6 +7,7 @@ contextBridge.exposeInMainWorld('api', {
|
||||
removeFavorite: (id) => ipcRenderer.invoke('db:removeFavorite', id),
|
||||
|
||||
search: (source, query) => ipcRenderer.invoke('api:search', source, query),
|
||||
toggleDevTools: () => ipcRenderer.send('toggle-dev-tools'),
|
||||
|
||||
getSources: () => ipcRenderer.invoke('api:getSources'),
|
||||
});
|
||||
@@ -1,6 +1,6 @@
|
||||
const GITHUB_OWNER = 'ItsSkaiya';
|
||||
const GITHUB_REPO = 'WaifuBoard';
|
||||
const CURRENT_VERSION = 'v1.4.0';
|
||||
const CURRENT_VERSION = 'v1.4.1';
|
||||
const UPDATE_CHECK_INTERVAL = 5 * 60 * 1000;
|
||||
|
||||
let currentVersionDisplay;
|
||||
|
||||
@@ -1,7 +1,13 @@
|
||||
export function setupGlobalKeybinds(searchModal) {
|
||||
export function setupGlobalKeybinds() {
|
||||
document.addEventListener('keydown', (e) => {
|
||||
if (e.key === 'Escape') {
|
||||
searchModal.classList.add('hidden');
|
||||
if (e.altKey && (e.key === 'i' || e.key === 'I')) {
|
||||
e.preventDefault();
|
||||
|
||||
if (window.api && window.api.toggleDevTools) {
|
||||
window.api.toggleDevTools();
|
||||
} else {
|
||||
console.warn('window.api.toggleDevTools is not defined in preload.js');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user