@saltcorn/mobile-app 1.0.0-rc.2 → 1.0.0-rc.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@saltcorn/mobile-app",
3
3
  "displayName": "Saltcorn mobile app",
4
- "version": "1.0.0-rc.2",
4
+ "version": "1.0.0-rc.3",
5
5
  "description": "Apache Cordova application with @saltcorn/markup",
6
6
  "main": "index.js",
7
7
  "scripts": {
@@ -654,15 +654,16 @@ async function make_unique_field(
654
654
  }
655
655
 
656
656
  function openFile(fileId) {
657
- // TODO fileIds with whitespaces do not work
658
657
  const config = parent.saltcorn.data.state.getState().mobileConfig;
659
658
  const serverPath = config.server_path;
660
659
  const token = config.jwt;
661
- const url = `${serverPath}/files/serve/${fileId}?jwt=${token}`;
660
+ const url = `${serverPath}/files/serve/${encodeURIComponent(
661
+ fileId
662
+ )}?jwt=${token}`;
662
663
  parent.cordova.InAppBrowser.open(
663
664
  url,
664
- "_self",
665
- "clearcache=yes,clearsessioncache=yes,location=no"
665
+ "_blank",
666
+ "clearcache=yes,clearsessioncache=yes,location=no,toolbar=yes,toolbarposition=top"
666
667
  );
667
668
  }
668
669