From dab7e527de7aacdd8c4d1755627f96980617e282 Mon Sep 17 00:00:00 2001 From: tamaina Date: Thu, 18 Apr 2019 21:33:24 +0900 Subject: [PATCH] Improve user lists index (#4605) * wip * Revert "wip" This reverts commit 6212831ce3bdae5ce17f8ace9945710ba7696185. * improve list index * Update user-lists.vue --- locales/ja-JP.yml | 7 +- .../common/views/components/user-lists.vue | 95 +++++++++++++++++++ .../views/components/ui.header.account.vue | 10 +- .../desktop/views/components/ui.sidebar.vue | 5 +- .../views/components/user-lists-window.vue | 75 +++------------ .../app/mobile/views/pages/user-lists.vue | 36 ++----- 6 files changed, 123 insertions(+), 105 deletions(-) create mode 100644 src/client/app/common/views/components/user-lists.vue diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index e9284f89a7..a475bc2c16 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -748,6 +748,10 @@ common/views/components/user-list-editor.vue: delete-are-you-sure: "リスト「$1」を削除しますか?" deleted: "削除しました" +common/views/components/user-lists.vue: + create-list: "リストを作成" + list-name: "リスト名" + common/views/widgets/broadcast.vue: fetching: "確認中" no-broadcasts: "お知らせはありません" @@ -1154,8 +1158,6 @@ desktop/views/components/received-follow-requests-window.vue: desktop/views/components/user-lists-window.vue: title: "リスト" - create-list: "リストを作成" - list-name: "リスト名" desktop/views/components/user-preview.vue: notes: "投稿" @@ -1689,7 +1691,6 @@ mobile/views/pages/drive.vue: mobile/views/pages/user-lists.vue: title: "リスト" - enter-list-name: "リスト名を入力してください" mobile/views/pages/signup.vue: lets-start: "📦 始めましょう" diff --git a/src/client/app/common/views/components/user-lists.vue b/src/client/app/common/views/components/user-lists.vue new file mode 100644 index 0000000000..786a6766d3 --- /dev/null +++ b/src/client/app/common/views/components/user-lists.vue @@ -0,0 +1,95 @@ + + + + + diff --git a/src/client/app/desktop/views/components/ui.header.account.vue b/src/client/app/desktop/views/components/ui.header.account.vue index effd0ef0fd..7f9decfdcd 100644 --- a/src/client/app/desktop/views/components/ui.header.account.vue +++ b/src/client/app/desktop/views/components/ui.header.account.vue @@ -90,9 +90,8 @@ import Vue from 'vue'; import i18n from '../../../i18n'; import MkUserListsWindow from './user-lists-window.vue'; -import MkUserListWindow from './user-list-window.vue'; import MkFollowRequestsWindow from './received-follow-requests-window.vue'; -import MkSettingsWindow from './settings-window.vue'; +// import MkSettingsWindow from './settings-window.vue'; import MkDriveWindow from './drive-window.vue'; import contains from '../../../common/scripts/contains'; import { faHome, faColumns } from '@fortawesome/free-solid-svg-icons'; @@ -143,12 +142,7 @@ export default Vue.extend({ }, list() { this.close(); - const w = this.$root.new(MkUserListsWindow); - w.$once('choosen', list => { - this.$root.new(MkUserListWindow, { - list - }); - }); + this.$root.new(MkUserListsWindow); }, followRequests() { this.close(); diff --git a/src/client/app/desktop/views/components/ui.sidebar.vue b/src/client/app/desktop/views/components/ui.sidebar.vue index cb0e059c11..1c01f127b9 100644 --- a/src/client/app/desktop/views/components/ui.sidebar.vue +++ b/src/client/app/desktop/views/components/ui.sidebar.vue @@ -148,10 +148,7 @@ export default Vue.extend({ }, list() { - const w = this.$root.new(MkUserListsWindow); - w.$once('choosen', list => { - this.$router.push(`i/lists/${ list.id }`); - }); + this.$root.new(MkUserListsWindow); }, followRequests() { diff --git a/src/client/app/desktop/views/components/user-lists-window.vue b/src/client/app/desktop/views/components/user-lists-window.vue index 7afcd6aa3b..afea01d4a1 100644 --- a/src/client/app/desktop/views/components/user-lists-window.vue +++ b/src/client/app/desktop/views/components/user-lists-window.vue @@ -1,85 +1,36 @@ - diff --git a/src/client/app/mobile/views/pages/user-lists.vue b/src/client/app/mobile/views/pages/user-lists.vue index 49006f41f6..a3e9bd78ba 100644 --- a/src/client/app/mobile/views/pages/user-lists.vue +++ b/src/client/app/mobile/views/pages/user-lists.vue @@ -1,20 +1,15 @@