diff options
author | GeckoEidechse <40122905+GeckoEidechse@users.noreply.github.com> | 2023-05-15 21:50:40 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-15 21:50:40 +0200 |
commit | 225e7545e61b4df2c7404114ebba64246017b86e (patch) | |
tree | bcd775ceac4f19e06b480d2e75b7baa9b57a35b0 /src-vue | |
parent | 5edffe63d3b6f503ad29da08f281ea88682f5f90 (diff) | |
download | FlightCore-225e7545e61b4df2c7404114ebba64246017b86e.tar.gz FlightCore-225e7545e61b4df2c7404114ebba64246017b86e.zip |
feat: Button to install NorthstarLauncher from git main branch (#314)
* feat: WIP code to install launcher from git main
Works but needs some more cleanup still
* fix: Formatting
* fix: Address clippy errors
* refactor: Move `install_git_main` to own source
file
* fix: Remove unnecessary `pub`
* docs: Update comments
* refactor: Move API URL to constants
Diffstat (limited to 'src-vue')
-rw-r--r-- | src-vue/src/views/DeveloperView.vue | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src-vue/src/views/DeveloperView.vue b/src-vue/src/views/DeveloperView.vue index 59c7927f..aa682095 100644 --- a/src-vue/src/views/DeveloperView.vue +++ b/src-vue/src/views/DeveloperView.vue @@ -31,6 +31,10 @@ Launch Northstar via Steam </el-button> + <el-button type="primary" @click="installLauncherGitMain"> + Install launcher from main branch + </el-button> + <br /> <br /> @@ -243,6 +247,23 @@ export default defineComponent({ showErrorNotification(error); }); }, + async installLauncherGitMain() { + + const notification = showNotification(`Installing git main`, 'Please wait', 'info', 0); + + await invoke<string>("install_git_main", { gameInstallPath: this.$store.state.game_path }) + .then((message) => { + this.release_notes_text = message; + showNotification("Done", `Installed launcher build from ${message}`); + }) + .catch((error) => { + showErrorNotification(error); + }) + .finally(() => { + // Clear old notification + notification.close(); + }); + }, async getAvailableNorthstarVersions() { await invoke<NorthstarThunderstoreReleaseWrapper[]>("get_available_northstar_versions") .then((message) => { |