From 9e9a72232452f79ee0ee78e2dee89d4c98a5dba4 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 17 Feb 2018 03:01:00 +0900 Subject: [PATCH] wip --- src/web/app/common/views/components/index.ts | 2 + .../app/common/views/components/messaging.vue | 4 +- .../views/components/reactions-viewer.vue | 2 +- .../views/components/stream-indicator.vue | 126 ++++++++++-------- .../views/components/widgets/messaging.vue | 2 +- .../views/components/friends-maker.vue | 2 +- src/web/app/desktop/views/components/index.ts | 2 + .../desktop/views/components/list-user.vue | 2 +- .../views/components/notifications.vue | 2 +- .../views/components/post-detail-sub.vue | 2 +- .../desktop/views/components/post-detail.vue | 2 +- .../desktop/views/components/posts-post.vue | 14 +- .../desktop/views/components/repost-form.vue | 2 +- .../app/desktop/views/components/timeline.vue | 2 +- .../components/ui-header-notifications.vue | 2 +- .../desktop/views/pages/user/user-friends.vue | 2 +- .../desktop/views/pages/user/user-home.vue | 2 +- .../desktop/views/pages/user/user-profile.vue | 2 +- src/web/app/mobile/views/components/drive.vue | 4 +- .../mobile/views/components/friends-maker.vue | 2 +- .../mobile/views/components/notification.vue | 2 +- .../mobile/views/components/notifications.vue | 2 +- .../app/mobile/views/components/post-card.vue | 2 +- .../mobile/views/components/post-detail.vue | 2 +- .../app/mobile/views/components/post-form.vue | 4 +- .../mobile/views/components/posts-post.vue | 8 +- .../app/mobile/views/components/user-card.vue | 2 +- src/web/app/mobile/views/pages/user.vue | 4 +- .../mobile/views/pages/user/home-friends.vue | 2 +- src/web/app/mobile/views/pages/user/home.vue | 2 +- webpack/webpack.config.ts | 3 +- 31 files changed, 119 insertions(+), 94 deletions(-) diff --git a/src/web/app/common/views/components/index.ts b/src/web/app/common/views/components/index.ts index 10d09ce65..e3f105f58 100644 --- a/src/web/app/common/views/components/index.ts +++ b/src/web/app/common/views/components/index.ts @@ -11,6 +11,7 @@ import time from './time.vue'; import images from './images.vue'; import uploader from './uploader.vue'; import specialMessage from './special-message.vue'; +import streamIndicator from './stream-indicator.vue'; Vue.component('mk-signin', signin); Vue.component('mk-signup', signup); @@ -23,3 +24,4 @@ Vue.component('mk-time', time); Vue.component('mk-images', images); Vue.component('mk-uploader', uploader); Vue.component('mk-special-message', specialMessage); +Vue.component('mk-stream-indicator', streamIndicator); diff --git a/src/web/app/common/views/components/messaging.vue b/src/web/app/common/views/components/messaging.vue index 386e705b0..f45f99b53 100644 --- a/src/web/app/common/views/components/messaging.vue +++ b/src/web/app/common/views/components/messaging.vue @@ -180,7 +180,7 @@ export default Vue.extend({ padding 16px > header - > mk-time + > .mk-time font-size 1em > .avatar @@ -381,7 +381,7 @@ export default Vue.extend({ margin 0 0 0 8px color rgba(0, 0, 0, 0.5) - > mk-time + > .mk-time position absolute top 0 right 0 diff --git a/src/web/app/common/views/components/reactions-viewer.vue b/src/web/app/common/views/components/reactions-viewer.vue index 696aef335..f6a27d913 100644 --- a/src/web/app/common/views/components/reactions-viewer.vue +++ b/src/web/app/common/views/components/reactions-viewer.vue @@ -38,7 +38,7 @@ export default Vue.extend({ > span margin-right 8px - > mk-reaction-icon + > .mk-reaction-icon font-size 1.4em > span diff --git a/src/web/app/common/views/components/stream-indicator.vue b/src/web/app/common/views/components/stream-indicator.vue index 564376bba..00bd58c1f 100644 --- a/src/web/app/common/views/components/stream-indicator.vue +++ b/src/web/app/common/views/components/stream-indicator.vue @@ -1,74 +1,92 @@ - diff --git a/src/web/app/common/views/components/widgets/messaging.vue b/src/web/app/common/views/components/widgets/messaging.vue index 19ef70431..f31acc5c6 100644 --- a/src/web/app/common/views/components/widgets/messaging.vue +++ b/src/web/app/common/views/components/widgets/messaging.vue @@ -52,7 +52,7 @@ export default define({ > [data-fa] margin-right 4px - > mk-messaging + > .mk-messaging max-height 250px overflow auto diff --git a/src/web/app/desktop/views/components/friends-maker.vue b/src/web/app/desktop/views/components/friends-maker.vue index add6c10a3..caa5f4913 100644 --- a/src/web/app/desktop/views/components/friends-maker.vue +++ b/src/web/app/desktop/views/components/friends-maker.vue @@ -114,7 +114,7 @@ export default Vue.extend({ line-height 16px color #ccc - > mk-follow-button + > .mk-follow-button position absolute top 16px right 16px diff --git a/src/web/app/desktop/views/components/index.ts b/src/web/app/desktop/views/components/index.ts index 7a7438214..1e4c2bafc 100644 --- a/src/web/app/desktop/views/components/index.ts +++ b/src/web/app/desktop/views/components/index.ts @@ -26,6 +26,7 @@ import notifications from './notifications.vue'; import postForm from './post-form.vue'; import repostForm from './repost-form.vue'; import followButton from './follow-button.vue'; +import postPreview from './post-preview.vue'; Vue.component('mk-ui', ui); Vue.component('mk-ui-header', uiHeader); @@ -53,3 +54,4 @@ Vue.component('mk-notifications', notifications); Vue.component('mk-post-form', postForm); Vue.component('mk-repost-form', repostForm); Vue.component('mk-follow-button', followButton); +Vue.component('mk-post-preview', postPreview); diff --git a/src/web/app/desktop/views/components/list-user.vue b/src/web/app/desktop/views/components/list-user.vue index 28304e475..adaa8f092 100644 --- a/src/web/app/desktop/views/components/list-user.vue +++ b/src/web/app/desktop/views/components/list-user.vue @@ -93,7 +93,7 @@ export default Vue.extend({ font-size 1.1em color #717171 - > mk-follow-button + > .mk-follow-button position absolute top 16px right 16px diff --git a/src/web/app/desktop/views/components/notifications.vue b/src/web/app/desktop/views/components/notifications.vue index d211a933f..f19766dc8 100644 --- a/src/web/app/desktop/views/components/notifications.vue +++ b/src/web/app/desktop/views/components/notifications.vue @@ -197,7 +197,7 @@ export default Vue.extend({ &:last-child border-bottom none - > mk-time + > .mk-time display inline position absolute top 16px diff --git a/src/web/app/desktop/views/components/post-detail-sub.vue b/src/web/app/desktop/views/components/post-detail-sub.vue index 42f8be3b1..8d81e6860 100644 --- a/src/web/app/desktop/views/components/post-detail-sub.vue +++ b/src/web/app/desktop/views/components/post-detail-sub.vue @@ -119,7 +119,7 @@ export default Vue.extend({ font-size 1em color #717171 - > mk-url-preview + > .mk-url-preview margin-top 8px diff --git a/src/web/app/desktop/views/components/post-detail.vue b/src/web/app/desktop/views/components/post-detail.vue index 6c36f06fa..d23043dd4 100644 --- a/src/web/app/desktop/views/components/post-detail.vue +++ b/src/web/app/desktop/views/components/post-detail.vue @@ -280,7 +280,7 @@ export default Vue.extend({ font-size 1.5em color #717171 - > mk-url-preview + > .mk-url-preview margin-top 8px > footer diff --git a/src/web/app/desktop/views/components/posts-post.vue b/src/web/app/desktop/views/components/posts-post.vue index 2a4c39a97..e611b2513 100644 --- a/src/web/app/desktop/views/components/posts-post.vue +++ b/src/web/app/desktop/views/components/posts-post.vue @@ -178,6 +178,7 @@ export default Vue.extend({ }, reply() { document.body.appendChild(new MkPostFormWindow({ + parent: this, propsData: { reply: this.p } @@ -185,6 +186,7 @@ export default Vue.extend({ }, repost() { document.body.appendChild(new MkRepostFormWindow({ + parent: this, propsData: { post: this.p } @@ -192,6 +194,7 @@ export default Vue.extend({ }, react() { document.body.appendChild(new MkReactionPicker({ + parent: this, propsData: { source: this.$refs.reactButton, post: this.p @@ -200,6 +203,7 @@ export default Vue.extend({ }, menu() { document.body.appendChild(new MkPostMenu({ + parent: this, propsData: { source: this.$refs.menuButton, post: this.p @@ -303,7 +307,7 @@ export default Vue.extend({ .name font-weight bold - > mk-time + > .mk-time position absolute top 16px right 32px @@ -317,7 +321,7 @@ export default Vue.extend({ padding 0 16px background rgba(0, 0, 0, 0.0125) - > mk-post-preview + > .mk-post-preview background transparent > article @@ -415,7 +419,7 @@ export default Vue.extend({ > .dummy display none - mk-url-preview + .mk-url-preview margin-top 8px > .channel @@ -451,7 +455,7 @@ export default Vue.extend({ background $theme-color border-radius 4px - > mk-poll + > .mk-poll font-size 80% > .repost @@ -466,7 +470,7 @@ export default Vue.extend({ font-size 28px background #fff - > mk-post-preview + > .mk-post-preview padding 16px border dashed 1px #c0dac6 border-radius 8px diff --git a/src/web/app/desktop/views/components/repost-form.vue b/src/web/app/desktop/views/components/repost-form.vue index 9e9f7174f..f0e4a2bdf 100644 --- a/src/web/app/desktop/views/components/repost-form.vue +++ b/src/web/app/desktop/views/components/repost-form.vue @@ -58,7 +58,7 @@ export default Vue.extend({