mirror of
https://github.com/Stone-Red-Code/Markdowser.git
synced 2026-09-04 09:06:15 +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()
|
private void FetchUrl()
|
||||||
{
|
{
|
||||||
|
if (IsBusy)
|
||||||
|
{
|
||||||
|
WindowNotificationManager.Show(new Notification("Busy", "The browser is currently busy.", NotificationType.Warning));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (string.IsNullOrWhiteSpace(Url))
|
if (string.IsNullOrWhiteSpace(Url))
|
||||||
{
|
{
|
||||||
Content = DefaultContent;
|
Content = DefaultContent;
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
<KeyBinding Gesture="Alt+Right" Command="{Binding Forward}" />
|
<KeyBinding Gesture="Alt+Right" Command="{Binding Forward}" />
|
||||||
<KeyBinding Gesture="Ctrl+T" Command="{Binding NewTab}" />
|
<KeyBinding Gesture="Ctrl+T" Command="{Binding NewTab}" />
|
||||||
<KeyBinding Gesture="Ctrl+W" Command="{Binding CloseTab}" />
|
<KeyBinding Gesture="Ctrl+W" Command="{Binding CloseTab}" />
|
||||||
<KeyBinding Gesture="Alt+S" Command="{Binding ShowSidePanel}" />
|
<KeyBinding Gesture="Alt+S" Command="{Binding ToggleSidePanel}" />
|
||||||
</Window.KeyBindings>
|
</Window.KeyBindings>
|
||||||
|
|
||||||
<Grid RowDefinitions="Auto, *, Auto">
|
<Grid RowDefinitions="Auto, *, Auto">
|
||||||
@@ -78,14 +78,14 @@
|
|||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<Border Grid.Row="2" BorderThickness="0 2 0 0" CornerRadius="0" BorderBrush="{DynamicResource SemiColorTertiary}">
|
<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="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="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="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}" />
|
<Button Grid.Column="3" i:Attached.Icon="fa-solid fa-house" Command="{StaticResource HomeCommand}" />
|
||||||
|
|
||||||
<Grid Grid.Column="4">
|
<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>
|
<TextBox.KeyBindings>
|
||||||
<KeyBinding Gesture="Enter" Command="{Binding Browse}" />
|
<KeyBinding Gesture="Enter" Command="{Binding Browse}" />
|
||||||
</TextBox.KeyBindings>
|
</TextBox.KeyBindings>
|
||||||
|
|||||||
Reference in New Issue
Block a user