diff --git a/src/client/app/common/views/components/welcome-timeline.vue b/src/client/app/common/views/components/welcome-timeline.vue index bf2c65376..5a8b9df47 100644 --- a/src/client/app/common/views/components/welcome-timeline.vue +++ b/src/client/app/common/views/components/welcome-timeline.vue @@ -24,6 +24,13 @@ import Vue from 'vue'; export default Vue.extend({ + props: { + max: { + type: Number, + required: false, + default: undefined + } + }, data() { return { fetching: true, @@ -37,6 +44,7 @@ export default Vue.extend({ fetch(cb?) { this.fetching = true; (this as any).api('notes', { + limit: this.max, local: true, reply: false, renote: false, diff --git a/src/client/app/desktop/views/pages/welcome.vue b/src/client/app/desktop/views/pages/welcome.vue index 2203efcc9..cac4007b4 100644 --- a/src/client/app/desktop/views/pages/welcome.vue +++ b/src/client/app/desktop/views/pages/welcome.vue @@ -7,6 +7,13 @@
+
+ %i18n:common.misskey% {{ host }} + + %fa:user% {{ stats.originalUsersCount | number }} + %fa:pencil-alt% {{ stats.originalNotesCount | number }} + +

{{ name }}

@@ -19,12 +26,8 @@
-
- %i18n:common.misskey% {{ host }} - - %fa:user% {{ stats.originalUsersCount | number }} - %fa:pencil-alt% {{ stats.originalNotesCount | number }} - +
+ #{{ tag }}
@@ -32,7 +35,7 @@ Misskey
- +
%i18n:@signup%
@@ -54,13 +57,18 @@ export default Vue.extend({ host, name, description, - pointerInterval: null + pointerInterval: null, + tags: [] }; }, created() { (this as any).api('stats').then(stats => { this.stats = stats; }); + + (this as any).api('hashtags/trend').then(stats => { + this.tags = stats.map(x => x.tag); + }); }, mounted() { this.point(); @@ -161,6 +169,20 @@ root(isDark) $loginWidth = 340px $width = $aboutWidth + $loginWidth + > .info + margin 0 auto 16px auto + width $width + font-size 14px + color #fff + + > .stats + margin-left 16px + padding-left 16px + border-left solid 1px #fff + + > * + margin-right 16px + > main display flex margin auto @@ -201,22 +223,17 @@ root(isDark) padding 16px 32px 32px 32px background isDark ? #2e3440 : #f5f5f5 - > .info + > .hashtags margin 16px auto - padding 12px width $width font-size 14px color #fff - background rgba(#000, 0.2) + background rgba(#000, 0.3) border-radius 8px - > .stats - margin-left 16px - padding-left 16px - border-left solid 1px #fff - - > * - margin-right 16px + > * + display inline-block + margin 14px > .nav display block diff --git a/src/client/app/mobile/views/pages/welcome.vue b/src/client/app/mobile/views/pages/welcome.vue index cd8f5841e..feef2e8c6 100644 --- a/src/client/app/mobile/views/pages/welcome.vue +++ b/src/client/app/mobile/views/pages/welcome.vue @@ -14,6 +14,9 @@
+
+ #{{ tag }} +
%fa:user% {{ stats.originalUsersCount | number }} %fa:pencil-alt% {{ stats.originalNotesCount | number }} @@ -37,13 +40,18 @@ export default Vue.extend({ stats: null, host, name, - description + description, + tags: [] }; }, created() { (this as any).api('stats').then(stats => { this.stats = stats; }); + + (this as any).api('hashtags/trend').then(stats => { + this.tags = stats.map(x => x.tag); + }); } }); @@ -116,12 +124,22 @@ export default Vue.extend({ box-shadow 0 1px 3px rgba(#000, 0.075), inset 0 0 5px rgba(#000, 0.2) > .tl + margin 16px 0 + > * max-height 300px border-radius 6px overflow auto -webkit-overflow-scrolling touch + > .hashtags + border solid 2px #ddd + border-radius 8px + + > * + display inline-block + margin 16px + > .stats margin 16px 0 padding 8px diff --git a/src/server/api/endpoints.ts b/src/server/api/endpoints.ts index a5d13b023..f613710c8 100644 --- a/src/server/api/endpoints.ts +++ b/src/server/api/endpoints.ts @@ -629,8 +629,7 @@ const endpoints: Endpoint[] = [ }, { - name: 'hashtags/trend', - withCredential: true + name: 'hashtags/trend' }, {