Commit Graph

614 Commits

Author SHA1 Message Date
Peter Dave Hello
1aeedd8696 Add a simple Traditional Chinese translation 2024-04-11 20:03:13 +08:00
KernelDeimos
09bf422686 Add session manager ui 2024-04-11 00:29:39 -04:00
KernelDeimos
18b3e06fe8 Add session listing and revocation 2024-04-10 23:00:37 -04:00
KernelDeimos
e436693d3e Improve session mgmt (part 1) 2024-04-10 21:54:16 -04:00
KernelDeimos
eb66848aee Update database version when creating a new one 2024-04-10 12:25:44 -04:00
KernelDeimos
0eded34c8c Add indented logs and fix a bug 2024-04-10 12:22:21 -04:00
KernelDeimos
367c18bfc5 Add endpoint to list permissions 2024-04-10 12:16:08 -04:00
Eric Dubé
92dc0a7671
Merge pull request #255 from AtkinsSJ/appconnection-close
Notify apps when a child app closes, and let them close their children manually
2024-04-09 21:31:48 -04:00
Eric Dubé
8e553b4ee0
Merge pull request #252 from AtkinsSJ/broadcasts
Add a message broadcasting system
2024-04-09 21:29:46 -04:00
Sam Atkins
21c64e827b Add closeApp message
Sending a 'closeApp' message allows an app to close a target app, if it
has permission to do so. Currently, permission is granted if the
requesting app is the parent of the target app, or has godmode set.
2024-04-09 16:09:12 +01:00
Sam Atkins
c69a0abfa9 Extract a window_for_app_instance() helper function 2024-04-09 15:55:14 +01:00
Sam Atkins
cce6531d45 Notify parents/children when an app closes
Send an appClosed message with the instance ID of the app that was
closed. This will be picked up by Puter.js's AppConnection and reported
as a 'close' event.

To make this work, a `data-parent_instance_id` attribute is set on child
app windows. This is very similar to the `data-parent_uuid` attribute,
which tracks parent windows instead of parent app instances. (Dialogs
have a parent window, but are not apps, so don't have a parent app
instance.) The difference is subtle, and we may want to combine these in
the future, but currently closing an app will close any child windows,
which is not behaviour we want for child apps.
2024-04-09 15:55:14 +01:00
Sam Atkins
84a31b3520 Broadcast when the language changes
This is left open to future additions, by naming it 'locale', and having
the language just be an object field.

Side note, maybe we should have a LocaleService for this?
2024-04-09 10:44:51 +01:00
Sam Atkins
59cdb6e8c6 Broadcast when theme changes 2024-04-09 10:44:51 +01:00
Sam Atkins
068e620249 Add a message broadcasting service
A broadcast is a message sent to every running app that uses Puter.js.
Broadcasts have a name and a data payload, and are sent as a 'broadcast'
message.

Send a broadcast using:
`globalThis.services.get('broadcast').sendBroadcast(...)`

When doing so, you have the option to keep the broadcast message around,
so that it can be sent to any newly-launched apps. Sending another
broadcast with the same name will overwrite the previous one, so you
don't have to worry about flooding a new app with duplicates.
2024-04-09 10:44:51 +01:00
Aya Moosa
80aa87023e working white text, not perfect with all colors 2024-04-08 22:01:00 -07:00
Aya Moosa
626d63c91d working white text, not perfect with all colors 2024-04-08 22:00:12 -07:00
Aya Moosa
5bf0411015 got white text working, restets when other silders are used 2024-04-08 21:24:24 -07:00
Aya Moosa
b2fcb8d104 started light text for color 2024-04-08 15:59:12 -07:00
KernelDeimos
79f98795c7 Fix version checker using later javascript features 2024-04-08 17:05:47 -04:00
Eric Dubé
24ad365047
Merge pull request #253 from AtkinsSJ/bad-config-login-error
Add an error message when login fails because of domain misconfiguration
2024-04-08 12:23:31 -04:00
Eric Dubé
72286fd642
Merge pull request #249 from AtkinsSJ/service-copyrights
Add some missing copyright notices
2024-04-08 12:22:15 -04:00
Mohamed Elashri
a0f46c326a
Add build stage and remove linux/arm/v7 2024-04-08 17:12:26 +02:00
Sam Atkins
b1f2750cdb Add an error message when login fails because of domain misconfiguration
Previously, we just output whatever err.responseText was. However, that
has some downsides:

