mirror of
https://github.com/discourse/discourse.git
synced 2024-11-28 07:43:41 +08:00
549 lines
18 KiB
JavaScript
549 lines
18 KiB
JavaScript
export default {
|
|
"/t/13.json": {
|
|
post_stream: {
|
|
posts: [
|
|
{
|
|
id: 16,
|
|
username: "tgx",
|
|
avatar_template: "/images/avatar.png",
|
|
created_at: "2017-01-31T09:11:11.281Z",
|
|
cooked:
|
|
'<div class="poll" data-poll-status="open" data-poll-name="poll" data-poll-type="number" data-poll-min="1" data-poll-max="20" data-poll-step="1" data-poll-public="true">\n<div>\n<div class="poll-container"><ul>\n<li data-poll-option-id="4d8a15e3cc35750f016ce15a43937620">1</li>\n<li data-poll-option-id="cd314db7dfbac2b10687b6f39abfdf41">2</li>\n<li data-poll-option-id="68b434ff88aeae7054e42cd05a4d9056">3</li>\n<li data-poll-option-id="aa2393b424f2f395abb63bf785760a3b">4</li>\n<li data-poll-option-id="8b2f2930cac0574c3450f5db9a6fb7f9">5</li>\n<li data-poll-option-id="60cad69e0cfcb3fa77a68d11d3758002">6</li>\n<li data-poll-option-id="9ab1070dec27185440cdabb4948a5e9a">7</li>\n<li data-poll-option-id="99944bf07088f815a966d585daed6a7e">8</li>\n<li data-poll-option-id="345a83050400d78f5fac98d381b45e23">9</li>\n<li data-poll-option-id="46c01f638a50d86e020f47469733b8be">10</li>\n<li data-poll-option-id="07f7f85b2a3809faff68a35e81a664eb">11</li>\n<li data-poll-option-id="b3e8c14e714910cb8dd7089f097be133">12</li>\n<li data-poll-option-id="b4f15431e07443c372d521e4ed131abe">13</li>\n<li data-poll-option-id="a77bc9a30933e5af327211db2da46e17">14</li>\n<li data-poll-option-id="303d7c623da1985e94a9d27d43596934">15</li>\n<li data-poll-option-id="4e885ead68ff4456f102843df9fbbd7f">16</li>\n<li data-poll-option-id="cbf6e2b72e403b12d7ee63a138f32647">17</li>\n<li data-poll-option-id="9364fa2d67fbd62c473165441ad69571">18</li>\n<li data-poll-option-id="eb8661f072794ea57baa7827cd8ffc88">19</li>\n<li data-poll-option-id="b373436e858c0821135f994a5ff3345f">20</li>\n</ul></div>\n<div class="poll-info">\n<p><span class="info-number">0</span><span class="info-text">voters</span></p>\n<p>Votes are public.</p>\n</div>\n</div>\n<div class="poll-buttons"><a title="Display the poll results">Show results</a></div>\n</div>',
|
|
post_number: 1,
|
|
post_type: 1,
|
|
updated_at: "2017-01-31T09:11:11.281Z",
|
|
reply_count: 0,
|
|
quote_count: 0,
|
|
incoming_link_count: 0,
|
|
reads: 1,
|
|
score: 0,
|
|
yours: true,
|
|
topic_id: 13,
|
|
topic_slug: "this-is-a-topic-for-testing-number-poll",
|
|
version: 1,
|
|
can_edit: true,
|
|
can_delete: false,
|
|
can_recover: true,
|
|
can_wiki: true,
|
|
read: true,
|
|
actions_summary: [
|
|
{ id: 3, can_act: true },
|
|
{ id: 4, can_act: true },
|
|
{ id: 5, hidden: true, can_act: true },
|
|
{ id: 7, can_act: true },
|
|
{ id: 8, can_act: true }
|
|
],
|
|
moderator: false,
|
|
admin: true,
|
|
staff: true,
|
|
user_id: 1,
|
|
hidden: false,
|
|
trust_level: 4,
|
|
user_deleted: false,
|
|
can_view_edit_history: true,
|
|
wiki: false,
|
|
polls: [
|
|
{
|
|
options: [
|
|
{
|
|
id: "4d8a15e3cc35750f016ce15a43937620",
|
|
html: "1",
|
|
votes: 2
|
|
},
|
|
{
|
|
id: "cd314db7dfbac2b10687b6f39abfdf41",
|
|
html: "2",
|
|
votes: 1
|
|
},
|
|
{
|
|
id: "68b434ff88aeae7054e42cd05a4d9056",
|
|
html: "3",
|
|
votes: 1
|
|
},
|
|
{
|
|
id: "aa2393b424f2f395abb63bf785760a3b",
|
|
html: "4",
|
|
votes: 0
|
|
},
|
|
{
|
|
id: "8b2f2930cac0574c3450f5db9a6fb7f9",
|
|
html: "5",
|
|
votes: 1
|
|
},
|
|
{
|
|
id: "60cad69e0cfcb3fa77a68d11d3758002",
|
|
html: "6",
|
|
votes: 0
|
|
},
|
|
{
|
|
id: "9ab1070dec27185440cdabb4948a5e9a",
|
|
html: "7",
|
|
votes: 1
|
|
},
|
|
{
|
|
id: "99944bf07088f815a966d585daed6a7e",
|
|
html: "8",
|
|
votes: 3
|
|
},
|
|
{
|
|
id: "345a83050400d78f5fac98d381b45e23",
|
|
html: "9",
|
|
votes: 3
|
|
},
|
|
{
|
|
id: "46c01f638a50d86e020f47469733b8be",
|
|
html: "10",
|
|
votes: 3
|
|
},
|
|
{
|
|
id: "07f7f85b2a3809faff68a35e81a664eb",
|
|
html: "11",
|
|
votes: 2
|
|
},
|
|
{
|
|
id: "b3e8c14e714910cb8dd7089f097be133",
|
|
html: "12",
|
|
votes: 4
|
|
},
|
|
{
|
|
id: "b4f15431e07443c372d521e4ed131abe",
|
|
html: "13",
|
|
votes: 2
|
|
},
|
|
{
|
|
id: "a77bc9a30933e5af327211db2da46e17",
|
|
html: "14",
|
|
votes: 2
|
|
},
|
|
{
|
|
id: "303d7c623da1985e94a9d27d43596934",
|
|
html: "15",
|
|
votes: 2
|
|
},
|
|
{
|
|
id: "4e885ead68ff4456f102843df9fbbd7f",
|
|
html: "16",
|
|
votes: 1
|
|
},
|
|
{
|
|
id: "cbf6e2b72e403b12d7ee63a138f32647",
|
|
html: "17",
|
|
votes: 2
|
|
},
|
|
{
|
|
id: "9364fa2d67fbd62c473165441ad69571",
|
|
html: "18",
|
|
votes: 2
|
|
},
|
|
{
|
|
id: "eb8661f072794ea57baa7827cd8ffc88",
|
|
html: "19",
|
|
votes: 1
|
|
},
|
|
{
|
|
id: "b373436e858c0821135f994a5ff3345f",
|
|
html: "20",
|
|
votes: 2
|
|
}
|
|
],
|
|
voters: 35,
|
|
status: "open",
|
|
name: "poll",
|
|
type: "number",
|
|
min: "1",
|
|
max: "20",
|
|
step: "1",
|
|
public: "true",
|
|
preloaded_voters: Array.from(new Array(25), (_, i) => ({
|
|
id: 400 + i,
|
|
username: `bruce${400 + i}`,
|
|
avatar_template: "/images/avatar.png",
|
|
name: "Bruce Wayne"
|
|
}))
|
|
}
|
|
]
|
|
}
|
|
],
|
|
stream: [16]
|
|
},
|
|
timeline_lookup: [[1, 0]],
|
|
id: 13,
|
|
title: "This is a topic for testing number poll",
|
|
fancy_title: "This is a topic for testing number poll",
|
|
posts_count: 1,
|
|
created_at: "2017-01-31T09:11:11.161Z",
|
|
views: 1,
|
|
reply_count: 0,
|
|
participant_count: 1,
|
|
like_count: 0,
|
|
last_posted_at: "2017-01-31T09:11:11.281Z",
|
|
visible: true,
|
|
closed: false,
|
|
archived: false,
|
|
has_summary: false,
|
|
archetype: "regular",
|
|
slug: "this-is-a-topic-for-testing-number-poll",
|
|
category_id: 1,
|
|
word_count: 12,
|
|
user_id: 1,
|
|
draft_key: "topic_13",
|
|
draft_sequence: 1,
|
|
posted: true,
|
|
pinned_globally: false,
|
|
pinned: false,
|
|
details: {
|
|
auto_close_based_on_last_post: false,
|
|
created_by: {
|
|
id: 1,
|
|
username: "tgx",
|
|
avatar_template: "/images/avatar.png"
|
|
},
|
|
last_poster: {
|
|
id: 1,
|
|
username: "tgx",
|
|
avatar_template: "/images/avatar.png"
|
|
},
|
|
participants: [
|
|
{
|
|
id: 1,
|
|
username: "tgx",
|
|
avatar_template: "/images/avatar.png",
|
|
post_count: 1
|
|
}
|
|
],
|
|
suggested_topics: [],
|
|
notification_level: 3,
|
|
notifications_reason_id: 1,
|
|
can_move_posts: true,
|
|
can_edit: true,
|
|
can_delete: true,
|
|
can_recover: true,
|
|
can_remove_allowed_users: true,
|
|
can_invite_to: true,
|
|
can_create_post: true,
|
|
can_reply_as_new_topic: true,
|
|
can_flag_topic: true
|
|
},
|
|
highest_post_number: 1,
|
|
last_read_post_number: 1,
|
|
last_read_post_id: 16,
|
|
has_deleted: false,
|
|
actions_summary: [
|
|
{ id: 4, count: 0, hidden: false, can_act: true },
|
|
{ id: 7, count: 0, hidden: false, can_act: true },
|
|
{ id: 8, count: 0, hidden: false, can_act: true }
|
|
],
|
|
chunk_size: 20,
|
|
bookmarked: false
|
|
},
|
|
"/t/14.json": {
|
|
post_stream: {
|
|
posts: [
|
|
{
|
|
id: 17,
|
|
username: "tgx",
|
|
avatar_template: "/images/avatar.png",
|
|
created_at: "2017-01-31T09:11:11.281Z",
|
|
cooked:
|
|
'<div class="poll" data-poll-status="open" data-poll-name="poll" data-poll-type="multiple" data-poll-min="1" data-poll-max="3" data-poll-public="true">\n<div>\n<div class="poll-container"><ul>\n<li data-poll-option-id="4d8a15e3cc35750f016ce15a43937620">1</li>\n<li data-poll-option-id="cd314db7dfbac2b10687b6f39abfdf41">2</li>\n<li data-poll-option-id="68b434ff88aeae7054e42cd05a4d9056">3</li>\n</ul></div>\n<div class="poll-info">\n<p><span class="info-number">0</span><span class="info-text">voters</span></p>\n<p>Choose up to <strong>3</strong> options</p>\n<p>Votes are public.</p>\n</div>\n</div>\n<div class="poll-buttons">\n<a title="Cast your votes">Vote now!</a><a title="Display the poll results">Show results</a>\n</div>\n</div>',
|
|
post_number: 1,
|
|
post_type: 1,
|
|
updated_at: "2017-01-31T09:11:11.281Z",
|
|
reply_count: 0,
|
|
quote_count: 0,
|
|
incoming_link_count: 0,
|
|
reads: 1,
|
|
score: 0,
|
|
yours: true,
|
|
topic_id: 14,
|
|
topic_slug: "topic-with-a-public-poll",
|
|
version: 1,
|
|
can_edit: true,
|
|
can_delete: false,
|
|
can_recover: true,
|
|
can_wiki: true,
|
|
read: true,
|
|
actions_summary: [
|
|
{ id: 3, can_act: true },
|
|
{ id: 4, can_act: true },
|
|
{ id: 5, hidden: true, can_act: true },
|
|
{ id: 7, can_act: true },
|
|
{ id: 8, can_act: true }
|
|
],
|
|
moderator: false,
|
|
admin: true,
|
|
staff: true,
|
|
user_id: 1,
|
|
hidden: false,
|
|
trust_level: 4,
|
|
user_deleted: false,
|
|
can_view_edit_history: true,
|
|
wiki: false,
|
|
polls: [
|
|
{
|
|
options: [
|
|
{
|
|
id: "4d8a15e3cc35750f016ce15a43937620",
|
|
html: "1",
|
|
votes: 29
|
|
},
|
|
{
|
|
id: "cd314db7dfbac2b10687b6f39abfdf41",
|
|
html: "2",
|
|
votes: 29
|
|
},
|
|
{
|
|
id: "68b434ff88aeae7054e42cd05a4d9056",
|
|
html: "3",
|
|
votes: 42
|
|
}
|
|
],
|
|
voters: 100,
|
|
status: "open",
|
|
name: "poll",
|
|
type: "multiple",
|
|
min: "1",
|
|
max: "3",
|
|
public: "true",
|
|
preloaded_voters: {
|
|
"68b434ff88aeae7054e42cd05a4d9056": Array.from(
|
|
new Array(25),
|
|
(_, i) => ({
|
|
id: 1000 + i,
|
|
name: "Bruce Wayne",
|
|
username: `bruce${1000 + i}`,
|
|
avatar_template: "/images/avatar.png"
|
|
})
|
|
)
|
|
}
|
|
}
|
|
]
|
|
}
|
|
],
|
|
stream: [17]
|
|
},
|
|
timeline_lookup: [[1, 0]],
|
|
id: 14,
|
|
title: "Topic with a public poll",
|
|
fancy_title: "Topic with a public poll",
|
|
posts_count: 1,
|
|
created_at: "2017-01-31T09:11:11.161Z",
|
|
views: 1,
|
|
reply_count: 0,
|
|
participant_count: 1,
|
|
like_count: 0,
|
|
last_posted_at: "2017-01-31T09:11:11.281Z",
|
|
visible: true,
|
|
closed: false,
|
|
archived: false,
|
|
has_summary: false,
|
|
archetype: "regular",
|
|
slug: "topic-with-a-public-poll",
|
|
category_id: 1,
|
|
word_count: 12,
|
|
user_id: 1,
|
|
draft_key: "topic_14",
|
|
draft_sequence: 1,
|
|
posted: true,
|
|
pinned_globally: false,
|
|
pinned: false,
|
|
details: {
|
|
auto_close_based_on_last_post: false,
|
|
created_by: {
|
|
id: 1,
|
|
username: "tgx",
|
|
avatar_template: "/images/avatar.png"
|
|
},
|
|
last_poster: {
|
|
id: 1,
|
|
username: "tgx",
|
|
avatar_template: "/images/avatar.png"
|
|
},
|
|
participants: [
|
|
{
|
|
id: 1,
|
|
username: "tgx",
|
|
avatar_template: "/images/avatar.png",
|
|
post_count: 1
|
|
}
|
|
],
|
|
suggested_topics: [],
|
|
notification_level: 3,
|
|
notifications_reason_id: 1,
|
|
can_move_posts: true,
|
|
can_edit: true,
|
|
can_delete: true,
|
|
can_recover: true,
|
|
can_remove_allowed_users: true,
|
|
can_invite_to: true,
|
|
can_create_post: true,
|
|
can_reply_as_new_topic: true,
|
|
can_flag_topic: true
|
|
},
|
|
highest_post_number: 1,
|
|
last_read_post_number: 1,
|
|
last_read_post_id: 17,
|
|
has_deleted: false,
|
|
actions_summary: [
|
|
{ id: 4, count: 0, hidden: false, can_act: true },
|
|
{ id: 7, count: 0, hidden: false, can_act: true },
|
|
{ id: 8, count: 0, hidden: false, can_act: true }
|
|
],
|
|
chunk_size: 20,
|
|
bookmarked: false
|
|
},
|
|
"/t/15.json": {
|
|
post_stream: {
|
|
posts: [
|
|
{
|
|
id: 18,
|
|
username: "tgx",
|
|
avatar_template: "/images/avatar.png",
|
|
created_at: "2017-01-31T09:11:11.281Z",
|
|
cooked:
|
|
'<div class="poll" data-poll-status="open" data-poll-name="poll">\n<div>\n<div class="poll-container"><ul>\n<li data-poll-option-id="57ddd734344eb7436d64a7d68a0df444">test</li>\n<li data-poll-option-id="b5b78d79ab5b5d75d4d33d8b87f5d2aa">haha</li>\n</ul></div>\n<div class="poll-info"><p><span class="info-number">0</span><span class="info-text">voters</span></p></div>\n</div>\n<div class="poll-buttons"><a title="Display the poll results">Show results</a></div>\n</div>\n\n<div class="poll" data-poll-status="open" data-poll-name="test">\n<div>\n<div class="poll-container"><ul>\n<li data-poll-option-id="c26ad90783b0d80936e5fdb292b7963c">donkey</li>\n<li data-poll-option-id="99f2b9ac452ba73b115fcf3556e6d2d4">kong</li>\n</ul></div>\n<div class="poll-info"><p><span class="info-number">0</span><span class="info-text">voters</span></p></div>\n</div>\n<div class="poll-buttons"><a title="Display the poll results">Show results</a></div>\n</div>',
|
|
post_number: 1,
|
|
post_type: 1,
|
|
updated_at: "2017-01-31T09:11:11.281Z",
|
|
reply_count: 0,
|
|
quote_count: 0,
|
|
incoming_link_count: 0,
|
|
reads: 1,
|
|
score: 0,
|
|
yours: true,
|
|
topic_id: 15,
|
|
topic_slug: "topic-with-multiple-polls",
|
|
version: 1,
|
|
can_edit: true,
|
|
can_delete: false,
|
|
can_recover: true,
|
|
can_wiki: true,
|
|
read: true,
|
|
actions_summary: [
|
|
{ id: 3, can_act: true },
|
|
{ id: 4, can_act: true },
|
|
{ id: 5, hidden: true, can_act: true },
|
|
{ id: 7, can_act: true },
|
|
{ id: 8, can_act: true }
|
|
],
|
|
moderator: false,
|
|
admin: true,
|
|
staff: true,
|
|
user_id: 1,
|
|
hidden: false,
|
|
trust_level: 4,
|
|
user_deleted: false,
|
|
can_view_edit_history: true,
|
|
wiki: false,
|
|
polls: [
|
|
{
|
|
options: [
|
|
{
|
|
id: "57ddd734344eb7436d64a7d68a0df444",
|
|
html: "test",
|
|
votes: 0
|
|
},
|
|
{
|
|
id: "b5b78d79ab5b5d75d4d33d8b87f5d2aa",
|
|
html: "haha",
|
|
votes: 0
|
|
}
|
|
],
|
|
voters: 2,
|
|
status: "open",
|
|
name: "poll"
|
|
},
|
|
{
|
|
options: [
|
|
{
|
|
id: "c26ad90783b0d80936e5fdb292b7963c",
|
|
html: "donkey",
|
|
votes: 0
|
|
},
|
|
{
|
|
id: "99f2b9ac452ba73b115fcf3556e6d2d4",
|
|
html: "kong",
|
|
votes: 0
|
|
}
|
|
],
|
|
voters: 3,
|
|
status: "open",
|
|
name: "test"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
stream: [18]
|
|
},
|
|
timeline_lookup: [[1, 0]],
|
|
id: 15,
|
|
title: "Topic with multiple polls",
|
|
fancy_title: "Topic with multiple polls",
|
|
posts_count: 1,
|
|
created_at: "2017-01-31T09:11:11.161Z",
|
|
views: 1,
|
|
reply_count: 0,
|
|
participant_count: 1,
|
|
like_count: 0,
|
|
last_posted_at: "2017-01-31T09:11:11.281Z",
|
|
visible: true,
|
|
closed: false,
|
|
archived: false,
|
|
has_summary: false,
|
|
archetype: "regular",
|
|
slug: "topic-with-multiple-polls",
|
|
category_id: 1,
|
|
word_count: 12,
|
|
user_id: 1,
|
|
draft_key: "topic_15",
|
|
draft_sequence: 1,
|
|
posted: true,
|
|
pinned_globally: false,
|
|
pinned: false,
|
|
details: {
|
|
auto_close_based_on_last_post: false,
|
|
created_by: {
|
|
id: 1,
|
|
username: "tgx",
|
|
avatar_template: "/images/avatar.png"
|
|
},
|
|
last_poster: {
|
|
id: 1,
|
|
username: "tgx",
|
|
avatar_template: "/images/avatar.png"
|
|
},
|
|
participants: [
|
|
{
|
|
id: 1,
|
|
username: "tgx",
|
|
avatar_template: "/images/avatar.png",
|
|
post_count: 1
|
|
}
|
|
],
|
|
suggested_topics: [],
|
|
notification_level: 3,
|
|
notifications_reason_id: 1,
|
|
can_move_posts: true,
|
|
can_edit: true,
|
|
can_delete: true,
|
|
can_recover: true,
|
|
can_remove_allowed_users: true,
|
|
can_invite_to: true,
|
|
can_create_post: true,
|
|
can_reply_as_new_topic: true,
|
|
can_flag_topic: true
|
|
},
|
|
highest_post_number: 1,
|
|
last_read_post_number: 1,
|
|
last_read_post_id: 16,
|
|
has_deleted: false,
|
|
actions_summary: [
|
|
{ id: 4, count: 0, hidden: false, can_act: true },
|
|
{ id: 7, count: 0, hidden: false, can_act: true },
|
|
{ id: 8, count: 0, hidden: false, can_act: true }
|
|
],
|
|
chunk_size: 20,
|
|
bookmarked: false
|
|
}
|
|
};
|