Remove "minimize" button from Player when in Desktop resolution
This commit is contained in:
@@ -10,6 +10,7 @@ import {
|
|||||||
makeStyles,
|
makeStyles,
|
||||||
ThemeProvider,
|
ThemeProvider,
|
||||||
} from '@material-ui/core/styles'
|
} from '@material-ui/core/styles'
|
||||||
|
import { useMediaQuery } from '@material-ui/core'
|
||||||
import { GlobalHotKeys } from 'react-hotkeys'
|
import { GlobalHotKeys } from 'react-hotkeys'
|
||||||
import subsonic from '../subsonic'
|
import subsonic from '../subsonic'
|
||||||
import {
|
import {
|
||||||
@@ -78,6 +79,9 @@ const Player = () => {
|
|||||||
|
|
||||||
const visible = authenticated && queue.queue.length > 0
|
const visible = authenticated && queue.queue.length > 0
|
||||||
const classes = useStyle({ visible })
|
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 nextSong = useCallback(() => {
|
||||||
const idx = queue.queue.findIndex(
|
const idx = queue.queue.findIndex(
|
||||||
@@ -128,6 +132,7 @@ const Player = () => {
|
|||||||
showDestroy: true,
|
showDestroy: true,
|
||||||
showDownload: false,
|
showDownload: false,
|
||||||
showReload: false,
|
showReload: false,
|
||||||
|
toggleMode: !isDesktop,
|
||||||
glassBg: false,
|
glassBg: false,
|
||||||
showThemeSwitch: false,
|
showThemeSwitch: false,
|
||||||
showMediaSession: true,
|
showMediaSession: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user