From 128b56da28f40d8d398ebb2f08dff47c51385063 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 17 Mar 2018 03:33:36 +0900 Subject: [PATCH] :v: --- src/api/endpoints/posts.ts | 9 + src/web/app/common/views/components/index.ts | 2 + .../views/components/welcome-timeline.vue | 115 ++++++ src/web/app/desktop/views/pages/welcome.vue | 127 ++++--- src/web/app/mobile/views/pages/welcome.vue | 48 ++- src/web/assets/welcome.svg | 358 ++++++++++++++++++ 6 files changed, 601 insertions(+), 58 deletions(-) create mode 100644 src/web/app/common/views/components/welcome-timeline.vue create mode 100644 src/web/assets/welcome.svg diff --git a/src/api/endpoints/posts.ts b/src/api/endpoints/posts.ts index 3b29425927..7df744d2a3 100644 --- a/src/api/endpoints/posts.ts +++ b/src/api/endpoints/posts.ts @@ -27,6 +27,10 @@ module.exports = (params) => new Promise(async (res, rej) => { const [poll, pollErr] = $(params.poll).optional.boolean().$; if (pollErr) return rej('invalid poll param'); + // Get 'bot' parameter + //const [bot, botErr] = $(params.bot).optional.boolean().$; + //if (botErr) return rej('invalid bot param'); + // Get 'limit' parameter const [limit = 10, limitErr] = $(params.limit).optional.number().range(1, 100).$; if (limitErr) return rej('invalid limit param'); @@ -76,6 +80,11 @@ module.exports = (params) => new Promise(async (res, rej) => { query.poll = poll ? { $exists: true, $ne: null } : null; } + // TODO + //if (bot != undefined) { + // query.is_bot = bot; + //} + // Issue query const posts = await Post .find(query, { diff --git a/src/web/app/common/views/components/index.ts b/src/web/app/common/views/components/index.ts index 25f4e461df..fbf9d22a0b 100644 --- a/src/web/app/common/views/components/index.ts +++ b/src/web/app/common/views/components/index.ts @@ -23,6 +23,7 @@ import twitterSetting from './twitter-setting.vue'; import fileTypeIcon from './file-type-icon.vue'; import Switch from './switch.vue'; import Othello from './othello.vue'; +import welcomeTimeline from './welcome-timeline.vue'; Vue.component('mk-signin', signin); Vue.component('mk-signup', signup); @@ -47,3 +48,4 @@ Vue.component('mk-twitter-setting', twitterSetting); Vue.component('mk-file-type-icon', fileTypeIcon); Vue.component('mk-switch', Switch); Vue.component('mk-othello', Othello); +Vue.component('mk-welcome-timeline', welcomeTimeline); diff --git a/src/web/app/common/views/components/welcome-timeline.vue b/src/web/app/common/views/components/welcome-timeline.vue new file mode 100644 index 0000000000..ab402f126a --- /dev/null +++ b/src/web/app/common/views/components/welcome-timeline.vue @@ -0,0 +1,115 @@ + + + + + diff --git a/src/web/app/desktop/views/pages/welcome.vue b/src/web/app/desktop/views/pages/welcome.vue index 9f69305204..53ea99598d 100644 --- a/src/web/app/desktop/views/pages/welcome.vue +++ b/src/web/app/desktop/views/pages/welcome.vue @@ -1,13 +1,20 @@