DEV: Update eslint-config-discourse, use prettier for hbs (#151)
This commit is contained in:
parent
67896334b5
commit
ccceb8841c
|
@ -41,8 +41,8 @@ jobs:
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
yarn prettier -v
|
yarn prettier -v
|
||||||
if [ 0 -lt $(find assets admin/assets -type f \( -name "*.scss" -or -name "*.js" -or -name "*.es6" \) 2> /dev/null | wc -l) ]; then
|
if [ 0 -lt $(find assets admin/assets -type f \( -name "*.scss" -or -name "*.js" -or -name "*.es6" -or -name "*.hbs" \) 2> /dev/null | wc -l) ]; then
|
||||||
yarn prettier --list-different "assets/**/*.{scss,js,es6}"
|
yarn prettier --list-different "assets/**/*.{scss,js,es6,hbs}"
|
||||||
fi
|
fi
|
||||||
if [ 0 -lt $(find test -type f \( -name "*.js" -or -name "*.es6" \) 2> /dev/null | wc -l) ]; then
|
if [ 0 -lt $(find test -type f \( -name "*.js" -or -name "*.es6" \) 2> /dev/null | wc -l) ]; then
|
||||||
yarn prettier --list-different "test/**/*.{js,es6}"
|
yarn prettier --list-different "test/**/*.{js,es6}"
|
||||||
|
@ -50,7 +50,12 @@ jobs:
|
||||||
|
|
||||||
- name: Ember template lint
|
- name: Ember template lint
|
||||||
if: ${{ !cancelled() }}
|
if: ${{ !cancelled() }}
|
||||||
run: yarn ember-template-lint --no-error-on-unmatched-pattern assets/javascripts admin/assets/javascripts
|
run: yarn ember-template-lint --no-error-on-unmatched-pattern assets/javascripts
|
||||||
|
|
||||||
|
# Separated due to https://github.com/ember-template-lint/ember-template-lint/issues/2758
|
||||||
|
- name: Ember template lint (admin)
|
||||||
|
if: ${{ !cancelled() }}
|
||||||
|
run: yarn ember-template-lint --no-error-on-unmatched-pattern admin/assets/javascripts
|
||||||
|
|
||||||
- name: Rubocop
|
- name: Rubocop
|
||||||
if: ${{ !cancelled() }}
|
if: ${{ !cancelled() }}
|
||||||
|
|
|
@ -1,12 +1,21 @@
|
||||||
{{#d-modal-body id="chat-integration-edit-channel-modal" title="chat_integration.edit_channel_modal.title"}}
|
{{#d-modal-body
|
||||||
|
id="chat-integration-edit-channel-modal"
|
||||||
|
title="chat_integration.edit_channel_modal.title"
|
||||||
|
}}
|
||||||
<div>
|
<div>
|
||||||
<form {{action "save" on="submit"}}>
|
<form {{action "save" on="submit"}}>
|
||||||
<table>
|
<table>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr class="input">
|
<tr class="input">
|
||||||
<td class="label"><label for="provider">{{i18n "chat_integration.edit_channel_modal.provider"}}</label></td>
|
<td class="label"><label for="provider">{{i18n
|
||||||
|
"chat_integration.edit_channel_modal.provider"
|
||||||
|
}}</label></td>
|
||||||
<td>
|
<td>
|
||||||
{{i18n (concat "chat_integration.provider." model.channel.provider ".title")}}
|
{{i18n
|
||||||
|
(concat
|
||||||
|
"chat_integration.provider." model.channel.provider ".title"
|
||||||
|
)
|
||||||
|
}}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
@ -17,7 +26,15 @@
|
||||||
|
|
||||||
{{#each model.provider.channel_parameters as |param|}}
|
{{#each model.provider.channel_parameters as |param|}}
|
||||||
<tr class="input">
|
<tr class="input">
|
||||||
<td class="label"><label for="param-{{param.key}}">{{i18n (concat "chat_integration.provider." model.channel.provider ".param." param.key ".title")}}</label></td>
|
<td class="label"><label for="param-{{param.key}}">{{i18n
|
||||||
|
(concat
|
||||||
|
"chat_integration.provider."
|
||||||
|
model.channel.provider
|
||||||
|
".param."
|
||||||
|
param.key
|
||||||
|
".title"
|
||||||
|
)
|
||||||
|
}}</label></td>
|
||||||
<td>
|
<td>
|
||||||
{{text-field
|
{{text-field
|
||||||
name=(concat "param-" param.key)
|
name=(concat "param-" param.key)
|
||||||
|
@ -33,7 +50,15 @@
|
||||||
|
|
||||||
<tr class="chat-instructions">
|
<tr class="chat-instructions">
|
||||||
<td></td>
|
<td></td>
|
||||||
<td><label>{{i18n (concat "chat_integration.provider." model.channel.provider ".param." param.key ".help")}}</label></td>
|
<td><label>{{i18n
|
||||||
|
(concat
|
||||||
|
"chat_integration.provider."
|
||||||
|
model.channel.provider
|
||||||
|
".param."
|
||||||
|
param.key
|
||||||
|
".help"
|
||||||
|
)
|
||||||
|
}}</label></td>
|
||||||
</tr>
|
</tr>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</tbody>
|
</tbody>
|
||||||
|
@ -43,7 +68,8 @@
|
||||||
{{/d-modal-body}}
|
{{/d-modal-body}}
|
||||||
|
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
{{d-button id="save-channel"
|
{{d-button
|
||||||
|
id="save-channel"
|
||||||
class="btn-primary btn-large"
|
class="btn-primary btn-large"
|
||||||
action=(action "save")
|
action=(action "save")
|
||||||
title="chat_integration.edit_channel_modal.save"
|
title="chat_integration.edit_channel_modal.save"
|
||||||
|
@ -51,7 +77,8 @@
|
||||||
disabled=saveDisabled
|
disabled=saveDisabled
|
||||||
}}
|
}}
|
||||||
|
|
||||||
{{d-button class="btn-large"
|
{{d-button
|
||||||
|
class="btn-large"
|
||||||
action=(action "cancel")
|
action=(action "cancel")
|
||||||
title="chat_integration.edit_channel_modal.cancel"
|
title="chat_integration.edit_channel_modal.cancel"
|
||||||
label="chat_integration.edit_channel_modal.cancel"
|
label="chat_integration.edit_channel_modal.cancel"
|
||||||
|
|
|
@ -1,12 +1,21 @@
|
||||||
{{#d-modal-body id="chat-integration-edit-rule_modal" title="chat_integration.edit_rule_modal.title"}}
|
{{#d-modal-body
|
||||||
|
id="chat-integration-edit-rule_modal"
|
||||||
|
title="chat_integration.edit_rule_modal.title"
|
||||||
|
}}
|
||||||
<div>
|
<div>
|
||||||
<form {{action "save" on="submit"}}>
|
<form {{action "save" on="submit"}}>
|
||||||
<table>
|
<table>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr class="input">
|
<tr class="input">
|
||||||
<td class="label"><label for="provider">{{i18n "chat_integration.edit_rule_modal.provider"}}</label></td>
|
<td class="label"><label for="provider">{{i18n
|
||||||
|
"chat_integration.edit_rule_modal.provider"
|
||||||
|
}}</label></td>
|
||||||
<td>
|
<td>
|
||||||
{{i18n (concat "chat_integration.provider." model.channel.provider ".title")}}
|
{{i18n
|
||||||
|
(concat
|
||||||
|
"chat_integration.provider." model.channel.provider ".title"
|
||||||
|
)
|
||||||
|
}}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
@ -16,7 +25,9 @@
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr class="input">
|
<tr class="input">
|
||||||
<td class="label"><label for="channel">{{i18n "chat_integration.edit_rule_modal.channel"}}</label></td>
|
<td class="label"><label for="channel">{{i18n
|
||||||
|
"chat_integration.edit_rule_modal.channel"
|
||||||
|
}}</label></td>
|
||||||
<td>
|
<td>
|
||||||
{{channel-data provider=model.provider channel=model.channel}}
|
{{channel-data provider=model.provider channel=model.channel}}
|
||||||
</td>
|
</td>
|
||||||
|
@ -28,32 +39,50 @@
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr class="input">
|
<tr class="input">
|
||||||
<td class="label"><label for="filter">{{i18n "chat_integration.edit_rule_modal.type"}}</label></td>
|
<td class="label"><label for="filter">{{i18n
|
||||||
|
"chat_integration.edit_rule_modal.type"
|
||||||
|
}}</label></td>
|
||||||
<td>
|
<td>
|
||||||
{{combo-box name="type" content=model.rule.available_types value=model.rule.type}}
|
{{combo-box
|
||||||
|
name="type"
|
||||||
|
content=model.rule.available_types
|
||||||
|
value=model.rule.type
|
||||||
|
}}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr class="chat-instructions">
|
<tr class="chat-instructions">
|
||||||
<td></td>
|
<td></td>
|
||||||
<td><label>{{i18n "chat_integration.edit_rule_modal.instructions.type"}}</label></td>
|
<td><label>{{i18n
|
||||||
|
"chat_integration.edit_rule_modal.instructions.type"
|
||||||
|
}}</label></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr class="input">
|
<tr class="input">
|
||||||
<td class="label"><label for="filter">{{i18n "chat_integration.edit_rule_modal.filter"}}</label></td>
|
<td class="label"><label for="filter">{{i18n
|
||||||
|
"chat_integration.edit_rule_modal.filter"
|
||||||
|
}}</label></td>
|
||||||
<td>
|
<td>
|
||||||
{{combo-box name="filter" content=model.rule.available_filters value=model.rule.filter}}
|
{{combo-box
|
||||||
|
name="filter"
|
||||||
|
content=model.rule.available_filters
|
||||||
|
value=model.rule.filter
|
||||||
|
}}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr class="chat-instructions">
|
<tr class="chat-instructions">
|
||||||
<td></td>
|
<td></td>
|
||||||
<td><label>{{i18n "chat_integration.edit_rule_modal.instructions.filter"}}</label></td>
|
<td><label>{{i18n
|
||||||
|
"chat_integration.edit_rule_modal.instructions.filter"
|
||||||
|
}}</label></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
{{#if showCategory}}
|
{{#if showCategory}}
|
||||||
<tr class="input">
|
<tr class="input">
|
||||||
<td class="label"><label for="category">{{i18n "chat_integration.edit_rule_modal.category"}}</label></td>
|
<td class="label"><label for="category">{{i18n
|
||||||
|
"chat_integration.edit_rule_modal.category"
|
||||||
|
}}</label></td>
|
||||||
<td>
|
<td>
|
||||||
{{category-chooser
|
{{category-chooser
|
||||||
name="category"
|
name="category"
|
||||||
|
@ -65,33 +94,53 @@
|
||||||
|
|
||||||
<tr class="chat-instructions">
|
<tr class="chat-instructions">
|
||||||
<td></td>
|
<td></td>
|
||||||
<td><label>{{i18n "chat_integration.edit_rule_modal.instructions.category"}}</label></td>
|
<td><label>{{i18n
|
||||||
|
"chat_integration.edit_rule_modal.instructions.category"
|
||||||
|
}}</label></td>
|
||||||
</tr>
|
</tr>
|
||||||
{{else}}
|
{{else}}
|
||||||
<tr class="input">
|
<tr class="input">
|
||||||
<td class="label"><label for="group">{{i18n "chat_integration.edit_rule_modal.group"}}</label></td>
|
<td class="label"><label for="group">{{i18n
|
||||||
|
"chat_integration.edit_rule_modal.group"
|
||||||
|
}}</label></td>
|
||||||
<td>
|
<td>
|
||||||
{{combo-box content=model.groups valueAttribute="id" value=model.rule.group_id none="chat_integration.choose_group"}}
|
{{combo-box
|
||||||
|
content=model.groups
|
||||||
|
valueAttribute="id"
|
||||||
|
value=model.rule.group_id
|
||||||
|
none="chat_integration.choose_group"
|
||||||
|
}}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr class="chat-instructions">
|
<tr class="chat-instructions">
|
||||||
<td></td>
|
<td></td>
|
||||||
<td><label>{{i18n "chat_integration.edit_rule_modal.instructions.group"}}</label></td>
|
<td><label>{{i18n
|
||||||
|
"chat_integration.edit_rule_modal.instructions.group"
|
||||||
|
}}</label></td>
|
||||||
</tr>
|
</tr>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{#if siteSettings.tagging_enabled}}
|
{{#if siteSettings.tagging_enabled}}
|
||||||
<tr class="input">
|
<tr class="input">
|
||||||
<td class="label"><label for="tags">{{i18n "chat_integration.edit_rule_modal.tags"}}</label></td>
|
<td class="label"><label for="tags">{{i18n
|
||||||
|
"chat_integration.edit_rule_modal.tags"
|
||||||
|
}}</label></td>
|
||||||
<td>
|
<td>
|
||||||
{{tag-chooser placeholderKey="chat_integration.all_tags" name="tags" tags=model.rule.tags everyTag=true }}
|
{{tag-chooser
|
||||||
|
placeholderKey="chat_integration.all_tags"
|
||||||
|
name="tags"
|
||||||
|
tags=model.rule.tags
|
||||||
|
everyTag=true
|
||||||
|
}}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr class="chat-instructions">
|
<tr class="chat-instructions">
|
||||||
<td></td>
|
<td></td>
|
||||||
<td><label>{{i18n "chat_integration.edit_rule_modal.instructions.tags"}}</label></td>
|
<td><label>{{i18n
|
||||||
|
"chat_integration.edit_rule_modal.instructions.tags"
|
||||||
|
}}</label></td>
|
||||||
</tr>
|
</tr>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</tbody>
|
</tbody>
|
||||||
|
@ -101,7 +150,8 @@
|
||||||
{{/d-modal-body}}
|
{{/d-modal-body}}
|
||||||
|
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
{{d-button id="save-rule"
|
{{d-button
|
||||||
|
id="save-rule"
|
||||||
class="btn-primary btn-large"
|
class="btn-primary btn-large"
|
||||||
action=(action "save")
|
action=(action "save")
|
||||||
actionParam=model.rule
|
actionParam=model.rule
|
||||||
|
@ -110,7 +160,8 @@
|
||||||
disabled=saveDisabled
|
disabled=saveDisabled
|
||||||
}}
|
}}
|
||||||
|
|
||||||
{{d-button class="btn-large"
|
{{d-button
|
||||||
|
class="btn-large"
|
||||||
action=(route-action "closeModal")
|
action=(route-action "closeModal")
|
||||||
title="chat_integration.edit_rule_modal.cancel"
|
title="chat_integration.edit_rule_modal.cancel"
|
||||||
label="chat_integration.edit_rule_modal.cancel"
|
label="chat_integration.edit_rule_modal.cancel"
|
||||||
|
|
|
@ -1,10 +1,15 @@
|
||||||
{{#d-modal-body id="chat_integration_test_modal" title="chat_integration.test_modal.title"}}
|
{{#d-modal-body
|
||||||
|
id="chat_integration_test_modal"
|
||||||
|
title="chat_integration.test_modal.title"
|
||||||
|
}}
|
||||||
<div>
|
<div>
|
||||||
<form {{action "send" on="submit"}}>
|
<form {{action "send" on="submit"}}>
|
||||||
<table>
|
<table>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr class="input">
|
<tr class="input">
|
||||||
<td class="label"><label for="channel">{{i18n "chat_integration.test_modal.topic"}}</label></td>
|
<td class="label"><label for="channel">{{i18n
|
||||||
|
"chat_integration.test_modal.topic"
|
||||||
|
}}</label></td>
|
||||||
<td>
|
<td>
|
||||||
{{choose-topic selectedTopicId=model.topic_id}}
|
{{choose-topic selectedTopicId=model.topic_id}}
|
||||||
</td>
|
</td>
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
{{#if anyErrors}}
|
{{#if anyErrors}}
|
||||||
<div class="error">
|
<div class="error">
|
||||||
{{d-icon "exclamation-triangle"}}
|
{{d-icon "exclamation-triangle"}}
|
||||||
<span class="error-message">{{i18n "chat_integration.channels_with_errors"}}</span>
|
<span class="error-message">{{i18n
|
||||||
|
"chat_integration.channels_with_errors"
|
||||||
|
}}</span>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,17 @@
|
||||||
{{#each provider.channel_parameters as |param|}}
|
{{#each provider.channel_parameters as |param|}}
|
||||||
{{#unless param.hidden}}
|
{{#unless param.hidden}}
|
||||||
<span class="field-name">
|
<span class="field-name">
|
||||||
{{i18n (concat "chat_integration.provider." channel.provider ".param." param.key ".title")}}:
|
{{i18n
|
||||||
|
(concat
|
||||||
|
"chat_integration.provider."
|
||||||
|
channel.provider
|
||||||
|
".param."
|
||||||
|
param.key
|
||||||
|
".title"
|
||||||
|
)
|
||||||
|
}}:
|
||||||
</span>
|
</span>
|
||||||
<span class="field-value">{{get channel.data param.key}}</span>
|
<span class="field-value">{{get channel.data param.key}}</span>
|
||||||
<br>
|
<br />
|
||||||
{{/unless}}
|
{{/unless}}
|
||||||
{{/each}}
|
{{/each}}
|
Loading…
Reference in New Issue