A platform for community discussion. Free, open, simple.
DEV: Remove mobile-specific template for `categories-only-optimized` (#29510)
David Tayloree05a7244a03
diff --git a/app/assets/javascripts/discourse/app/components/categories-only-optimized.hbs b/app/assets/javascripts/discourse/app/components/categories-only-optimized.hbsindex 6c36c1c6106..b544ccc6ed6 100644--- a/app/assets/javascripts/discourse/app/components/categories-only-optimized.hbs+++ b/app/assets/javascripts/discourse/app/components/categories-only-optimized.hbs@@ -4,56 +4,27 @@>{{#if this.categories}}{{#if this.filteredCategories}}- <table- class="category-list optimized {{if this.showTopics 'with-topics'}}"- >- <thead>- <tr>- <th class="category"><span- role="heading"- aria-level="2"- id="categories-only-category"- >{{i18n "categories.category"}}</span></th>- <th class="topics">{{i18n "categories.topics"}}</th>- {{#if this.showTopics}}- <th class="latest">{{i18n "categories.latest"}}</th>- {{/if}}- </tr>- </thead>- <tbody aria-labelledby="categories-only-category">- {{#each this.categories as |category|}}+ {{#if this.site.mobileView}}+ <div+ class="category-list optimized {{if this.showTopics 'with-topics'}}"+ >+ {{#each this.filteredCategories as |c|}}<ParentCategoryRowOptimized- @category={{category}}+ @category={{c}}@showTopics={{this.showTopics}}/>{{/each}}- </tbody>- </table>- {{/if}}-- {{#if this.mutedCategories}}- <div class="muted-categories">- <a- href- class="muted-categories-link"- {{on "click" this.toggleShowMuted}}- >- <h3 class="muted-categories-heading">{{i18n "categories.muted"}}</h3>- {{#if this.mutedToggleIcon}}- {{d-icon this.mutedToggleIcon}}- {{/if}}- </a>+ </div>+ {{else}}<table- class="category-list optimized- {{if this.showTopics 'with-topics'}}- {{unless this.showMutedCategories 'hidden'}}"+ class="category-list optimized {{if this.showTopics 'with-topics'}}"><thead><tr><th class="category"><spanrole="heading"aria-level="2"- id="categories-only-category-muted"+ id="categories-only-category">{{i18n "categories.category"}}</span></th><th class="topics">{{i18n "categories.topics"}}</th>{{#if this.showTopics}}@@ -61,16 +32,74 @@{{/if}}</tr></thead>- <tbody aria-labelledby="categories-only-category-muted">+ <tbody aria-labelledby="categories-only-category">{{#each this.categories as |category|}}<ParentCategoryRowOptimized@category={{category}}@showTopics={{this.showTopics}}- @listType="muted"/>{{/each}}</tbody></table>+ {{/if}}+ {{/if}}++ {{#if this.mutedCategories}}+ <div class="muted-categories">+ <a+ href+ class="muted-categories-link"+ {{on "click" this.toggleShowMuted}}+ >+ <h3 class="muted-categories-heading">{{i18n "categories.muted"}}</h3>+ {{#if this.mutedToggleIcon}}+ {{d-icon this.mutedToggleIcon}}+ {{/if}}+ </a>+ {{#if this.site.mobileView}}+ <div+ class="category-list optimized+ {{if this.showTopics 'with-topics'}}+ {{unless this.showMutedCategories 'hidden'}}"+ >+ {{#each this.mutedCategories as |c|}}+ <ParentCategoryRowOptimized+ @category={{c}}+ @showTopics={{this.showTopics}}+ @listType="muted"+ />+ {{/each}}+ </div>+ {{else}}+ <table+ class="category-list optimized+ {{if this.showTopics 'with-topics'}}+ {{unless this.showMutedCategories 'hidden'}}"+ >+ <thead>+ <tr>+ <th class="category"><span+ role="heading"+ aria-level="2"+ id="categories-only-category-muted"+ >{{i18n "categories.category"}}</span></th>+ <th class="topics">{{i18n "categories.topics"}}</th>+ {{#if this.showTopics}}+ <th class="latest">{{i18n "categories.latest"}}</th>+ {{/if}}+ </tr>+ </thead>+ <tbody aria-labelledby="categories-only-category-muted">+ {{#each this.categories as |category|}}+ <ParentCategoryRowOptimized+ @category={{category}}+ @showTopics={{this.showTopics}}+ @listType="muted"+ />+ {{/each}}+ </tbody>+ </table>+ {{/if}}</div>{{/if}}{{/if}}diff --git a/app/assets/javascripts/discourse/app/templates/mobile/components/categories-only-optimized.hbs b/app/assets/javascripts/discourse/app/templates/mobile/components/categories-only-optimized.hbsdeleted file mode 100644index 3bff12c547f..00000000000--- a/app/assets/javascripts/discourse/app/templates/mobile/components/categories-only-optimized.hbs+++ /dev/null@@ -1,36 +0,0 @@-{{#if this.categories}}- {{#if this.filteredCategories}}- <div class="category-list optimized {{if this.showTopics 'with-topics'}}">- {{#each this.filteredCategories as |c|}}- <ParentCategoryRowOptimized- @category={{c}}- @showTopics={{this.showTopics}}- />- {{/each}}- </div>- {{/if}}-- {{#if this.mutedCategories}}- <div class="muted-categories">- <a href class="muted-categories-link" {{on "click" this.toggleShowMuted}}>- <h3 class="muted-categories-heading">{{i18n "categories.muted"}}</h3>- {{#if this.mutedToggleIcon}}- {{d-icon this.mutedToggleIcon}}- {{/if}}- </a>- <div- class="category-list optimized- {{if this.showTopics 'with-topics'}}- {{unless this.showMutedCategories 'hidden'}}"- >- {{#each this.mutedCategories as |c|}}- <ParentCategoryRowOptimized- @category={{c}}- @showTopics={{this.showTopics}}- @listType="muted"- />- {{/each}}- </div>- </div>- {{/if}}-{{/if}}\ No newline at end of file