mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
UX: Don't link to theme source unless it's http(s)
This commit is contained in:
parent
1cd64f68f1
commit
e67474daf4
@ -147,6 +147,10 @@ export default Ember.Controller.extend({
|
|||||||
"scss"
|
"scss"
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
sourceIsHttp: Ember.computed.match(
|
||||||
|
"model.remote_theme.remote_url",
|
||||||
|
/^http(s)?:\/\//
|
||||||
|
),
|
||||||
actions: {
|
actions: {
|
||||||
updateToLatest() {
|
updateToLatest() {
|
||||||
this.set("updatingRemote", true);
|
this.set("updatingRemote", true);
|
||||||
|
@ -38,7 +38,11 @@
|
|||||||
{{#if model.remote_theme}}
|
{{#if model.remote_theme}}
|
||||||
|
|
||||||
{{#if model.remote_theme.remote_url}}
|
{{#if model.remote_theme.remote_url}}
|
||||||
<a class="remote-url" href="{{model.remote_theme.remote_url}}">{{i18n "admin.customize.theme.source_url"}} {{d-icon "link"}}</a>
|
{{#if sourceIsHttp}}
|
||||||
|
<a class="remote-url" href="{{model.remote_theme.remote_url}}">{{i18n "admin.customize.theme.source_url"}} {{d-icon "link"}}</a>
|
||||||
|
{{else}}
|
||||||
|
<div class="remote-url"><code>{{model.remote_theme.remote_url}}</code></div>
|
||||||
|
{{/if}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{#if model.remote_theme.about_url}}
|
{{#if model.remote_theme.about_url}}
|
||||||
<a class="url about-url" href="{{model.remote_theme.about_url}}">{{i18n "admin.customize.theme.about_theme"}} {{d-icon "link"}}</a>
|
<a class="url about-url" href="{{model.remote_theme.about_url}}">{{i18n "admin.customize.theme.about_theme"}} {{d-icon "link"}}</a>
|
||||||
|
@ -140,9 +140,14 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.remote-url,
|
div.remote-url {
|
||||||
.about-url,
|
font-size: $font-down-1;
|
||||||
.license-url {
|
margin-bottom: 7px;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.remote-url,
|
||||||
|
a.about-url,
|
||||||
|
a.license-url {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user