show paused on mic/camera

This commit is contained in:
cupcakearmy 2021-06-09 12:13:11 +02:00
parent 82142ccb14
commit 8398dccac3
No known key found for this signature in database
GPG Key ID: D28129AE5654D9D9

View File

@ -4,13 +4,15 @@ import ms from 'ms'
import Banner from './banner'
import Settings from './settings'
import { InputDevicesStatus } from './utils'
export default class TrayUtility {
static tray: Tray | null = null
static build() {
const [paused, interval] = Settings.getStatus()
const status = paused ? `Paused for: ${ms(interval)}` : `Next break: ${ms(interval)}`
let status = paused ? `Paused for: ${ms(interval)}` : `Next break: ${ms(interval)}`
if (InputDevicesStatus.areCameraOrMicrophoneActive()) status = `Paused: Mic/Camera Active`
const template: Parameters<typeof Menu['buildFromTemplate']>[0] = [
{ label: status, type: 'normal', enabled: false },