Show a 'not available for mobile web' screen (temporary)
parent
a014b4e6cb
commit
0f293ecf95
|
@ -35,7 +35,7 @@ export const ViewHeader = observer(function ViewHeader({
|
||||||
canGoBack = store.nav.tab.canGoBack
|
canGoBack = store.nav.tab.canGoBack
|
||||||
}
|
}
|
||||||
if (isDesktopWeb) {
|
if (isDesktopWeb) {
|
||||||
return undefined
|
return <></>
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<Container hideOnScroll={hideOnScroll || false}>
|
<Container hideOnScroll={hideOnScroll || false}>
|
||||||
|
|
|
@ -12,15 +12,22 @@ import {Login} from '../../screens/Login'
|
||||||
import {ErrorBoundary} from '../../com/util/ErrorBoundary'
|
import {ErrorBoundary} from '../../com/util/ErrorBoundary'
|
||||||
import {Lightbox} from '../../com/lightbox/Lightbox'
|
import {Lightbox} from '../../com/lightbox/Lightbox'
|
||||||
import {Modal} from '../../com/modals/Modal'
|
import {Modal} from '../../com/modals/Modal'
|
||||||
|
import {Text} from 'view/com/util/text/Text'
|
||||||
import {Composer} from './Composer'
|
import {Composer} from './Composer'
|
||||||
|
import {usePalette} from 'lib/hooks/usePalette'
|
||||||
import {useColorSchemeStyle} from 'lib/hooks/useColorSchemeStyle'
|
import {useColorSchemeStyle} from 'lib/hooks/useColorSchemeStyle'
|
||||||
import {s, colors} from 'lib/styles'
|
import {s, colors} from 'lib/styles'
|
||||||
|
import {isMobileWeb} from 'platform/detection'
|
||||||
|
|
||||||
export const WebShell: React.FC = observer(() => {
|
export const WebShell: React.FC = observer(() => {
|
||||||
const pageBg = useColorSchemeStyle(styles.bgLight, styles.bgDark)
|
const pageBg = useColorSchemeStyle(styles.bgLight, styles.bgDark)
|
||||||
const store = useStores()
|
const store = useStores()
|
||||||
const screenRenderDesc = constructScreenRenderDesc(store.nav)
|
const screenRenderDesc = constructScreenRenderDesc(store.nav)
|
||||||
|
|
||||||
|
if (isMobileWeb) {
|
||||||
|
return <NoMobileWeb />
|
||||||
|
}
|
||||||
|
|
||||||
if (!store.session.hasSession) {
|
if (!store.session.hasSession) {
|
||||||
return (
|
return (
|
||||||
<View style={styles.outerContainer}>
|
<View style={styles.outerContainer}>
|
||||||
|
@ -64,17 +71,6 @@ export const WebShell: React.FC = observer(() => {
|
||||||
<Lightbox />
|
<Lightbox />
|
||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
// TODO
|
|
||||||
// <Modal />
|
|
||||||
// <Lightbox />
|
|
||||||
// <Composer
|
|
||||||
// active={store.shell.isComposerActive}
|
|
||||||
// onClose={() => store.shell.closeComposer()}
|
|
||||||
// winHeight={winDim.height}
|
|
||||||
// replyTo={store.shell.composerOpts?.replyTo}
|
|
||||||
// imagesOpen={store.shell.composerOpts?.imagesOpen}
|
|
||||||
// onPost={store.shell.composerOpts?.onPost}
|
|
||||||
// />
|
|
||||||
})
|
})
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -126,6 +122,21 @@ function constructScreenRenderDesc(nav: NavigationModel): {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function NoMobileWeb() {
|
||||||
|
const pal = usePalette('default')
|
||||||
|
return (
|
||||||
|
<View style={[pal.view, styles.noMobileWeb]}>
|
||||||
|
<Text type="title-2xl" style={{paddingBottom: 20}}>
|
||||||
|
We're so sorry!
|
||||||
|
</Text>
|
||||||
|
<Text type="lg">
|
||||||
|
This app is not available for mobile Web yet. Please open it on your
|
||||||
|
desktop or download the iOS app.
|
||||||
|
</Text>
|
||||||
|
</View>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
const styles = StyleSheet.create({
|
const styles = StyleSheet.create({
|
||||||
outerContainer: {
|
outerContainer: {
|
||||||
height: '100%',
|
height: '100%',
|
||||||
|
@ -142,4 +153,10 @@ const styles = StyleSheet.create({
|
||||||
hidden: {
|
hidden: {
|
||||||
display: 'none',
|
display: 'none',
|
||||||
},
|
},
|
||||||
|
noMobileWeb: {
|
||||||
|
height: '100%',
|
||||||
|
justifyContent: 'center',
|
||||||
|
paddingHorizontal: 20,
|
||||||
|
paddingBottom: 40,
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue