diff --git a/Anamnesis/Files/FileBrowserView.xaml.cs b/Anamnesis/Files/FileBrowserView.xaml.cs index 3e2ae27fe..115b906d6 100644 --- a/Anamnesis/Files/FileBrowserView.xaml.cs +++ b/Anamnesis/Files/FileBrowserView.xaml.cs @@ -149,6 +149,15 @@ public EntryWrapper? Selected this.FileName = this.selected?.Name ?? string.Empty; } + if (this.selected != null && this.selected.Entry is IDirectory) + { + this.SelectButton.Text = LocalizationService.GetString("Common_OpenDir"); + } + else + { + this.SelectButton.Text = this.mode == Modes.Load ? LocalizationService.GetString("Common_OpenFile") : LocalizationService.GetString("Common_SaveFile"); + } + // show the options panel for the selected file type if (this.selected != null && this.selected.Entry is IFile file) { @@ -466,6 +475,12 @@ private async void OnSelectClicked(object? sender, RoutedEventArgs? e) } } + if (this.Selected != null && this.Selected.Entry is IDirectory dir) + { + this.CurrentDir = dir; + return; + } + this.CloseDrawer(); } diff --git a/Anamnesis/Languages/en.json b/Anamnesis/Languages/en.json index 1d5e4e5a5..28b703c84 100644 --- a/Anamnesis/Languages/en.json +++ b/Anamnesis/Languages/en.json @@ -1,6 +1,7 @@ { "Common_OpenFile": "Load", "Common_SaveFile": "Save", + "Common_OpenDir": "Open", "Common_Enable": "Enable", "Common_Disable": "Disable", "Common_None": "None",