From 15c94f6b8158a72f7f3d9335238770c8a851f1fd Mon Sep 17 00:00:00 2001 From: syuilo Date: Tue, 27 Feb 2018 02:17:10 +0900 Subject: [PATCH] :v: --- src/web/app/common/filters/index.ts | 1 - src/web/app/common/{ => views}/filters/bytes.ts | 0 src/web/app/common/views/filters/index.ts | 2 ++ src/web/app/common/views/filters/number.ts | 5 +++++ src/web/app/mobile/views/pages/user.vue | 6 +++--- 5 files changed, 10 insertions(+), 4 deletions(-) delete mode 100644 src/web/app/common/filters/index.ts rename src/web/app/common/{ => views}/filters/bytes.ts (100%) create mode 100644 src/web/app/common/views/filters/index.ts create mode 100644 src/web/app/common/views/filters/number.ts diff --git a/src/web/app/common/filters/index.ts b/src/web/app/common/filters/index.ts deleted file mode 100644 index 16ff8c87a4..0000000000 --- a/src/web/app/common/filters/index.ts +++ /dev/null @@ -1 +0,0 @@ -require('./bytes'); diff --git a/src/web/app/common/filters/bytes.ts b/src/web/app/common/views/filters/bytes.ts similarity index 100% rename from src/web/app/common/filters/bytes.ts rename to src/web/app/common/views/filters/bytes.ts diff --git a/src/web/app/common/views/filters/index.ts b/src/web/app/common/views/filters/index.ts new file mode 100644 index 0000000000..3a1d1ac235 --- /dev/null +++ b/src/web/app/common/views/filters/index.ts @@ -0,0 +1,2 @@ +require('./bytes'); +require('./number'); diff --git a/src/web/app/common/views/filters/number.ts b/src/web/app/common/views/filters/number.ts new file mode 100644 index 0000000000..d9f48229dd --- /dev/null +++ b/src/web/app/common/views/filters/number.ts @@ -0,0 +1,5 @@ +import Vue from 'vue'; + +Vue.filter('number', (n) => { + return n.toLocaleString(); +}); diff --git a/src/web/app/mobile/views/pages/user.vue b/src/web/app/mobile/views/pages/user.vue index 378beeaf13..ae2fbe85d9 100644 --- a/src/web/app/mobile/views/pages/user.vue +++ b/src/web/app/mobile/views/pages/user.vue @@ -27,15 +27,15 @@
- {{ user.posts_count }} + {{ user.posts_count | number }} %i18n:mobile.tags.mk-user.posts% - {{ user.following_count }} + {{ user.following_count | number }} %i18n:mobile.tags.mk-user.following% - {{ user.followers_count }} + {{ user.followers_count | number }} %i18n:mobile.tags.mk-user.followers%