feat: add deep link theme installation support

This commit is contained in:
Hachi-R 2025-02-15 22:18:42 -03:00
parent ec638d1a7a
commit 740d3ffaac
5 changed files with 67 additions and 7 deletions

View file

@ -10,6 +10,7 @@ import { PythonRPC } from "./services/python-rpc";
import { Aria2 } from "./services/aria2";
import { db, levelKeys } from "./level";
import { loadState } from "./main";
import { handleDeepLinkTheme } from "./events/themes/deeplink";
const { autoUpdater } = updater;
@ -86,6 +87,15 @@ const handleDeepLinkPath = (uri?: string) => {
if (url.host === "install-source") {
WindowManager.redirect(`settings${url.search}`);
}
if (url.host === "install-theme") {
const themeName = url.searchParams.get("theme");
const authorCode = url.searchParams.get("author");
if (themeName && authorCode) {
handleDeepLinkTheme(themeName, authorCode);
}
}
} catch (error) {
logger.error("Error handling deep link", uri, error);
}