mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Apply prettier to hbs files
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
<div class="select-kit-header-wrapper">
|
||||
{{component this.selectKit.options.selectedNameComponent
|
||||
{{component
|
||||
this.selectKit.options.selectedNameComponent
|
||||
tabindex=this.tabindex
|
||||
item=this.selectedContent
|
||||
selectKit=this.selectKit
|
||||
@@ -7,4 +8,4 @@
|
||||
}}
|
||||
|
||||
{{d-icon this.caretIcon class="caret-icon"}}
|
||||
</div>
|
||||
</div>
|
||||
@@ -9,8 +9,11 @@
|
||||
</div>
|
||||
|
||||
{{#if this.shouldDisplayDescription}}
|
||||
<div class="category-desc" aria-hidden="true">{{dir-span this.descriptionText htmlSafe="true"}}</div>
|
||||
<div class="category-desc" aria-hidden="true">{{dir-span
|
||||
this.descriptionText
|
||||
htmlSafe="true"
|
||||
}}</div>
|
||||
{{/if}}
|
||||
{{else}}
|
||||
{{html-safe this.label}}
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
@@ -6,4 +6,4 @@
|
||||
<div class="palettes" style={{this.backgroundColor}}>
|
||||
{{this.palettes}}
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
@@ -1,15 +1,21 @@
|
||||
<div class="select-kit-header-wrapper">
|
||||
{{#each this.icons as |icon|}} {{d-icon icon}} {{/each}}
|
||||
|
||||
{{component this.selectKit.options.selectedNameComponent
|
||||
{{component
|
||||
this.selectKit.options.selectedNameComponent
|
||||
tabindex=this.tabindex
|
||||
item=this.selectedContent
|
||||
selectKit=this.selectKit
|
||||
}}
|
||||
|
||||
{{#if this.shouldDisplayClearableButton}}
|
||||
<DButton @class="btn-clear" @icon="times" @action={{this.selectKit.onClearSelection}} @ariaLabel="clear_input" />
|
||||
<DButton
|
||||
@class="btn-clear"
|
||||
@icon="times"
|
||||
@action={{this.selectKit.onClearSelection}}
|
||||
@ariaLabel="clear_input"
|
||||
/>
|
||||
{{/if}}
|
||||
|
||||
{{d-icon this.caretIcon class="caret-icon"}}
|
||||
</div>
|
||||
</div>
|
||||
@@ -1 +1 @@
|
||||
<span>{{this.label}}</span>
|
||||
<span>{{this.label}}</span>
|
||||
@@ -1,7 +1,8 @@
|
||||
<div class="select-kit-header-wrapper">
|
||||
{{#each this.icons as |icon|}} {{d-icon icon}} {{/each}}
|
||||
|
||||
{{component this.selectKit.options.selectedNameComponent
|
||||
{{component
|
||||
this.selectKit.options.selectedNameComponent
|
||||
tabindex=this.tabindex
|
||||
item=this.selectedContent
|
||||
selectKit=this.selectKit
|
||||
@@ -13,4 +14,4 @@
|
||||
{{/if}}
|
||||
​
|
||||
{{! Zero-width space character, so icon-only button height = regular button height }}
|
||||
</div>
|
||||
</div>
|
||||
@@ -10,4 +10,4 @@
|
||||
<div class="texts">
|
||||
<span class="name">{{html-safe this.label}}</span>
|
||||
<span class="desc">{{html-safe this.description}}</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -13,4 +13,4 @@
|
||||
{{else}}
|
||||
{{d-icon "envelope"}}
|
||||
<span class="identifier">{{this.item.id}}</span>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
@@ -1,5 +1,10 @@
|
||||
{{#if this.item.url}}
|
||||
<AvatarFlair @flairName={{this.item.name}} @flairUrl={{this.item.url}} @flairBgColor={{this.item.bgColor}} @flairColor={{this.item.color}} />
|
||||
<AvatarFlair
|
||||
@flairName={{this.item.name}}
|
||||
@flairUrl={{this.item.url}}
|
||||
@flairBgColor={{this.item.bgColor}}
|
||||
@flairColor={{this.item.color}}
|
||||
/>
|
||||
{{/if}}
|
||||
|
||||
<span>{{this.label}}</span>
|
||||
<span>{{this.label}}</span>
|
||||
@@ -5,7 +5,8 @@
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{component this.selectKit.options.selectedNameComponent
|
||||
{{component
|
||||
this.selectKit.options.selectedNameComponent
|
||||
tabindex=this.tabindex
|
||||
item=this.selectedContent
|
||||
selectKit=this.selectKit
|
||||
@@ -18,4 +19,4 @@
|
||||
{{/if}}
|
||||
|
||||
{{d-icon this.caretIcon class="caret-icon"}}
|
||||
</div>
|
||||
</div>
|
||||
@@ -10,4 +10,4 @@
|
||||
<span class="future-date-input-selector-datetime">
|
||||
{{this.item.timeFormatted}}
|
||||
</span>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
@@ -1,9 +1,16 @@
|
||||
{{#if this.tags}}
|
||||
<div class="mini-tag-chooser-selected-collection selected-tags">
|
||||
{{#each this.tags as |tag|}}
|
||||
<DButton @translatedTitle={{tag.value}} @icon="times" @action={{action this.selectKit.deselect}} @actionParam={{tag.value}} @class={{tag.classNames}} @tabindex={{0}}>
|
||||
<DButton
|
||||
@translatedTitle={{tag.value}}
|
||||
@icon="times"
|
||||
@action={{action this.selectKit.deselect}}
|
||||
@actionParam={{tag.value}}
|
||||
@class={{tag.classNames}}
|
||||
@tabindex={{0}}
|
||||
>
|
||||
{{discourse-tag tag.value noHref=true}}
|
||||
</DButton>
|
||||
{{/each}}
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
@@ -1,5 +1,6 @@
|
||||
{{#unless this.selectKit.isHidden}}
|
||||
{{component this.selectKit.options.headerComponent
|
||||
{{component
|
||||
this.selectKit.options.headerComponent
|
||||
tabindex=this.tabindex
|
||||
value=this.value
|
||||
selectedContent=this.selectedContent
|
||||
@@ -7,8 +8,12 @@
|
||||
id=(concat this.selectKit.uniqueID "-header")
|
||||
}}
|
||||
|
||||
<SelectKit::SelectKitBody @selectKit={{this.selectKit}} @id={{concat this.selectKit.uniqueID "-body"}}>
|
||||
{{component this.selectKit.options.filterComponent
|
||||
<SelectKit::SelectKitBody
|
||||
@selectKit={{this.selectKit}}
|
||||
@id={{concat this.selectKit.uniqueID "-body"}}
|
||||
>
|
||||
{{component
|
||||
this.selectKit.options.filterComponent
|
||||
selectKit=this.selectKit
|
||||
id=(concat this.selectKit.uniqueID "-filter")
|
||||
}}
|
||||
@@ -16,7 +21,8 @@
|
||||
{{#if this.selectedContent.length}}
|
||||
<div class="selected-content">
|
||||
{{#each this.selectedContent as |item|}}
|
||||
{{component this.selectKit.options.selectedChoiceComponent
|
||||
{{component
|
||||
this.selectKit.options.selectedChoiceComponent
|
||||
item=item
|
||||
selectKit=this.selectKit
|
||||
}}
|
||||
@@ -32,7 +38,8 @@
|
||||
</span>
|
||||
{{else}}
|
||||
{{#each this.collections as |collection|}}
|
||||
{{component (component-for-collection collection.identifier this.selectKit)
|
||||
{{component
|
||||
(component-for-collection collection.identifier this.selectKit)
|
||||
collection=collection
|
||||
selectKit=this.selectKit
|
||||
value=this.value
|
||||
@@ -52,4 +59,4 @@
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
</SelectKit::SelectKitBody>
|
||||
{{/unless}}
|
||||
{{/unless}}
|
||||
@@ -1,3 +1,3 @@
|
||||
<span class="formatted-selection">
|
||||
{{this.formattedContent}}
|
||||
</span>
|
||||
</span>
|
||||
@@ -3,7 +3,10 @@
|
||||
{{d-icon icon}}
|
||||
{{/each}}
|
||||
|
||||
<MultiSelect::FormatSelectedContent @content={{or this.selectedContent this.selectKit.noneItem}} @selectKit={{this.selectKit}} />
|
||||
<MultiSelect::FormatSelectedContent
|
||||
@content={{or this.selectedContent this.selectKit.noneItem}}
|
||||
@selectKit={{this.selectKit}}
|
||||
/>
|
||||
|
||||
{{d-icon this.caretIcon class="caret-icon"}}
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,6 +1,13 @@
|
||||
<div {{on "click" this.onSelectedNameClick}} tabindex="0" title={{this.title}} data-value={{this.value}} data-name={{this.name}} class="select-kit-selected-name selected-name choice">
|
||||
<div
|
||||
{{on "click" this.onSelectedNameClick}}
|
||||
tabindex="0"
|
||||
title={{this.title}}
|
||||
data-value={{this.value}}
|
||||
data-name={{this.name}}
|
||||
class="select-kit-selected-name selected-name choice"
|
||||
>
|
||||
<div class="body">
|
||||
{{this.badge}}
|
||||
{{d-icon "times"}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -6,4 +6,4 @@
|
||||
{{i18n this.label}}
|
||||
</span>
|
||||
{{d-icon this.caretIcon class="caret-icon"}}
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,8 +1,9 @@
|
||||
<h2 class="selected-name" title={{this.title}} role="option">
|
||||
{{period-title this.value
|
||||
{{period-title
|
||||
this.value
|
||||
showDateRange=true
|
||||
fullDay=this.selectKit.options.fullDay
|
||||
}}
|
||||
</h2>
|
||||
|
||||
{{d-icon this.caretIcon class="caret-icon"}}
|
||||
{{d-icon this.caretIcon class="caret-icon"}}
|
||||
@@ -1,8 +1,9 @@
|
||||
<span class="selection-indicator"></span>
|
||||
|
||||
<span class="period-title">
|
||||
{{period-title this.rowValue
|
||||
{{period-title
|
||||
this.rowValue
|
||||
showDateRange=true
|
||||
fullDay=this.selectKit.options.fullDay
|
||||
}}
|
||||
</span>
|
||||
</span>
|
||||
@@ -1,4 +1,4 @@
|
||||
<p class="reason">
|
||||
<PinnedOptions @value={{this.pinned}} @topic={{this.topic}} />
|
||||
<span class="text">{{html-safe this.reasonText}}</span>
|
||||
</p>
|
||||
</p>
|
||||
@@ -4,4 +4,4 @@
|
||||
<li class="select-kit-error">{{item}}</li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
@@ -1,3 +1,3 @@
|
||||
{{#if this.selectKit.isExpanded}}
|
||||
{{yield}}
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
@@ -1,11 +1,12 @@
|
||||
{{#if this.collection.content.length}}
|
||||
<ul class="select-kit-collection" aria-live="polite" role="menu">
|
||||
{{#each this.collection.content as |item|}}
|
||||
{{component (component-for-row this.collection.identifier item this.selectKit)
|
||||
{{component
|
||||
(component-for-row this.collection.identifier item this.selectKit)
|
||||
item=item
|
||||
value=this.value
|
||||
selectKit=this.selectKit
|
||||
}}
|
||||
{{/each}}
|
||||
</ul>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
@@ -1,6 +1,6 @@
|
||||
{{#unless this.isHidden}}
|
||||
{{!-- filter-input-search prevents 1password from attempting autocomplete --}}
|
||||
{{!-- template-lint-disable no-down-event-binding --}}
|
||||
{{! filter-input-search prevents 1password from attempting autocomplete }}
|
||||
{{! template-lint-disable no-down-event-binding }}
|
||||
|
||||
<Input
|
||||
tabindex={{0}}
|
||||
@@ -22,4 +22,4 @@
|
||||
{{#if this.selectKit.options.filterIcon}}
|
||||
{{d-icon this.selectKit.options.filterIcon class="filter-icon"}}
|
||||
{{/if}}
|
||||
{{/unless}}
|
||||
{{/unless}}
|
||||
@@ -4,4 +4,4 @@
|
||||
|
||||
<span class="name">
|
||||
{{this.label}}
|
||||
</span>
|
||||
</span>
|
||||
@@ -1,8 +1,9 @@
|
||||
<div class="select-kit-header-wrapper">
|
||||
{{#each this.icons as |icon|}} {{d-icon icon}} {{/each}}
|
||||
|
||||
{{component this.selectKit.options.selectedNameComponent
|
||||
{{component
|
||||
this.selectKit.options.selectedNameComponent
|
||||
item=this.selectedContent
|
||||
selectKit=this.selectKit
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,3 +1,7 @@
|
||||
<SelectedChoice @item={{this.item}} @selectKit={{this.selectKit}} @extraClass={{this.extraClass}}>
|
||||
<SelectedChoice
|
||||
@item={{this.item}}
|
||||
@selectKit={{this.selectKit}}
|
||||
@extraClass={{this.extraClass}}
|
||||
>
|
||||
{{this.badge}}
|
||||
</SelectedChoice>
|
||||
</SelectedChoice>
|
||||
@@ -1,4 +1,12 @@
|
||||
<button aria-label={{i18n "select_kit.delete_item" name=this.itemName}} id="{{this.id}}-choice" data-value={{this.itemValue}} data-name={{this.itemName}} type="button" {{on "click" (fn this.selectKit.deselect this.item)}} class="btn btn-default selected-choice {{this.extraClass}}">
|
||||
<button
|
||||
aria-label={{i18n "select_kit.delete_item" name=this.itemName}}
|
||||
id="{{this.id}}-choice"
|
||||
data-value={{this.itemValue}}
|
||||
data-name={{this.itemName}}
|
||||
type="button"
|
||||
{{on "click" (fn this.selectKit.deselect this.item)}}
|
||||
class="btn btn-default selected-choice {{this.extraClass}}"
|
||||
>
|
||||
{{d-icon "times"}}
|
||||
{{#if (has-block)}}
|
||||
{{yield}}
|
||||
@@ -7,4 +15,4 @@
|
||||
{{this.itemName}}
|
||||
</span>
|
||||
{{/if}}
|
||||
</button>
|
||||
</button>
|
||||
@@ -1,5 +1,12 @@
|
||||
{{#if this.selectKit.options.showFullTitle}}
|
||||
<div lang={{this.lang}} title={{this.title}} data-value={{this.value}} data-name={{this.name}} role="option" class="select-kit-selected-name selected-name choice">
|
||||
<div
|
||||
lang={{this.lang}}
|
||||
title={{this.title}}
|
||||
data-value={{this.value}}
|
||||
data-name={{this.name}}
|
||||
role="option"
|
||||
class="select-kit-selected-name selected-name choice"
|
||||
>
|
||||
{{#if this.item.icon}}
|
||||
{{d-icon this.item.icon}}
|
||||
{{/if}}
|
||||
@@ -9,13 +16,23 @@
|
||||
</span>
|
||||
|
||||
{{#if this.shouldDisplayClearableButton}}
|
||||
<DButton @class="btn-clear" @icon="times" @action={{this.selectKit.deselect}} @actionParam={{this.item}} @ariaLabel="clear_input" />
|
||||
<DButton
|
||||
@class="btn-clear"
|
||||
@icon="times"
|
||||
@action={{this.selectKit.deselect}}
|
||||
@actionParam={{this.item}}
|
||||
@ariaLabel="clear_input"
|
||||
/>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{else}}
|
||||
{{#if this.item.icon}}
|
||||
<div role="option" lang={{this.lang}} class="select-kit-selected-name selected-name choice">
|
||||
<div
|
||||
role="option"
|
||||
lang={{this.lang}}
|
||||
class="select-kit-selected-name selected-name choice"
|
||||
>
|
||||
{{d-icon this.item.icon}}
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
@@ -1,5 +1,6 @@
|
||||
{{#unless this.selectKit.isHidden}}
|
||||
{{component this.selectKit.options.headerComponent
|
||||
{{component
|
||||
this.selectKit.options.headerComponent
|
||||
tabindex=this.tabindex
|
||||
value=this.value
|
||||
selectedContent=this.selectedContent
|
||||
@@ -7,8 +8,12 @@
|
||||
id=(concat this.selectKit.uniqueID "-header")
|
||||
}}
|
||||
|
||||
<SelectKit::SelectKitBody @selectKit={{this.selectKit}} @id={{concat this.selectKit.uniqueID "-body"}}>
|
||||
{{component this.selectKit.options.filterComponent
|
||||
<SelectKit::SelectKitBody
|
||||
@selectKit={{this.selectKit}}
|
||||
@id={{concat this.selectKit.uniqueID "-body"}}
|
||||
>
|
||||
{{component
|
||||
this.selectKit.options.filterComponent
|
||||
selectKit=this.selectKit
|
||||
id=(concat this.selectKit.uniqueID "-filter")
|
||||
}}
|
||||
@@ -21,7 +26,8 @@
|
||||
</span>
|
||||
{{else}}
|
||||
{{#each this.collections as |collection|}}
|
||||
{{component (component-for-collection collection.identifier this.selectKit)
|
||||
{{component
|
||||
(component-for-collection collection.identifier this.selectKit)
|
||||
collection=collection
|
||||
selectKit=this.selectKit
|
||||
value=this.value
|
||||
@@ -41,4 +47,4 @@
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
</SelectKit::SelectKitBody>
|
||||
{{/unless}}
|
||||
{{/unless}}
|
||||
@@ -1 +1 @@
|
||||
{{discourse-tag this.rowValue count=this.item.count noHref=true}}
|
||||
{{discourse-tag this.rowValue count=this.item.count noHref=true}}
|
||||
@@ -2,4 +2,4 @@
|
||||
<div class="more-tags">
|
||||
{{i18n "select_kit.components.tag_drop.filter_for_more"}}
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
@@ -1,5 +1,6 @@
|
||||
<div class="select-kit-header-wrapper">
|
||||
{{component this.selectKit.options.selectedNameComponent
|
||||
{{component
|
||||
this.selectKit.options.selectedNameComponent
|
||||
tabindex=this.tabindex
|
||||
item=this.selectedContent
|
||||
selectKit=this.selectKit
|
||||
@@ -7,4 +8,4 @@
|
||||
}}
|
||||
|
||||
{{d-icon this.caretIcon class="caret-icon"}}
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,4 +1 @@
|
||||
{{discourse-tag this.rowValue
|
||||
noHref=true
|
||||
count=this.item.count
|
||||
}}
|
||||
{{discourse-tag this.rowValue noHref=true count=this.item.count}}
|
||||
@@ -1 +1 @@
|
||||
{{this.heading}}
|
||||
{{this.heading}}
|
||||
@@ -1,18 +1,28 @@
|
||||
{{#if this.appendReason}}
|
||||
<p class="reason">
|
||||
<TopicNotificationsOptions @value={{this.notificationLevel}} @topic={{this.topic}} @onChange={{action "changeTopicNotificationLevel"}} @options={{hash
|
||||
<TopicNotificationsOptions
|
||||
@value={{this.notificationLevel}}
|
||||
@topic={{this.topic}}
|
||||
@onChange={{action "changeTopicNotificationLevel"}}
|
||||
@options={{hash
|
||||
icon=this.icon
|
||||
showFullTitle=this.showFullTitle
|
||||
showCaret=this.showCaret
|
||||
headerAriaLabel=(i18n "topic.notifications.title")
|
||||
}} />
|
||||
}}
|
||||
/>
|
||||
<span class="text">{{html-safe this.notificationReasonText}}</span>
|
||||
</p>
|
||||
{{else}}
|
||||
<TopicNotificationsOptions @value={{this.notificationLevel}} @topic={{this.topic}} @onChange={{action "changeTopicNotificationLevel"}} @options={{hash
|
||||
<TopicNotificationsOptions
|
||||
@value={{this.notificationLevel}}
|
||||
@topic={{this.topic}}
|
||||
@onChange={{action "changeTopicNotificationLevel"}}
|
||||
@options={{hash
|
||||
icon=this.icon
|
||||
showFullTitle=this.showFullTitle
|
||||
showCaret=this.showCaret
|
||||
headerAriaLabel=(i18n "topic.notifications.title")
|
||||
}} />
|
||||
{{/if}}
|
||||
}}
|
||||
/>
|
||||
{{/if}}
|
||||
@@ -1,9 +1,10 @@
|
||||
<TopicStatus @topic={{this.item}} @disableActions={{true}} />
|
||||
<div class="topic-title">{{replace-emoji this.item.fancy_title}}</div>
|
||||
<div class="topic-categories">
|
||||
{{bound-category-link this.item.category
|
||||
{{bound-category-link
|
||||
this.item.category
|
||||
recursive=true
|
||||
hideParent=true
|
||||
link=false
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
@@ -4,4 +4,4 @@
|
||||
|
||||
{{#if this.item.name}}
|
||||
<span class="name">{{this.item.name}}</span>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
Reference in New Issue
Block a user