Improve help dialogue.

- Shows frontend and backend versions
- Shows version release notes
This commit is contained in:
D. Berge
2025-07-26 10:59:40 +02:00
parent a58cce8565
commit 9a47977f5f

View File

@@ -14,6 +14,8 @@
</template>
<v-card>
<v-window v-model="page">
<v-window-item value="support">
<v-card-title class="headline">
Dougal user support
</v-card-title>
@@ -34,6 +36,20 @@
</v-alert>
</v-card-text>
</v-window-item>
<v-window-item value="changelog">
<v-card-title class="headline">
Dougal release notes
</v-card-title>
<v-card-text>
<pre>{{ versionHistory }}</pre>
</v-card-text>
</v-window-item>
</v-window>
<v-divider></v-divider>
@@ -57,6 +73,7 @@
<span class="d-none d-lg-inline">Report a bug</span>
</v-btn>
<!---
<v-btn
color="info"
text
@@ -65,6 +82,17 @@
>
<v-icon>mdi-rss</v-icon>
</v-btn>
--->
<v-btn v-if="versionHistory"
color="info"
text
:title="page == 'support' ? 'View release notes' : 'View support info'"
:input-value="page == 'changelog'"
@click="page = page == 'support' ? 'changelog' : 'support'"
>
<v-icon>mdi-history</v-icon>
</v-btn>
<v-spacer></v-spacer>
@@ -98,13 +126,21 @@ export default {
feed: btoa(encodeURIComponent("https://gitlab.com/wgp/dougal/software.atom?feed_token=XSPpvsYEny8YmH75Nz5W")),
clientVersion: process.env.DOUGAL_FRONTEND_VERSION ?? "(unknown)",
serverVersion: null,
versionHistory: null,
page: "support"
};
},
methods: {
async getServerVersion () {
if (!this.serverVersion) {
const version = await this.api(['/version', {}, null, {silent:true}]);
this.serverVersion = version?.tag ?? "(unknown)";
}
if (!this.versionHistory) {
const history = await this.api(['/version/history?count=1', {}, null, {silent:true}]);
this.versionHistory = history[this.serverVersion.replace(/-.*$/, "")] ?? null;
}
},
...mapActions(["api"])