From bb14895fd8249247be0d89fe053b62be2dfdeabf Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 2 Dec 2018 15:26:56 +0900 Subject: [Client] Resolve #2225 --- src/client/app/mobile/views/pages/user.vue | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'src/client/app/mobile') diff --git a/src/client/app/mobile/views/pages/user.vue b/src/client/app/mobile/views/pages/user.vue index 3187f09f47..7e167d83d7 100644 --- a/src/client/app/mobile/views/pages/user.vue +++ b/src/client/app/mobile/views/pages/user.vue @@ -116,6 +116,34 @@ export default Vue.extend({ menu() { let menu = [{ + icon: ['far', 'list'], + text: this.$t('push-to-list'), + action: async () => { + const lists = await this.$root.api('users/lists/list'); + const listId = await this.$root.alert({ + type: null, + title: this.$t('select-list'), + select: { + items: lists.map(list => ({ + value: list.id, text: list.title + })) + }, + showCancelButton: true + }); + if (listId == null) return; + await this.$root.api('users/lists/push', { + listId: listId, + userId: this.user.id + }); + this.$root.alert({ + type: 'success', + text: this.$t('list-pushed', { + user: this.user.name, + list: lists.find(l => l.id === listId).title + }) + }); + } + }, null, { icon: this.user.isMuted ? ['fas', 'eye'] : ['far', 'eye-slash'], text: this.user.isMuted ? this.$t('unmute') : this.$t('mute'), action: () => { -- cgit v1.3.1-freya