Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DEV: Resolve deprecated use of
registerConnectorClass
(#262)
- Loading branch information
1 parent
82b2196
commit 8352a79
Showing
5 changed files
with
31 additions
and
29 deletions.
There are no files selected for viewing
12 changes: 8 additions & 4 deletions
12
assets/javascripts/discourse/connectors/user-activity-bottom/solved-list.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 |
---|---|---|
@@ -1,4 +1,8 @@ | ||
<LinkTo @route="userActivity.solved"> | ||
{{d-icon "check-square"}} | ||
{{i18n "solved.title"}} | ||
</LinkTo> | ||
{{#if this.siteSettings.solved_enabled}} | ||
<li class="user-activity-bottom-outlet solved-list"> | ||
<LinkTo @route="userActivity.solved"> | ||
{{d-icon "check-square"}} | ||
{{i18n "solved.title"}} | ||
</LinkTo> | ||
</li> | ||
{{/if}} |
6 changes: 6 additions & 0 deletions
6
assets/javascripts/discourse/connectors/user-activity-bottom/solved-list.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,6 @@ | ||
import Component from "@glimmer/component"; | ||
import { inject as service } from "@ember/service"; | ||
|
||
export default class SolvedList extends Component { | ||
@service siteSettings; | ||
} |
18 changes: 11 additions & 7 deletions
18
assets/javascripts/discourse/connectors/user-summary-stat/solved-count.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 |
---|---|---|
@@ -1,7 +1,11 @@ | ||
<LinkTo @route="userActivity.solved"> | ||
<UserStat | ||
@value={{model.solved_count}} | ||
@label="solved.solution_summary" | ||
@icon="check-square" | ||
/> | ||
</LinkTo> | ||
{{#if (and this.siteSettings.solved_enabled @outletArgs.solved_count)}} | ||
<li class="user-summary-stat-outlet solved-count"> | ||
<LinkTo @route="userActivity.solved"> | ||
<UserStat | ||
@value={{@outletArgs.model.solved_count}} | ||
@label="solved.solution_summary" | ||
@icon="check-square" | ||
/> | ||
</LinkTo> | ||
</li> | ||
{{/if}} |
6 changes: 6 additions & 0 deletions
6
assets/javascripts/discourse/connectors/user-summary-stat/solved-count.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,6 @@ | ||
import Component from "@glimmer/component"; | ||
import { inject as service } from "@ember/service"; | ||
|
||
export default class SolvedCount extends Component { | ||
@service siteSettings; | ||
} |
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