diff --git a/bin/svgs.js b/bin/svgs.js index f0138f9..70bafae 100644 --- a/bin/svgs.js +++ b/bin/svgs.js @@ -22,4 +22,5 @@ module.exports = [ {id:'fa-comments', src:'node_modules/font-awesome-svg-png/white/svg/comments.svg', title: 'Conversations'}, {id:'fa-paperclip', src:'node_modules/font-awesome-svg-png/white/svg/paperclip.svg', title: 'Paperclip'}, {id:'fa-thumbtack', src:'node_modules/font-awesome-svg-png/white/svg/thumb-tack.svg', title: 'Thumbtack'}, + {id:'fa-bars', src:'node_modules/font-awesome-svg-png/white/svg/bars.svg', title: 'List'}, ] \ No newline at end of file diff --git a/routes/_api/lists.js b/routes/_api/lists.js new file mode 100644 index 0000000..056154b --- /dev/null +++ b/routes/_api/lists.js @@ -0,0 +1,8 @@ +import { get } from '../_utils/ajax' + +export function getLists(instanceName, accessToken) { + let url = `https://${instanceName}/api/v1/lists` + return get(url, { + 'Authorization': `Bearer ${accessToken}` + }) +} \ No newline at end of file diff --git a/routes/_api/timelines.js b/routes/_api/timelines.js index 1f9619d..40f887e 100644 --- a/routes/_api/timelines.js +++ b/routes/_api/timelines.js @@ -19,6 +19,8 @@ function getTimelineUrlPath(timeline) { return 'statuses' } else if (timeline.startsWith('account/')) { return 'accounts' + } else if (timeline.startsWith('list/')) { + return 'timelines/list' } } @@ -31,7 +33,9 @@ export function getTimeline(instanceName, accessToken, timeline, maxId, since) { } else if (timeline.startsWith('status/')) { url += '/' + timeline.split('/').slice(-1)[0] + '/context' } else if (timeline.startsWith('account/')) { - url += '/' + timeline.split('/').slice(-1)[0] +'/statuses' + url += '/' + timeline.split('/').slice(-1)[0] + '/statuses' + } else if (timeline.startsWith('list/')) { + url += '/' + timeline.split('/').slice(-1)[0] } let params = {} diff --git a/routes/_components/Nav.html b/routes/_components/Nav.html index e8c8222..655bb47 100644 --- a/routes/_components/Nav.html +++ b/routes/_components/Nav.html @@ -18,6 +18,10 @@