DEV: Update eslint-config-discourse, use prettier for hbs (#163)
This commit is contained in:
parent
dc48bea931
commit
c519b4bc92
|
@ -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() }}
|
||||
|
|
|
@ -24,9 +24,8 @@ export default AdComponent.extend({
|
|||
const placement = this.get("placement");
|
||||
|
||||
if (!mobileView && this.siteSettings.amazon_topic_list_top_src_code) {
|
||||
data["topic-list-top"][
|
||||
"user_input"
|
||||
] = this.siteSettings.amazon_topic_list_top_src_code;
|
||||
data["topic-list-top"]["user_input"] =
|
||||
this.siteSettings.amazon_topic_list_top_src_code;
|
||||
data["topic-list-top"]["amazon_width"] = parseInt(
|
||||
this.siteSettings.amazon_topic_list_top_ad_width_code,
|
||||
10
|
||||
|
@ -38,9 +37,8 @@ export default AdComponent.extend({
|
|||
}
|
||||
|
||||
if (mobileView && this.siteSettings.amazon_mobile_topic_list_top_src_code) {
|
||||
data["topic-list-top"][
|
||||
"user_input_mobile"
|
||||
] = this.siteSettings.amazon_mobile_topic_list_top_src_code;
|
||||
data["topic-list-top"]["user_input_mobile"] =
|
||||
this.siteSettings.amazon_mobile_topic_list_top_src_code;
|
||||
data["topic-list-top"]["mobile_amazon_width"] = parseInt(
|
||||
this.siteSettings.amazon_mobile_topic_list_top_ad_width_code,
|
||||
10
|
||||
|
@ -55,9 +53,8 @@ export default AdComponent.extend({
|
|||
!mobileView &&
|
||||
this.siteSettings.amazon_topic_above_post_stream_src_code
|
||||
) {
|
||||
data["topic-above-post-stream"][
|
||||
"user_input"
|
||||
] = this.siteSettings.amazon_topic_above_post_stream_src_code;
|
||||
data["topic-above-post-stream"]["user_input"] =
|
||||
this.siteSettings.amazon_topic_above_post_stream_src_code;
|
||||
data["topic-above-post-stream"]["amazon_width"] = parseInt(
|
||||
this.siteSettings.amazon_topic_above_post_stream_ad_width_code,
|
||||
10
|
||||
|
@ -72,9 +69,8 @@ export default AdComponent.extend({
|
|||
mobileView &&
|
||||
this.siteSettings.amazon_mobile_topic_above_post_stream_src_code
|
||||
) {
|
||||
data["topic-above-post-stream"][
|
||||
"user_input_mobile"
|
||||
] = this.siteSettings.amazon_mobile_topic_above_post_stream_src_code;
|
||||
data["topic-above-post-stream"]["user_input_mobile"] =
|
||||
this.siteSettings.amazon_mobile_topic_above_post_stream_src_code;
|
||||
data["topic-above-post-stream"]["mobile_amazon_width"] = parseInt(
|
||||
this.siteSettings.amazon_mobile_topic_above_post_stream_ad_width_code,
|
||||
10
|
||||
|
@ -89,9 +85,8 @@ export default AdComponent.extend({
|
|||
!mobileView &&
|
||||
this.siteSettings.amazon_topic_above_suggested_src_code
|
||||
) {
|
||||
data["topic-above-suggested"][
|
||||
"user_input"
|
||||
] = this.siteSettings.amazon_topic_above_suggested_src_code;
|
||||
data["topic-above-suggested"]["user_input"] =
|
||||
this.siteSettings.amazon_topic_above_suggested_src_code;
|
||||
data["topic-above-suggested"]["amazon_width"] = parseInt(
|
||||
this.siteSettings.amazon_topic_above_suggested_ad_width_code,
|
||||
10
|
||||
|
@ -106,9 +101,8 @@ export default AdComponent.extend({
|
|||
mobileView &&
|
||||
this.siteSettings.amazon_mobile_topic_above_suggested_src_code
|
||||
) {
|
||||
data["topic-above-suggested"][
|
||||
"user_input_mobile"
|
||||
] = this.siteSettings.amazon_mobile_topic_above_suggested_src_code;
|
||||
data["topic-above-suggested"]["user_input_mobile"] =
|
||||
this.siteSettings.amazon_mobile_topic_above_suggested_src_code;
|
||||
data["topic-above-suggested"]["mobile_amazon_width"] = parseInt(
|
||||
this.siteSettings.amazon_mobile_topic_above_suggested_ad_width_code,
|
||||
10
|
||||
|
@ -120,9 +114,8 @@ export default AdComponent.extend({
|
|||
}
|
||||
|
||||
if (!mobileView && this.siteSettings.amazon_post_bottom_src_code) {
|
||||
data["post-bottom"][
|
||||
"user_input"
|
||||
] = this.siteSettings.amazon_post_bottom_src_code;
|
||||
data["post-bottom"]["user_input"] =
|
||||
this.siteSettings.amazon_post_bottom_src_code;
|
||||
data["post-bottom"]["amazon_width"] = parseInt(
|
||||
this.siteSettings.amazon_post_bottom_ad_width_code,
|
||||
10
|
||||
|
@ -134,9 +127,8 @@ export default AdComponent.extend({
|
|||
}
|
||||
|
||||
if (mobileView && this.siteSettings.amazon_mobile_post_bottom_src_code) {
|
||||
data["post-bottom"][
|
||||
"user_input_mobile"
|
||||
] = this.siteSettings.amazon_mobile_post_bottom_src_code;
|
||||
data["post-bottom"]["user_input_mobile"] =
|
||||
this.siteSettings.amazon_mobile_post_bottom_src_code;
|
||||
data["post-bottom"]["mobile_amazon_width"] = parseInt(
|
||||
this.siteSettings.amazon_mobile_post_bottom_ad_width_code,
|
||||
10
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import MultiSelectComponent from "select-kit/components/multi-select";
|
||||
import Ember from "ember";
|
||||
const { makeArray } = Ember;
|
||||
import { computed } from "@ember/object";
|
||||
|
||||
|
|
|
@ -3,17 +3,43 @@
|
|||
|
||||
{{#if houseAds.length}}
|
||||
<form class="form-horizontal">
|
||||
{{house-ads-list-setting name="topic_list_top" value=adSettings.topic_list_top allAds=houseAds adSettings=adSettings}}
|
||||
{{house-ads-list-setting name="topic_above_post_stream" value=adSettings.topic_above_post_stream allAds=houseAds adSettings=adSettings}}
|
||||
{{house-ads-list-setting name="topic_above_suggested" value=adSettings.topic_above_suggested allAds=houseAds adSettings=adSettings}}
|
||||
{{house-ads-list-setting name="post_bottom" value=adSettings.post_bottom allAds=houseAds adSettings=adSettings}}
|
||||
{{house-ads-list-setting name="topic_list_between" value=adSettings.topic_list_between allAds=houseAds adSettings=adSettings}}
|
||||
{{house-ads-list-setting
|
||||
name="topic_list_top"
|
||||
value=adSettings.topic_list_top
|
||||
allAds=houseAds
|
||||
adSettings=adSettings
|
||||
}}
|
||||
{{house-ads-list-setting
|
||||
name="topic_above_post_stream"
|
||||
value=adSettings.topic_above_post_stream
|
||||
allAds=houseAds
|
||||
adSettings=adSettings
|
||||
}}
|
||||
{{house-ads-list-setting
|
||||
name="topic_above_suggested"
|
||||
value=adSettings.topic_above_suggested
|
||||
allAds=houseAds
|
||||
adSettings=adSettings
|
||||
}}
|
||||
{{house-ads-list-setting
|
||||
name="post_bottom"
|
||||
value=adSettings.post_bottom
|
||||
allAds=houseAds
|
||||
adSettings=adSettings
|
||||
}}
|
||||
{{house-ads-list-setting
|
||||
name="topic_list_between"
|
||||
value=adSettings.topic_list_between
|
||||
allAds=houseAds
|
||||
adSettings=adSettings
|
||||
}}
|
||||
|
||||
{{d-button label="admin.adplugin.house_ads.more_settings"
|
||||
icon="cog"
|
||||
class="btn-default"
|
||||
action=(route-action "moreSettings")
|
||||
}}
|
||||
{{d-button
|
||||
label="admin.adplugin.house_ads.more_settings"
|
||||
icon="cog"
|
||||
class="btn-default"
|
||||
action=(route-action "moreSettings")
|
||||
}}
|
||||
</form>
|
||||
{{else}}
|
||||
<p>
|
||||
|
|
|
@ -8,7 +8,8 @@
|
|||
action=(action "save")
|
||||
disabled=disableSave
|
||||
class="btn-primary"
|
||||
label="admin.adplugin.house_ads.save"}}
|
||||
label="admin.adplugin.house_ads.save"
|
||||
}}
|
||||
|
||||
{{#if saving}}
|
||||
{{savingStatus}}
|
||||
|
@ -21,6 +22,7 @@
|
|||
{{d-button
|
||||
action=(action "destroy")
|
||||
class="btn-danger delete-button"
|
||||
label="admin.adplugin.house_ads.delete"}}
|
||||
label="admin.adplugin.house_ads.delete"
|
||||
}}
|
||||
</div>
|
||||
{{/d-section}}
|
|
@ -1,5 +1,6 @@
|
|||
{{#each adComponents as |adComponent|}}
|
||||
{{component adComponent
|
||||
{{component
|
||||
adComponent
|
||||
placement=placement
|
||||
refreshOnChange=refreshOnChange
|
||||
category=category
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{{#if showAd}}
|
||||
{{#if site.mobileView}}
|
||||
<div class="amazon-product-links-label" style={{adTitleStyleMobile}}><h2>{{i18n "adplugin.advertisement_label"}}</h2></div>
|
||||
<div class="amazon-product-links-label" style={{adTitleStyleMobile}}><h2
|
||||
>{{i18n "adplugin.advertisement_label"}}</h2></div>
|
||||
<iframe
|
||||
style={{adWrapperStyleMobile}}
|
||||
marginwidth="0"
|
||||
|
@ -12,7 +13,9 @@
|
|||
>
|
||||
</iframe>
|
||||
{{else}}
|
||||
<div class="amazon-product-links-label"><h2>{{i18n "adplugin.advertisement_label"}}</h2></div>
|
||||
<div class="amazon-product-links-label"><h2>{{i18n
|
||||
"adplugin.advertisement_label"
|
||||
}}</h2></div>
|
||||
<div class="container" align="center">
|
||||
<iframe
|
||||
style={{adWrapperStyle}}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{{#if showAd}}
|
||||
{{! template-lint-disable no-forbidden-elements }}
|
||||
<script src={{url}} id="_carbonads_js" async type="text/javascript">
|
||||
</script>
|
||||
{{/if}}
|
|
@ -1,11 +1,15 @@
|
|||
{{#if showAd}}
|
||||
<div class="google-adsense-label"><h2>{{i18n "adplugin.advertisement_label"}}</h2></div>
|
||||
<div class="google-adsense-label"><h2>{{i18n
|
||||
"adplugin.advertisement_label"
|
||||
}}</h2></div>
|
||||
<div class="google-adsense-content" style={{adWrapperStyle}}>
|
||||
<ins class="adsbygoogle"
|
||||
<ins
|
||||
class="adsbygoogle"
|
||||
style={{adInsStyle}}
|
||||
data-ad-client="ca-pub-{{publisher_id}}"
|
||||
data-ad-slot={{ad_code}}
|
||||
data-ad-format={{autoAdFormat}}>
|
||||
data-ad-format={{autoAdFormat}}
|
||||
>
|
||||
</ins>
|
||||
</div>
|
||||
{{/if}}
|
|
@ -1,9 +1,23 @@
|
|||
{{#if showAd}}
|
||||
{{#if site.mobileView}}
|
||||
<div class="google-dfp-ad-label" style={{adTitleStyleMobile}}><h2>{{i18n "adplugin.advertisement_label"}}</h2></div>
|
||||
<div id={{divId}} style={{adWrapperStyle}} class="dfp-ad-unit" align="center"></div>
|
||||
<div class="google-dfp-ad-label" style={{adTitleStyleMobile}}><h2>{{i18n
|
||||
"adplugin.advertisement_label"
|
||||
}}</h2></div>
|
||||
<div
|
||||
id={{divId}}
|
||||
style={{adWrapperStyle}}
|
||||
class="dfp-ad-unit"
|
||||
align="center"
|
||||
></div>
|
||||
{{else}}
|
||||
<div class="google-dfp-ad-label"><h2>{{i18n "adplugin.advertisement_label"}}</h2></div>
|
||||
<div id={{divId}} style={{adWrapperStyle}} class="dfp-ad-unit" align="center"></div>
|
||||
<div class="google-dfp-ad-label"><h2>{{i18n
|
||||
"adplugin.advertisement_label"
|
||||
}}</h2></div>
|
||||
<div
|
||||
id={{divId}}
|
||||
style={{adWrapperStyle}}
|
||||
class="dfp-ad-unit"
|
||||
align="center"
|
||||
></div>
|
||||
{{/if}}
|
||||
{{/if}}
|
|
@ -1 +1,5 @@
|
|||
{{ad-slot placement="post-bottom" category=model.topic.category.slug postNumber=model.post_number}}
|
||||
{{ad-slot
|
||||
placement="post-bottom"
|
||||
category=model.topic.category.slug
|
||||
postNumber=model.post_number
|
||||
}}
|
|
@ -1 +1,6 @@
|
|||
{{ad-slot placement="topic-list-top" refreshOnChange=listLoading category=category.slug listLoading=listLoading}}
|
||||
{{ad-slot
|
||||
placement="topic-list-top"
|
||||
refreshOnChange=listLoading
|
||||
category=category.slug
|
||||
listLoading=listLoading
|
||||
}}
|
|
@ -1 +1,5 @@
|
|||
{{ad-slot placement="topic-above-post-stream" refreshOnChange=model.id category=model.category.slug}}
|
||||
{{ad-slot
|
||||
placement="topic-above-post-stream"
|
||||
refreshOnChange=model.id
|
||||
category=model.category.slug
|
||||
}}
|
|
@ -1 +1,5 @@
|
|||
{{ad-slot placement="topic-above-suggested" refreshOnChange=model.id category=model.category.slug}}
|
||||
{{ad-slot
|
||||
placement="topic-above-suggested"
|
||||
refreshOnChange=model.id
|
||||
category=model.category.slug
|
||||
}}
|
Loading…
Reference in New Issue