Commit Graph

13 Commits

Author SHA1 Message Date
Kurt Hutten
bd7aa4cc4e Make sure the code-init is robust when local storage is empty
Plus fix local storage for old code
2021-05-30 13:59:16 +10:00
Kurt Hutten
bd58e6c7cb Add stl download for OpenSCAD and CadQuery IDEs
Resolves #330.
2021-05-30 08:11:46 +10:00
Kurt Hutten
f629833229 Add the ability to link to text resource for IDE
Very basic feature, puts the url of the resource in the url for the ide
to fetch when it loads. I haven't added the ability to create these
links as it probably needs some consideration with how it fits into the
IDE.

Should work with any url that returns text but obviously has to CORS
enable since it's in the browser, of which gitlab raw content is not
which is kinda bizzare.

works with github raw content like so:
`#fetch_text_v1=https://raw.githubusercontent.com/aaevan/openscad_objects/main/fire_tablet_bottom_corner.scad`
however I would recommend url encoding it with `encodeURIComponent` in
case there are special characters in the path
`#fetch_text_v1=https%3A%2F%2Fraw.githubusercontent.com%2Faaevan%2Fopenscad_objects%2Fmain%2Ffire_tablet_bottom_corner.scad`

In the case of github, linking to raw is the safest, however it will try
and get to the raw content from the web-app url i.e. the following still
works:
`#fetch_text_v1=https://github.com/aaevan/openscad_objects/blob/main/fire_tablet_bottom_corner.scad`

Resolves #327
2021-05-28 06:45:39 +10:00
Kurt Hutten
644e431eba Link to docs
Not much connection between the main website and the docs website atm
2021-05-18 21:36:33 +10:00
Kurt Hutten
315492a08a Add s3 integration
Doing so has a number of benefits
- Overcome the 10Mb limit of the API gateway the lambdas have to go
through
- By storing the key as the hash of the code we can return previous
generated assets, i.e. caching
- cost, transfering assets into the bucket within the AWS ecosystem
is faster than return, and there fore the lambdas execute for less time
- Sets us up for the future as when generating artifacts for repos when
there is a change to master etc we want to store these assets somewhere
and s3 is an obvious choice
- Solved a weird CORS issue where I couldn't get CORS working with
binaryMediaTypes enabled, don't need binary types when dumping in s3

Resolves #316
2021-05-18 07:13:08 +10:00
Kurt Hutten
7749a14da3 All apostrophes in jsx 2021-05-08 09:09:07 +10:00
Kurt Hutten
053b1d642c Improve script URL ecoding
added some magic to get scripts to efficiently encoded into the URL.
We're using pako to compress the script, but this outputs to a 8bit
array. Stringifying this array adds a lot of overhead, because "125"
has three characters in it.
Instead we're using the character codes to turn these a bit numbers
into single characters base64 is used as well because not all of the
characters are allowed in a url (and b64 is better than
encodeURIComponent).
2021-05-08 09:07:54 +10:00
Kurt Hutten
e343bca75f Upgrade to tailwind 2 2021-05-01 09:29:16 +10:00
Kurt Hutten
940f3f1d79 Couple tweaks 2021-05-01 08:11:38 +10:00
Kurt Hutten
cc6d8d3fbd Attempt to at move app into app sub dir 2021-05-01 07:35:11 +10:00
Kurt Hutten
9db76458d1 Revert "Move app into app directory"
This reverts commit 5c53902caf.
2021-05-01 07:29:45 +10:00
Kurt Hutten
9beb2e73b9 Update sudmodule 2021-05-01 07:23:22 +10:00
Kurt Hutten
5c53902caf Move app into app directory 2021-05-01 07:13:47 +10:00