mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
feat: enhance theme import flow with redirect and modal
This commit is contained in:
parent
ca75ad6721
commit
ef28337729
3 changed files with 52 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 { sleep } from "./helpers";
|
||||
|
||||
const { autoUpdater } = updater;
|
||||
|
||||
|
@ -92,11 +93,15 @@ const handleDeepLinkPath = (uri?: string) => {
|
|||
const authorCode = url.searchParams.get("author");
|
||||
|
||||
if (themeName && authorCode) {
|
||||
WindowManager.mainWindow?.webContents.send(
|
||||
"import-theme",
|
||||
themeName,
|
||||
authorCode
|
||||
);
|
||||
WindowManager.redirect(`settings?theme=true`);
|
||||
|
||||
sleep(1000).then(() => {
|
||||
WindowManager.mainWindow?.webContents.send(
|
||||
"import-theme",
|
||||
themeName,
|
||||
authorCode
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue