Improve input dialog

This commit is contained in:
syuilo
2018-12-02 20:10:53 +09:00
parent 3a2dc95850
commit 1653977392
26 changed files with 201 additions and 318 deletions

View File

@ -120,7 +120,7 @@ export default Vue.extend({
text: this.$t('push-to-list'),
action: async () => {
const lists = await this.$root.api('users/lists/list');
const listId = await this.$root.dialog({
const { canceled, result: listId } = await this.$root.dialog({
type: null,
title: this.$t('select-list'),
select: {
@ -130,7 +130,7 @@ export default Vue.extend({
},
showCancelButton: true
});
if (!listId) return;
if (canceled) return;
await this.$root.api('users/lists/push', {
listId: listId,
userId: this.user.id