FIX: Show the solved filter on tags (#296)

This commit is contained in:
Jan Cernik 2024-06-01 12:26:03 -03:00 committed by GitHub
parent f81f1a1629
commit 6f27ff2998
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 4 deletions

View File

@ -25,7 +25,10 @@ export default class SolvedStatusFilter extends Component {
args.editingCategory
) {
return false;
} else if (helper.siteSettings.allow_solved_on_all_topics) {
} else if (
helper.siteSettings.allow_solved_on_all_topics ||
router.currentRouteName === "tag.show"
) {
return true;
} else {
return args.currentCategory?.enable_accepted_answers;
@ -45,8 +48,7 @@ export default class SolvedStatusFilter extends Component {
}
get status() {
const queryParamValue =
this.router.currentRoute.attributes?.modelParams?.solved;
const queryParamValue = this.router.currentRoute.queryParams?.solved;
return UX_VALUES[queryParamValue] || "all";
}

View File

@ -5,7 +5,7 @@ $solved-color: green;
min-width: auto;
margin-right: 0.5em;
.select-kit-header {
margin: 0;
color: var(--primary-high);
}
}
}