Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server & game status detection #21

Merged
merged 10 commits into from
Mar 4, 2024
Merged

Conversation

dadodasyra
Copy link
Collaborator

It may still need modification in the main.rs to support javascript bridging with tauri.
I tried but it's a mess and don't have time for it.

The whole API behind is working, tried by running rust without tauri.

It needs Administrator priveleges

@dadodasyra dadodasyra marked this pull request as ready for review March 2, 2024 23:52
@zelytra zelytra added enhancement New feature or request backend labels Mar 3, 2024
@zelytra zelytra changed the base branch from master to develop March 3, 2024 14:05
@dadodasyra
Copy link
Collaborator Author

import { invoke } from '@tauri-apps/api/tauri'

setInterval(() => {
    invoke('get_game_status')
        .then((res) => {
                console.log(res);
                if (res === "InGame") {
                    invoke('get_server_ip')
                        .then((res) =>
                            console.log(res)
                        )
                }
        }).catch((e) => console.error(e))
}, 5000)

Get data example

frontend/src-tauri/src/api.rs Outdated Show resolved Hide resolved
frontend/src-tauri/src/api.rs Show resolved Hide resolved
frontend/src-tauri/src/api.rs Show resolved Hide resolved
frontend/src-tauri/src/api.rs Show resolved Hide resolved
frontend/src-tauri/src/fetch_informations.rs Outdated Show resolved Hide resolved
frontend/src-tauri/src/fetch_informations.rs Show resolved Hide resolved
frontend/src-tauri/src/fetch_informations.rs Show resolved Hide resolved
frontend/src-tauri/src/fetch_informations.rs Outdated Show resolved Hide resolved
frontend/src-tauri/src/fetch_informations.rs Show resolved Hide resolved
frontend/src-tauri/src/fetch_informations.rs Outdated Show resolved Hide resolved
@dadodasyra
Copy link
Collaborator Author

I changed refresh to 500ms for MainMenu, without using powershell It should be acceptable..
Maybe in the future we may add a user settings to configure that..

@dadodasyra dadodasyra requested a review from zelytra March 4, 2024 12:46
@dadodasyra dadodasyra linked an issue Mar 4, 2024 that may be closed by this pull request
@zelytra zelytra merged commit 5d9cec6 into develop Mar 4, 2024
3 checks passed
@zelytra zelytra deleted the feature/backend-server-detection branch March 4, 2024 13:15
zelytra added a commit that referenced this pull request Mar 7, 2024
* Fix/update from master (#28)

* Bump vue-tsc from 1.8.27 to 2.0.3 in /frontend (#27)

Bumps [vue-tsc](https://github.com/vuejs/language-tools/tree/HEAD/packages/tsc) from 1.8.27 to 2.0.3.
- [Release notes](https://github.com/vuejs/language-tools/releases)
- [Changelog](https://github.com/vuejs/language-tools/blob/master/CHANGELOG.md)
- [Commits](https://github.com/vuejs/language-tools/commits/v2.0.3/packages/tsc)

---
updated-dependencies:
- dependency-name: vue-tsc
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump quarkus.platform.version from 3.7.4 to 3.8.1 in /backend (#26)

Bumps `quarkus.platform.version` from 3.7.4 to 3.8.1.

Updates `io.quarkus.platform:quarkus-bom` from 3.7.4 to 3.8.1
- [Commits](quarkusio/quarkus-platform@3.7.4...3.8.1)

Updates `io.quarkus.platform:quarkus-maven-plugin` from 3.7.4 to 3.8.1
- [Commits](quarkusio/quarkus-platform@3.7.4...3.8.1)

---
updated-dependencies:
- dependency-name: io.quarkus.platform:quarkus-bom
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.quarkus.platform:quarkus-maven-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump vue from 3.4.20 to 3.4.21 in /frontend (#25)

Bumps [vue](https://github.com/vuejs/core) from 3.4.20 to 3.4.21.
- [Release notes](https://github.com/vuejs/core/releases)
- [Changelog](https://github.com/vuejs/core/blob/main/CHANGELOG.md)
- [Commits](vuejs/core@v3.4.20...v3.4.21)

---
updated-dependencies:
- dependency-name: vue
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump vue-i18n from 9.9.1 to 9.10.1 in /frontend (#24)

Bumps [vue-i18n](https://github.com/intlify/vue-i18n-next/tree/HEAD/packages/vue-i18n) from 9.9.1 to 9.10.1.
- [Release notes](https://github.com/intlify/vue-i18n-next/releases)
- [Changelog](https://github.com/intlify/vue-i18n-next/blob/master/CHANGELOG.md)
- [Commits](https://github.com/intlify/vue-i18n-next/commits/v9.10.1/packages/vue-i18n)

---
updated-dependencies:
- dependency-name: vue-i18n
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Server & game status detection (#21)

* Feature/focus and macro (#37)

* Add alert system & Patches (#39)

* Clean and refacto backend socket message system (#45)

* Config page (#41)

* Add real time game status update in session (#46)

* Feature/port listening fix (#47)

* Add auto updater to app (#49)

* Session run research (#50)

* Fix IP fetching (#51)

* Add SotServer user workflow (#48)

* Add cached actions Closes #53

* README.md (#23)

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dadodasyra <44753923+dadodasyra@users.noreply.github.com>
Co-authored-by: Zelytra <contact@zelytra.fr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Do not use Powershell
2 participants