Remove KeyboardInputComponent and add file upload and WebSocket support

Deleted unused `KeyboardInputComponent`. Added file upload functionality to `MainView` with WebSocket event handling. Introduced `WebsocketClient` class for managing server connection and file transmission. Enhanced `KeyboardComponent` with configurable key rounding. Updated `WebsocketHandler` for improved binary message handling and storage.
This commit is contained in:
2025-06-10 21:08:00 +02:00
parent 8ee8f17f96
commit 5da8424c40
7 changed files with 404 additions and 237 deletions

View File

@@ -38,6 +38,7 @@ class KeyboardComponent(
initialOctave: Int = 4,
val keyboardWidth: Int = 210,
val keyboardHeight: Int = keyboardWidth / 2,
val rounding: Int = 4,
val onNoteDown: (Int) -> Unit = {},
val onNoteUp: (Int) -> Unit = {}
) : Komponent() {
@@ -222,7 +223,7 @@ class KeyboardComponent(
0,
whiteKeyWidth,
keyboardHeight,
0,
rounding,
if (isPressed) WhiteKeyPressedCls.name else WhiteKeyCls.name
)
}
@@ -238,7 +239,7 @@ class KeyboardComponent(
0,
blackKeyWidth,
blackKeyHeight,
0,
rounding,
if (isPressed) BlackKeyPressedCls.name else BlackKeyCls.name
)
}