From 43cbde97adf798020df8bf4444142d311b7cb3b7 Mon Sep 17 00:00:00 2001 From: Deluan Date: Tue, 30 Mar 2021 22:43:39 -0400 Subject: [PATCH] Remove "minimize" button from Player when in Desktop resolution --- ui/src/audioplayer/Player.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ui/src/audioplayer/Player.js b/ui/src/audioplayer/Player.js index 7633cb839..e63a7e40d 100644 --- a/ui/src/audioplayer/Player.js +++ b/ui/src/audioplayer/Player.js @@ -10,6 +10,7 @@ import { makeStyles, ThemeProvider, } from '@material-ui/core/styles' +import { useMediaQuery } from '@material-ui/core' import { GlobalHotKeys } from 'react-hotkeys' import subsonic from '../subsonic' import { @@ -78,6 +79,9 @@ const Player = () => { const visible = authenticated && queue.queue.length > 0 const classes = useStyle({ visible }) + // Match the medium breakpoint defined in the material-ui theme + // See https://material-ui.com/customization/breakpoints/#breakpoints + const isDesktop = useMediaQuery('(min-width:960px)') const nextSong = useCallback(() => { const idx = queue.queue.findIndex( @@ -128,6 +132,7 @@ const Player = () => { showDestroy: true, showDownload: false, showReload: false, + toggleMode: !isDesktop, glassBg: false, showThemeSwitch: false, showMediaSession: true,