mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
feat: add deep link theme installation support
This commit is contained in:
parent
ec638d1a7a
commit
740d3ffaac
5 changed files with 67 additions and 7 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue