behavior improvement
This commit is contained in:
parent
cc254e21df
commit
a19ac916d2
@ -266,7 +266,7 @@ function getPromptInput(title, message = '', options = {}) {
|
||||
* @param {object} options - Options for the notification
|
||||
* @param {boolean} options.pinned - If true, notification will not be dismissed automatically
|
||||
*/
|
||||
function notify(message, mode, options = {}) {
|
||||
function notify(message, mode, options = { timeout, pinned }) {
|
||||
let icon
|
||||
switch (mode) {
|
||||
case 'success':
|
||||
@ -274,7 +274,8 @@ function notify(message, mode, options = {}) {
|
||||
break;
|
||||
case 'error':
|
||||
icon = `<svg class="icon icon--error" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="none" d="M0 0h24v24H0z"/><path d="M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm-1-7v2h2v-2h-2zm0-8v6h2V7h-2z"/></svg>`
|
||||
options.pinned = true
|
||||
if (!options.hasOwnProperty('timeout'))
|
||||
options.pinned = true
|
||||
break;
|
||||
}
|
||||
if (mode === 'error') {
|
||||
|
||||
2
main_UI.min.js
vendored
2
main_UI.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user