Commit Graph

1225 Commits

Author SHA1 Message Date
KernelDeimos
522664d415 feat(backend): allow services to provide user properties 2024-05-31 18:10:11 -04:00
KernelDeimos
71e2310fa4 tweak(ui): expose UIAlert to service scripts 2024-05-31 18:09:15 -04:00
KernelDeimos
d2b37fc436 tweak(ui): fix NotifCard accessing on_click 2024-05-31 18:03:45 -04:00
Nariman Jelveh
e6e058c0a0 Update UIContextMenu.js 2024-05-31 10:58:18 -07:00
Sam Atkins
6de4c89c25 refactor(phoenix): Combine similar sed command classes
These make more sense combined into one Command which is controlled by
constructor parameters:

- b, t and T
- d and D
- g and G
- h and H
- p and P
2024-05-31 15:49:32 +01:00
Sam Atkins
0d4f907b66 feat(phoenix): Implement parsing of sed scripts
Sed is now finally able to actually run scripts, instead of ignoring all
input and running a hard-coded test script!
2024-05-31 15:49:32 +01:00
Sam Atkins
e047b0bf30 fix(phoenix): Add missing newlines to sed command output 2024-05-31 15:49:32 +01:00
Sam Atkins
f250f86446 feat(phoenix): Add --dump and --file options to sed 2024-05-31 15:49:32 +01:00
Sam Atkins
4067c82486 feat(phoenix): Expose parsed arg tokens to apps that request them
Some shell apps care about what order the arguments appear in. When
`parseArgs()` is called with `tokens: true`, it produces this `tokens`
array which represents all the command line options and arguments, in
order, which is useful for these more advanced cases.
2024-05-31 15:49:32 +01:00
Sam Atkins
306014adc7 feat(phoenix): Add more commands to sed, including labels and branching
This is ported over from an old forgotten branch I'd deleted, then
thankfully managed to dig up again. 😅

Instead of making GroupCommand contain child commands, use a flat array
for commands and implement groups as GroupStartCommand and
GroupEndCommand. This makes it much simpler to iterate the commands
list in order to jump to labels.

Then implement those labels and the commands that use them: b, t, and T.

