diff --git a/src/boot/after_store.js b/src/boot/after_store.js index d45584c0..d27d4fb8 100644 --- a/src/boot/after_store.js +++ b/src/boot/after_store.js @@ -183,6 +183,12 @@ const setSettings = async ({ apiConfig, staticConfig, store }) => { copyInstanceOption('renderMisskeyMarkdown') copyInstanceOption('sidebarRight') + if (config.backendCommitUrl) + copyInstanceOption('backendCommitUrl') + + if (config.frontendCommitUrl) + copyInstanceOption('frontendCommitUrl') + return store.dispatch('setTheme', config['theme']) } diff --git a/src/components/settings_modal/tabs/version_tab.js b/src/components/settings_modal/tabs/version_tab.js index d69b131d..2a8999f9 100644 --- a/src/components/settings_modal/tabs/version_tab.js +++ b/src/components/settings_modal/tabs/version_tab.js @@ -1,22 +1,21 @@ import { extractCommit } from 'src/services/version/version.service' -const pleromaFeCommitUrl = 'https://akkoma.dev/AkkomaGang/pleroma-fe/commit/' -const pleromaBeCommitUrl = 'https://akkoma.dev/AkkomaGang/akkoma/commit/' - const VersionTab = { data () { const instance = this.$store.state.instance return { + backendCommitUrl: instance.backendCommitUrl, backendVersion: instance.backendVersion, + frontendCommitUrl: instance.frontendCommitUrl, frontendVersion: instance.frontendVersion } }, computed: { frontendVersionLink () { - return pleromaFeCommitUrl + this.frontendVersion + return this.frontendCommitUrl + this.frontendVersion }, backendVersionLink () { - return pleromaBeCommitUrl + extractCommit(this.backendVersion) + return this.backendCommitUrl + extractCommit(this.backendVersion) } } } diff --git a/src/modules/instance.js b/src/modules/instance.js index 0c856352..c60e1918 100644 --- a/src/modules/instance.js +++ b/src/modules/instance.js @@ -73,6 +73,8 @@ const defaultState = { conversationOtherRepliesButton: 'below', conversationTreeFadeAncestors: false, maxDepthInThread: 6, + backendCommitUrl: 'https://akkoma.dev/AkkomaGang/akkoma/commit/', + frontendCommitUrl: 'https://akkoma.dev/AkkomaGang/pleroma-fe/commit/', // Nasty stuff customEmoji: [],