Commit Graph

37 Commits

Author SHA1 Message Date
Alex Bates 1968531ca4 Projects MVP (#292)
Co-authored-by: Matt Kempster <kidpixel@gmail.com>
Co-authored-by: Mark Street <streetster@gmail.com>
2022-02-18 17:48:51 +00:00
Ethan Roseman 662818bf8d Decompile gooey (#360)
* add "Reset source code" button

* dedup modal css

* Eth's delivery of delectable dinner

* rename ScratchResetModal to ScratchDecompileModal

* consistent state

Co-authored-by: Alex Bates <hi@imalex.xyz>
2022-02-18 03:58:28 +09:00
Léo Lam f8bd61f4f3 frontend: Translate ANSI color codes to HTML colors (#344)
Allows Clang's pretty color diagnostics to show up correctly
2022-02-07 22:04:22 +09:00
Alex Bates 09378167a8 Add plausible analytics to frontend (#311)
* add next-plausible

* add analytics events to key actions

* use stats.decomp.me

* don't run frontend tests on windows runner

buggy github action
2022-01-14 01:30:37 +09:00
Alex Bates 8c8607c562 Fix preferences dialog on Safari (#296) 2022-01-06 14:06:55 +00:00
Alex Bates 110ce88357 Index page (#295)
* index page

* set index title

* cleanup

* at footer to 404

* move /scratch/new to /new

* fix update_scratch_score updating the scratch even if not required

* remove projects from index

* fix errors if you lack an avatar

* extra metadata in ScratchList

* add home button to scratch menu
2022-01-06 23:00:39 +09:00
Alex Bates b96dd0315d ScratchViewSet + search box (#285)
* initial scratch viewset impl

* use scratch2 on frontend

* todo

* viewset

* permissions

* fix mypy

* add TerseScratchSerializer

* mypy

* add FRONTEND_BASE

* add search box

* use get_html_url

* scratch default name

* always show search icon

* oops

* add platform icon to search results

* very oops

* improve searchbox stability

* fix requirements

* don't autosave on compiler change

* add Search to ScratchToolbar

* Nav frog padding tweak

* frog hover state

* click away bug

* fix weird search result click bugs

* recompile on visit another scratch
2022-01-04 03:00:12 +09:00
Alex Bates b755c55ef8 Add settings page (#270)
* nav user menu popup

* add settings page

Fixes #61.

* use real links for menu links

* lint

* allow access to UserMenu when signed out

* mark comment

* rename 'Scratch settings' tab

* add platform logo to compileropts + give tab min width

* lint

* toolbar hamburger

* draggable diff bar

* scratch preferences modal

* prevent long names from breaking ui

* no scrollbar on vertical tabs

* AboutScratch overflow fixes

* update right pane width

* responsiveness

* toggle menus on multiple clicks

* temporarily remove settings link

* better scratch name behaviour on small widths

* remove nav from scratch page

* implement export

* menu style changes

* scratch name cursor:text

* lint

* don't use focus-visible

Unsupported on Safari

* show loading spinner in ButtonItems

* shortcuts

* footer credits icon

* add icons to scratch menu

* compile scratch in SSR

* score in AboutScratch

* give the toolbar its colour back

* diff compile changes

* give editable scratch name a hover state

* improve editor preferences ui

* tricolor toolbar,tabs,panels

* reduce diff header blur

* tweak scratch name bg color

* pass tests
2022-01-02 16:39:33 +09:00
Alex Bates 8a6dc722c9 Windows (#239)
* run tests on windows also

* postinstall: don't pipe to /dev/null as this doesnt work on windows

* make backend_test_windows into its own workflow

* skip tests where compiler is not supported

* fix mypy
2021-12-21 00:57:53 +09:00
Alex Bates 467c9142e8 Add frontend testing (#182) 2021-10-16 13:37:43 +01:00
Alex Bates 0e8b01841a Frontend improvements + Docker updates (#167, #169)
Co-authored-by: Mark Street <22226349+mkst@users.noreply.github.com>
2021-10-14 12:52:28 +01:00
alex 7757386396 Migrate to Next.js + big style update (#154)
* Backend changes to diff from label rather than 0, also possibly fix #109

* implement diff_label frontend & fix assemble_asm

* Log stack trace if asm-differ fails

* don't return { obj } from api

* slight change in stub func code

* GET /compilers returns arches for compilers

* GET /compilers returns arches for compilers

* keep compiler_ids

* Obtain ido from download script, add comment for permuter api support

* Clean m2c wrapper code, add left pointer style, add test

* fix 3 tests

* list arches from api

* fix cookies in DEBUG

SameSite=None is incompatible with Secure, and this causes some browsers
to ignore the cookie altogether.

* fix test

Regression due to changing API to not return { "user": User } but
rather just the User object itself.

* fix create scratch without glabel

This works around a backend bug

* add label select on scratch creation

* show compilers/presets for current arch only

- fixes #92
- fixes #132

* fix mypy issues

* use react instead of preact

* hold pages in src/pages/

This matches NextJS file structure; the names of files reflect their routing paths.

* migrate to NextJS

* use next-pwa

* statically generate user page

* fix github login

* add loading progress bar

* arch on scratch

* nav redesign

* use .env.local instead of local.env

* fix unset compiler not considering arch

* add discord server to readme

* big styling update

* add footer

* move compiler dir into components

* use lib dir

* fix ts error

* describe deployment

* dont use NEXT_PUBLIC_* in .env

* add storybook

* document storybook

* make AsyncButton loading state pretty

* remove sharp

* custom monaco editor react component

* ci: build frontend

* allow nextjs to build despite ignored typescript errors

* ci

* remove react-loading-skeleton

* oops

* don't request public_repo github scope

* give AsyncButton error popup its arrow back

* try fix monaco problem

* oops

* fix monaco red bg for real this time

Co-authored-by: Ethan Roseman <ethteck@gmail.com>
2021-10-13 00:49:23 +09:00
alex 537eff9a95 Merge branch 'main' into dotenv 2021-09-23 13:25:54 +01:00
alex 5f33326703 update readme and read from local.env 2021-09-17 17:10:06 +01:00
alex 884a292f91 rewrite scratch component 2021-09-04 15:10:25 +01:00
alex 9c3816adee use reviewdog.yml 2021-08-28 01:16:26 +01:00
alex 7d5d872a07 check eslint and typescript
Resolves #99.
2021-08-28 00:36:04 +01:00
alex 706996d71a user pages + use typescript
Partially fixes #99 (needs CI).
Partially implements #105 (still needs scratch list).
2021-08-27 22:54:16 +01:00
alex 3797395d3a add GitHub login 2021-08-27 18:01:21 +01:00
alex e8c8666d75 fix monaco bugs 2021-08-26 13:27:44 +01:00
alex 90f83fd11e fix #55 2021-08-25 22:52:32 +01:00
alex b056bcfe25 update frontend for new api 2021-08-09 15:38:38 +01:00
alex 5539ba8427 hide diff explanation when diff pane size is too small 2021-08-06 13:27:10 +01:00
alex d5c724b185 router updates 2021-08-06 12:19:29 +01:00
alex e9f7849950 icons 2021-08-06 03:05:43 +01:00
alex 1dcf859806 big updates 2021-08-05 17:40:15 +01:00
alex 89254bc7fb load API_BASE from .env 2021-08-04 08:55:21 +01:00
Alex Bates ff686d771c add asm-differ scrollbars 2021-08-03 09:25:17 +01:00
Alex Bates 29ae8efb84 fix various frontend bugs 2021-08-02 18:44:46 +01:00
Ethan Roseman 94de1e3aec Scratch updating, fix various bugs, toast 2021-08-02 22:45:57 +09:00
Alex Bates 8f59db5516 integrate scratch ui with new api 2021-07-07 19:09:30 +01:00
Alex Bates 2b1f1eb627 allow column resizing 2021-07-06 16:53:56 +01:00
Alex Bates fd29f99679 recompile c code on change 2021-07-06 16:34:04 +01:00
Alex Bates 36ecd15baa add CompilerConfigSelect 2021-07-06 15:25:49 +01:00
Alex Bates fd93fe5bdf connect 'compile!' button to api 2021-07-05 20:47:24 +01:00
Alex Bates 85e29b2080 use preact 2021-07-05 20:05:42 +01:00
Alex Bates a4124f61d8 explain frontend dir 2021-07-04 09:14:30 +01:00