Improve input dialog
This commit is contained in:
parent
3a2dc95850
commit
1653977392
26 changed files with 201 additions and 318 deletions
|
|
@ -167,11 +167,14 @@ export default Vue.extend({
|
|||
icon: 'pencil-alt',
|
||||
text: this.$t('rename'),
|
||||
action: () => {
|
||||
this.$input({
|
||||
this.$root.dialog({
|
||||
title: this.$t('rename'),
|
||||
default: this.name,
|
||||
allowEmpty: false
|
||||
}).then(name => {
|
||||
input: {
|
||||
default: this.name,
|
||||
allowEmpty: false
|
||||
}
|
||||
}).then(({ canceled, result: name }) => {
|
||||
if (canceled) return;
|
||||
this.$store.dispatch('settings/renameDeckColumn', { id: this.column.id, name });
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -252,9 +252,11 @@ export default Vue.extend({
|
|||
icon: 'hashtag',
|
||||
text: this.$t('@deck.hashtag'),
|
||||
action: () => {
|
||||
this.$input({
|
||||
title: this.$t('enter-hashtag-tl-title')
|
||||
}).then(title => {
|
||||
this.$root.dialog({
|
||||
title: this.$t('enter-hashtag-tl-title'),
|
||||
input: true
|
||||
}).then(({ canceled, result: title }) => {
|
||||
if (canceled) return;
|
||||
this.$store.dispatch('settings/addDeckColumn', {
|
||||
id: uuid(),
|
||||
type: 'hashtag',
|
||||
|
|
|
|||
|
|
@ -77,8 +77,8 @@ export default Vue.extend({
|
|||
type: 'warning',
|
||||
text: this.$t('block-confirm'),
|
||||
showCancelButton: true
|
||||
}).then(res => {
|
||||
if (!res) return;
|
||||
}).then(({ canceled }) => {
|
||||
if (canceled) return;
|
||||
|
||||
this.$root.api('blocking/create', {
|
||||
userId: this.user.id
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue