mirror of
https://github.com/venera-app/venera.git
synced 2025-09-27 07:47:24 +00:00
Add select dialog
This commit is contained in:
@@ -1291,5 +1291,22 @@ let UI = {
|
||||
title: title,
|
||||
validator: validator
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Show a select dialog
|
||||
* @param title {string}
|
||||
* @param options {string[]}
|
||||
* @param initialIndex {number?}
|
||||
* @returns {number | null} - The selected index. If the dialog is canceled, return null.
|
||||
*/
|
||||
showSelectDialog: (title, options, initialIndex) => {
|
||||
return sendMessage({
|
||||
method: 'UI',
|
||||
function: 'showSelectDialog',
|
||||
title: title,
|
||||
options: options,
|
||||
initialIndex: initialIndex
|
||||
})
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user