mirror of
				https://github.com/hydralauncher/hydra.git
				synced 2025-03-09 15:40:26 +00:00 
			
		
		
		
	fix: fixing typecheck errors
This commit is contained in:
		
							parent
							
								
									ab8721f2e5
								
							
						
					
					
						commit
						6b2a480fa6
					
				
					 9 changed files with 19 additions and 16 deletions
				
			
		
							
								
								
									
										2
									
								
								.github/workflows/build.yml
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/workflows/build.yml
									
										
									
									
										vendored
									
									
								
							| 
						 | 
				
			
			@ -2,7 +2,7 @@ name: Build
 | 
			
		|||
 | 
			
		||||
on:
 | 
			
		||||
  push:
 | 
			
		||||
    branches: "**"
 | 
			
		||||
    branches: main
 | 
			
		||||
 | 
			
		||||
jobs:
 | 
			
		||||
  build:
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										4
									
								
								.github/workflows/contributors.yml
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								.github/workflows/contributors.yml
									
										
									
									
										vendored
									
									
								
							| 
						 | 
				
			
			@ -2,10 +2,10 @@ name: Contributors
 | 
			
		|||
 | 
			
		||||
on:
 | 
			
		||||
  push:
 | 
			
		||||
    branches: "**"
 | 
			
		||||
    branches: main
 | 
			
		||||
 | 
			
		||||
