mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 15:28:37 +08:00
DEV: Make category object more Ember friendly (#26342)
Some of the properties, like 'categoriesById', 'parentCategory' and 'subcategories', were updated manually when categories were loaded. This was not ideal because it required a lot of code to keep the objects in sync and some of the properties were not updated correctly.
This commit is contained in:
@ -8,7 +8,7 @@ acceptance("Chat | Hashtag CSS Generator", function (needs) {
|
||||
const category3 = {
|
||||
id: 4,
|
||||
color: "2B81AF",
|
||||
parentCategory: { id: 1 },
|
||||
parent_category_id: 1,
|
||||
name: "category3",
|
||||
};
|
||||
|
||||
@ -71,7 +71,7 @@ acceptance("Chat | Hashtag CSS Generator", function (needs) {
|
||||
".hashtag-category-badge { background-color: var(--primary-medium); }\n" +
|
||||
".hashtag-color--category-1 { background-color: #ff0000; }\n" +
|
||||
".hashtag-color--category-2 { background-color: #333; }\n" +
|
||||
".hashtag-color--category-4 { background-color: #2B81AF; }"
|
||||
".hashtag-color--category-4 { background: linear-gradient(-90deg, #2B81AF 50%, #ff0000 50%); }"
|
||||
);
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user