aboutsummaryrefslogtreecommitdiff
path: root/src-vue
diff options
context:
space:
mode:
authorGeckoEidechse <40122905+GeckoEidechse@users.noreply.github.com>2023-03-27 18:10:46 +0200
committerGitHub <noreply@github.com>2023-03-27 16:10:46 +0000
commit4cdfc0ea04844681de078d26f44321cb3c3b05c5 (patch)
tree0c4c4a6bd6c94f5f34706adbf9b7d3f2562c3a3f /src-vue
parent3529654c9c84342c3273302a6cc684916358315b (diff)
downloadFlightCore-4cdfc0ea04844681de078d26f44321cb3c3b05c5.tar.gz
FlightCore-4cdfc0ea04844681de078d26f44321cb3c3b05c5.zip
feat: Generate FlightCore release notes (#188)
* feat: Generate FlightCore release notes * fix: Remove leftover comment * fix: Add missing semantic commit type * fix: Re-add newlines accidentally removed in merge * refactor: Remove contributors section Will re-add a proper implementation in a later PR. * fix: Revert accidentally modified line * docs: Update comments * fix: Use correct user-agent * fix: Put unknown commits into "Other" section Previously they were just dropped * refactor: Move constant string array to right file * fix: Remove debug prints * refactor: Move lib import to start of file * refactor: Use wrapper type kinda needed by selector in frontend. Allows for still passing full object to backend for future extensability * fix: Generate missing wrapper TS interface * fix: Add title and message to notification * refactor: Move constant to consts file * fix: Fix formatting * fix: Remove unnecessary property declaration
Diffstat (limited to 'src-vue')
-rw-r--r--src-vue/src/views/DeveloperView.vue95
1 files changed, 95 insertions, 0 deletions
diff --git a/src-vue/src/views/DeveloperView.vue b/src-vue/src/views/DeveloperView.vue
index 52117b8d..bca473fb 100644
--- a/src-vue/src/views/DeveloperView.vue
+++ b/src-vue/src/views/DeveloperView.vue
@@ -5,6 +5,38 @@
This page is designed for developers. Some of the buttons here can break your Northstar install if you do not know what you're doing!
</el-alert>
+ <el-button type="primary" @click="getTags">
+ Get tags
+ </el-button>
+
+ <el-select v-model="firstTag" class="m-2" placeholder="First tag">
+ <el-option
+ v-for="item in ns_release_tags"
+ :key="item.value"
+ :label="item.label"
+ :value="item"
+ />
+ </el-select>
+ <el-select v-model="secondTag" class="m-2" placeholder="Second tag">
+ <el-option
+ v-for="item in ns_release_tags"
+ :key="item.value"
+ :label="item.label"
+ :value="item"
+ />
+ </el-select>
+
+ <el-button type="primary" @click="compareTags">
+ Compare Tags
+ </el-button>
+
+ <el-input
+ v-model="release_notes_text"
+ type="textarea"
+ :rows="5"
+ placeholder="Output"
+ />
+
<h3>Basic:</h3>
<el-button type="primary" @click="disableDevMode">
@@ -53,6 +85,7 @@ import { defineComponent } from "vue";
import { invoke } from "@tauri-apps/api";
import { ElNotification } from "element-plus";
import { GameInstall } from "../utils/GameInstall";
+import { TagWrapper } from "../../../src-tauri/bindings/TagWrapper";
import PullRequestsSelector from "../components/PullRequestsSelector.vue";
export default defineComponent({
@@ -63,8 +96,30 @@ export default defineComponent({
data() {
return {
mod_to_install_field_string : "",
+ release_notes_text : "",
+ first_tag: { label: '', value: {name: ''} },
+ second_tag: { label: '', value: {name: ''} },
+ ns_release_tags: [] as TagWrapper[],
}
},
+ computed: {
+ firstTag: {
+ get(): TagWrapper {
+ return this.first_tag;
+ },
+ set(value: TagWrapper) {
+ this.first_tag = value;
+ }
+ },
+ secondTag: {
+ get(): TagWrapper {
+ return this.second_tag;
+ },
+ set(value: TagWrapper) {
+ this.second_tag = value;
+ }
+ },
+ },
methods: {
disableDevMode() {
this.$store.commit('toggleDeveloperMode');
@@ -152,6 +207,46 @@ export default defineComponent({
});
});
},
+ async getTags() {
+ await invoke<TagWrapper[]>("get_list_of_tags")
+ .then((message) => {
+ this.ns_release_tags = message;
+ ElNotification({
+ title: "Done",
+ message: "Fetched tags",
+ type: 'success',
+ position: 'bottom-right'
+ });
+ })
+ .catch((error) => {
+ ElNotification({
+ title: 'Error',
+ message: error,
+ type: 'error',
+ position: 'bottom-right'
+ });
+ });
+ },
+ async compareTags() {
+ await invoke<string>("compare_tags", {firstTag: this.firstTag.value, secondTag: this.secondTag.value})
+ .then((message) => {
+ this.release_notes_text = message;
+ ElNotification({
+ title: "Done",
+ message: "Generated release notes",
+ type: 'success',
+ position: 'bottom-right'
+ });
+ })
+ .catch((error) => {
+ ElNotification({
+ title: 'Error',
+ message: error,
+ type: 'error',
+ position: 'bottom-right'
+ });
+ });
+ },
}
});
</script>