forked from AkkomaGang/akkoma-fe
Allow using custom source URLs
This commit is contained in:
parent
f391cf70a4
commit
c4301ae802
3 changed files with 12 additions and 5 deletions
|
@ -183,6 +183,12 @@ const setSettings = async ({ apiConfig, staticConfig, store }) => {
|
|||
copyInstanceOption('renderMisskeyMarkdown')
|
||||
copyInstanceOption('sidebarRight')
|
||||
|
||||
if (typeof config.backendCommitUrl !== 'undefined')
|
||||
copyInstanceOption('backendCommitUrl')
|
||||
|
||||
if (typeof config.frontendCommitUrl !== 'undefined')
|
||||
copyInstanceOption('frontendCommitUrl')
|
||||
|
||||
return store.dispatch('setTheme', config['theme'])
|
||||
}
|
||||
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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: [],
|
||||
|
|
Loading…
Reference in a new issue