jobs:
 | 
			
		||||
  lint:
 | 
			
		||||
  contributors:
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
 | 
			
		||||
    steps:
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										0
									
								
								resources/hydra.db
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								resources/hydra.db
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -109,7 +109,7 @@ export const resolveDatabaseUpdates = async () => {
 | 
			
		|||
  const updateDataSource = createDataSource({
 | 
			
		||||
    database: app.isPackaged
 | 
			
		||||
      ? path.join(process.resourcesPath, "hydra.db")
 | 
			
		||||
      : path.join(__dirname, "..", "..", "resources", "hydra.db"),
 | 
			
		||||
      : path.join(__dirname, "..", "..", "hydra.db"),
 | 
			
		||||
  });
 | 
			
		||||
 | 
			
		||||
  return updateDataSource.initialize().then(async () => {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										1
									
								
								src/renderer/src/declaration.d.ts
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								src/renderer/src/declaration.d.ts
									
										
									
									
										vendored
									
									
								
							| 
						 | 
				
			
			@ -21,6 +21,7 @@ declare global {
 | 
			
		|||
    startGameDownload: (
 | 
			
		||||
      repackId: number,
 | 
			
		||||
      objectID: string,
 | 
			
		||||
      title: string,
 | 
			
		||||
      shop: GameShop,
 | 
			
		||||
      downloadPath: string
 | 
			
		||||
    ) => Promise<Game>;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -75,7 +75,7 @@ export function GameDetails() {
 | 
			
		|||
 | 
			
		||||
  const getGame = useCallback(() => {
 | 
			
		||||
    window.electron
 | 
			
		||||
      .getGameByObjectID(objectID)
 | 
			
		||||
      .getGameByObjectID(objectID!)
 | 
			
		||||
      .then((result) => setGame(result));
 | 
			
		||||
  }, [setGame, objectID]);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -92,7 +92,7 @@ export function GameDetails() {
 | 
			
		|||
    getRandomGame();
 | 
			
		||||
 | 
			
		||||
    window.electron
 | 
			
		||||
      .getGameShopDetails(objectID, "steam", getSteamLanguage(i18n.language))
 | 
			
		||||
      .getGameShopDetails(objectID!, "steam", getSteamLanguage(i18n.language))
 | 
			
		||||
      .then((result) => {
 | 
			
		||||
        if (!result) {
 | 
			
		||||
          navigate(-1);
 | 
			
		||||
| 
						 | 
				
			
			@ -100,7 +100,7 @@ export function GameDetails() {
 | 
			
		|||
        }
 | 
			
		||||
 | 
			
		||||
        window.electron
 | 
			
		||||
          .getHowLongToBeat(objectID, "steam", result.name)
 | 
			
		||||
          .getHowLongToBeat(objectID!, "steam", result.name)
 | 
			
		||||
          .then((data) => {
 | 
			
		||||
            setHowLongToBeat({ isLoading: false, data });
 | 
			
		||||
          });
 | 
			
		||||
| 
						 | 
				
			
			@ -191,7 +191,7 @@ export function GameDetails() {
 | 
			
		|||
        <section className={styles.container}>
 | 
			
		||||
          <div className={styles.hero}>
 | 
			
		||||
            <AsyncImage
 | 
			
		||||
              src={steamUrlBuilder.libraryHero(objectID)}
 | 
			
		||||
              src={steamUrlBuilder.libraryHero(objectID!)}
 | 
			
		||||
              className={styles.heroImage}
 | 
			
		||||
              alt={game?.title}
 | 
			
		||||
              onSettled={handleImageSettled}
 | 
			
		||||
| 
						 | 
				
			
			@ -199,7 +199,7 @@ export function GameDetails() {
 | 
			
		|||
            <div className={styles.heroBackdrop}>
 | 
			
		||||
              <div className={styles.heroContent}>
 | 
			
		||||
                <AsyncImage
 | 
			
		||||
                  src={steamUrlBuilder.logo(objectID)}
 | 
			
		||||
                  src={steamUrlBuilder.logo(objectID!)}
 | 
			
		||||
                  style={{ width: 300, alignSelf: "flex-end" }}
 | 
			
		||||
                />
 | 
			
		||||
              </div>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -29,7 +29,7 @@ export function RepacksModal({
 | 
			
		|||
  onClose,
 | 
			
		||||
}: RepacksModalProps) {
 | 
			
		||||
  const [filteredRepacks, setFilteredRepacks] = useState<GameRepack[]>([]);
 | 
			
		||||
  const [repack, setRepack] = useState<GameRepack>(null);
 | 
			
		||||
  const [repack, setRepack] = useState<GameRepack | null>(null);
 | 
			
		||||
 | 
			
		||||
  const repackersFriendlyNames = useAppSelector(
 | 
			
		||||
    (state) => state.repackersFriendlyNames.value
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -13,7 +13,7 @@ export interface SelectFolderModalProps {
 | 
			
		|||
  gameDetails: ShopDetails;
 | 
			
		||||
  onClose: () => void;
 | 
			
		||||
  startDownload: (repackId: number, downloadPath: string) => Promise<void>;
 | 
			
		||||
  repack: GameRepack;
 | 
			
		||||
  repack: GameRepack | null;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export function SelectFolderModal({
 | 
			
		||||
| 
						 | 
				
			
			@ -61,10 +61,12 @@ export function SelectFolderModal({
 | 
			
		|||
  };
 | 
			
		||||
 | 
			
		||||
  const handleStartClick = () => {
 | 
			
		||||
    setDownloadStarting(true);
 | 
			
		||||
    startDownload(repack.id, selectedPath).finally(() => {
 | 
			
		||||
      setDownloadStarting(false);
 | 
			
		||||
    });
 | 
			
		||||
    if (repack) {
 | 
			
		||||
      setDownloadStarting(true);
 | 
			
		||||
      startDownload(repack.id, selectedPath).finally(() => {
 | 
			
		||||
        setDownloadStarting(false);
 | 
			
		||||
      });
 | 
			
		||||
    }
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  return (
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -51,7 +51,7 @@ export function Home() {
 | 
			
		|||
  const handleSelectCategory = (category: CatalogueCategory) => {
 | 
			
		||||
    if (category !== currentCategory) {
 | 
			
		||||
      getCatalogue(category);
 | 
			
		||||
      navigate(`/?category=${category}`, { replace: true });
 | 
			
		||||
      navigate(`/?category=${category}`);
 | 
			
		||||
    }
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue