mirror of
https://github.com/Karaka-Management/jsOMS.git
synced 2026-01-11 17:58:41 +00:00
fix contributing and app notification options
This commit is contained in:
parent
6bc3d3d3b9
commit
05f4eef3d3
|
|
@ -12,16 +12,7 @@ If you have a good idea for improvement feel free to create a new issue with all
|
|||
|
||||
### Issues
|
||||
|
||||
Feel free to grab any open issue implement it and create a new pull request. Most issues can be found in the code and have the following structure:
|
||||
|
||||
```js
|
||||
/**
|
||||
* @todo Orange-Management/Orange-Management#ISSUE_NUMBER [d:difficulty]
|
||||
* Description for the issue
|
||||
*/
|
||||
```
|
||||
|
||||
The issue information can be used to provide additional information such as priority, difficulty and type. For your first issue try to find a issue marked `[d:first]` or `[d:beginner]`.
|
||||
Feel free to grab any open issue implement it and create a new pull request. Most issues can be found in the code marked with `@todo` or in the [PROJECT.md](https://github.com/Orange-Management/Docs/blob/master/Project/PROJECT.md) file.
|
||||
|
||||
### Code Style
|
||||
|
||||
|
|
@ -31,6 +22,6 @@ Not always are the defined coding style standards upheld, if you notice that sim
|
|||
|
||||
While code coverage is just a metric it is still appreciated to cover as many files and code paths as possible. Just have a look at the code coverage and implement missing unit tests.
|
||||
|
||||
### Freatures
|
||||
### Features
|
||||
|
||||
You have a good idea for a feature and can implement it yourself, go ahead and create a new pull request.
|
||||
|
|
@ -51,12 +51,24 @@ export class AppNotification
|
|||
|
||||
let output = document.importNode(tpl.content, true);
|
||||
output.querySelector('.log-msg').classList.add('log-msg-status-' + msg.status);
|
||||
output.querySelector('.log-msg-title').innerHTML = msg.title;
|
||||
output.querySelector('.log-msg-content').innerHTML = msg.message;
|
||||
output.querySelector('.close').addEventListeenr('click', function() {
|
||||
this.parent.remove();
|
||||
});
|
||||
|
||||
if (msg.title && msg.title !== '') {
|
||||
output.querySelector('.log-msg-title').innerHTML = msg.title;
|
||||
} else {
|
||||
output.querySelector('.log-msg-title').remove();
|
||||
}
|
||||
|
||||
tpl.parentNode.appendChild(output);
|
||||
window.navigator.vibrate(msg.vibrate ? 200 : 0);
|
||||
|
||||
if (msg.isSticky) {
|
||||
return;
|
||||
}
|
||||
|
||||
setTimeout(function ()
|
||||
{
|
||||
document.getElementsByClassName('log-msg')[0].remove();
|
||||
|
|
|
|||
|
|
@ -18,11 +18,12 @@ export class NotificationMessage
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
constructor(status, title, message, vibrate = false)
|
||||
constructor(status, title, message, vibrate = false, isSticky = false)
|
||||
{
|
||||
this.status = status;
|
||||
this.title = title;
|
||||
this.message = message;
|
||||
this.vibrate = vibrate
|
||||
this.status = status;
|
||||
this.title = title;
|
||||
this.message = message;
|
||||
this.vibrate = vibrate
|
||||
this.isSticky = isSticky
|
||||
};
|
||||
};
|
||||
Loading…
Reference in New Issue
Block a user