stopwatch notif: check if timetracking is enabled (#14750)
fixes #14435
This commit is contained in:
@ -1,11 +1,14 @@
|
||||
import prettyMilliseconds from 'pretty-ms';
|
||||
const {AppSubUrl, csrf, NotificationSettings} = window.config;
|
||||
const {AppSubUrl, csrf, NotificationSettings, EnableTimetracking} = window.config;
|
||||
|
||||
let updateTimeInterval = null; // holds setInterval id when active
|
||||
|
||||
export async function initStopwatch() {
|
||||
const stopwatchEl = $('.active-stopwatch-trigger');
|
||||
if (!EnableTimetracking) {
|
||||
return;
|
||||
}
|
||||
|
||||
const stopwatchEl = $('.active-stopwatch-trigger');
|
||||
stopwatchEl.removeAttr('href'); // intended for noscript mode only
|
||||
stopwatchEl.popup({
|
||||
position: 'bottom right',
|
||||
|
Reference in New Issue
Block a user