mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-19 01:03:57 +00:00
feat: adding optional common redist install
This commit is contained in:
2
src/renderer/src/declaration.d.ts
vendored
2
src/renderer/src/declaration.d.ts
vendored
@@ -237,7 +237,7 @@ declare global {
|
||||
canInstallCommonRedist: () => Promise<boolean>;
|
||||
installCommonRedist: () => Promise<void>;
|
||||
onCommonRedistProgress: (
|
||||
cb: (value: { component: string; complete: boolean }) => void
|
||||
cb: (value: { log: string; complete: boolean }) => void
|
||||
) => () => Electron.IpcRenderer;
|
||||
platform: NodeJS.Platform;
|
||||
|
||||
|
||||
@@ -54,6 +54,12 @@ export function SettingsGeneral() {
|
||||
setCanInstallCommonRedist(canInstall);
|
||||
});
|
||||
|
||||
const interval = setInterval(() => {
|
||||
window.electron.canInstallCommonRedist().then((canInstall) => {
|
||||
setCanInstallCommonRedist(canInstall);
|
||||
});
|
||||
}, 1000 * 5);
|
||||
|
||||
setLanguageOptions(
|
||||
orderBy(
|
||||
Object.entries(languageResources).map(([language, value]) => {
|
||||
@@ -66,6 +72,10 @@ export function SettingsGeneral() {
|
||||
"asc"
|
||||
)
|
||||
);
|
||||
|
||||
return () => {
|
||||
clearInterval(interval);
|
||||
};
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
Reference in New Issue
Block a user