From ca604692628dcba95681964e8deec5ca75049c4e Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 15 Feb 2018 12:36:42 +0900 Subject: [PATCH] wip --- src/web/app/common/define-widget.ts | 4 +- .../views/components/widgets/calendar.vue | 192 ++++++++++++++++++ .../views/components/widgets/donation.vue | 45 ++++ .../views/components/widgets/messaging.vue | 59 ++++++ .../common/views/components/widgets/nav.vue | 29 +++ .../views/components/widgets/photo-stream.vue | 122 +++++++++++ .../views/components/widgets/profile.vue | 4 +- .../views/components/widgets/slideshow.vue | 154 ++++++++++++++ .../common/views/components/widgets/tips.vue | 109 ++++++++++ .../desktop/-tags/home-widgets/calendar.tag | 167 --------------- .../desktop/-tags/home-widgets/donation.tag | 36 ---- .../desktop/-tags/home-widgets/messaging.tag | 52 ----- .../app/desktop/-tags/home-widgets/nav.tag | 23 --- .../-tags/home-widgets/photo-stream.tag | 118 ----------- .../desktop/-tags/home-widgets/slideshow.tag | 151 -------------- .../app/desktop/-tags/home-widgets/tips.tag | 94 --------- webpack/plugins/index.ts | 4 +- 17 files changed, 716 insertions(+), 647 deletions(-) create mode 100644 src/web/app/common/views/components/widgets/calendar.vue create mode 100644 src/web/app/common/views/components/widgets/donation.vue create mode 100644 src/web/app/common/views/components/widgets/messaging.vue create mode 100644 src/web/app/common/views/components/widgets/nav.vue create mode 100644 src/web/app/common/views/components/widgets/photo-stream.vue create mode 100644 src/web/app/common/views/components/widgets/slideshow.vue create mode 100644 src/web/app/common/views/components/widgets/tips.vue delete mode 100644 src/web/app/desktop/-tags/home-widgets/calendar.tag delete mode 100644 src/web/app/desktop/-tags/home-widgets/donation.tag delete mode 100644 src/web/app/desktop/-tags/home-widgets/messaging.tag delete mode 100644 src/web/app/desktop/-tags/home-widgets/nav.tag delete mode 100644 src/web/app/desktop/-tags/home-widgets/photo-stream.tag delete mode 100644 src/web/app/desktop/-tags/home-widgets/slideshow.tag delete mode 100644 src/web/app/desktop/-tags/home-widgets/tips.tag diff --git a/src/web/app/common/define-widget.ts b/src/web/app/common/define-widget.ts index 5102ee1ab..782a69a62 100644 --- a/src/web/app/common/define-widget.ts +++ b/src/web/app/common/define-widget.ts @@ -2,7 +2,7 @@ import Vue from 'vue'; export default function(data: { name: string; - props: T; + props?: T; }) { return Vue.extend({ props: { @@ -26,7 +26,7 @@ export default function(data: { }, data() { return { - props: data.props + props: data.props || {} }; }, watch: { diff --git a/src/web/app/common/views/components/widgets/calendar.vue b/src/web/app/common/views/components/widgets/calendar.vue new file mode 100644 index 000000000..308f43cd9 --- /dev/null +++ b/src/web/app/common/views/components/widgets/calendar.vue @@ -0,0 +1,192 @@ + + + + + diff --git a/src/web/app/common/views/components/widgets/donation.vue b/src/web/app/common/views/components/widgets/donation.vue new file mode 100644 index 000000000..50adc531b --- /dev/null +++ b/src/web/app/common/views/components/widgets/donation.vue @@ -0,0 +1,45 @@ + + + + + diff --git a/src/web/app/common/views/components/widgets/messaging.vue b/src/web/app/common/views/components/widgets/messaging.vue new file mode 100644 index 000000000..19ef70431 --- /dev/null +++ b/src/web/app/common/views/components/widgets/messaging.vue @@ -0,0 +1,59 @@ + + + + + diff --git a/src/web/app/common/views/components/widgets/nav.vue b/src/web/app/common/views/components/widgets/nav.vue new file mode 100644 index 000000000..77e1eea49 --- /dev/null +++ b/src/web/app/common/views/components/widgets/nav.vue @@ -0,0 +1,29 @@ + + + + + diff --git a/src/web/app/common/views/components/widgets/photo-stream.vue b/src/web/app/common/views/components/widgets/photo-stream.vue new file mode 100644 index 000000000..12e568ca0 --- /dev/null +++ b/src/web/app/common/views/components/widgets/photo-stream.vue @@ -0,0 +1,122 @@ + + + + + diff --git a/src/web/app/common/views/components/widgets/profile.vue b/src/web/app/common/views/components/widgets/profile.vue index e589eb20b..70902c7cf 100644 --- a/src/web/app/common/views/components/widgets/profile.vue +++ b/src/web/app/common/views/components/widgets/profile.vue @@ -1,7 +1,7 @@ + + + + diff --git a/src/web/app/common/views/components/widgets/tips.vue b/src/web/app/common/views/components/widgets/tips.vue new file mode 100644 index 000000000..f38ecfe44 --- /dev/null +++ b/src/web/app/common/views/components/widgets/tips.vue @@ -0,0 +1,109 @@ + + + + + diff --git a/src/web/app/desktop/-tags/home-widgets/calendar.tag b/src/web/app/desktop/-tags/home-widgets/calendar.tag deleted file mode 100644 index 46d47662b..000000000 --- a/src/web/app/desktop/-tags/home-widgets/calendar.tag +++ /dev/null @@ -1,167 +0,0 @@ - -
-

{ year }年{ month }月

-

{ day }日

-

{ weekDay }曜日

-
-
-
-

今日:{ dayP.toFixed(1) }%

-
-
-
-
-
-

今月:{ monthP.toFixed(1) }%

-
-
-
-
-
-

今年:{ yearP.toFixed(1) }%

-
-
-
-
-
- - -
diff --git a/src/web/app/desktop/-tags/home-widgets/donation.tag b/src/web/app/desktop/-tags/home-widgets/donation.tag deleted file mode 100644 index 5ed5c137b..000000000 --- a/src/web/app/desktop/-tags/home-widgets/donation.tag +++ /dev/null @@ -1,36 +0,0 @@ - -
-

%fa:heart%%i18n:desktop.tags.mk-donation-home-widget.title%

-

{'%i18n:desktop.tags.mk-donation-home-widget.text%'.substr(0, '%i18n:desktop.tags.mk-donation-home-widget.text%'.indexOf('{'))}@syuilo{'%i18n:desktop.tags.mk-donation-home-widget.text%'.substr('%i18n:desktop.tags.mk-donation-home-widget.text%'.indexOf('}') + 1)}

-
- - -
diff --git a/src/web/app/desktop/-tags/home-widgets/messaging.tag b/src/web/app/desktop/-tags/home-widgets/messaging.tag deleted file mode 100644 index d3b77b58c..000000000 --- a/src/web/app/desktop/-tags/home-widgets/messaging.tag +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - diff --git a/src/web/app/desktop/-tags/home-widgets/nav.tag b/src/web/app/desktop/-tags/home-widgets/nav.tag deleted file mode 100644 index 890fb4d8f..000000000 --- a/src/web/app/desktop/-tags/home-widgets/nav.tag +++ /dev/null @@ -1,23 +0,0 @@ - - - - - diff --git a/src/web/app/desktop/-tags/home-widgets/photo-stream.tag b/src/web/app/desktop/-tags/home-widgets/photo-stream.tag deleted file mode 100644 index a2d95dede..000000000 --- a/src/web/app/desktop/-tags/home-widgets/photo-stream.tag +++ /dev/null @@ -1,118 +0,0 @@ - - -

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

-
- -
-

%i18n:desktop.tags.mk-photo-stream-home-widget.no-photos%

- - -
diff --git a/src/web/app/desktop/-tags/home-widgets/slideshow.tag b/src/web/app/desktop/-tags/home-widgets/slideshow.tag deleted file mode 100644 index a69ab74b7..000000000 --- a/src/web/app/desktop/-tags/home-widgets/slideshow.tag +++ /dev/null @@ -1,151 +0,0 @@ - -
-

クリックしてフォルダを指定してください

-

このフォルダには画像がありません

-
-
-
- - - -
diff --git a/src/web/app/desktop/-tags/home-widgets/tips.tag b/src/web/app/desktop/-tags/home-widgets/tips.tag deleted file mode 100644 index efe9c90fc..000000000 --- a/src/web/app/desktop/-tags/home-widgets/tips.tag +++ /dev/null @@ -1,94 +0,0 @@ - -

%fa:R lightbulb%

- - -
diff --git a/webpack/plugins/index.ts b/webpack/plugins/index.ts index 9850db485..d97f78155 100644 --- a/webpack/plugins/index.ts +++ b/webpack/plugins/index.ts @@ -11,11 +11,11 @@ const isProduction = env === 'production'; export default (version, lang) => { const plugins = [ consts(lang), - new StringReplacePlugin(), - hoist() + new StringReplacePlugin() ]; if (isProduction) { + plugins.push(hoist()); plugins.push(minify()); }