mirror of
https://github.com/cupcakearmy/unpixel.git
synced 2024-12-22 08:06:33 +00:00
show paused on mic/camera
This commit is contained in:
parent
82142ccb14
commit
8398dccac3
@ -4,13 +4,15 @@ import ms from 'ms'
|
|||||||
|
|
||||||
import Banner from './banner'
|
import Banner from './banner'
|
||||||
import Settings from './settings'
|
import Settings from './settings'
|
||||||
|
import { InputDevicesStatus } from './utils'
|
||||||
|
|
||||||
export default class TrayUtility {
|
export default class TrayUtility {
|
||||||
static tray: Tray | null = null
|
static tray: Tray | null = null
|
||||||
|
|
||||||
static build() {
|
static build() {
|
||||||
const [paused, interval] = Settings.getStatus()
|
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] = [
|
const template: Parameters<typeof Menu['buildFromTemplate']>[0] = [
|
||||||
{ label: status, type: 'normal', enabled: false },
|
{ label: status, type: 'normal', enabled: false },
|
||||||
|
Loading…
Reference in New Issue
Block a user