Commit graph

89 commits

Author SHA1 Message Date
Pat Hartl
b8cba6b024 Use observable collection for chat messages 2026-04-12 20:00:44 -05:00
Pat Hartl
afa20bee72 Merge branch 'avalonia-launcher' 2026-04-10 01:52:20 -05:00
Pat Hartl
0ab6ee5262 Basic chat window 2026-04-07 23:10:45 -05:00
akifreak
80bb5d59ee Replace var with const/let and remove unused variable in ChunkUploader
- var request and var response in Init() → const (never reassigned,
  var is function-scoped and hoisted which is undesirable in class methods)
- let formData in UploadChunk() → const (never reassigned)
- chunkResponse in UploadChunk() removed (assigned but never read)
- let start in GetChunks() → const (never reassigned)
- var percent in UpdateProgressBar() → const (never reassigned)
2026-04-04 15:05:06 +02:00
akifreak
7dbb1b7619 Remove unused UploadInitResponse import from ChunkUploader 2026-04-04 15:05:06 +02:00
akifreak
4065232e61 Null-guard progress bar DOM elements in UpdateProgressBar
document.querySelector() can return null if the elements are not
yet in the DOM. Dereferencing null would throw inside the axios
onUploadProgress callback, which is caught by UploadChunk's catch
and re-thrown as a string - causing the whole upload to fail
silently with an undefined message.
2026-04-04 15:05:06 +02:00
akifreak
9882f14d04 Fix undefined error message when UploadChunk throws a string
UploadChunk throws a template literal string, not an Error object.
Accessing .message on a string primitive returns undefined, so
JSOnUploadError was always called with undefined and the server log
showed no useful detail. Use String(ex) as fallback so the message
is always populated.
2026-04-04 15:05:06 +02:00
akifreak
a439cf5638 Propagate init net failure instead of swallowing
The original catch block was simply swalloing errors instead of
propagating them upwards.
When the /api/Upload/Init request failed it set this.Key = null, logged
to the console, and returned normally. From the caller's perspective
Init() had succeeded.

Start() in the Blazor component then called Upload() immediately after,
which proceeded with this.Key = null. Every chunk was sent to the server
with a null key, the server returned 400 for each one, each UploadChunk
call threw, and the whole upload failed - but only after sending every
chunk, and only with the opaque "Error uploading chunk N/M" message
rather than anything pointing at the actual cause.

By removing the catch, an axios error in Init() propagates up through
the JS interop call InvokeVoidAsync("Init", ...) in Start(). That throws
a JSException in C#, Start() exits immediately before Upload() is ever
called, and the finally block resets Uploading so the UI recovers. The
user gets a failure where it actually happened.
2026-04-04 15:02:46 +02:00
akifreak
910504b7df Remove leftover debugger statement from ChunkUploader.Init 2026-04-03 21:22:22 +02:00
akifreak
a7bd41ff9d Fix game archive upload in web ui
bundle.js is built by webpack as an ES module (output.library.type:
'module'), ending with named exports such as:

  export { Be as ChunkUploader, s as InfiniteScroll, ... }

All three inclusion sites (App.razor, _Layout.cshtml,
ScriptLoader.razor) loaded it via a plain <script> tag, which is for
classic scripts only and does not support the 'export' keyword.

Edge throws a visible SyntaxError and uploading does not work.

