mirror of
https://github.com/inventree/InvenTree.git
synced 2025-10-24 18:07:38 +00:00
allow mobile check ignore (#10529)
* allow mobile check ignore * add docs
This commit is contained in:
@@ -35,6 +35,7 @@ declare global {
|
||||
api_host?: string;
|
||||
sentry_dsn?: string;
|
||||
environment?: string;
|
||||
mobile_mode?: 'default' | 'allow-ignore' | 'allow-always';
|
||||
};
|
||||
react: typeof React;
|
||||
React: typeof React;
|
||||
|
||||
@@ -40,7 +40,11 @@ export default function MainView() {
|
||||
}, []);
|
||||
|
||||
// Check if mobile
|
||||
if (!allowMobile && checkMobile()) {
|
||||
if (
|
||||
!allowMobile &&
|
||||
window.INVENTREE_SETTINGS.mobile_mode !== 'allow-always' &&
|
||||
checkMobile()
|
||||
) {
|
||||
return <MobileAppView />;
|
||||
}
|
||||
|
||||
|
||||
@@ -33,8 +33,12 @@ export default function MobileAppView() {
|
||||
<Anchor href={docLinks.app}>
|
||||
<Trans>Read the docs</Trans>
|
||||
</Anchor>
|
||||
{IS_DEV && (
|
||||
<Text onClick={ignore}>
|
||||
{(IS_DEV ||
|
||||
window.INVENTREE_SETTINGS.mobile_mode === 'allow-ignore') && (
|
||||
<Text
|
||||
onClick={ignore}
|
||||
style={{ cursor: 'pointer', textDecoration: 'underline' }}
|
||||
>
|
||||
<Trans>Ignore and continue to Desktop view</Trans>
|
||||
</Text>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user