diff --git a/app/assets/javascripts/discourse/app/components/basic-topic-list.js b/app/assets/javascripts/discourse/app/components/basic-topic-list.js index 6ef44008076..36b305921a0 100644 --- a/app/assets/javascripts/discourse/app/components/basic-topic-list.js +++ b/app/assets/javascripts/discourse/app/components/basic-topic-list.js @@ -81,7 +81,7 @@ export default Component.extend({ click(e) { // Mobile basic-topic-list doesn't use the `topic-list-item` view so // the event for the topic entrance is never wired up. - if (!this.site.mobileView) { + if (this.site.desktopView) { return; } diff --git a/app/assets/javascripts/discourse/app/components/bookmark-list.hbs b/app/assets/javascripts/discourse/app/components/bookmark-list.hbs index 351b8b8c4ad..69c5dadac97 100644 --- a/app/assets/javascripts/discourse/app/components/bookmark-list.hbs +++ b/app/assets/javascripts/discourse/app/components/bookmark-list.hbs @@ -5,7 +5,7 @@ > - {{#unless this.site.mobileView}} + {{#if this.site.desktopView}} @@ -15,7 +15,7 @@ - {{/unless}} + {{/if}} {{#each this.content as |bookmark|}} @@ -98,7 +98,7 @@ {{on "click" this.screenExcerptForExternalLink}} >{{html-safe bookmark.excerpt}}

- {{#unless this.site.mobileView}} + {{#if this.site.desktopView}}
{{i18n "topic.title"}}    
{{#if bookmark.user.avatar_template}} {{i18n "close"}} {{/if}} - {{#if this.composer.site.mobileView}} + {{#if this.site.mobileView}} {{#if this.composer.whisperOrUnlistTopic}} {{d-icon "far-eye-slash"}} @@ -306,7 +306,7 @@ - {{#if this.composer.site.mobileView}} + {{#if this.site.mobileView}} {{/if}} - {{#unless this.site.mobileView}} + {{#if this.site.desktopView}} - {{/unless}} + {{/if}} {{else}} diff --git a/app/assets/javascripts/discourse/app/components/composer-editor.js b/app/assets/javascripts/discourse/app/components/composer-editor.js index 544f7f87dda..a1b3a08743a 100644 --- a/app/assets/javascripts/discourse/app/components/composer-editor.js +++ b/app/assets/javascripts/discourse/app/components/composer-editor.js @@ -899,7 +899,7 @@ export default Component.extend(ComposerUploadUppy, { unshift: true, }); - if (this.allowUpload && this.uploadIcon && !this.site.mobileView) { + if (this.allowUpload && this.uploadIcon && this.site.desktopView) { toolbar.addButton({ id: "upload", group: "insertions", diff --git a/app/assets/javascripts/discourse/app/components/discourse-banner.hbs b/app/assets/javascripts/discourse/app/components/discourse-banner.hbs index 82a5ea19427..4e4c98ae62b 100644 --- a/app/assets/javascripts/discourse/app/components/discourse-banner.hbs +++ b/app/assets/javascripts/discourse/app/components/discourse-banner.hbs @@ -5,9 +5,9 @@ {{#if this.currentUser.staff}} {{d-icon "pencil-alt"}} - {{#unless this.site.mobileView}} + {{#if this.site.desktopView}} {{html-safe (i18n "banner.edit")}} - {{/unless}} + {{/if}} {{/if}} diff --git a/app/assets/javascripts/discourse/app/components/discourse-topic.js b/app/assets/javascripts/discourse/app/components/discourse-topic.js index b20a7876bc6..4253cbb8034 100644 --- a/app/assets/javascripts/discourse/app/components/discourse-topic.js +++ b/app/assets/javascripts/discourse/app/components/discourse-topic.js @@ -153,7 +153,7 @@ export default Component.extend(Scrolling, MobileScrollDirection, { // On desktop the user only needs to scroll past the topic title. return ( offset > this.dockAt && - (!this.site.mobileView || this.mobileScrollDirection === "down") + (this.site.desktopView || this.mobileScrollDirection === "down") ); }, diff --git a/app/assets/javascripts/discourse/app/components/glimmer-header.gjs b/app/assets/javascripts/discourse/app/components/glimmer-header.gjs index 7d5be71afa4..8cc17788b24 100644 --- a/app/assets/javascripts/discourse/app/components/glimmer-header.gjs +++ b/app/assets/javascripts/discourse/app/components/glimmer-header.gjs @@ -161,10 +161,9 @@ export default class GlimmerHeader extends Component { @action toggleBodyScrolling(bool) { - if (!this.site.mobileView) { - return; + if (this.site.mobileView) { + scrollLock(bool); } - scrollLock(bool); } @action @@ -180,7 +179,6 @@ export default class GlimmerHeader extends Component { @toggleHamburger={{this.toggleHamburger}} @showSidebar={{@showSidebar}} > - {{#each (headerButtons.resolve) as |entry|}} {{#if (and (eq entry.key "auth") (not this.currentUser))}} diff --git a/app/assets/javascripts/discourse/app/components/glimmer-header/topic/info.gjs b/app/assets/javascripts/discourse/app/components/glimmer-header/topic/info.gjs index e733977aecc..95a5e7b976a 100644 --- a/app/assets/javascripts/discourse/app/components/glimmer-header/topic/info.gjs +++ b/app/assets/javascripts/discourse/app/components/glimmer-header/topic/info.gjs @@ -129,7 +129,7 @@ export default class Info extends Component { {{#if (and @topic.category.parentCategory.parentCategory - (not this.site.mobileView) + this.site.desktopView ) }} {{categoryLink diff --git a/app/assets/javascripts/discourse/app/components/glimmer-site-header.gjs b/app/assets/javascripts/discourse/app/components/glimmer-site-header.gjs index 3a8781ef727..ddaa54f25a8 100644 --- a/app/assets/javascripts/discourse/app/components/glimmer-site-header.gjs +++ b/app/assets/javascripts/discourse/app/components/glimmer-site-header.gjs @@ -432,7 +432,7 @@ export default class GlimmerSiteHeader extends Component {