aboutsummaryrefslogtreecommitdiff
path: root/src-tauri/bindings
diff options
context:
space:
mode:
authorGeckoEidechse <40122905+GeckoEidechse@users.noreply.github.com>2023-03-02 21:28:53 +0100
committerGitHub <noreply@github.com>2023-03-02 20:28:53 +0000
commit00201de46c05a90646b072a7c3dbcf1d4c591ba6 (patch)
treea41f2cd79c9bc5bfc3e4c0e079ba97c4206cfb55 /src-tauri/bindings
parentdd0aaaa0d7e2e173c8cd4110e8d5237c9b0c914a (diff)
downloadFlightCore-00201de46c05a90646b072a7c3dbcf1d4c591ba6.tar.gz
FlightCore-00201de46c05a90646b072a7c3dbcf1d4c591ba6.zip
feat: Allow installing PRs from DeveloperView (#139)
* feat: Initial backend code to get list of PRs Hardcoded for launcher right now * refactor: Autogen TS bindings from Rust code using `ts-rs` as done in #140 * fix: Fix incorrect typing What is returned is actually an array of `PullsApiResponseElement` * feat: Prototyping frontend UI for installing PR * fix: Use right repo Used Mods instead of Launcher * feat: Enable installing launcher pull request * refactor: Rename variables to indicate approp repo NorthstarLauncher vs NorthstarMods * style: Formatting fixes * feat: Initial code for getting mods PRs * feat: Add backend code for installing mods PRs * feat: Add note about launching in notification * fix: Remove commented out code * refactor: Depduplicate code * refactor: Remove unnecessary use of anyhow * refactor: Use already existing function for checking game path * feat: Add comment about profile / batch file * chore: Remove leftover print statements * feat: Add clickable link for each PR * refactor: Reduce duplicate code * refactor: Rename enum * fix: Use proper type * fix: Remove leftover `console.log`s * style: Revert accidental formatting change * refactor: Remove second API call for mods PRs * refactor: Rename variable * refactor: Remove second API call for launcher PRs * refactor: Move API URL string to `constants.rs` So that all constants are in a single place * fix: Restore lines deleted in merge * style: Formatting fixes * fix: Print line when done installing PR * feat: Show notification for install start/done Displays a notification that PR install has started and upon completion replaces it with one saying that install has completed. * fix: Remove left-over console log * feat: "Install PR" UI (#197) * refactor: export pull requests selector to dedicated component * refactor: regroup launcher+mods collapses in one collapse component * refactor: load pull requests when opening selector collapse item * refactor: review progress loaders' style * fix: don't fetch PRs if they've already been loaded * feat: update collapse style * refactor: remove fetch success notification * refactor: both collapses can be opened at the same time * fix: non-accordion collapse sends an object as event parameter * fix: Iterate over multiple pages of GitHub CI API This ensures we can still grab older artifacts. Max page is capped at 10 as going too high will cause us to hit API rate limits. Also refined error message accordingly. * refactor: Move stored PRs to submodule as suggested in review * refactor: Move getPullRequests to store submodule I order to clean up PullRequestSelector.vue Other functions will follow in separate commits. Currently TypeScript compilation fails on undefined type of `state` * fix: Properly define state type * refactor: Move installLauncherPR to store submodule * refactor: Move installModsPR to store submodule --------- Co-authored-by: Rémy Raes <contact@remyraes.com>
Diffstat (limited to 'src-tauri/bindings')
-rw-r--r--src-tauri/bindings/CommitHead.ts4
-rw-r--r--src-tauri/bindings/PullRequestType.ts3
-rw-r--r--src-tauri/bindings/PullsApiResponseElement.ts4
-rw-r--r--src-tauri/bindings/Repo.ts3
4 files changed, 14 insertions, 0 deletions
diff --git a/src-tauri/bindings/CommitHead.ts b/src-tauri/bindings/CommitHead.ts
new file mode 100644
index 00000000..58f31657
--- /dev/null
+++ b/src-tauri/bindings/CommitHead.ts
@@ -0,0 +1,4 @@
+// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
+import type { Repo } from "./Repo";
+
+export interface CommitHead { sha: string, ref: string, repo: Repo, } \ No newline at end of file
diff --git a/src-tauri/bindings/PullRequestType.ts b/src-tauri/bindings/PullRequestType.ts
new file mode 100644
index 00000000..2d1fd0a8
--- /dev/null
+++ b/src-tauri/bindings/PullRequestType.ts
@@ -0,0 +1,3 @@
+// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
+
+export type PullRequestType = "MODS" | "LAUNCHER"; \ No newline at end of file
diff --git a/src-tauri/bindings/PullsApiResponseElement.ts b/src-tauri/bindings/PullsApiResponseElement.ts
new file mode 100644
index 00000000..b2b5c476
--- /dev/null
+++ b/src-tauri/bindings/PullsApiResponseElement.ts
@@ -0,0 +1,4 @@
+// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
+import type { CommitHead } from "./CommitHead";
+
+export interface PullsApiResponseElement { number: bigint, title: string, url: string, head: CommitHead, html_url: string, } \ No newline at end of file
diff --git a/src-tauri/bindings/Repo.ts b/src-tauri/bindings/Repo.ts
new file mode 100644
index 00000000..836f39d7
--- /dev/null
+++ b/src-tauri/bindings/Repo.ts
@@ -0,0 +1,3 @@
+// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
+
+export interface Repo { full_name: string, } \ No newline at end of file