Also add the s SubstituteCommand, and combine the code for the q and Q
commands.
2024-05-31 15:49:32 +01:00
Sam Atkins
6aae8fc63b refactor(phoenix): Split up sed code
Let's organise this a bit.
2024-05-31 15:49:32 +01:00
Sam Atkins
9b4d16fbe9 fix(parsely): Make Repeat parser work when no separator is given 2024-05-31 15:49:32 +01:00
Sam Atkins
d46b043c5d feat(parsely): Add stringUntil() parser
The counterpart of stringOf(), it reads characters until it matches its
parameter.
2024-05-31 15:49:32 +01:00
Sam Atkins
5656d9d42f feat(parsely): Add a fail() parser
I've found this useful for stubbing out parts of a grammar during
development.
2024-05-31 15:49:32 +01:00
Nariman Jelveh
c9a43ce5c0 Update UIContextMenu.js 2024-05-30 18:16:32 -07:00
Nariman Jelveh
7c8492ba43 Fix the issue of checkmark's wrong color in ctx menu disabled items on hover 2024-05-30 17:09:18 -07:00
Nariman Jelveh
16d5ac6abb Delay opening the submenu for smoother mouse navigation on the menu 2024-05-30 15:24:50 -07:00
Nariman Jelveh
a8515e0a41 Switch font to Inter 🎉 2024-05-30 15:14:25 -07:00
KernelDeimos
fccabf1bc0 feat(backend): allow services to provide whoami values 2024-05-30 17:11:06 -04:00
Eric Dubé
dd1d129693
Merge pull request #444 from HeyPuter/eric/ui-updates
UI Updates
2024-05-30 16:48:28 -04:00
KernelDeimos
124596058a feat(ui): allow component-based settings tabs 2024-05-30 16:14:32 -04:00
KernelDeimos
be38df32ec tweak(ui): allow setting render more for JustHTML 2024-05-30 16:14:32 -04:00
KernelDeimos
577bd59b6c feat(ui): add new components
This commit adds the following components:
- ActionCard
- Frame
- NotifCard
2024-05-30 16:14:32 -04:00
KernelDeimos
f8780d032b fix(ui): improve Component base class
The following improvements were made:
- do not require empty object in constructor
- allow components to override render mode based on constructor values
- improve error handling in get()
- allow array of property names in on_ready()->listen()
- allow components to be attached to shadow roots
2024-05-30 16:07:16 -04:00
KernelDeimos
38ba42575c feat(ui): add new components
This commit adds the following components:
- Glyph
2024-05-30 16:04:52 -04:00
Nariman Jelveh
60f0ade3c1 Improve the UX of the menubar and context menu 2024-05-30 13:02:00 -07:00
KernelDeimos
8e083d20d2 tweak(ui): allow size changing on spinner 2024-05-30 15:59:05 -04:00
Eric Dubé
a62a56fd7b
Merge pull request #413 from AtkinsSJ/extract-posix-error
refactor: Move PosixError class where it can be accessed outside of Phoenix
2024-05-30 12:43:41 -04:00
Eric Dubé
895358e6e5
Merge pull request #423 from AtkinsSJ/parsely
Tidy up "newparser" so it can be used properly
2024-05-30 12:42:03 -04:00
Eric Dubé
d57980c6cb
Merge pull request #421 from AtkinsSJ/exit-status
Add exit status codes to `puter.exit()`, and an `exit` builtin to Phoenix
2024-05-30 12:28:36 -04:00
Eric Dubé
0672562c8a
Merge pull request #442 from HeyPuter/eric/extensibility
class registry for service scripts
2024-05-28 20:10:03 -04:00
KernelDeimos
d047abf31c Update eslint 2024-05-28 19:06:00 -04:00
KernelDeimos
e050506a05 Add class registry (second pass)
ExportService gets removed and instead a global class registry is added.
The `init.js` file is split into `init_sync.js` and `init_async.js`
so that synchronous code that isn't dependent on imports is guarenteed
to run before initgui.js. The globalThis scope and service-script API
now expose `def`, a function for registering class definitions, and
`use`, a function for obtaining registered classes.
2024-05-28 19:06:00 -04:00
KernelDeimos
cd574c87ef Fix the previous fix 2024-05-28 16:10:43 -04:00
KernelDeimos
4e3a24e609 fix: check subdomain earlier for /apps 2024-05-28 15:51:22 -04:00
Eric Dubé
c495ccff65
Merge pull request #408 from AtkinsSJ/git-client
Add a git client
2024-05-28 12:10:01 -04:00
KernelDeimos
51bac4486f Add class registry (first pass)
In the first pass I add a `register` method and update `defineComponent`
so it calls `register` as well. This made it possible to create a
proof-of-concept for registered classes. Additionally ExportService was
added to expose registered classes to service scripts. This first pass
works, but it would be better if all types of classes (components or
otherwise) were registered via the same method.
2024-05-27 21:16:50 -04:00
Eric Dubé
146ce659e2
Merge pull request #434 from HeyPuter/eric/get-user-service
refactor: add GetUserService
2024-05-26 00:44:03 -04:00
KernelDeimos
c0cb1cd2b8 refactor: add GetUserService 2024-05-26 00:31:51 -04:00
Eric Dubé
f4d41891d9
Merge pull request #426 from HeyPuter/eric/service-scripts
refactor(gui): add service scripts
2024-05-25 17:35:55 -04:00
KernelDeimos
06f41659f5 Add function to import UIWindow from service scripts 2024-05-25 17:20:22 -04:00
KernelDeimos
cbfad2ef7a refactor(gui): add service scripts 2024-05-24 19:29:07 -04:00
Eric Dubé
8de94d3f1c
Merge pull request #422 from HeyPuter/eric/gui-loading
GUI loading refactor + service-registered gui scripts
2024-05-24 17:42:14 -04:00
Eric Dubé
f20870544d
Update docker-image.yaml 2024-05-24 16:53:13 -04:00
Eric Dubé
4d91ef14f4
Update docker-image.yaml 2024-05-24 16:49:43 -04:00
Eric Dubé
6ed9f0a01d
Update docker-image.yaml 2024-05-24 16:41:20 -04:00
Eric Dubé
94e9f8fd34
Update docker-image.yaml 2024-05-24 16:37:01 -04:00
Eric Dubé
fc51424f86
Merge pull request #332 from HeyPuter/release-please--branches--main--components--puter.com
chore(main): release 1.0.0
2024-05-24 16:25:34 -04:00
github-actions[bot]
5146dc4981 chore(main): release 2.3.0 2024-05-24 16:22:55 -04:00
Sam Atkins
03123faa8a Finish concept JSON parser
This now can parse JSON correctly in various configurations.
2024-05-24 16:23:26 +01:00