From f11ebafe4769506b2404a7957ca14b62a3257444 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 30 Dec 2018 01:32:58 +0900 Subject: [PATCH] :art: --- src/client/app/common/scripts/note-mixin.ts | 7 +- .../app/common/views/components/menu.vue | 21 +----- .../app/common/views/components/note-menu.vue | 4 +- .../views/components/reaction-picker.vue | 72 ++++++------------- .../views/components/visibility-chooser.vue | 44 +++++------- .../app/desktop/views/components/timeline.vue | 2 - .../desktop/views/pages/deck/deck.column.vue | 1 - .../views/pages/deck/deck.user-column.vue | 1 - .../app/desktop/views/pages/deck/deck.vue | 1 - .../app/mobile/views/components/post-form.vue | 3 +- src/client/app/mobile/views/pages/user.vue | 1 - 11 files changed, 46 insertions(+), 111 deletions(-) diff --git a/src/client/app/common/scripts/note-mixin.ts b/src/client/app/common/scripts/note-mixin.ts index 76059fbb0..0dc18a763 100644 --- a/src/client/app/common/scripts/note-mixin.ts +++ b/src/client/app/common/scripts/note-mixin.ts @@ -129,9 +129,7 @@ export default (opts: Opts = {}) => ({ source: this.$refs.reactButton, note: this.appearNote, showFocus: viaKeyboard, - animation: !viaKeyboard, - compact: opts.mobile, - big: opts.mobile + animation: !viaKeyboard }).$once('closed', this.focus); }, @@ -171,8 +169,7 @@ export default (opts: Opts = {}) => ({ this.$root.new(MkNoteMenu, { source: this.$refs.menuButton, note: this.appearNote, - animation: !viaKeyboard, - compact: opts.mobile, + animation: !viaKeyboard }).$once('closed', this.focus); }, diff --git a/src/client/app/common/views/components/menu.vue b/src/client/app/common/views/components/menu.vue index fb1b66a92..447e42e42 100644 --- a/src/client/app/common/views/components/menu.vue +++ b/src/client/app/common/views/components/menu.vue @@ -24,16 +24,11 @@ export default Vue.extend({ items: { type: Array, required: true - }, - compact: { - type: Boolean, - required: false, - default: false } }, data() { return { - hukidasi: !this.compact + hukidasi: !this.$root.isMobile }; }, mounted() { @@ -47,7 +42,7 @@ export default Vue.extend({ let left; let top; - if (this.compact) { + if (this.$root.isMobile) { const x = rect.left + window.pageXOffset + (this.source.offsetWidth / 2); const y = rect.top + window.pageYOffset + (this.source.offsetHeight / 2); left = (x - (width / 2)); @@ -121,14 +116,11 @@ export default Vue.extend({ diff --git a/src/client/app/desktop/views/components/timeline.vue b/src/client/app/desktop/views/components/timeline.vue index b3405fa37..f6d272c06 100644 --- a/src/client/app/desktop/views/components/timeline.vue +++ b/src/client/app/desktop/views/components/timeline.vue @@ -139,7 +139,6 @@ export default Vue.extend({ this.$root.new(Menu, { source: this.$refs.listButton, - compact: false, items: menu }); }, @@ -170,7 +169,6 @@ export default Vue.extend({ this.$root.new(Menu, { source: this.$refs.tagButton, - compact: false, items: menu }); } diff --git a/src/client/app/desktop/views/pages/deck/deck.column.vue b/src/client/app/desktop/views/pages/deck/deck.column.vue index a84dbdcdc..6678a3c88 100644 --- a/src/client/app/desktop/views/pages/deck/deck.column.vue +++ b/src/client/app/desktop/views/pages/deck/deck.column.vue @@ -240,7 +240,6 @@ export default Vue.extend({ showMenu() { this.$root.new(Menu, { source: this.$refs.menu, - compact: false, items: this.getMenu() }); }, diff --git a/src/client/app/desktop/views/pages/deck/deck.user-column.vue b/src/client/app/desktop/views/pages/deck/deck.user-column.vue index f87b828cf..31e58264c 100644 --- a/src/client/app/desktop/views/pages/deck/deck.user-column.vue +++ b/src/client/app/desktop/views/pages/deck/deck.user-column.vue @@ -336,7 +336,6 @@ export default Vue.extend({ this.$root.new(Menu, { source: this.$refs.menu, - compact: false, items: menu }); }, diff --git a/src/client/app/desktop/views/pages/deck/deck.vue b/src/client/app/desktop/views/pages/deck/deck.vue index 56c6dd051..30b985e7e 100644 --- a/src/client/app/desktop/views/pages/deck/deck.vue +++ b/src/client/app/desktop/views/pages/deck/deck.vue @@ -179,7 +179,6 @@ export default Vue.extend({ add() { this.$root.new(Menu, { source: this.$refs.add, - compact: true, items: [{ icon: 'home', text: this.$t('@deck.home'), diff --git a/src/client/app/mobile/views/components/post-form.vue b/src/client/app/mobile/views/components/post-form.vue index 599547858..26850cabb 100644 --- a/src/client/app/mobile/views/components/post-form.vue +++ b/src/client/app/mobile/views/components/post-form.vue @@ -300,8 +300,7 @@ export default Vue.extend({ setVisibility() { const w = this.$root.new(MkVisibilityChooser, { - source: this.$refs.visibilityButton, - compact: true + source: this.$refs.visibilityButton }); w.$once('chosen', v => { this.applyVisibility(v); diff --git a/src/client/app/mobile/views/pages/user.vue b/src/client/app/mobile/views/pages/user.vue index fdfe4ce52..f6ab06df6 100644 --- a/src/client/app/mobile/views/pages/user.vue +++ b/src/client/app/mobile/views/pages/user.vue @@ -208,7 +208,6 @@ export default Vue.extend({ this.$root.new(Menu, { source: this.$refs.menu, - compact: true, items: menu }); },