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"
|
||||
);
|
||||
},
|
||||
sourceIsHttp: Ember.computed.match(
|
||||
"model.remote_theme.remote_url",
|
||||
/^http(s)?:\/\//
|
||||
),
|
||||
actions: {
|
||||
updateToLatest() {
|
||||
this.set("updatingRemote", true);
|
||||
|
|
|
@ -38,7 +38,11 @@
|
|||
{{#if model.remote_theme}}
|
||||
|
||||
{{#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 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>
|
||||
|
|
|
@ -140,9 +140,14 @@
|
|||
}
|
||||
}
|
||||
|
||||
.remote-url,
|
||||
.about-url,
|
||||
.license-url {
|
||||
div.remote-url {
|
||||
font-size: $font-down-1;
|
||||
margin-bottom: 7px;
|
||||
}
|
||||
|
||||
a.remote-url,
|
||||
a.about-url,
|
||||
a.license-url {
|
||||
display: inline-block;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue