FIX: Don't put the FAQ as "New" if there is a custom faq_url
If we do this, it's impossible to ever mark it as read.
This commit is contained in:
parent
e29d24fefa
commit
9224afacaf
2 changed files with 10 additions and 4 deletions
app/assets/javascripts/discourse
|
@ -2,6 +2,12 @@ import computed from 'ember-addons/ember-computed-decorators';
|
||||||
export default Ember.Component.extend({
|
export default Ember.Component.extend({
|
||||||
classNames: ['hamburger-panel'],
|
classNames: ['hamburger-panel'],
|
||||||
|
|
||||||
|
@computed('currentUser.read_faq')
|
||||||
|
prioritizeFaq(readFaq) {
|
||||||
|
// If it's a custom FAQ never prioritize it
|
||||||
|
return Ember.isEmpty(this.siteSettings.faq_url) && !readFaq;
|
||||||
|
},
|
||||||
|
|
||||||
@computed()
|
@computed()
|
||||||
showKeyboardShortcuts() {
|
showKeyboardShortcuts() {
|
||||||
return !Discourse.Mobile.mobileView && !this.capabilities.touch;
|
return !Discourse.Mobile.mobileView && !this.capabilities.touch;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{{#menu-panel visible=visible}}
|
{{#menu-panel visible=visible}}
|
||||||
{{#unless currentUser.read_faq}}
|
{{#if prioritizeFaq}}
|
||||||
{{#menu-links}}
|
{{#menu-links}}
|
||||||
<li class='heading'>
|
<li class='heading'>
|
||||||
{{#d-link path=faqUrl class="faq-link"}}
|
{{#d-link path=faqUrl class="faq-link"}}
|
||||||
|
@ -8,7 +8,7 @@
|
||||||
{{/d-link}}
|
{{/d-link}}
|
||||||
</li>
|
</li>
|
||||||
{{/menu-links}}
|
{{/menu-links}}
|
||||||
{{/unless}}
|
{{/if}}
|
||||||
|
|
||||||
{{#if currentUser.staff}}
|
{{#if currentUser.staff}}
|
||||||
{{#menu-links}}
|
{{#menu-links}}
|
||||||
|
@ -81,9 +81,9 @@
|
||||||
|
|
||||||
{{#menu-links omitRule="true"}}
|
{{#menu-links omitRule="true"}}
|
||||||
<li>{{d-link route="about" class="about-link" label="about.simple_title"}}</li>
|
<li>{{d-link route="about" class="about-link" label="about.simple_title"}}</li>
|
||||||
{{#if currentUser.read_faq}}
|
{{#unless prioritizeFaq}}
|
||||||
<li>{{d-link path=faqUrl class="faq-link" label="faq"}}</li>
|
<li>{{d-link path=faqUrl class="faq-link" label="faq"}}</li>
|
||||||
{{/if}}
|
{{/unless}}
|
||||||
|
|
||||||
{{#if showKeyboardShortcuts}}
|
{{#if showKeyboardShortcuts}}
|
||||||
<li>{{d-link action="keyboardShortcuts" class="keyboard-shortcuts-link" label="keyboard_shortcuts_help.title"}}</li>
|
<li>{{d-link action="keyboardShortcuts" class="keyboard-shortcuts-link" label="keyboard_shortcuts_help.title"}}</li>
|
||||||
|
|
Reference in a new issue