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
|
||||
run: |
|
||||
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
|
||||
yarn prettier --list-different "assets/**/*.{scss,js,es6}"
|
||||
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,hbs}"
|
||||
fi
|
||||
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}"
|
||||
|
@ -50,7 +50,12 @@ jobs:
|
|||
|
||||
- name: Ember template lint
|
||||
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
|
||||
if: ${{ !cancelled() }}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{{#d-modal-body id="chat_integration_error_modal"}}
|
||||
<h4>{{i18n model.error_key}}</h4>
|
||||
<pre>{{model.error_info}}</pre>
|
||||
{{/d-modal-body}}
|
||||
{{/d-modal-body}}
|
|
@ -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>
|
||||
<form {{action "save" on="submit"}}>
|
||||
<table>
|
||||
<tbody>
|
||||
<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>
|
||||
{{i18n (concat "chat_integration.provider." model.channel.provider ".title")}}
|
||||
{{i18n
|
||||
(concat
|
||||
"chat_integration.provider." model.channel.provider ".title"
|
||||
)
|
||||
}}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
@ -17,7 +26,15 @@
|
|||
|
||||
{{#each model.provider.channel_parameters as |param|}}
|
||||
<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>
|
||||
{{text-field
|
||||
name=(concat "param-" param.key)
|
||||
|
@ -33,7 +50,15 @@
|
|||
|
||||
<tr class="chat-instructions">
|
||||
<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>
|
||||
{{/each}}
|
||||
</tbody>
|
||||
|
@ -43,7 +68,8 @@
|
|||
{{/d-modal-body}}
|
||||
|
||||
<div class="modal-footer">
|
||||
{{d-button id="save-channel"
|
||||
{{d-button
|
||||
id="save-channel"
|
||||
class="btn-primary btn-large"
|
||||
action=(action "save")
|
||||
title="chat_integration.edit_channel_modal.save"
|
||||
|
@ -51,9 +77,10 @@
|
|||
disabled=saveDisabled
|
||||
}}
|
||||
|
||||
{{d-button class="btn-large"
|
||||
{{d-button
|
||||
class="btn-large"
|
||||
action=(action "cancel")
|
||||
title="chat_integration.edit_channel_modal.cancel"
|
||||
label="chat_integration.edit_channel_modal.cancel"
|
||||
}}
|
||||
</div>
|
||||
</div>
|
|
@ -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>
|
||||
<form {{action "save" on="submit"}}>
|
||||
<table>
|
||||
<tbody>
|
||||
<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>
|
||||
{{i18n (concat "chat_integration.provider." model.channel.provider ".title")}}
|
||||
{{i18n
|
||||
(concat
|
||||
"chat_integration.provider." model.channel.provider ".title"
|
||||
)
|
||||
}}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
@ -16,7 +25,9 @@
|
|||
</tr>
|
||||
|
||||
<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>
|
||||
{{channel-data provider=model.provider channel=model.channel}}
|
||||
</td>
|
||||
|
@ -28,32 +39,50 @@
|
|||
</tr>
|
||||
|
||||
<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>
|
||||
{{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>
|
||||
</tr>
|
||||
|
||||
<tr class="chat-instructions">
|
||||
<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 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>
|
||||
{{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>
|
||||
</tr>
|
||||
|
||||
<tr class="chat-instructions">
|
||||
<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>
|
||||
|
||||
{{#if showCategory}}
|
||||
<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>
|
||||
{{category-chooser
|
||||
name="category"
|
||||
|
@ -65,33 +94,53 @@
|
|||
|
||||
<tr class="chat-instructions">
|
||||
<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>
|
||||
{{else}}
|
||||
<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>
|
||||
{{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>
|
||||
</tr>
|
||||
|
||||
<tr class="chat-instructions">
|
||||
<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>
|
||||
{{/if}}
|
||||
|
||||
{{#if siteSettings.tagging_enabled}}
|
||||
<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>
|
||||
{{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>
|
||||
</tr>
|
||||
|
||||
<tr class="chat-instructions">
|
||||
<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>
|
||||
{{/if}}
|
||||
</tbody>
|
||||
|
@ -101,7 +150,8 @@
|
|||
{{/d-modal-body}}
|
||||
|
||||
<div class="modal-footer">
|
||||
{{d-button id="save-rule"
|
||||
{{d-button
|
||||
id="save-rule"
|
||||
class="btn-primary btn-large"
|
||||
action=(action "save")
|
||||
actionParam=model.rule
|
||||
|
@ -110,9 +160,10 @@
|
|||
disabled=saveDisabled
|
||||
}}
|
||||
|
||||
{{d-button class="btn-large"
|
||||
{{d-button
|
||||
class="btn-large"
|
||||
action=(route-action "closeModal")
|
||||
title="chat_integration.edit_rule_modal.cancel"
|
||||
label="chat_integration.edit_rule_modal.cancel"
|
||||
}}
|
||||
</div>
|
||||
</div>
|
|
@ -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>
|
||||
<form {{action "send" on="submit"}}>
|
||||
<table>
|
||||
<tbody>
|
||||
<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>
|
||||
{{choose-topic selectedTopicId=model.topic_id}}
|
||||
</td>
|
||||
|
@ -33,4 +38,4 @@
|
|||
label="chat_integration.test_modal.close"
|
||||
}}
|
||||
{{/conditional-loading-spinner}}
|
||||
</div>
|
||||
</div>
|
|
@ -1,7 +1,9 @@
|
|||
{{#if anyErrors}}
|
||||
<div class="error">
|
||||
{{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>
|
||||
{{/if}}
|
||||
|
||||
|
@ -29,4 +31,4 @@
|
|||
label="chat_integration.create_channel"
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -25,4 +25,4 @@
|
|||
{{/unless}}
|
||||
|
||||
{{outlet}}
|
||||
</div>
|
||||
</div>
|
|
@ -1,9 +1,17 @@
|
|||
{{#each provider.channel_parameters as |param|}}
|
||||
{{#unless param.hidden}}
|
||||
<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 class="field-value">{{get channel.data param.key}}</span>
|
||||
<br>
|
||||
<br />
|
||||
{{/unless}}
|
||||
{{/each}}
|
||||
{{/each}}
|
|
@ -74,4 +74,4 @@
|
|||
label="chat_integration.create_rule"
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -42,4 +42,4 @@
|
|||
class="delete"
|
||||
title="chat_integration.rule_table.delete_rule"
|
||||
}}
|
||||
</td>
|
||||
</td>
|
Loading…
Reference in New Issue