mirror of
				https://github.com/go-gitea/gitea
				synced 2025-10-30 19:08:37 +00:00 
			
		
		
		
	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