mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
refactor: changing res variable name to something more descriptive
This commit is contained in:
parent
1f3eedfb15
commit
9642212ffd
4 changed files with 7 additions and 33 deletions
26
.github/workflows/sync.yml
vendored
26
.github/workflows/sync.yml
vendored
|
@ -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
|
|
@ -19,7 +19,7 @@ export function Downloads() {
|
|||
const navigate = useNavigate();
|
||||
|
||||
const [filteredLibrary, setFilteredLibrary] = useState<Game[]>([]);
|
||||
const [showBinaryNotFoundModal, setShowBinaryNotFoundModal] = useState<boolean>(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();
|
||||
});
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ export function HeroPanel({
|
|||
}: HeroPanelProps) {
|
||||
const { t } = useTranslation("game_details");
|
||||
|
||||
const [showBinaryNotFoundModal, setShowBinaryNotFoundModal] = useState<boolean>(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();
|
||||
});
|
||||
|
||||
|
|
|
@ -22,4 +22,4 @@ export const BinaryNotFoundModal = ({
|
|||
{t("instructions")}
|
||||
</Modal>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue