Commit Graph

157 Commits

Author SHA1 Message Date
Pikterra32
2377e4aceb
Add french (#22)
* Create fr-fr.json

* Update languages.json

* Update fr-fr.json

* Update fr-fr.json

* Update fr-fr.json

* Update fr-fr.json

* Update fr-fr.json

* Update fr-fr.json

* Update fr-fr.json
2024-04-09 18:17:54 -04:00
Elijah R
da202c549f add unfinished German translation using files from webapp v1 2024-04-09 17:27:51 -04:00
Elijah R
5ea1a67883 move @hcaptcha/types to devDependencies 2024-04-09 16:22:14 -04:00
Elijah R
dd01b84dd2 add link to contribute a language to the dropdown 2024-04-09 16:16:10 -04:00
Elijah R
6b4bf0de3d add language dropdown, remove pirate from list until we update it 2024-04-09 16:13:38 -04:00
Elijah R
9d60b44073 Fully implement i18n 2024-04-09 15:06:10 -04:00
Elijah R
24622e65eb fix localization typo 2024-04-09 11:52:33 -04:00
Elijah R
1a24bed775 add light mode toggle 2024-04-09 01:42:37 -04:00
Elijah R
ed35afba80
Merge pull request #21 from computernewb/account-auth
Add Account Authentication
2024-04-08 19:24:20 -04:00
Elijah R
ef93d5866f fix username colors 2024-04-08 00:31:57 -04:00
Elijah R
7c71bacef7 Merge branch 'master' into account-auth 2024-04-07 16:40:20 -04:00
Elijah R
53f75e5601 we don't need that anymore, parcel bug has been patched 2024-04-07 16:38:35 -04:00
Elijah R
70a2f9cc4e allow the client to request its preferred username even if webapp-wide auth is enabled since some VMs might not support auth 2024-04-07 14:39:38 -04:00
Elijah R
837a34d8cc implement password resets 2024-04-05 20:05:49 -04:00
Elijah R
29fcfbcc7c remove (bg|text)-* from account modal 2024-04-05 17:37:54 -04:00
Elijah R
c8b7b3e00a dogok banned for cause merge conflict 2024-04-05 17:32:16 -04:00
Elijah R
d2206ff547 implement date of birth 2024-04-05 17:26:24 -04:00
dakrk
e1b8bfcebb
Actually do bootstrap theme properly
why was it like this in the first place

(i ought to just complete the bootstrapless branch at this point)
2024-04-05 17:27:53 +01:00
dakrk
d3ad9a3585
Indent CSS
some things aren't. WHY
2024-04-05 17:20:30 +01:00
dakrk
52499b8c6e
Introduce editorconfig 2024-04-05 17:18:51 +01:00
dakrk
72d0cbb37b
Fix indentation (consistent formatting CHALLENGE)
You people have a prettierrc yet never run prettier

tabs or spaces. WHICH IS IT
2 width or 4 width WHICH IS IT

(i'd make index.html 4 width tab but there's more that uses space there)
2024-04-05 17:16:20 +01:00
Elijah R
54255cc118 implement account authentication (webapp) 2024-04-05 09:11:21 -04:00
modeco80
999bdd0809 format fixes and unittest additions, translated document title
We also actually use our format utilities to set the title.
2024-03-16 18:57:19 -04:00
modeco80
0cef7194ce More i18n related updates
- More string keys
- Reworked string keys entirely
- Moved formatting into seperate typescript module
- Write unit tests using `jest` for the format module
- README improvements

Pirate language needs to be reworked and it should be a bit less painful now to actually add more string keys later on (eventually making the whole webapp strings lie inside the stringkeys)
2024-03-15 04:01:40 -04:00
modeco80
3a7e590797 Make i18n more robust to failure
Now we actually format the fallback key if we can't find the language's translation of a string key.

In the rare case that the fallback language actually doesn't have a key, we just return the key name and a little notice that something's gone wrong.

Local storage stuff is now handled by our i18n impl (upon setting a language, if it's not the fallback language, we'll write it to localstorage automatically so we remember the user's decision), just to cleanup the initalization in main.ts (and also because it's a bit simpler that way).

Also moved initalization to a DOMContentLoaded event, since that can be made async.
2024-03-13 21:55:01 -04:00
modeco80
6327036283 Implement basic i18n
Not fully functional yet, so this won't/shouldn't be pushed onto the site yet (no language dropdown, there are still quite a few hardcoded strings that need to become string keys ...) but it works more than well enough to at least test and add more things as string keys that are currently hardcoded.

There are two languages provided, "en-us" and "pirate". Pirate is a test language to make sure all string keys are applying properly and all that.

As a bonus the new I18n system also offers a slightly less boneheaded way to do replacements, which is much more flexible than blind replace calls, and can take any type which is able to be stringified.

The parsing code for this is far from my best work, but it'll do for now, and seems to work okay (and has basic idiot proofing), so eh.

Supersedes #13.
2024-03-12 06:45:03 -04:00
modeco80
7691b84073 add Permissions#set
This avoids constructing a Permissions just to reset it, when we can just set it to nothing

Also contains some var->let or var->const work
2024-03-12 03:02:02 -04:00
modeco80
acd2b949b8 make AdminOpcode enum numbers
Thanks to previous work they will be converted to a string anyways, so they need not be strings here.
2024-03-12 02:53:53 -04:00
modeco80
cfed6dbfa3 oops 2024-03-12 02:14:12 -04:00
modeco80
2661a1a142 Remove "new Promise" hoisting in most cases in main.ts
Not actually needed (and in most cases, the inner lambda was `async` colored anyways, so why not just async color the function itself?)
2024-03-12 01:44:04 -04:00
modeco80
125e6a769d reformat typescript code with prettier
Mostly just for nicity. I did manually clean up a few things, but other than that, this basically was just importing configs from cvm3/crusttest, adding prettier as a dev dependency, and just ctrl-shift-I on every typescript file part of the codebase
2024-03-12 01:28:23 -04:00
modeco80
6dc3ba20af Remove most "as" casting
Since the places where this was being done actually typecheck now (thanks mostly to the nanoevent interfaces), we no longer need wonky "as U" casts anymore!
2024-03-12 01:18:39 -04:00
modeco80
4561eb1f63 Use nanoevents typing where possible
(this also fixes the use of a generic function type, where Nanoevents explciitly provides a cleaner type alias)
2024-03-12 00:10:24 -04:00
modeco80
3b4891c0a7 ok thank you javascript for not being a half baked language at all 2024-03-11 23:47:49 -04:00
modeco80
4dd5c42d55 Make CollabVMClient#send use typescript magic to allow passing any type
This allows passing any type (though practically, this is only ever going to include numbers) into it. This removes the need to constantly .toString() (though booleans are still kind of awful, but I guess we could factor that out somehow)
2024-03-11 23:40:43 -04:00
modeco80
72f321f689 Make admin opcodes a enum
just for typesafety. we're on typescript after all
2024-03-11 23:28:37 -04:00
modeco80
b59ebe2466 implement mouse wheel handling and clean up mouse handling in general 2024-03-11 21:24:40 -04:00
Elijah R
f981a661da reset username color on vm close - resolves #19 2024-02-26 13:56:17 -05:00
Elijah R
20d268df21 re-add ctrl+alt+del button by popular request 2024-02-26 13:46:11 -05:00
Elijah R
5cbfe9f1b5
Add VM0 blur
this might not be the best way to do this. Maybe in the future ill add a config option to make some VMs nsfw. For now this is fine
2024-02-05 13:28:05 -05:00
Elijah R
edf56a5652 fix deployment to subdirectories 2024-02-04 13:26:02 -05:00
Elijah R
33c7fcb421 add mastodon link 2024-02-04 13:13:24 -05:00
Elijah R
27e469a233 update README 2024-02-04 13:11:50 -05:00
Elijah R
6a1d2bef7b disable sourcemaps for production builds 2024-02-04 13:02:45 -05:00
Elijah R
468bfe1748 add localstorage usernames 2024-02-04 13:02:45 -05:00
Elijah R
63902f6cdb fix logging in as mod 2024-02-04 13:02:45 -05:00
Elijah R
b4d8bbcf28 color the username span on login 2024-02-04 13:02:45 -05:00
Elijah R
71587c3f58 bump v 2024-02-04 13:02:45 -05:00
Elijah R
d1c8c5ae9a implement xss, properly hide things on vm close 2024-02-04 13:02:45 -05:00
Elijah R
bb803f57a8 add welcome modal 2024-02-04 13:02:45 -05:00