feat: Implement accessible SFTP file browser and native editor
This commit is contained in:
@@ -23,8 +23,11 @@ class _ConnectionViewState extends ConsumerState<ConnectionView> {
|
||||
// Listen for global connection errors (e.g. lost connection)
|
||||
ref.listen<String?>(connectionErrorProvider, (previous, next) {
|
||||
if (next != null) {
|
||||
_showErrorDialog(next);
|
||||
ref.read(connectionErrorProvider.notifier).state = null;
|
||||
SemanticsService.sendAnnouncement(
|
||||
View.of(context),
|
||||
next,
|
||||
TextDirection.ltr,
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -252,6 +255,7 @@ class _NewConnectionFormState extends ConsumerState<NewConnectionForm> {
|
||||
}
|
||||
|
||||
Future<void> _pickKeyFile() async {
|
||||
final view = View.of(context);
|
||||
try {
|
||||
FilePickerResult? result = await FilePicker.platform.pickFiles(
|
||||
type: FileType.any, // SSH keys often have no extension or .pem/.key
|
||||
@@ -265,7 +269,11 @@ class _NewConnectionFormState extends ConsumerState<NewConnectionForm> {
|
||||
_privateKeyContent = content;
|
||||
_privateKeyName = file.name;
|
||||
});
|
||||
SemanticsService.announce('Key selected: ${file.name}', TextDirection.ltr);
|
||||
SemanticsService.sendAnnouncement(
|
||||
view,
|
||||
'Key selected: ${file.name}',
|
||||
TextDirection.ltr,
|
||||
);
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
|
||||
Reference in New Issue
Block a user