- If there's no responseText (as for when we can't find the domain) then
  the user gets a blank message.
- If it's a 404 error, the responseText includes the full HTML for
  Puter's 404 page, which we don't want to dump in the error box! This
  is unlikely to happen in practice, but was easy enough to cater for.

So, add a nicer message in those cases.

The misconfiguration message is taken from here:
https://github.com/HeyPuter/puter/issues/185#issuecomment-2037977592

Resolves #235.
2024-04-08 15:49:00 +01:00
Sam Atkins
8aee3f8174 Add some missing copyright notices 2024-04-08 11:10:39 +01:00
Nariman Jelveh
ea61799b3d
Merge pull request #240 from HeyPuter/eric/gui-personalization
Puter Theme Color Setting
2024-04-07 14:35:24 -07:00
KernelDeimos
b1e6e0c25a Fix i18n 2024-04-07 17:27:09 -04:00
KernelDeimos
f7916cfa74 Add option to reset colors 2024-04-07 17:19:47 -04:00
KernelDeimos
3f37ef2fad Fix i18n 2024-04-07 16:18:59 -04:00
KernelDeimos
3297940bab Improve dialog 2024-04-07 04:53:49 -04:00
KernelDeimos
821d33b8d8 Make opacity differences match prod 2024-04-07 04:39:08 -04:00
KernelDeimos
72129ca16f Make defaults consistent with original 2024-04-07 03:21:32 -04:00
KernelDeimos
12fa88b149 Save color settings 2024-04-07 03:15:45 -04:00
KernelDeimos
c83069bd03 Add i18n items 2024-04-07 02:53:33 -04:00
KernelDeimos
5661605884 Add ui colors to settings window 2024-04-07 02:53:05 -04:00
KernelDeimos
d1bbbb8e93 Use CSS variables 2024-04-07 02:34:04 -04:00
KernelDeimos
178f851684 Fix previous fix 2024-04-07 00:28:23 -04:00
KernelDeimos
cb4b8c5914 Add minor fixes 2024-04-07 00:06:11 -04:00
KernelDeimos
8018a607a8 Add CSS 2024-04-07 00:05:54 -04:00
KernelDeimos
dc5a7ca431 Display storage use of host/puter separately 2024-04-06 23:26:18 -04:00
Eric Dubé
95d33eab94
Merge pull request #238 from AtkinsSJ/app-ipc
Implement support for launching child apps, and IPC between a parent and its children
2024-04-06 07:51:17 -04:00
Sam Atkins
725cbf2e20 Add support for launching child apps
Calling `puter.ui.launchApp()` now treats the new app as a child of the
one that launched it.

A child app is given a `puter.parent_instance_id` URL param, containing
its parent's instance ID.

Previously, `launchApp()` would resolve as soon as the app was launched.
This commit changes that, so that it is notified after the child app
sends its READY event to Puter. This means that as soon as `launchApp()`
has completed, the child app is ready to receive messages. The downside
is that launching an app that does not include Puter.js will now not
cause a notification, so `await puter.ui.launchApp()` will not resolve
in that case.
2024-04-06 12:27:36 +01:00
KernelDeimos
674cebd9e1 Add Linux support to HostDiskUsageService 2024-04-06 05:33:46 -04:00
Eric Dubé
0dd66463df
Merge pull request #241 from vineeth-vk11/#233
Implementing HostDiskUsageService removing diskusage dependency
2024-04-06 05:29:21 -04:00
KernelDeimos
beeeb7bcbf Tiny fix 2024-04-06 05:08:38 -04:00
vineethvk11
bf4bc214b2 Implementing HostDiskUsageService removing diskusage dependency 2024-04-06 13:03:09 +05:30
KernelDeimos
b99534ebdf Add WIP color sliders 2024-04-06 02:35:06 -04:00
Eric Dubé
c6fb75c65f
Merge pull request #231 from HeyPuter/eric/user-to-user-permissions
User-to-User Permission Granting
2024-04-05 23:11:32 -04:00
KernelDeimos
38e8b19b50 Cleanup 2024-04-05 23:05:20 -04:00
KernelDeimos
90ce840234 Add revoke-user-user endpoint 2024-04-05 23:01:50 -04:00