Fixed by adding type="module" to the bundle.js script tag in all three
locations.
2026-04-03 21:21:40 +02:00
Pat Hartl
7cc857bcc8 Fix script editor bindings, update BlazorMonaco 2026-03-20 00:01:12 -05:00
Pat Hartl
1b21c77fe5 Make ArchiveId nullable for file pickers 2026-02-07 19:19:33 -06:00
Pat Hartl
3dc5e8010d Fix file manager styling 2026-01-24 23:02:54 -06:00
Pat Hartl
77ad9b9c53 Add component for better Not Found message 2026-01-18 02:09:07 -06:00
Pat Hartl
4086cbaeeb Update read status when sending message, scroll to bottom on new message, merge message into group if gap < 5 mins 2026-01-11 21:21:12 -06:00
Pat Hartl
66abc6e59e Implement infinite loading with chat thread
- Chat messages are now loaded based on scroll position
- Read status is now updated and set by last message read
- Reworked script importing by using ScriptProvider
2026-01-11 14:38:24 -06:00
Pat Hartl
8bf006b1a4 Refactor TS to classes, remove factory in place of static Create factory method, rework module importing 2026-01-07 18:25:17 -06:00
Pat Hartl
fbcb02a863 Move useful terminal methods to component, remove old addon registration 2026-01-03 23:58:50 -06:00
Pat Hartl
eda3a8e7bc Fix infinite loader namespace 2026-01-03 23:22:35 -06:00
Pat Hartl
2d95541942 Remove overload for GetMessages 2026-01-03 23:22:25 -06:00
Pat Hartl
9b515623df Extend XtermBlazor to load addons 2026-01-03 18:27:26 -06:00
Pat Hartl
e85eeb01db Fix bundling, JS interop initialization 2026-01-03 18:26:30 -06:00
Pat Hartl
76b37fc46b Fix SplitPane factory 2026-01-03 15:57:01 -06:00
Pat Hartl
40871e24aa WIP infinite loader component 2026-01-03 15:53:17 -06:00
Pat Hartl
7f21a1846f Refactor split pane as JS module 2026-01-03 15:52:09 -06:00
Pat Hartl
6021eca118 Refactor time provider as JS module 2026-01-03 15:51:47 -06:00
Pat Hartl
1e1fa1713d Refactor chunk uploader as JS module 2026-01-03 15:51:21 -06:00
Pat Hartl
81685f2da7 Style chat component 2026-01-02 02:10:42 -06:00
Pat Hartl
e1c1469614 Fix chat component rendering
- Load thread after creation
- Change thread list from DataList to Flex
- Move unread badge to right side of chat thread list item
- Fix avatar rerendering after another message is added to message group
- Add styling to thread list
- Change message input to support markdown and add markdown rendering for message contents
2025-12-30 18:08:20 -06:00
Pat Hartl
83ff6a8237 Separate SignalR chat client from RPC client. Create abstraction for getting server address. Implement server-side chat client. 2025-12-23 21:12:06 -06:00
Pat Hartl
77f0e47e47 Make sure list of participants is populated 2025-12-22 21:12:19 -06:00
Pat Hartl
fc397fc6e8 Add MouseArea component 2025-12-22 21:11:58 -06:00
Aaron Powell
5b0368bf7a Changing how null is detected and handled
Using the required keyword to indicate what is expected to be passed to the components in the stack.

Looking through the usage, only the Values property can come through as null, everything else is set to something that should never be nullable (and then, if it is, it should be considered a proper error to resolve).
2025-12-17 14:50:05 +11:00
Pat Hartl
9bbac6e2fa Fix null values for tag inputs 2025-12-16 19:02:35 -06:00
Pat Hartl
17fa802c19 Implementation of script debugger component with RPC via SignalR 2025-12-10 20:55:38 -06:00
Pat Hartl
f733fc274a Fix tag input 2025-12-06 19:28:04 -06:00
Pat Hartl
0889d6c9d4 Fix spacing in data table 2025-11-18 01:14:24 -06:00
Pat Hartl
4213c2629f Fix file manager styling 2025-11-17 22:14:29 -06:00
Pat Hartl
a506a67ccd Fix validation message for chat input 2025-11-13 23:40:12 -06:00
Pat Hartl
4db6215aec Use splitter for chat 2025-11-13 23:39:55 -06:00
Pat Hartl
0f231e2ecf Fix default icon for chat thread 2025-11-13 21:04:48 -06:00
Pat Hartl
d6747198c3 Fix null reference 2025-11-13 21:04:39 -06:00
Pat Hartl
c921da512b Add error message when message fails to send 2025-11-13 21:04:31 -06:00
Pat Hartl
3e428a1f92 Properly pass result on dialog OK 2025-11-13 18:18:03 -06:00
Pat Hartl
4535d9891a Add chat read status, badges to avatars, avatars for groups 2025-11-12 18:26:25 -06:00
Pat Hartl
f2585b60bc Open users dialog with data, use DataList 2025-11-11 01:10:05 -06:00
Pat Hartl
f03ef2bd02 Fix avatar styling 2025-11-11 01:09:29 -06:00
Pat Hartl
ab006b0012 Fix styling for data list 2025-11-11 01:09:18 -06:00
Pat Hartl
005041b518 Specify radio type 2025-11-10 19:20:34 -06:00
Pat Hartl
328967c553 Specify item type 2025-11-10 18:10:57 -06:00