FEATURE: add solved enabled key
This commit is contained in:
parent
0b9853c7e2
commit
bf113f47b0
|
@ -173,9 +173,14 @@ function initializeWithApi(api) {
|
|||
});
|
||||
|
||||
if (api.registerConnectorClass) {
|
||||
api.registerConnectorClass('user-activity-bottom', 'solved-list', {
|
||||
shouldRender(args, component) {
|
||||
return component.siteSettings.solved_enabled;
|
||||
},
|
||||
});
|
||||
api.registerConnectorClass('user-summary-stat', 'solved-count', {
|
||||
shouldRender(args) {
|
||||
return args.model.solved_count > 0;
|
||||
shouldRender(args, component) {
|
||||
return component.siteSettings.solved_enabled && args.model.solved_count > 0;
|
||||
},
|
||||
setupComponent() {
|
||||
this.set('classNames', ['linked-stat']);
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
en:
|
||||
site_settings:
|
||||
solved_enabled: "Enable solved plugin, allow users to select solutions for topics"
|
||||
allow_solved_on_all_topics: "Allow users to select solutions on all topics (by default you control this by editing categories)"
|
||||
accept_all_solutions_trust_level: "Minimum trust level required to accept solutions on any topic (even when not OP)"
|
||||
reports:
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
plugins:
|
||||
solved_enabled:
|
||||
default: true
|
||||
client: true
|
||||
allow_solved_on_all_topics:
|
||||
default: false
|
||||
client: true
|
||||
|
|
Loading…
Reference in New Issue