Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX: replaces discourseComputed by computed #16530

Merged
merged 1 commit into from Apr 21, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -1,18 +1,19 @@
import Controller from "@ember/controller";
import I18n from "I18n";
import bootbox from "bootbox";
import discourseComputed from "discourse-common/utils/decorators";
import { later } from "@ember/runloop";
import { action } from "@ember/object";
import { action, computed } from "@ember/object";
import { clipboardCopy } from "discourse/lib/utilities";

export default class AdminCustomizeColorsShowController extends Controller {
@discourseComputed("model.colors", "onlyOverridden")
colors(allColors, onlyOverridden) {
if (onlyOverridden) {
return allColors.filterBy("overridden");
onlyOverridden = false;

@computed("model.colors.[]", "onlyOverridden")
get colors() {
if (this.onlyOverridden) {
return this.model.colors?.filterBy("overridden");
} else {
return allColors;
return this.model.colors;
}
}

Expand Down