mirror of
https://gitlab.com/ryzen-controller-team/ryzen-controller.git
synced 2024-12-22 18:13:28 +07:00
Changed notification display.
This commit is contained in:
parent
63d016cd63
commit
32089ec336
@ -16,9 +16,6 @@
|
||||
<li><a href="#">Presets</a></li>
|
||||
<li><a href="#">Logs</a></li>
|
||||
</ul>
|
||||
|
||||
<div class="uk-container" id="notification-zone"></div>
|
||||
|
||||
<ul class="uk-switcher uk-margin">
|
||||
|
||||
|
||||
|
@ -81,11 +81,11 @@ function checkForAdminRights() {
|
||||
* @param {string} message The message to be displayed, new line will be replaced by <br/>.
|
||||
*/
|
||||
function notification(type, message) {
|
||||
var element = parseHTML(`
|
||||
<div class="uk-alert-${type}" uk-alert>
|
||||
<a class="uk-alert-close" uk-close></a>
|
||||
<p>${(''+message).replace(/(?:\r\n|\r|\n)/g, '<br/>')}</p>
|
||||
</div>`);
|
||||
var notifZone = document.getElementById('notification-zone');
|
||||
notifZone.appendChild(element[0]);
|
||||
UIkit.notification({
|
||||
message: (''+message).replace(/(?:\r\n|\r|\n)/g, '<br/>'),
|
||||
status: type,
|
||||
pos: 'top-right',
|
||||
timeout: 5000
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user