mirror of
https://github.com/pvrzz/directify.git
synced 2026-11-29 05:22:24 +00:00
Add directify desktop app source
osu!lazer-style beatmap search (mode, mania key count, genre, language, star-rating range) against catboy.best-compatible mirrors with automatic fallback, library management with offline-cached cover art, a collection.db editor, portable beatpack backup/restore, i18n (en/es/ja), light/dark theme, keyboard shortcuts, proxy support, and an in-app GitHub Releases update check.
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
import { contextBridge, ipcRenderer } from "electron";
|
||||
import type { DirectifyIpcApi } from "../ipc-types.js";
|
||||
|
||||
const api: DirectifyIpcApi = {
|
||||
getSettings: () => ipcRenderer.invoke("settings:get"),
|
||||
saveSettings: (settings) => ipcRenderer.invoke("settings:save", settings),
|
||||
|
||||
detectOsuInstall: () => ipcRenderer.invoke("osu:detectInstall"),
|
||||
pickOsuInstallDir: () => ipcRenderer.invoke("osu:pickInstallDir"),
|
||||
|
||||
listInstalledBeatmapFolders: () => ipcRenderer.invoke("library:listFolders"),
|
||||
scanLibrary: () => ipcRenderer.invoke("library:scan"),
|
||||
deleteBeatmapSet: (folderName) => ipcRenderer.invoke("library:delete", folderName),
|
||||
|
||||
pickBackupDestination: () => ipcRenderer.invoke("backup:pickDestination"),
|
||||
backupLibrary: (destZipPath, folderNames) =>
|
||||
ipcRenderer.invoke("backup:create", destZipPath, folderNames),
|
||||
pickBackupToRestore: () => ipcRenderer.invoke("backup:pickToRestore"),
|
||||
restoreBackup: (zipPath) => ipcRenderer.invoke("backup:restore", zipPath),
|
||||
|
||||
searchBeatmaps: (query) => ipcRenderer.invoke("beatmaps:search", query),
|
||||
installBeatmapSet: (set) => ipcRenderer.invoke("beatmaps:install", set),
|
||||
|
||||
readCollections: () => ipcRenderer.invoke("collections:read"),
|
||||
writeCollections: (db) => ipcRenderer.invoke("collections:write", db),
|
||||
|
||||
checkForUpdate: () => ipcRenderer.invoke("app:checkForUpdate"),
|
||||
openExternal: (url) => ipcRenderer.invoke("app:openExternal", url),
|
||||
};
|
||||
|
||||
contextBridge.exposeInMainWorld("directify", api);
|
||||
Reference in New Issue
Block a user