From 4cdfc0ea04844681de078d26f44321cb3c3b05c5 Mon Sep 17 00:00:00 2001
From: GeckoEidechse <40122905+GeckoEidechse@users.noreply.github.com>
Date: Mon, 27 Mar 2023 18:10:46 +0200
Subject: 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
---
src-vue/src/views/DeveloperView.vue | 95 +++++++++++++++++++++++++++++++++++++
1 file changed, 95 insertions(+)
(limited to 'src-vue/src')
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!
+
+ Get tags
+
+
+
+
+
+
+
+
+
+
+ Compare Tags
+
+
+
+
Basic:
@@ -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("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("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'
+ });
+ });
+ },
}
});
--
cgit v1.2.3