refactor: remove dead exports, unused params, and stale config

This commit is contained in:
2026-04-04 13:36:46 -07:00
parent 2a4ca6f37e
commit 0dfe919d4f
6 changed files with 16 additions and 58 deletions
-10
View File
@@ -1,5 +1,4 @@
import Store from 'electron-store';
import { detectPlatform } from './platform';
export interface Keybind {
key: string;
@@ -112,10 +111,6 @@ export interface AppConfig {
y: number | undefined;
maximized: boolean;
};
platform: {
detectedOS: string;
gpuBackend: string;
};
}
export const DEFAULT_KEYBINDS: AppConfig['keybinds'] = {
@@ -131,7 +126,6 @@ export const DEFAULT_KEYBINDS: AppConfig['keybinds'] = {
fullscreenToggle: { key: 'F11', ctrl: false, shift: false, alt: false },
};
const platformInfo = detectPlatform();
export const config = new Store<AppConfig>({
name: 'krunker-civilian-config',
@@ -222,9 +216,5 @@ export const config = new Store<AppConfig>({
y: undefined,
maximized: true,
},
platform: {
detectedOS: platformInfo.os,
gpuBackend: platformInfo.gpuBackend,
},
},
});
+2 -2
View File
@@ -551,7 +551,7 @@ async function launchApp(): Promise<void> {
const ALLOWED_CONFIG_KEYS = new Set<string>([
'window', 'performance', 'game', 'swapper', 'matchmaker',
'keybinds', 'userscripts', 'ui', 'discord', 'translator',
'advanced', 'accounts', 'tabWindow', 'platform',
'advanced', 'accounts', 'tabWindow',
]);
ipcMain.handle('get-version', () => appVersion);
@@ -745,7 +745,7 @@ async function launchApp(): Promise<void> {
// ── Action button IPC handlers ──
ipcMain.handle('open-electron-log', () => {
shell.openPath(getLogPath('electron'));
shell.openPath(getLogPath());
});
ipcMain.handle('reset-swapper', async () => {
try {
+1 -1
View File
@@ -67,7 +67,7 @@ function makeLogger(getStream: () => WriteStream) {
export const electronLog = makeLogger(() => electronStream);
export function getLogPath(_type: 'electron'): string {
export function getLogPath(): string {
init();
return electronPath;
}