aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeckoEidechse <40122905+GeckoEidechse@users.noreply.github.com>2023-08-03 13:26:14 +0200
committerGitHub <noreply@github.com>2023-08-03 13:26:14 +0200
commit52b8d87d02e14812fd49cd70f574fa81bc437eb4 (patch)
treebf290a704b2a088ca6c8a7fb20bf22e4cc6df535
parented7ab58d35cd0f6aa3296d0089b161180a33f5c2 (diff)
downloadFlightCore-52b8d87d02e14812fd49cd70f574fa81bc437eb4.tar.gz
FlightCore-52b8d87d02e14812fd49cd70f574fa81bc437eb4.zip
feat: Copy release notes to clipboard (#464)
* feat: Add button to copy release note to clipboard Adds a button to dev view to copy the generated release notes to clip board * feat: Copy to clipboard after generating release notes This saves an extra step when doing releases
-rw-r--r--src-vue/src/views/DeveloperView.vue14
1 files changed, 14 insertions, 0 deletions
diff --git a/src-vue/src/views/DeveloperView.vue b/src-vue/src/views/DeveloperView.vue
index f60d47b1..de83c9a8 100644
--- a/src-vue/src/views/DeveloperView.vue
+++ b/src-vue/src/views/DeveloperView.vue
@@ -123,6 +123,10 @@
Compare Tags
</el-button>
+ <el-button type="primary" @click="copyReleaseNotesToClipboard">
+ Copy to clipboard
+ </el-button>
+
<el-input
v-model="release_notes_text"
type="textarea"
@@ -262,6 +266,7 @@ export default defineComponent({
.then((message) => {
this.release_notes_text = message;
showNotification("Done", "Generated release notes");
+ this.copyReleaseNotesToClipboard();
})
.catch((error) => {
showErrorNotification(error);
@@ -336,6 +341,15 @@ export default defineComponent({
.then((message) => { showNotification(`NSProton Version`, message as string); })
.catch((error) => { showNotification(`Error`, error, "error"); })
},
+ async copyReleaseNotesToClipboard() {
+ navigator.clipboard.writeText(this.release_notes_text)
+ .then(() => {
+ showNotification("Copied to clipboard");
+ })
+ .catch(() => {
+ showErrorNotification("Failed copying to clipboard");
+ });
+ },
}
});
</script>