Skip to content

Commit ebf44a6

Browse files
authored
Merge pull request #298 from paviliondev/three_four_deprecations
COMPATIBILITY: Fontawesome 6 icon upgrade and new composer support
2 parents a1c8cd9 + 70d128f commit ebf44a6

23 files changed

+47
-41
lines changed

assets/javascripts/discourse/components/custom-field-input.hbs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,19 +41,19 @@
4141
{{/if}}
4242
{{d-button
4343
action=(action "destroy")
44-
icon="trash-alt"
44+
icon="trash-can"
4545
class="destroy"
4646
disabled=this.destroyDisabled
4747
}}
4848
{{d-button
49-
icon="save"
49+
icon="floppy-disk"
5050
action=(action "save")
5151
disabled=this.saveDisabled
5252
class="save"
5353
}}
5454
{{d-button
5555
action=(action "close")
56-
icon="times"
56+
icon="xmark"
5757
disabled=this.closeDisabled
5858
}}
5959
</td>
@@ -78,7 +78,7 @@
7878
</td>
7979
{{else}}
8080
<td class="actions">
81-
{{d-button action=(action "edit") icon="pencil-alt"}}
81+
{{d-button action=(action "edit") icon="pencil"}}
8282
</td>
8383
{{/if}}
8484
{{/if}}

assets/javascripts/discourse/components/custom-field-input.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ export default Component.extend({
118118
if (result.success) {
119119
this.set("field.edit", false);
120120
} else {
121-
this.set("saveIcon", "times");
121+
this.set("saveIcon", "xmark");
122122
}
123123
setTimeout(() => {
124124
if (this.isDestroyed) {

assets/javascripts/discourse/components/custom-wizard-composer-editor.hbs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
@wizardComposer={{true}}
1616
@fieldId={{this.field.id}}
1717
@disabled={{this.disableTextarea}}
18+
@onSetup={{this.setupEditor}}
1819
@outletArgs={{hash composer=this.composer editorType="composer"}}
1920
/>
2021

assets/javascripts/discourse/components/custom-wizard-composer-editor.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,18 @@ export default class CustomWizardComposerEditor extends ComposerEditor {
3232
this.uppyComposerUpload.editorInputClass = `.${dasherize(
3333
this.field.type
3434
)}-${dasherize(this.field.id)} .d-editor-input`;
35-
this.uppyComposerUpload.composerModel = this.composer;
35+
this.uppyComposerUpload.composerModel = this.composer.model;
3636
if (!this.currentUser) {
3737
this.currentUser = {};
3838
}
3939
}
4040

41+
@bind
42+
setupEditor(textManipulation) {
43+
textManipulation.placeholder.composer = this.composer;
44+
super.setupEditor(textManipulation);
45+
}
46+
4147
@discourseComputed
4248
allowedFileTypes() {
4349
return this.siteSettings.authorized_extensions

assets/javascripts/discourse/components/custom-wizard-date-time-input.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@
2626
{{/if}}
2727

2828
{{#if this.clearable}}
29-
{{d-button class="clear-date-time" icon="times" action=(action "onClear")}}
29+
{{d-button class="clear-date-time" icon="xmark" action=(action "onClear")}}
3030
{{/if}}

assets/javascripts/discourse/components/custom-wizard-field-composer.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,18 @@ export default Component.extend({
1818
"composer",
1919
EmberObject.create({
2020
loading: false,
21-
reply: this.get("field.value") || "",
21+
model: {
22+
reply: this.get("field.value") || "",
23+
},
2224
afterRefresh: () => {},
25+
allowUpload: true,
2326
})
2427
);
2528
},
2629

27-
@observes("composer.reply")
30+
@observes("composer.model.reply")
2831
setField() {
29-
this.set("field.value", this.get("composer.reply"));
32+
this.set("field.value", this.get("composer.model.reply"));
3033
},
3134

3235
@computed("showPreview")

assets/javascripts/discourse/components/wizard-links.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
{{d-button
3030
action=(action "remove")
3131
actionParam=link.id
32-
icon="times"
32+
icon="xmark"
3333
class="remove"
3434
}}
3535
</div>

assets/javascripts/discourse/components/wizard-mapper-input.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,5 +54,5 @@
5454
{{/if}}
5555

5656
<a role="button" class="remove-input" {{action this.remove this.input}}>
57-
{{d-icon "times"}}
57+
{{d-icon "xmark"}}
5858
</a>

assets/javascripts/discourse/components/wizard-mapper-pair.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,5 @@
3939
role="button"
4040
{{action this.removePair this.pair}}
4141
class="remove-pair"
42-
>{{d-icon "times"}}</a>
42+
>{{d-icon "xmark"}}</a>
4343
{{/if}}

assets/javascripts/discourse/components/wizard-message.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
{{#if this.showDocumentation}}
1919
<div class="message-block">
20-
{{d-icon "question-circle"}}
20+
{{d-icon "circle-question"}}
2121

2222
<a href={{this.url}} target="_blank" rel="noopener noreferrer">
2323
{{this.documentation}}

0 commit comments

Comments
 (0)