From 3698c679e23c184e897d86e9d75dfe2a110a282c Mon Sep 17 00:00:00 2001 From: syuilo Date: Tue, 4 Sep 2018 02:09:56 +0900 Subject: [PATCH] :pizza: --- locales/ja-JP.yml | 6 +- .../app/common/views/components/index.ts | 2 + .../trends.chart.vue} | 0 .../app/common/views/components/trends.vue | 105 ++++++++++++++++++ .../app/common/views/widgets/hashtags.vue | 94 +--------------- .../app/desktop/views/pages/welcome.vue | 52 +++++---- 6 files changed, 143 insertions(+), 116 deletions(-) rename src/client/app/common/views/{widgets/hashtags.chart.vue => components/trends.chart.vue} (100%) create mode 100644 src/client/app/common/views/components/trends.vue diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index c5a3fc81ff..a57f724a32 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -375,6 +375,10 @@ common/views/components/visibility-chooser.vue: specified-desc: "指定したユーザーにのみ公開" private: "非公開" +common/views/components/trends.vue: + count: "{}人が投稿" + empty: "トレンドなし" + common/views/widgets/broadcast.vue: fetching: "確認中" no-broadcasts: "お知らせはありません" @@ -403,8 +407,6 @@ common/views/widgets/posts-monitor.vue: common/views/widgets/hashtags.vue: title: "ハッシュタグ" - count: "{}人が投稿" - empty: "トレンドなし" common/views/widgets/server.vue: title: "サーバー情報" diff --git a/src/client/app/common/views/components/index.ts b/src/client/app/common/views/components/index.ts index 422a3da050..4700b6269e 100644 --- a/src/client/app/common/views/components/index.ts +++ b/src/client/app/common/views/components/index.ts @@ -1,5 +1,6 @@ import Vue from 'vue'; +import trends from './trends.vue'; import analogClock from './analog-clock.vue'; import menu from './menu.vue'; import noteHeader from './note-header.vue'; @@ -40,6 +41,7 @@ import uiSelect from './ui/select.vue'; import formButton from './ui/form/button.vue'; import formRadio from './ui/form/radio.vue'; +Vue.component('mk-trends', trends); Vue.component('mk-analog-clock', analogClock); Vue.component('mk-menu', menu); Vue.component('mk-note-header', noteHeader); diff --git a/src/client/app/common/views/widgets/hashtags.chart.vue b/src/client/app/common/views/components/trends.chart.vue similarity index 100% rename from src/client/app/common/views/widgets/hashtags.chart.vue rename to src/client/app/common/views/components/trends.chart.vue diff --git a/src/client/app/common/views/components/trends.vue b/src/client/app/common/views/components/trends.vue new file mode 100644 index 0000000000..627edc3876 --- /dev/null +++ b/src/client/app/common/views/components/trends.vue @@ -0,0 +1,105 @@ + + + + + diff --git a/src/client/app/common/views/widgets/hashtags.vue b/src/client/app/common/views/widgets/hashtags.vue index 56520400b6..0cb6b2df10 100644 --- a/src/client/app/common/views/widgets/hashtags.vue +++ b/src/client/app/common/views/widgets/hashtags.vue @@ -4,20 +4,7 @@
-

%fa:spinner .pulse .fw%%i18n:common.loading%

-

%fa:exclamation-circle%%i18n:@empty%

- - -
-
-
- #{{ stat.tag }} -

{{ '%i18n:@count%'.replace('{}', stat.usersCount) }}

-
- -
-
- +
@@ -25,7 +12,6 @@ - - diff --git a/src/client/app/desktop/views/pages/welcome.vue b/src/client/app/desktop/views/pages/welcome.vue index e67ef16136..481441c3c7 100644 --- a/src/client/app/desktop/views/pages/welcome.vue +++ b/src/client/app/desktop/views/pages/welcome.vue @@ -8,7 +8,7 @@
-
+

{{ name }}

@@ -27,24 +27,24 @@ |

- -
- #{{ tag }} -
-
+

- @@ -71,8 +71,7 @@ export default Vue.extend({ host, name: 'Misskey', description: '', - broadcasts: [], - tags: [] + broadcasts: [] }; }, created() { @@ -86,9 +85,6 @@ export default Vue.extend({ this.stats = stats; }); - (this as any).api('hashtags/trend').then(stats => { - this.tags = stats.map(x => x.tag); - }); }, methods: { signup() { @@ -113,7 +109,7 @@ export default Vue.extend({ left 15px .v--modal-overlay - background rgba(0, 0, 0, 0.4) + background rgba(0, 0, 0, 0.6) .modal-light .v--modal-box @@ -162,8 +158,8 @@ root(isDark) > button position fixed z-index 1 - bottom 64px - left 64px + bottom 16px + left 16px padding 16px font-size 18px color isDark ? #fff : #444 @@ -179,7 +175,7 @@ root(isDark) margin 0 auto padding 64px - > * + .block color isDark ? #fff : #444 background isDark ? #313543 : #fff box-shadow 0 3px 8px rgba(0, 0, 0, 0.2) @@ -190,6 +186,7 @@ root(isDark) grid-row 1 grid-column 1 padding 32px + border-top solid 5px $theme-color > h1 margin 0 @@ -257,12 +254,25 @@ root(isDark) grid-column 1 font-size 14px - > .tl + > .side + display grid grid-row 1 / 4 grid-column 2 - text-align left - max-height 100% - overflow auto + grid-template-rows 1fr 350px + grid-template-columns 1fr + gap 16px + + > .tl + grid-row 1 + grid-column 1 + text-align left + max-height 100% + overflow auto + + > .trends + grid-row 2 + grid-column 1 + padding 8px .mk-welcome[data-darkmode] root(true)