From 9642212ffd26daf4f0e0b011c10d3fcffc9cad74 Mon Sep 17 00:00:00 2001 From: Fhilipe Coelho Date: Sun, 14 Apr 2024 22:16:57 -0300 Subject: [PATCH] refactor: changing res variable name to something more descriptive --- .github/workflows/sync.yml | 26 ------------------- src/renderer/pages/downloads/downloads.tsx | 6 ++--- .../pages/game-details/hero-panel.tsx | 6 ++--- .../shared-modals/binary-not-found-modal.tsx | 2 +- 4 files changed, 7 insertions(+), 33 deletions(-) delete mode 100644 .github/workflows/sync.yml diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml deleted file mode 100644 index 3755cccd..00000000 --- a/.github/workflows/sync.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: Sync - -on: - push: - branches: "**" - -jobs: - sync: - runs-on: ubuntu-latest - - steps: - - name: Check out Git repository - uses: actions/checkout@v4 - - - name: Sync with remote repository - run: | - rm -rf .git - git init - git remote add origin https://hydralauncher:${{ secrets.HYDRA_GITHUB_SECRET }}@github.com/hydralauncher/hydra - git config --global init.defaultBranch main - git config --global user.name "GitHub Actions" - git config --global user.email "<>" - git checkout -b main - git add . - git commit -a -m "$GITHUB_SHA" - git push origin main --force diff --git a/src/renderer/pages/downloads/downloads.tsx b/src/renderer/pages/downloads/downloads.tsx index 813b888d..196eb176 100644 --- a/src/renderer/pages/downloads/downloads.tsx +++ b/src/renderer/pages/downloads/downloads.tsx @@ -19,7 +19,7 @@ export function Downloads() { const navigate = useNavigate(); const [filteredLibrary, setFilteredLibrary] = useState([]); - const [showBinaryNotFoundModal, setShowBinaryNotFoundModal] = useState(false); + const [showBinaryNotFoundModal, setShowBinaryNotFoundModal] = useState(false); const { game: gameDownloading, @@ -39,8 +39,8 @@ export function Downloads() { }, [library]); const openGame = (gameId: number) => - window.electron.openGame(gameId).then(res => { - if (!res) setShowBinaryNotFoundModal(true); + window.electron.openGame(gameId).then(isBinaryInPath => { + if (!isBinaryInPath) setShowBinaryNotFoundModal(true); updateLibrary(); }); diff --git a/src/renderer/pages/game-details/hero-panel.tsx b/src/renderer/pages/game-details/hero-panel.tsx index 71ff506a..386528a5 100644 --- a/src/renderer/pages/game-details/hero-panel.tsx +++ b/src/renderer/pages/game-details/hero-panel.tsx @@ -28,7 +28,7 @@ export function HeroPanel({ }: HeroPanelProps) { const { t } = useTranslation("game_details"); - const [showBinaryNotFoundModal, setShowBinaryNotFoundModal] = useState(false); + const [showBinaryNotFoundModal, setShowBinaryNotFoundModal] = useState(false); const { game: gameDownloading, @@ -49,8 +49,8 @@ export function HeroPanel({ const isGameDownloading = isDownloading && gameDownloading?.id === game?.id; const openGame = (gameId: number) => - window.electron.openGame(gameId).then(res => { - if (!res) setShowBinaryNotFoundModal(true); + window.electron.openGame(gameId).then(isBinaryInPath => { + if (!isBinaryInPath) setShowBinaryNotFoundModal(true); updateLibrary(); }); diff --git a/src/renderer/pages/shared-modals/binary-not-found-modal.tsx b/src/renderer/pages/shared-modals/binary-not-found-modal.tsx index 2f37f346..ddbde5b6 100644 --- a/src/renderer/pages/shared-modals/binary-not-found-modal.tsx +++ b/src/renderer/pages/shared-modals/binary-not-found-modal.tsx @@ -22,4 +22,4 @@ export const BinaryNotFoundModal = ({ {t("instructions")} ) -} \ No newline at end of file +}