mirror of
https://github.com/discourse/discourse.git
synced 2025-06-03 19:39:30 +08:00
FIX: Remote themes Github link should go to custom branch #9184
This commit is contained in:
@ -203,6 +203,17 @@ export default Controller.extend({
|
||||
);
|
||||
},
|
||||
sourceIsHttp: match("model.remote_theme.remote_url", /^http(s)?:\/\//),
|
||||
|
||||
@discourseComputed(
|
||||
"model.remote_theme.remote_url",
|
||||
"model.remote_theme.branch"
|
||||
)
|
||||
remoteThemeLink(remoteThemeUrl, remoteThemeBranch) {
|
||||
return remoteThemeBranch
|
||||
? `${remoteThemeUrl.replace(/\.git$/, "")}/tree/${remoteThemeBranch}`
|
||||
: remoteThemeUrl;
|
||||
},
|
||||
|
||||
actions: {
|
||||
updateToLatest() {
|
||||
this.set("updatingRemote", true);
|
||||
|
Reference in New Issue
Block a user