mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-19 21:46:11 +05:00
more standalone styles added
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
import { useState } from 'react'
|
||||
import { Button, Dialog, DialogActions, DialogTitle, ListItem, ListItemIcon, ListItemText } from '@material-ui/core'
|
||||
import { Button, Dialog, DialogActions, DialogTitle, ListItemIcon, ListItemText } from '@material-ui/core'
|
||||
import { PowerSettingsNew as PowerSettingsNewIcon } from '@material-ui/icons'
|
||||
import { shutdownHost } from 'utils/Hosts'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import { isStandaloneApp } from 'utils/Utils'
|
||||
import StyledMenuButtonWrapper from 'style/StyledMenuButtonWrapper'
|
||||
|
||||
export default function CloseServer({ isOffline, isLoading }) {
|
||||
const { t } = useTranslation()
|
||||
@@ -12,13 +14,22 @@ export default function CloseServer({ isOffline, isLoading }) {
|
||||
|
||||
return (
|
||||
<>
|
||||
<ListItem disabled={isOffline || isLoading} button key={t('CloseServer')} onClick={openDialog}>
|
||||
<ListItemIcon>
|
||||
<PowerSettingsNewIcon />
|
||||
</ListItemIcon>
|
||||
<StyledMenuButtonWrapper disabled={isOffline || isLoading} button key={t('CloseServer')} onClick={openDialog}>
|
||||
{isStandaloneApp ? (
|
||||
<>
|
||||
<PowerSettingsNewIcon />
|
||||
<div>{t('CloseServer')}</div>
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
<ListItemIcon>
|
||||
<PowerSettingsNewIcon />
|
||||
</ListItemIcon>
|
||||
|
||||
<ListItemText primary={t('CloseServer')} />
|
||||
</ListItem>
|
||||
<ListItemText primary={t('CloseServer')} />
|
||||
</>
|
||||
)}
|
||||
</StyledMenuButtonWrapper>
|
||||
|
||||
<Dialog open={open} onClose={closeDialog}>
|
||||
<DialogTitle>{t('CloseServer?')}</DialogTitle>
|
||||
|
||||
Reference in New Issue
Block a user