( title, notificationType, timeAlive = 2, buttons = [] )
| 56 | } |
| 57 | |
| 58 | export function addNotification( |
| 59 | title, |
| 60 | notificationType, |
| 61 | timeAlive = 2, |
| 62 | buttons = [] |
| 63 | ) { |
| 64 | // eslint-disable-next-line |
| 65 | return function addNotification({ state, resolve }) { |
| 66 | const now = Date.now(); |
| 67 | |
| 68 | state.push('notifications', { |
| 69 | id: now, |
| 70 | title: resolve.value(title), |
| 71 | notificationType: resolve.value(notificationType), |
| 72 | buttons: resolve.value(buttons), |
| 73 | endTime: now + resolve.value(timeAlive) * 1000, |
| 74 | }); |
| 75 | }; |
| 76 | } |
| 77 | |
| 78 | export function updateSandboxUrl(sandbox) { |
| 79 | // eslint-disable-next-line |
no test coverage detected