Improve input dialog
This commit is contained in:
parent
3a2dc95850
commit
1653977392
26 changed files with 201 additions and 318 deletions
|
@ -34,7 +34,6 @@ import PostFormWindow from './views/components/post-form-window.vue';
|
|||
import RenoteFormWindow from './views/components/renote-form-window.vue';
|
||||
import MkChooseFileFromDriveWindow from './views/components/choose-file-from-drive-window.vue';
|
||||
import MkChooseFolderFromDriveWindow from './views/components/choose-folder-from-drive-window.vue';
|
||||
import InputDialog from './views/components/input-dialog.vue';
|
||||
import Notification from './views/components/ui-notification.vue';
|
||||
|
||||
import { url } from '../config';
|
||||
|
@ -113,22 +112,6 @@ init(async (launch) => {
|
|||
});
|
||||
},
|
||||
|
||||
$input(opts) {
|
||||
return new Promise<string>((res, rej) => {
|
||||
const o = opts || {};
|
||||
const d = this.$root.new(InputDialog, {
|
||||
title: o.title,
|
||||
placeholder: o.placeholder,
|
||||
default: o.default,
|
||||
type: o.type || 'text',
|
||||
allowEmpty: o.allowEmpty
|
||||
});
|
||||
d.$once('done', text => {
|
||||
res(text);
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
$notify(message) {
|
||||
this.$root.new(Notification, {
|
||||
message
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue