DEV: Fix JS errors in styleguide (#11494)

Replaces latest topic list component with basic topic list (the former
no longer exists). And fixes the display of the topic footer buttons.
This commit is contained in:
Penar Musaraj 2020-12-15 12:35:14 -05:00 committed by GitHub
parent 31fe0e91ad
commit 2b2c840297
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 15 additions and 11 deletions

View File

@ -1,3 +1,4 @@
import EmberObject from "@ember/object";
import NavItem from "discourse/models/nav-item";
let topicId = 2000000;
@ -114,9 +115,14 @@ export function createData(store) {
};
let topic = createTopic();
topic.set("category", categories[0]);
topic.get("details").setProperties({
can_create_post: true,
topic.setProperties({
details: EmberObject.create({
can_create_post: true,
can_invite_to: false,
can_delete: false,
can_close_topic: false,
}),
category: categories[0],
suggested_topics: [topic, topic, topic],
});

View File

@ -1,7 +1,5 @@
{{#styleguide-example title="topic-footer-buttons - logged in"}}
{{topic-footer-buttons
canInviteTo=true
topic=dummy.topic}}
{{topic-footer-buttons topic=dummy.topic}}
{{/styleguide-example}}
{{#styleguide-example title="topic-footer-buttons - anonymous"}}

View File

@ -0,0 +1,3 @@
{{#styleguide-example title="basic-topic-list" class="half-size"}}
{{basic-topic-list topics=dummy.topics}}
{{/styleguide-example}}

View File

@ -1,3 +0,0 @@
{{#styleguide-example title="latest-topic-list" class="half-size"}}
{{latest-topic-list topics=dummy.topics}}
{{/styleguide-example}}

View File

@ -49,8 +49,8 @@ en:
title: "Topic Statuses"
topic_list:
title: "Topic List"
latest_topic_list:
title: "Latest Topic List"
basic_topic_list:
title: "Basic Topic List"
footer_message:
title: "Footer Message"
signup_cta: