mirror of
https://gitlab.com/ryzen-controller-team/ryzen-controller.git
synced 2024-12-23 02:23:31 +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="#">Presets</a></li>
|
||||||
<li><a href="#">Logs</a></li>
|
<li><a href="#">Logs</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<div class="uk-container" id="notification-zone"></div>
|
|
||||||
|
|
||||||
<ul class="uk-switcher uk-margin">
|
<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/>.
|
* @param {string} message The message to be displayed, new line will be replaced by <br/>.
|
||||||
*/
|
*/
|
||||||
function notification(type, message) {
|
function notification(type, message) {
|
||||||
var element = parseHTML(`
|
UIkit.notification({
|
||||||
<div class="uk-alert-${type}" uk-alert>
|
message: (''+message).replace(/(?:\r\n|\r|\n)/g, '<br/>'),
|
||||||
<a class="uk-alert-close" uk-close></a>
|
status: type,
|
||||||
<p>${(''+message).replace(/(?:\r\n|\r|\n)/g, '<br/>')}</p>
|
pos: 'top-right',
|
||||||
</div>`);
|
timeout: 5000
|
||||||
var notifZone = document.getElementById('notification-zone');
|
});
|
||||||
notifZone.appendChild(element[0]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user