Display private RSS feed url in general settings (#888)

refs https://github.com/TryGhost/Ghost/issues/9001

- show private feed url if private blogging is enabled
- added a `.avoid-break-out` CSS utility class to prevent layout issues caused by non-breaking text such as long links
This commit is contained in:
Katharina Irrgang 2017-10-05 11:59:14 +02:00 committed by Kevin Ansfield
parent bbbe6038b2
commit cb576b14d3
4 changed files with 37 additions and 8 deletions

View File

@ -48,6 +48,13 @@ export default Controller.extend({
}
}),
privateRSSUrl: computed('config.blogUrl', 'model.publicHash', function () {
let blogUrl = this.get('config.blogUrl');
let publicHash = this.get('model.publicHash');
return `${blogUrl}/${publicHash}/rss`;
}),
_deleteTheme() {
let theme = this.get('store').peekRecord('theme', this.get('themeToDelete').name);

View File

@ -22,6 +22,7 @@ export default Model.extend(ValidationEngine, {
labs: attr('string'),
navigation: attr('navigation-settings'),
isPrivate: attr('boolean'),
publicHash: attr('string'),
password: attr('string'),
slack: attr('slack-settings'),
amp: attr('boolean'),

View File

@ -436,6 +436,16 @@ img {
display: flex;
}
.avoid-break-out {
overflow-wrap: break-word;
word-wrap: break-word;
word-break: break-all;
word-break: break-word;
hyphens: auto;
}
/* Animations
/* ---------------------------------------------------------- */

View File

@ -203,15 +203,26 @@
<div class="gh-setting">
<div class="gh-setting-content">
<div class="gh-setting-title">Make this site private</div>
<div class="gh-setting-desc">Enable protection with simple shared password, All search engine optimization and social features will be disabled.</div>
{{#if model.isPrivate}}
<div class="gh-setting-content-extended">
{{#gh-form-group errors=model.errors hasValidated=model.hasValidated property="password"}}
{{gh-input model.password name="general[password]" type="text" focusOut=(action "validate" "password" target=model) update=(action (mut model.password)) data-test-password-input=true}}
{{gh-error-message errors=model.errors property="password" data-test-password-error=true}}
<p>Set the password for this site</p>
{{/gh-form-group}}
<div class="gh-setting-desc">
Enable protection with simple shared password, All search engine optimization and social features will be disabled.
{{#if model.isPrivate}}
<span class="avoid-break-out">
<br><br>
A private RSS feed is available at
<a href="{{privateRSSUrl}}" target="_blank" rel="noopener">{{privateRSSUrl}}</a>
</span>
{{/if}}
</div>
{{#if model.isPrivate}}
<div class="gh-setting-content-extended">
{{#gh-form-group errors=model.errors hasValidated=model.hasValidated property="password"}}
{{gh-input model.password name="general[password]" type="text" focusOut=(action "validate" "password" target=model) update=(action (mut model.password)) data-test-password-input=true}}
{{gh-error-message errors=model.errors property="password" data-test-password-error=true}}
<p>Set the password for this site</p>
{{/gh-form-group}}
</div>
{{/if}}
</div>
<div class="gh-setting-action">