added special add button in standalone app

This commit is contained in:
Daniel Shleifman
2022-06-19 20:24:52 +03:00
parent a0ba83c9d4
commit 9d726196c4
2 changed files with 29 additions and 4 deletions

View File

@@ -7,6 +7,7 @@ import { StyledMenuButtonWrapper } from 'style/CustomMaterialUiStyles'
import { isStandaloneApp } from 'utils/Utils' import { isStandaloneApp } from 'utils/Utils'
import AddDialog from './AddDialog' import AddDialog from './AddDialog'
import { StyledPWAAddButton } from './style'
export default function AddDialogButton({ isOffline, isLoading }) { export default function AddDialogButton({ isOffline, isLoading }) {
const { t } = useTranslation() const { t } = useTranslation()
@@ -18,10 +19,7 @@ export default function AddDialogButton({ isOffline, isLoading }) {
<div> <div>
<StyledMenuButtonWrapper disabled={isOffline || isLoading} button onClick={handleClickOpen}> <StyledMenuButtonWrapper disabled={isOffline || isLoading} button onClick={handleClickOpen}>
{isStandaloneApp ? ( {isStandaloneApp ? (
<> <StyledPWAAddButton />
<LibraryAddIcon />
<div>{t('AddFromLink')}</div>
</>
) : ( ) : (
<> <>
<ListItemIcon> <ListItemIcon>

View File

@@ -337,3 +337,30 @@ export const PosterLanguageSwitch = styled.div`
} }
`} `}
` `
export const StyledPWAAddButton = styled.div`
border: 2px solid white;
border-radius: 50%;
height: 45px;
width: 45px;
position: relative;
:before,
:after {
content: '';
background: white;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
:before {
width: 2px;
height: 25px;
}
:after {
width: 25px;
height: 2px;
}
`