Commit Graph

53 Commits

Author SHA1 Message Date
Kurt Hutten
f176bbe090 Use high quality render for CadQuery download 2021-07-04 20:48:11 +10:00
Kurt Hutten
70e55a039d Implement gzip compression for cad artifacts
The stls from CadQuery and OpenSCAD are not compressed and so we're
throwing away bandwidth and taking a performance hit by not gziping.

Gzip for s3 basically needs to be gziped before upload and than have

'content-type'      :  'text/stl'
'content-encoding'  :  'gzip'
set.

https://stackoverflow.com/questions/8080824/how-to-serve-gzipped-assets-from-amazon-s3

The obvious part that needs to change is putObject in
app/api/src/docker/common/utils.js but there might be a few more
nuances.

resolves #391
2021-07-03 08:25:20 +10:00
Kurt Hutten
2e3f9b9e25 Add deprecation warning for CascadeStudio
https://github.com/Irev-Dev/cadhub/discussions/261
2021-07-02 20:38:05 +10:00
Kurt Hutten
b01c08b0d2 Remove email route after all of the sillyness 2021-07-02 20:18:17 +10:00
Kurt Hutten
5a4588ac7f Emergency fix for cad base url 2021-07-01 20:58:30 +10:00
Kurt Hutten
0531e2cb54 Remove insult on home-page and add github to footer 2021-07-01 20:24:02 +10:00
Kurt Hutten
084c4afdc3 Update email code to send an email per EditUserCell
using multiple recipients is break of privacy since user will be able
to see each other's emails.
2021-07-01 20:14:46 +10:00
Kurt Hutten
8f8dae70c2 Deploy optimized CadQuery stls 2021-06-29 18:43:43 +10:00
Kurt Hutten
7417499d4b Formatting 2021-06-29 17:17:21 +10:00
Kurt Hutten
0da15443cb Add email integration to be able to broadcast emails to all users.
Resolves #388
2021-06-29 06:37:04 +10:00
Kurt Hutten
f9c3f5ed25 Add blog to footer 2021-06-28 20:48:29 +10:00
Kurt Hutten
2baf11fc11 Add material 2021-06-27 06:35:58 +10:00
Kurt Hutten
c56cf6f4ce Improve three.js scene lighting
Related to #383
2021-06-27 06:23:28 +10:00
Kurt Hutten
e95d47cfdf Update default cq stl quality 2021-06-27 05:52:37 +10:00
Kurt Hutten
e91a264768 lint project 2021-06-26 06:14:49 +10:00
Kurt Hutten
29999bc2ce Allow admins to edit parts
Needed for moderation
2021-06-25 19:43:34 +10:00
Kurt Hutten
87e43ab7ce Add Cors headers to lamda timeout so they can be detected on the FE 2021-06-25 19:26:33 +10:00
Kurt Hutten
0773915fbc Update cq-cli to latest (beta) 2021-06-25 19:26:12 +10:00
Kurt Hutten
473f8d667c Fix images being deleted when they shouldn't
Resolves #375
2021-06-25 05:34:17 +10:00
Kurt Hutten
52bf8922c4 Lint project 2021-06-24 20:36:56 +10:00
Kurt Hutten
2e6afa86f6 Update landing page links 2021-06-23 19:37:23 +10:00
Kurt Hutten
142bf2c890 Start adding ide colors, includes adding custom theme to openscad
Resolves #365
2021-06-16 21:49:24 +10:00
Kurt Hutten
155923b2e7 Add reset view to view dropdown in EditorMenu
Related to #360
2021-06-14 09:21:47 +10:00
Kurt Hutten
b65c4530b2 Tweak panel toolbars
See this thread:
https://discord.com/channels/775984095250612234/775984095250612240/853751444703543326

Related to #360
2021-06-14 08:49:52 +10:00
Kurt Hutten
d3cb93b218 Add docs for how to use external links
related to #360
2021-06-14 06:29:26 +10:00
Kurt Hutten
5083d8e7f8 Add external resource flow
related to #360
2021-06-13 17:08:37 +10:00
Kurt Hutten
da81942adc Run linting
related to #360
2021-06-13 06:33:03 +10:00
Kurt Hutten
d781c94027 Convert to UseIdeContext
related to #360
2021-06-13 06:23:36 +10:00
Kurt Hutten
c142860433 Move encoded script logic together 2021-06-13 06:17:01 +10:00
Kurt Hutten
e591eb8ff8 Rename IdeToolbarNew to IdeWrapper
related to #360
2021-06-12 20:57:04 +10:00
Kurt Hutten
f032dd1e90 Clean up IdeToolbarNew 2021-06-12 20:39:33 +10:00
Kurt Hutten
e9583166f4 Move context provide up one layer to the DevIdePage
Related to #360
2021-06-12 20:35:13 +10:00
Kurt Hutten
cd94f11374 Disable buttons that can't be used yet
Also make construction message hidable.
related to #360
2021-06-12 20:10:30 +10:00
Kurt Hutten
6b4ff7aa61 Make new favicon into a homepage link
related to #360
2021-06-12 19:24:42 +10:00
Kurt Hutten
3c18a24cb6 Add proper menu
related to #360
2021-06-12 19:20:24 +10:00
Kurt Hutten
6ad731d158 finish ide lay out
added side bar and editor toolbar
related to #360
2021-06-11 19:47:25 +10:00
Kurt Hutten
81f7659bbc Convert Svg component to typescript
related to #360
2021-06-11 19:31:46 +10:00
Kurt Hutten
ab084e0d5a Add rough IdeHeader
relates to #360
2021-06-09 06:43:12 +10:00
Kurt Hutten
02460544bf Add new viewer and console toolbar (handle + settings)
Related to #360
2021-06-08 19:27:56 +10:00
Kurt Hutten
15732a9ed7 Merge pull request #337 from Irev-Dev/kurt/docs-update-336
Update read me to reflect up and coming OpenSCAD and CadQuery integrations
2021-06-06 20:06:07 +10:00
Kurt Hutten
a0b588000a Replace redwood flash with toaster
https://community.redwoodjs.com/t/redwood-flash-is-being-replaced-with-react-hot-toast-how-to-update-your-project-v0-27-0/1921
Resolves #326.
2021-06-06 06:12:26 +10:00
Kurt Hutten
2e91c74baf Add initial sentry setup
Related to #343 but will probably need a few more changes
2021-06-05 20:32:56 +10:00
Kurt Hutten
b868ab292b Add experimental support for OpenSCAD libraries
I've been able to get a proof of concept of downloading a openscad
library when the docker image builds
https://twitter.com/IrevDev/status/1400785325509660678
Since its experimental atm I'll leave it with just the one for now.

I've also got a local dev working again for the cad lambdas.

Resolves #338
2021-06-05 12:20:53 +10:00
Kurt Hutten
77d0fcb336 Update read me to reflect openscad and cadquery changes
Resolves #336.
2021-06-04 18:24:14 +10:00
Kurt Hutten
913045fe12 Improve browser caching with cache control header
Not only does the header need to be added, but the signed URL needs to
have it's expiry rounded so that the return url is the same for a given
window, say 10minutes

I followed this https://advancedweb.hu/cacheable-s3-signed-urls/
basically what this means is that because we're caching the assets
themselves, if as user asks for a part that already exists we'll return
a url for the existing part instead of regenerating it, however if it
was them that generated the part less than 10 minutes ago, they'll still
have to download the asset again. This way it will save us costs and
will be quicker for them.

Resolves #334
2021-05-31 16:56:21 +10:00
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