feat: add torbox icon

This commit is contained in:
Zamitto 2025-02-01 17:53:08 -03:00
parent ebc70ce28f
commit bdf3a98c1a
4 changed files with 10 additions and 18 deletions

View File

@ -40,7 +40,8 @@ const bundleBackup = async (
return tarLocation; return tarLocation;
}; };
export const createBackup = async ( export const uploadSaveGame = async (
_event: Electron.IpcMainInvokeEvent,
objectId: string, objectId: string,
shop: GameShop, shop: GameShop,
downloadOptionTitle: string | null downloadOptionTitle: string | null
@ -102,13 +103,4 @@ export const createBackup = async (
}); });
}; };
const uploadSaveGame = async (
_event: Electron.IpcMainInvokeEvent,
objectId: string,
shop: GameShop,
downloadOptionTitle: string | null
) => {
return createBackup(objectId, shop, downloadOptionTitle);
};
registerEvent("uploadSaveGame", uploadSaveGame); registerEvent("uploadSaveGame", uploadSaveGame);

View File

@ -6,7 +6,6 @@ import axios from "axios";
import { exec } from "child_process"; import { exec } from "child_process";
import { ProcessPayload } from "./download/types"; import { ProcessPayload } from "./download/types";
import { gamesSublevel, levelKeys } from "@main/level"; import { gamesSublevel, levelKeys } from "@main/level";
import { createBackup } from "@main/events/cloud-save/upload-save-game";
const commands = { const commands = {
findWineDir: `lsof -c wine 2>/dev/null | grep '/drive_c/windows$' | head -n 1 | awk '{for(i=9;i<=NF;i++) printf "%s ", $i; print ""}'`, findWineDir: `lsof -c wine 2>/dev/null | grep '/drive_c/windows$' | head -n 1 | awk '{for(i=9;i<=NF;i++) printf "%s ", $i; print ""}'`,
@ -283,10 +282,6 @@ const onCloseGame = (game: Game) => {
gamesPlaytime.delete(levelKeys.game(game.shop, game.objectId)); gamesPlaytime.delete(levelKeys.game(game.shop, game.objectId));
if (game.remoteId) { if (game.remoteId) {
// create backup
// todo: check for hydra cloud?
createBackup(game.objectId, game.shop, "");
updateGamePlaytime( updateGamePlaytime(
game, game,
performance.now() - gamePlaytime.lastSyncTick, performance.now() - gamePlaytime.lastSyncTick,

View File

@ -5,7 +5,7 @@ import { useTranslation } from "react-i18next";
import { SettingsRealDebrid } from "./settings-real-debrid"; import { SettingsRealDebrid } from "./settings-real-debrid";
import { SettingsGeneral } from "./settings-general"; import { SettingsGeneral } from "./settings-general";
import { SettingsBehavior } from "./settings-behavior"; import { SettingsBehavior } from "./settings-behavior";
import torBoxLogo from "@renderer/assets/icons/torbox.webp";
import { SettingsDownloadSources } from "./settings-download-sources"; import { SettingsDownloadSources } from "./settings-download-sources";
import { import {
SettingsContextConsumer, SettingsContextConsumer,
@ -74,6 +74,13 @@ export default function Settings() {
} }
onClick={() => setCurrentCategoryIndex(index)} onClick={() => setCurrentCategoryIndex(index)}
> >
{index === 3 && (
<img
src={torBoxLogo}
alt="TorBox"
style={{ width: 13 }}
/>
)}
{category} {category}
</Button> </Button>
))} ))}

View File

@ -10,8 +10,6 @@ export type HydraCloudFeature =
| "backup" | "backup"
| "achievements-points"; | "achievements-points";
export type DebridServices = "RealDebrid" | "TorBox";
export interface GameRepack { export interface GameRepack {
id: number; id: number;
title: string; title: string;