mirror of
https://github.com/Stone-Red-Code/Markdowser.git
synced 2026-09-04 00:56:13 +02:00
Fix toggle sidebar keybinding and disable content panel when laoding
This commit is contained in:
@@ -188,6 +188,12 @@ public partial class MainWindowViewModel : ViewModelBase
|
||||
|
||||
private void FetchUrl()
|
||||
{
|
||||
if (IsBusy)
|
||||
{
|
||||
WindowNotificationManager.Show(new Notification("Busy", "The browser is currently busy.", NotificationType.Warning));
|
||||
return;
|
||||
}
|
||||
|
||||
if (string.IsNullOrWhiteSpace(Url))
|
||||
{
|
||||
Content = DefaultContent;
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
<KeyBinding Gesture="Alt+Right" Command="{Binding Forward}" />
|
||||
<KeyBinding Gesture="Ctrl+T" Command="{Binding NewTab}" />
|
||||
<KeyBinding Gesture="Ctrl+W" Command="{Binding CloseTab}" />
|
||||
<KeyBinding Gesture="Alt+S" Command="{Binding ShowSidePanel}" />
|
||||
<KeyBinding Gesture="Alt+S" Command="{Binding ToggleSidePanel}" />
|
||||
</Window.KeyBindings>
|
||||
|
||||
<Grid RowDefinitions="Auto, *, Auto">
|
||||
@@ -78,14 +78,14 @@
|
||||
</Grid>
|
||||
|
||||
<Border Grid.Row="2" BorderThickness="0 2 0 0" CornerRadius="0" BorderBrush="{DynamicResource SemiColorTertiary}">
|
||||
<Grid ColumnDefinitions="Auto, Auto, Auto, Auto, *, Auto">
|
||||
<Grid IsEnabled="{Binding !IsBusy}" ColumnDefinitions="Auto, Auto, Auto, Auto, *, Auto">
|
||||
<Button Grid.Column="0" i:Attached.Icon="fa-solid fa-caret-left" IsEnabled="{Binding BackEnabled}" Command="{Binding Back}" />
|
||||
<Button Grid.Column="1" i:Attached.Icon="fa-solid fa-caret-right" IsEnabled="{Binding ForwardEnabled}" Command="{Binding Forward}" />
|
||||
<Button Grid.Column="2" i:Attached.Icon="fa-solid fa-rotate-right" Command="{Binding Browse}" />
|
||||
<Button Grid.Column="3" i:Attached.Icon="fa-solid fa-house" Command="{StaticResource HomeCommand}" />
|
||||
|
||||
<Grid Grid.Column="4">
|
||||
<TextBox x:Name="urlBar" IsVisible="{Binding !IsBusy}" Watermark="Search DuckDuckGo or type a URL" Text="{Binding Url}" BorderThickness="0">
|
||||
<TextBox IsVisible="{Binding !IsBusy}" Watermark="Search DuckDuckGo or type a URL" Text="{Binding Url}" BorderThickness="0">
|
||||
<TextBox.KeyBindings>
|
||||
<KeyBinding Gesture="Enter" Command="{Binding Browse}" />
|
||||
</TextBox.KeyBindings>
|
||||
|
||||
Reference in New Issue
Block a user