75 lines
2.6 KiB
Diff
75 lines
2.6 KiB
Diff
From c4301ae8025189e41b7b485a64ae4ba9f2539d14 Mon Sep 17 00:00:00 2001
|
|
From: Oneric <oneric@oneric.stub>
|
|
Date: Sat, 28 Sep 2024 18:33:30 +0200
|
|
Subject: [PATCH] Allow using custom source URLs
|
|
|
|
---
|
|
src/boot/after_store.js | 6 ++++++
|
|
src/components/settings_modal/tabs/version_tab.js | 9 ++++-----
|
|
src/modules/instance.js | 2 ++
|
|
3 files changed, 12 insertions(+), 5 deletions(-)
|
|
|
|
diff --git a/src/boot/after_store.js b/src/boot/after_store.js
|
|
index d45584c0..af457cb4 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 (typeof config.backendCommitUrl !== 'undefined')
|
|
+ copyInstanceOption('backendCommitUrl')
|
|
+
|
|
+ if (typeof config.frontendCommitUrl !== 'undefined')
|
|
+ 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: [],
|
|
--
|
|
2.34.1
|
|
|