-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #267 from paviliondev/resolve_deprecations
COMPATIBILITY: resolve deprecations expected in Ember upgrade for Discourse 3.2
- Loading branch information
Showing
28 changed files
with
243 additions
and
200 deletions.
There are no files selected for viewing
34 changes: 34 additions & 0 deletions
34
assets/javascripts/discourse/components/modal/admin-wizards-columns.hbs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<DModal @closeModal={{@closeModal}} @title={{this.title}}> | ||
{{#if loading}} | ||
<LoadingSpinner size="large" /> | ||
{{else}} | ||
<div class="edit-directory-columns-container"> | ||
{{#each @model.columns as |column|}} | ||
<div class="edit-directory-column"> | ||
<div class="left-content"> | ||
<label class="column-name"> | ||
<Input @type="checkbox" @checked={{column.enabled}} /> | ||
{{directory-table-header-title | ||
field=column.label | ||
translated=true | ||
}} | ||
</label> | ||
</div> | ||
</div> | ||
{{/each}} | ||
</div> | ||
{{/if}} | ||
<div class="modal-footer"> | ||
<DButton | ||
class="btn-primary" | ||
@label="directory.edit_columns.save" | ||
@action={{action "save"}} | ||
/> | ||
|
||
<DButton | ||
class="btn-secondary reset-to-default" | ||
@label="directory.edit_columns.reset_to_default" | ||
@action={{action "resetToDefault"}} | ||
/> | ||
</div> | ||
</DModal> |
15 changes: 15 additions & 0 deletions
15
assets/javascripts/discourse/components/modal/admin-wizards-columns.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import Component from "@glimmer/component"; | ||
import { action } from "@ember/object"; | ||
import I18n from "I18n"; | ||
|
||
export default class AdminWizardsColumnComponent extends Component { | ||
title = I18n.t("admin.wizard.edit_columns"); | ||
|
||
@action save() { | ||
this.args.closeModal(); | ||
} | ||
|
||
@action resetToDefault() { | ||
this.args.model.reset(); | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
assets/javascripts/discourse/components/modal/next-session-scheduled.hbs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<DModal | ||
@closeModal={{@closeModal}} | ||
class="next-session-time-modal" | ||
@title={{this.title}} | ||
> | ||
<DateTimeInput | ||
@date={{this.bufferedDateTime}} | ||
@onChange={{action "dateTimeChanged"}} | ||
@showTime="true" | ||
@clearable="true" | ||
/> | ||
<div class="modal-footer"> | ||
<DButton | ||
@action={{action "submit"}} | ||
class="btn-primary" | ||
@label="admin.wizard.after_time_modal.done" | ||
@disabled={{this.submitDisabled}} | ||
/> | ||
</div> | ||
</DModal> |
30 changes: 30 additions & 0 deletions
30
assets/javascripts/discourse/components/modal/next-session-scheduled.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import Component from "@glimmer/component"; | ||
import { tracked } from "@glimmer/tracking"; | ||
import { action } from "@ember/object"; | ||
import I18n from "I18n"; | ||
|
||
export default class NextSessionScheduledComponent extends Component { | ||
@tracked bufferedDateTime; | ||
title = I18n.t("admin.wizard.after_time_modal.title"); | ||
|
||
constructor() { | ||
super(...arguments); | ||
this.bufferedDateTime = this.args.model.dateTime | ||
? moment(this.args.model.dateTime) | ||
: moment(Date.now()); | ||
} | ||
|
||
get submitDisabled() { | ||
return moment().isAfter(this.bufferedDateTime); | ||
} | ||
|
||
@action submit() { | ||
const dateTime = this.bufferedDateTime; | ||
this.args.model.update(moment(dateTime).utc().toISOString()); | ||
this.args.closeModal(); | ||
} | ||
|
||
@action dateTimeChanged(dateTime) { | ||
this.bufferedDateTime = dateTime; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 0 additions & 14 deletions
14
assets/javascripts/discourse/controllers/admin-wizards-columns.js.es6
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 0 additions & 30 deletions
30
assets/javascripts/discourse/controllers/next-session-scheduled.js.es6
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 4 additions & 1 deletion
5
assets/javascripts/discourse/routes/admin-wizards-logs-show.js.es6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.