From c0a60260c25c8f7e0c4975b6a1a4342f2b430210 Mon Sep 17 00:00:00 2001 From: syuilo Date: Mon, 25 Feb 2019 19:45:00 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=A2=E3=83=90=E3=82=A4=E3=83=AB=E7=89=88?= =?UTF-8?q?=E3=81=A7=E3=82=82=E3=83=87=E3=83=83=E3=82=AD=E3=82=92=E4=BD=BF?= =?UTF-8?q?=E3=81=88=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=20(#4366)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * wip * wip * wip * wip * wip * wip * wip * wip * Fix bug * wip * Update notifications.vue * Update user-menu.vue * deck settings * indicate --- locales/ja-JP.yml | 25 +- src/client/app/common/define-widget.ts | 16 +- .../app/common/views/components/menu.vue | 4 + .../app/common/views/components/renote.vue | 25 +- .../common/views/components/url-preview.vue | 16 +- .../app/common/views/components/user-menu.vue | 3 +- .../views/deck/deck.column-core.vue | 0 .../views/deck/deck.column.vue | 32 +- .../views/deck/deck.direct-column.vue | 0 .../views/deck/deck.direct.vue | 0 .../views/deck/deck.explore-column.vue | 0 .../views/deck/deck.favorites-column.vue | 0 .../views/deck/deck.featured-column.vue | 0 .../views/deck/deck.hashtag-column.vue | 0 .../views/deck/deck.hashtag-tl.vue | 0 .../views/deck/deck.list-tl.vue | 0 .../views/deck/deck.mentions-column.vue | 0 .../views/deck/deck.mentions.vue | 0 .../views/deck/deck.note-column.vue | 4 +- .../views/deck/deck.notes.vue | 9 +- .../views/deck/deck.notification.vue | 10 +- .../views/deck/deck.notifications-column.vue | 0 .../views/deck/deck.notifications.vue | 2 +- .../views/deck/deck.search-column.vue | 0 .../views/deck/deck.tl-column.vue | 2 +- .../views/deck/deck.tl.vue | 0 .../views/deck/deck.user-column.home.vue | 4 +- .../views/deck/deck.user-column.vue | 0 .../{desktop => common}/views/deck/deck.vue | 84 ++--- .../views/deck/deck.widgets-column.vue | 10 +- src/client/app/desktop/script.ts | 26 +- .../app/desktop/views/components/index.ts | 2 + .../desktop/views/components/note-preview.vue | 9 +- .../app/desktop/views/components/note.sub.vue | 11 +- .../app/desktop/views/components/note.vue | 31 +- .../app/desktop/views/components/notes.vue | 7 +- .../app/desktop/views/components/settings.vue | 20 +- src/client/app/init.ts | 7 + src/client/app/mios.ts | 2 +- src/client/app/mobile/script.ts | 24 +- .../mobile/views/components/note-preview.vue | 42 ++- .../app/mobile/views/components/note.sub.vue | 44 ++- .../app/mobile/views/components/note.vue | 81 ++--- .../app/mobile/views/components/notes.vue | 2 +- .../mobile/views/components/notification.vue | 16 - .../mobile/views/components/notifications.vue | 14 +- .../mobile/views/components/ui-container.vue | 101 +++--- .../app/mobile/views/components/ui.header.vue | 37 +-- .../app/mobile/views/components/ui.nav.vue | 290 +++++++++++------- src/client/app/mobile/views/components/ui.vue | 71 ++++- .../app/mobile/views/pages/notifications.vue | 41 --- .../app/mobile/views/pages/settings.vue | 25 ++ src/client/app/store.ts | 228 +++++--------- 53 files changed, 711 insertions(+), 666 deletions(-) rename src/client/app/{desktop => common}/views/deck/deck.column-core.vue (100%) rename src/client/app/{desktop => common}/views/deck/deck.column.vue (88%) rename src/client/app/{desktop => common}/views/deck/deck.direct-column.vue (100%) rename src/client/app/{desktop => common}/views/deck/deck.direct.vue (100%) rename src/client/app/{desktop => common}/views/deck/deck.explore-column.vue (100%) rename src/client/app/{desktop => common}/views/deck/deck.favorites-column.vue (100%) rename src/client/app/{desktop => common}/views/deck/deck.featured-column.vue (100%) rename src/client/app/{desktop => common}/views/deck/deck.hashtag-column.vue (100%) rename src/client/app/{desktop => common}/views/deck/deck.hashtag-tl.vue (100%) rename src/client/app/{desktop => common}/views/deck/deck.list-tl.vue (100%) rename src/client/app/{desktop => common}/views/deck/deck.mentions-column.vue (100%) rename src/client/app/{desktop => common}/views/deck/deck.mentions.vue (100%) rename src/client/app/{desktop => common}/views/deck/deck.note-column.vue (92%) rename src/client/app/{desktop => common}/views/deck/deck.notes.vue (98%) rename src/client/app/{desktop => common}/views/deck/deck.notification.vue (93%) rename src/client/app/{desktop => common}/views/deck/deck.notifications-column.vue (100%) rename src/client/app/{desktop => common}/views/deck/deck.notifications.vue (99%) rename src/client/app/{desktop => common}/views/deck/deck.search-column.vue (100%) rename src/client/app/{desktop => common}/views/deck/deck.tl-column.vue (97%) rename src/client/app/{desktop => common}/views/deck/deck.tl.vue (100%) rename src/client/app/{desktop => common}/views/deck/deck.user-column.home.vue (97%) rename src/client/app/{desktop => common}/views/deck/deck.user-column.vue (100%) rename src/client/app/{desktop => common}/views/deck/deck.vue (78%) rename src/client/app/{desktop => common}/views/deck/deck.widgets-column.vue (93%) delete mode 100644 src/client/app/mobile/views/pages/notifications.vue diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 27d497c29..e4416080e 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -158,6 +158,16 @@ common: no-notes: "投稿がありません" turn-on-darkmode: "闇に飲まれる" turn-off-darkmode: "光あれ" + deck-column-align: "デッキのカラムの配置" + deck-column-align-center: "中央" + deck-column-align-left: "左" + deck-column-align-flexible: "フレキシブル" + deck-column-width: "デッキのカラムの幅" + deck-column-width-narrow: "狭" + deck-column-width-narrower: "やや狭" + deck-column-width-normal: "普通" + deck-column-width-wider: "やや広" + deck-column-width-wide: "広" error: title: "問題が発生しました" @@ -939,16 +949,6 @@ desktop/views/components/settings.vue: show-local-renotes: "ローカルの投稿のRenoteをタイムラインに表示する" show-maps: "マップの自動展開" remain-deleted-note: "削除された投稿を表示し続ける" - deck-column-align: "デッキのカラムの配置" - deck-column-align-center: "中央" - deck-column-align-left: "左" - deck-column-align-flexible: "フレキシブル" - deck-column-width: "デッキのカラムの幅" - deck-column-width-narrow: "狭" - deck-column-width-narrower: "やや狭" - deck-column-width-normal: "普通" - deck-column-width-wider: "やや広" - deck-column-width-wide: "広" sound: "サウンド" enable-sounds: "サウンドを有効にする" @@ -1711,10 +1711,6 @@ mobile/views/pages/note.vue: prev: "前の投稿" next: "次の投稿" -mobile/views/pages/notifications.vue: - notifications: "通知" - read-all: "すべての通知を既読にしますか?" - mobile/views/pages/games/reversi.vue: reversi: "リバーシ" @@ -1803,6 +1799,7 @@ deck: direct: "ダイレクト投稿" notifications: "通知" list: "リスト" + select-list: "リストを選択してください" swap-left: "左に移動" swap-right: "右に移動" swap-up: "上に移動" diff --git a/src/client/app/common/define-widget.ts b/src/client/app/common/define-widget.ts index 5eb971844..1efdbb188 100644 --- a/src/client/app/common/define-widget.ts +++ b/src/client/app/common/define-widget.ts @@ -9,6 +9,10 @@ export default function (data: { widget: { type: Object }, + column: { + type: Object, + default: null + }, platform: { type: String, required: true @@ -65,10 +69,14 @@ export default function (data: { this.bakeProps(); - this.$root.api('i/update_widget', { - id: this.id, - data: this.props - }); + if (this.platform == 'deck') { + this.$store.commit('device/updateDeckColumn', this.column); + } else { + this.$root.api('i/update_widget', { + id: this.id, + data: this.props + }); + } } } }); diff --git a/src/client/app/common/views/components/menu.vue b/src/client/app/common/views/components/menu.vue index b43bec1ca..a2124c992 100644 --- a/src/client/app/common/views/components/menu.vue +++ b/src/client/app/common/views/components/menu.vue @@ -64,6 +64,10 @@ export default Vue.extend({ this.hukidasi = false; } + if (top < 0) { + top = 0; + } + popover.style.left = left + 'px'; popover.style.top = top + 'px'; diff --git a/src/client/app/common/views/components/renote.vue b/src/client/app/common/views/components/renote.vue index 591c546ee..58a0a2659 100644 --- a/src/client/app/common/views/components/renote.vue +++ b/src/client/app/common/views/components/renote.vue @@ -1,5 +1,5 @@ @@ -21,14 +21,12 @@ import Vue from 'vue'; import i18n from '../../../i18n'; import XColumn from './deck.column.vue'; import XNotes from './deck.notes.vue'; -import XNote from '../components/note.vue'; export default Vue.extend({ i18n: i18n(), components: { XColumn, XNotes, - XNote }, data() { diff --git a/src/client/app/desktop/views/deck/deck.notes.vue b/src/client/app/common/views/deck/deck.notes.vue similarity index 98% rename from src/client/app/desktop/views/deck/deck.notes.vue rename to src/client/app/common/views/deck/deck.notes.vue index 810addd50..f94eb8fd3 100644 --- a/src/client/app/desktop/views/deck/deck.notes.vue +++ b/src/client/app/common/views/deck/deck.notes.vue @@ -13,12 +13,12 @@ @@ -97,12 +97,8 @@ diff --git a/src/client/app/mobile/views/components/ui-container.vue b/src/client/app/mobile/views/components/ui-container.vue index 90b29d0c2..806dcc9a1 100644 --- a/src/client/app/mobile/views/components/ui-container.vue +++ b/src/client/app/mobile/views/components/ui-container.vue @@ -1,5 +1,5 @@