fix(mobile): component viewer in mobile web

This commit is contained in:
Mo
2022-07-07 13:08:52 -05:00
parent f484a2a920
commit d9014615f0
6 changed files with 8 additions and 6 deletions

View File

@@ -52,6 +52,7 @@ app-release.aab
*.bundle
!Web.bundle
html/Web.bundle/src/web-src
html/Web.bundle/src/components
ios-release.bundle.map
# fastlane

View File

@@ -127,6 +127,7 @@ export const MobileWebAppContainer = () => {
onHttpError={() => console.error('An HTTP error occurred')}
onMessage={onMessage}
allowFileAccess={true}
allowUniversalAccessFromFileURLs={true}
injectedJavaScript={injectedJS}
/>
)

View File

@@ -6,9 +6,6 @@
<meta content="IE=edge" http-equiv="X-UA-Compatible" />
<meta content="width=device-width, initial-scale=1" name="viewport" />
<link rel="stylesheet" href="web-src/app.css" />
</head>
<body>
<script>
window.defaultSyncServer = "https://api.standardnotes.com";
window.defaultFilesHost = "https://files.standardnotes.com";
@@ -20,6 +17,9 @@
</script>
<script src="web-src/app.js"></script>
</head>
<body>
</body>
</html>

View File

@@ -22,7 +22,7 @@
"start": "react-native start",
"tsc": "tsc --noEmit",
"upgrade:snjs": "ncu -u '@standardnotes/*'",
"web:bundle": "mkdir -p html/Web.bundle/src/web-src/ && cp -r ../web/dist/. html/Web.bundle/src/web-src/"
"web:bundle": "mkdir -p html/Web.bundle/src/web-src/ && cp -r ../web/dist/. html/Web.bundle/src/web-src/ && mkdir -p html/Web.bundle/src/components/assets && cp -r ../components/dist/assets/. html/Web.bundle/src/components/assets/"
},
"installConfig": {
"hoistingLimits": "workspaces"