mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-17 10:15:33 +02:00
Fix bug
This commit is contained in:
@@ -1,20 +1,19 @@
|
||||
import OS from '../../mios';
|
||||
import InputDialog from '../views/components/input-dialog.vue';
|
||||
|
||||
export default function(opts) {
|
||||
export default (os: OS) => opts => {
|
||||
return new Promise<string>((res, rej) => {
|
||||
const o = opts || {};
|
||||
const d = new InputDialog({
|
||||
propsData: {
|
||||
title: o.title,
|
||||
placeholder: o.placeholder,
|
||||
default: o.default,
|
||||
type: o.type || 'text',
|
||||
allowEmpty: o.allowEmpty
|
||||
}
|
||||
}).$mount();
|
||||
const d = os.new(InputDialog, {
|
||||
title: o.title,
|
||||
placeholder: o.placeholder,
|
||||
default: o.default,
|
||||
type: o.type || 'text',
|
||||
allowEmpty: o.allowEmpty
|
||||
});
|
||||
d.$once('done', text => {
|
||||
res(text);
|
||||
});
|
||||
document.body.appendChild(d.$el);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user