From 6b2f16f3bf618adecfb3d82b3913991d74784021 Mon Sep 17 00:00:00 2001 From: Nolan Lawson Date: Sun, 28 Jan 2018 15:44:33 -0800 Subject: [PATCH] add status context --- bin/svgs.js | 3 +- routes/_actions/timeline.js | 2 ++ routes/_components/Layout.html | 2 +- routes/_components/status/Status.html | 2 +- routes/_components/timeline/Timeline.html | 29 ++++++++++----- routes/_store/instanceComputations.js | 2 +- routes/_store/obsevers.js | 4 ++- routes/_utils/arrays.js | 1 + routes/_utils/mastodon/timelines.js | 15 ++++++++ routes/statuses/[statusId].html | 43 +++++++++++++++++++++++ templates/2xx.html | 1 + 11 files changed, 90 insertions(+), 14 deletions(-) create mode 100644 routes/statuses/[statusId].html diff --git a/bin/svgs.js b/bin/svgs.js index 13300fde..2b2ffbde 100644 --- a/bin/svgs.js +++ b/bin/svgs.js @@ -17,5 +17,6 @@ module.exports = [ {id:'fa-lock', src:'node_modules/font-awesome-svg-png/white/svg/lock.svg', title: 'Locked'}, {id:'fa-envelope', src:'node_modules/font-awesome-svg-png/white/svg/envelope.svg', title: 'Sealed Envelope'}, {id:'fa-user-times', src:'node_modules/font-awesome-svg-png/white/svg/user-times.svg', title: 'Stop Following'}, - {id:'fa-user-plus', src:'node_modules/font-awesome-svg-png/white/svg/user-plus.svg', title: 'Follow'} + {id:'fa-user-plus', src:'node_modules/font-awesome-svg-png/white/svg/user-plus.svg', title: 'Follow'}, + {id:'fa-comments', src:'node_modules/font-awesome-svg-png/white/svg/comments.svg', title: 'Statuses'}, ] \ No newline at end of file diff --git a/routes/_actions/timeline.js b/routes/_actions/timeline.js index 7282f4f4..c8deb8ed 100644 --- a/routes/_actions/timeline.js +++ b/routes/_actions/timeline.js @@ -31,6 +31,8 @@ async function fetchStatuses(instanceName, accessToken, timelineName, lastStatus } async function addStatuses(instanceName, timelineName, newStatuses) { + console.log('addStatuses, length:', newStatuses.length) + debugger mark('addStatuses') let newStatusIds = newStatuses.map(status => status.id) let oldStatusIds = store.getForTimeline(instanceName, timelineName, 'statusIds') || [] diff --git a/routes/_components/Layout.html b/routes/_components/Layout.html index e68639b0..238af527 100644 --- a/routes/_components/Layout.html +++ b/routes/_components/Layout.html @@ -1,5 +1,5 @@ <:Window bind:online /> -