- added NcModal.vue, NcActions.vue, NcButton.vue, FirstrunWizard.vue, Card.vue, Page0.vue, Page1.vue, Page2.vue, Page3.vue and some icons
Some checks failed
CI Pipeline / japa-tests (push) Failing after 51s
Some checks failed
CI Pipeline / japa-tests (push) Failing after 51s
- added lime color inside tailwind.config.js - added some utilities scripts needed for components - npm updates - changed postcss.config.js for nesting css styles - added about function to NavBar.vue
This commit is contained in:
parent
cefd9081ae
commit
87e9314b00
25 changed files with 3475 additions and 401 deletions
43
resources/js/utils/Timer.js
Normal file
43
resources/js/utils/Timer.js
Normal file
|
@ -0,0 +1,43 @@
|
|||
/**
|
||||
* @param {Function} callback The function to call
|
||||
* @param {number} delay The time to wait
|
||||
*/
|
||||
export default function timer(callback, delay) {
|
||||
let id;
|
||||
let started;
|
||||
let remaining = delay;
|
||||
let running;
|
||||
|
||||
this.start = function () {
|
||||
running = true;
|
||||
started = new Date();
|
||||
id = setTimeout(callback, remaining);
|
||||
};
|
||||
|
||||
this.pause = function () {
|
||||
running = false;
|
||||
clearTimeout(id);
|
||||
remaining -= new Date() - started;
|
||||
};
|
||||
|
||||
this.clear = function () {
|
||||
running = false;
|
||||
clearTimeout(id);
|
||||
remaining = 0;
|
||||
};
|
||||
|
||||
this.getTimeLeft = function () {
|
||||
if (running) {
|
||||
this.pause();
|
||||
this.start();
|
||||
}
|
||||
|
||||
return remaining;
|
||||
};
|
||||
|
||||
this.getStateRunning = function () {
|
||||
return running;
|
||||
};
|
||||
|
||||
this.start();
|
||||
}
|
Loading…
Add table
editor.link_modal.header
Reference in a new issue