mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
use shared prompt
This commit is contained in:
parent
4c2a7ed02d
commit
adb3a60373
10 changed files with 215 additions and 36 deletions
24
dashboard-ui/bower_components/emby-webcomponents/prompt/nativeprompt.js
vendored
Normal file
24
dashboard-ui/bower_components/emby-webcomponents/prompt/nativeprompt.js
vendored
Normal file
|
@ -0,0 +1,24 @@
|
|||
define([], function () {
|
||||
|
||||
return function (options) {
|
||||
|
||||
return new Promise(function (resolve, reject) {
|
||||
|
||||
if (typeof options === 'string') {
|
||||
options = {
|
||||
title: '',
|
||||
text: options
|
||||
};
|
||||
}
|
||||
|
||||
var result = prompt(options.title || '', options.text || '');
|
||||
|
||||
if (result) {
|
||||
resolve(result);
|
||||
} else {
|
||||
reject(result);
|
||||
}
|
||||
});
|
||||
|
||||
};
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue