implement file encryption key inputs

This commit is contained in:
marlon-erler
2026-08-29 23:51:38 +02:00
parent f5ce48a485
commit 7aee3742ba
4 changed files with 108 additions and 34 deletions
@@ -51,6 +51,9 @@ export default class FileTransferViewModel extends Context {
),
);
exportKey: React.State<string> = new React.State("");
exportKeyConfirmation: React.State<string> = new React.State("");
// guards
hasNoPathsSelected: React.State<boolean> = React.createProxyState(
[this.selectedPaths],
@@ -63,6 +66,12 @@ export default class FileTransferViewModel extends Context {
this.receivingTransferChannel.value == "" ||
this.receivingTransferKey.value == "",
);
cannotExport: React.State<boolean> = React.createProxyState(
[this.exportKey, this.exportKeyConfirmation],
() =>
this.exportKey.value == "" || this.exportKey.value != this.exportKeyConfirmation.value
);
// handlers
handleReceivedFile = (path: string): void => {