mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-11 13:56:16 +00:00
feat: adding level generic interface
This commit is contained in:
@@ -2,6 +2,7 @@ import { createContext, useCallback, useEffect, useState } from "react";
|
|||||||
|
|
||||||
import { setUserPreferences } from "@renderer/features";
|
import { setUserPreferences } from "@renderer/features";
|
||||||
import { useAppDispatch } from "@renderer/hooks";
|
import { useAppDispatch } from "@renderer/hooks";
|
||||||
|
import { levelDBService } from "@renderer/services/leveldb.service";
|
||||||
import type { UserBlocks, UserPreferences } from "@types";
|
import type { UserBlocks, UserPreferences } from "@types";
|
||||||
import { useSearchParams } from "react-router-dom";
|
import { useSearchParams } from "react-router-dom";
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import { levelDBService } from "@renderer/services/leveldb.service";
|
|||||||
import type { DownloadSource } from "@types";
|
import type { DownloadSource } from "@types";
|
||||||
import { useAppDispatch } from "./redux";
|
import { useAppDispatch } from "./redux";
|
||||||
import { setGenres, setTags } from "@renderer/features";
|
import { setGenres, setTags } from "@renderer/features";
|
||||||
import type { DownloadSource } from "@types";
|
|
||||||
|
|
||||||
export const externalResourcesInstance = axios.create({
|
export const externalResourcesInstance = axios.create({
|
||||||
baseURL: import.meta.env.RENDERER_VITE_EXTERNAL_RESOURCES_URL,
|
baseURL: import.meta.env.RENDERER_VITE_EXTERNAL_RESOURCES_URL,
|
||||||
|
|||||||
@@ -152,6 +152,7 @@ export function RepacksModal({
|
|||||||
};
|
};
|
||||||
return levelDBService.put(gameKey, updated, "games");
|
return levelDBService.put(gameKey, updated, "games");
|
||||||
}
|
}
|
||||||
|
return Promise.resolve();
|
||||||
})
|
})
|
||||||
.catch(() => {});
|
.catch(() => {});
|
||||||
|
|
||||||
|
|||||||
@@ -66,6 +66,7 @@ export const ImportThemeModal = ({
|
|||||||
}
|
}
|
||||||
|
|
||||||
const allThemes = (await levelDBService.values("themes")) as {
|
const allThemes = (await levelDBService.values("themes")) as {
|
||||||
|
id: string;
|
||||||
isActive?: boolean;
|
isActive?: boolean;
|
||||||
}[];
|
}[];
|
||||||
const activeTheme = allThemes.find((t) => t.isActive);
|
const activeTheme = allThemes.find((t) => t.isActive);
|
||||||
|
|||||||
Reference in New Issue
Block a user