Files
wehub-resource-sync bb087aad19
CI / format (push) Failing after 2s
CI / packaging (push) Failing after 0s
CI / test (push) Failing after 3s
chore: import upstream snapshot with attribution
2026-07-13 11:58:56 +08:00

28 lines
992 B
Dart

import 'package:dart_mappable/dart_mappable.dart';
import 'package:localsend_app/model/state/send/web/web_send_file.dart';
import 'package:localsend_app/model/state/send/web/web_send_session.dart';
part 'web_send_state.mapper.dart';
@MappableClass()
class WebSendState with WebSendStateMappable {
final Map<String, WebSendSession> sessions; // session id -> session data, also includes incoming requests
final Map<String, WebSendFile> files; // file id as key
final bool autoAccept; // automatically accept incoming requests
final String? pin;
final Map<String, int> pinAttempts; // IP address -> attempts (will be reset on session end)
const WebSendState({
required this.sessions,
required this.files,
required this.autoAccept,
required this.pin,
required this.pinAttempts,
});
@override
String toString() {
return 'WebSendState(sessions: $sessions, files: <${files.keys}>, autoAccept: $autoAccept, pin: $pin, pinAttempts: $pinAttempts)';
}
}