2024-02-05 23:08:37 -08:00
|
|
|
<Window xmlns="https://github.com/avaloniaui"
|
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
2024-05-10 20:31:14 -07:00
|
|
|
xmlns:s="using:SourceGit"
|
2024-02-05 23:08:37 -08:00
|
|
|
xmlns:vm="using:SourceGit.ViewModels"
|
|
|
|
xmlns:m="using:SourceGit.Models"
|
|
|
|
xmlns:c="using:SourceGit.Converters"
|
|
|
|
xmlns:v="using:SourceGit.Views"
|
|
|
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
|
|
|
x:Class="SourceGit.Views.Launcher"
|
|
|
|
x:DataType="vm:Launcher"
|
|
|
|
x:Name="me"
|
|
|
|
Icon="/App.ico"
|
|
|
|
Title="SourceGit"
|
2024-03-14 03:23:36 -07:00
|
|
|
Background="Transparent"
|
2024-02-05 23:08:37 -08:00
|
|
|
MinWidth="1280" MinHeight="720"
|
|
|
|
WindowStartupLocation="CenterScreen"
|
2024-03-14 03:23:36 -07:00
|
|
|
ExtendClientAreaToDecorationsHint="True"
|
|
|
|
ExtendClientAreaChromeHints="NoChrome"
|
|
|
|
SystemDecorations="{OnPlatform Full, Linux=None}">
|
2024-03-11 03:29:42 -07:00
|
|
|
<Window.Resources>
|
|
|
|
<SolidColorBrush x:Key="SystemControlErrorTextForegroundBrush" Color="Red"/>
|
|
|
|
</Window.Resources>
|
|
|
|
|
2024-02-05 23:08:37 -08:00
|
|
|
<Grid Margin="{Binding #me.WindowState, Converter={x:Static c:WindowStateConverters.ToContentMargin}}">
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
<RowDefinition Height="{Binding #me.WindowState, Converter={x:Static c:WindowStateConverters.ToTitleBarHeight}}"/>
|
|
|
|
<RowDefinition Height="*"/>
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
2024-03-14 03:23:36 -07:00
|
|
|
<!-- Custom window shadow for Linux -->
|
|
|
|
<Border Grid.Row="0" Grid.RowSpan="2"
|
|
|
|
Background="{DynamicResource Brush.Window}"
|
|
|
|
Effect="drop-shadow(0 0 6 #A0000000)"
|
|
|
|
IsVisible="{OnPlatform False, Linux=True}"/>
|
|
|
|
|
|
|
|
<!-- Custom TitleBar -->
|
2024-02-05 23:08:37 -08:00
|
|
|
<Grid Grid.Row="0" ColumnDefinitions="Auto,*,Auto">
|
|
|
|
<!-- Bottom border -->
|
2024-03-07 19:13:53 -08:00
|
|
|
<Border Grid.Column="0" Grid.ColumnSpan="3"
|
|
|
|
Background="{DynamicResource Brush.TitleBar}"
|
|
|
|
BorderThickness="0,0,0,1" BorderBrush="{DynamicResource Brush.Border0}"
|
2024-03-14 03:23:36 -07:00
|
|
|
DoubleTapped="MaximizeOrRestoreWindow"
|
|
|
|
PointerPressed="BeginMoveWindow"/>
|
2024-02-05 23:08:37 -08:00
|
|
|
|
|
|
|
<!-- Caption Buttons (macOS) -->
|
2024-03-07 19:13:53 -08:00
|
|
|
<Border Grid.Column="0" VerticalAlignment="Stretch" Margin="2,0,8,3" IsVisible="{OnPlatform False, macOS=True}">
|
2024-02-05 23:08:37 -08:00
|
|
|
<v:CaptionButtonsMacOS VerticalAlignment="Bottom"/>
|
|
|
|
</Border>
|
|
|
|
|
2024-03-21 18:57:59 -07:00
|
|
|
<!-- Menu -->
|
2024-05-10 20:31:14 -07:00
|
|
|
<Button Grid.Column="0" Classes="icon_button" VerticalAlignment="Bottom" IsVisible="{OnPlatform True, macOS=False}">
|
2024-04-08 23:36:32 -07:00
|
|
|
<Button.Margin>
|
|
|
|
<OnPlatform Default="4,0,2,3" macOS="4,0,6,3"/>
|
|
|
|
</Button.Margin>
|
|
|
|
|
2024-02-05 23:08:37 -08:00
|
|
|
<Button.Flyout>
|
2024-02-06 01:00:39 -08:00
|
|
|
<MenuFlyout Placement="BottomEdgeAlignedLeft" VerticalOffset="-8">
|
2024-05-11 03:06:31 -07:00
|
|
|
<MenuItem Header="{DynamicResource Text.Preference}" Command="{x:Static s:App.OpenPreferenceCommand}" InputGesture="Ctrl+Shift+P">
|
2024-02-05 23:08:37 -08:00
|
|
|
<MenuItem.Icon>
|
|
|
|
<Path Width="14" Height="14" Data="{StaticResource Icons.Settings2}"/>
|
|
|
|
</MenuItem.Icon>
|
|
|
|
</MenuItem>
|
2024-05-10 20:31:14 -07:00
|
|
|
<MenuItem Header="{DynamicResource Text.Hotkeys}" Command="{x:Static s:App.OpenHotkeysCommand}">
|
2024-03-04 18:46:08 -08:00
|
|
|
<MenuItem.Icon>
|
|
|
|
<Path Width="14" Height="14" Data="{StaticResource Icons.Hotkeys}"/>
|
|
|
|
</MenuItem.Icon>
|
|
|
|
</MenuItem>
|
2024-03-26 07:11:06 -07:00
|
|
|
<MenuItem Header="-"/>
|
2024-05-10 20:31:14 -07:00
|
|
|
<MenuItem Header="{DynamicResource Text.SelfUpdate}" Command="{x:Static s:App.CheckForUpdateCommand}">
|
2024-03-26 07:11:06 -07:00
|
|
|
<MenuItem.Icon>
|
|
|
|
<Path Width="14" Height="14" Data="{StaticResource Icons.SoftwareUpdate}"/>
|
|
|
|
</MenuItem.Icon>
|
|
|
|
</MenuItem>
|
|
|
|
<MenuItem Header="-"/>
|
2024-05-10 20:31:14 -07:00
|
|
|
<MenuItem Header="{DynamicResource Text.About}" Command="{x:Static s:App.OpenAboutCommand}">
|
2024-02-05 23:08:37 -08:00
|
|
|
<MenuItem.Icon>
|
|
|
|
<Path Width="14" Height="14" Data="{StaticResource Icons.Info}"/>
|
|
|
|
</MenuItem.Icon>
|
|
|
|
</MenuItem>
|
|
|
|
</MenuFlyout>
|
|
|
|
</Button.Flyout>
|
2024-02-17 18:41:41 -08:00
|
|
|
<Path Width="12" Height="12" Data="{StaticResource Icons.Menu}"/>
|
2024-02-05 23:08:37 -08:00
|
|
|
</Button>
|
|
|
|
|
|
|
|
<!-- Pages Tabs-->
|
|
|
|
<Grid x:Name="launcherTabsContainer" Grid.Column="1" Height="30" ColumnDefinitions="Auto,*,Auto" VerticalAlignment="Bottom" SizeChanged="UpdateScrollIndicator">
|
2024-05-11 07:50:49 -07:00
|
|
|
<RepeatButton x:Name="leftScrollIndicator" Grid.Column="0" Classes="icon_button" Width="18" Height="30" Click="ScrollTabsLeft">
|
2024-02-05 23:08:37 -08:00
|
|
|
<Path Width="8" Height="14" Stretch="Fill" Data="{StaticResource Icons.TriangleLeft}"/>
|
2024-05-11 07:50:49 -07:00
|
|
|
</RepeatButton>
|
2024-02-05 23:08:37 -08:00
|
|
|
|
|
|
|
<ScrollViewer Grid.Column="1"
|
|
|
|
x:Name="launcherTabsScroller"
|
|
|
|
HorizontalScrollBarVisibility="Hidden"
|
|
|
|
VerticalScrollBarVisibility="Disabled"
|
|
|
|
DoubleTapped="MaximizeOrRestoreWindow"
|
|
|
|
PointerPressed="BeginMoveWindow"
|
2024-05-11 06:59:37 -07:00
|
|
|
PointerWheelChanged="ScrollTabs"
|
|
|
|
ScrollChanged="OnTabsScrollChanged">
|
2024-02-05 23:08:37 -08:00
|
|
|
<StackPanel x:Name="launcherTabsBar" Orientation="Horizontal" SizeChanged="UpdateScrollIndicator">
|
|
|
|
<ListBox Classes="launcher_page_tabbar"
|
|
|
|
ItemsSource="{Binding Pages}"
|
|
|
|
SelectedItem="{Binding ActivePage, Mode=TwoWay}">
|
|
|
|
<ListBox.ItemsPanel>
|
|
|
|
<ItemsPanelTemplate>
|
|
|
|
<VirtualizingStackPanel Orientation="Horizontal" Height="30"/>
|
|
|
|
</ItemsPanelTemplate>
|
|
|
|
</ListBox.ItemsPanel>
|
|
|
|
|
|
|
|
<ListBox.ItemTemplate>
|
|
|
|
<DataTemplate DataType="{x:Type vm:LauncherPage}">
|
|
|
|
<Border Classes="launcher_pagetab"
|
|
|
|
Height="30"
|
|
|
|
BorderThickness="1,1,1,0"
|
|
|
|
CornerRadius="6,6,0,0"
|
|
|
|
PointerPressed="OnPointerPressedTab"
|
|
|
|
PointerMoved="OnPointerMovedOverTab"
|
|
|
|
PointerReleased="OnPointerReleasedTab"
|
|
|
|
Loaded="SetupDragAndDrop">
|
|
|
|
<Border.ContextMenu>
|
|
|
|
<ContextMenu>
|
|
|
|
<MenuItem Header="{DynamicResource Text.PageTabBar.Tab.Close}"
|
|
|
|
Command="{Binding #me.DataContext.(vm:Launcher).CloseTab}"
|
|
|
|
CommandParameter="{Binding}"
|
2024-05-05 16:14:53 -07:00
|
|
|
InputGesture="{OnPlatform Ctrl+W, macOS=⌘+W}"/>
|
2024-02-05 23:08:37 -08:00
|
|
|
<MenuItem Header="{DynamicResource Text.PageTabBar.Tab.CloseOther}"
|
|
|
|
Command="{Binding #me.DataContext.(vm:Launcher).CloseOtherTabs}"
|
|
|
|
CommandParameter="{Binding}"/>
|
|
|
|
<MenuItem Header="{DynamicResource Text.PageTabBar.Tab.CloseRight}"
|
|
|
|
Command="{Binding #me.DataContext.(vm:Launcher).CloseRightTabs}"
|
|
|
|
CommandParameter="{Binding}"/>
|
|
|
|
<MenuItem Header="-" IsVisible="{Binding Node.IsRepository}"/>
|
|
|
|
<MenuItem IsVisible="{Binding Node.IsRepository}">
|
|
|
|
<MenuItem.Header>
|
|
|
|
<Grid Height="20" ColumnDefinitions="Auto,*">
|
|
|
|
<TextBlock Grid.Column="0" Text="{DynamicResource Text.PageTabBar.Tab.Bookmark}"/>
|
|
|
|
<ComboBox Grid.Column="1"
|
|
|
|
HorizontalAlignment="Right" VerticalAlignment="Center"
|
|
|
|
BorderThickness=".5" Margin="8,0,0,0"
|
|
|
|
ItemsSource="{x:Static m:Bookmarks.Supported}"
|
|
|
|
SelectedIndex="{Binding Node.Bookmark, Mode=TwoWay}">
|
|
|
|
<ComboBox.Resources>
|
|
|
|
<Thickness x:Key="ComboBoxPadding">12,2,0,2</Thickness>
|
|
|
|
<Thickness x:Key="ComboBoxEditableTextPadding">11,2,32,2</Thickness>
|
|
|
|
<x:Double x:Key="ComboBoxMinHeight">22</x:Double>
|
|
|
|
</ComboBox.Resources>
|
|
|
|
<ComboBox.ItemTemplate>
|
|
|
|
<DataTemplate>
|
|
|
|
<Border Height="20" VerticalAlignment="Center">
|
|
|
|
<Path Width="12" Height="12"
|
2024-03-13 01:02:39 -07:00
|
|
|
Fill="{Binding Converter={x:Static c:BookmarkConverters.ToBrush}}"
|
|
|
|
StrokeThickness="{Binding Converter={x:Static c:BookmarkConverters.ToStrokeThickness}}"
|
2024-02-05 23:08:37 -08:00
|
|
|
Stroke="{DynamicResource Brush.FG1}"
|
|
|
|
HorizontalAlignment="Center" VerticalAlignment="Center"
|
|
|
|
Data="{StaticResource Icons.Bookmark}"/>
|
|
|
|
</Border>
|
|
|
|
</DataTemplate>
|
|
|
|
</ComboBox.ItemTemplate>
|
|
|
|
</ComboBox>
|
|
|
|
</Grid>
|
|
|
|
</MenuItem.Header>
|
|
|
|
</MenuItem>
|
|
|
|
<MenuItem Header="-" IsVisible="{Binding Node.IsRepository}"/>
|
|
|
|
<MenuItem Header="{DynamicResource Text.PageTabBar.Tab.CopyPath}" Command="{Binding CopyPath}" IsVisible="{Binding Node.IsRepository}"/>
|
|
|
|
</ContextMenu>
|
|
|
|
</Border.ContextMenu>
|
|
|
|
|
2024-02-29 22:09:39 -08:00
|
|
|
<v:LauncherTab UseFixedTabWidth="{Binding Source={x:Static vm:Preference.Instance}, Path=UseFixedTabWidth}" Height="30" ColumnDefinitions="Auto,*,Auto" VerticalAlignment="Center">
|
|
|
|
<Path Grid.Column="0"
|
|
|
|
Width="12" Height="12" Margin="12,0"
|
2024-02-05 23:08:37 -08:00
|
|
|
Fill="{Binding Node.Bookmark, Converter={x:Static c:BookmarkConverters.ToBrush}}"
|
|
|
|
StrokeThickness="{Binding Node.Bookmark, Converter={x:Static c:BookmarkConverters.ToStrokeThickness}}"
|
|
|
|
Stroke="{DynamicResource Brush.FG1}"
|
|
|
|
Data="{StaticResource Icons.Bookmark}"
|
|
|
|
IsVisible="{Binding Node.IsRepository}"
|
|
|
|
IsHitTestVisible="False"/>
|
2024-02-29 22:09:39 -08:00
|
|
|
<Path Grid.Column="0"
|
|
|
|
Width="12" Height="12" Margin="12,0"
|
2024-02-05 23:08:37 -08:00
|
|
|
Fill="{DynamicResource Brush.FG1}"
|
|
|
|
Data="{StaticResource Icons.Repositories}"
|
|
|
|
IsVisible="{Binding !Node.IsRepository}"
|
|
|
|
IsHitTestVisible="False"/>
|
|
|
|
<TextBlock Grid.Column="1"
|
2024-03-04 23:53:38 -08:00
|
|
|
Classes="monospace"
|
2024-03-21 21:18:03 -07:00
|
|
|
FontSize="12"
|
2024-02-05 23:08:37 -08:00
|
|
|
HorizontalAlignment="Stretch" VerticalAlignment="Center"
|
|
|
|
TextAlignment="Center"
|
|
|
|
Text="{Binding Node.Name}"
|
|
|
|
IsVisible="{Binding Node.IsRepository}"
|
|
|
|
IsHitTestVisible="False"/>
|
|
|
|
<TextBlock Grid.Column="1"
|
2024-03-04 23:53:38 -08:00
|
|
|
Classes="monospace"
|
2024-03-21 21:18:03 -07:00
|
|
|
FontSize="12"
|
2024-02-05 23:08:37 -08:00
|
|
|
HorizontalAlignment="Stretch" VerticalAlignment="Center"
|
|
|
|
TextAlignment="Center"
|
|
|
|
Text="{DynamicResource Text.PageTabBar.Welcome.Title}"
|
|
|
|
IsVisible="{Binding !Node.IsRepository}"
|
|
|
|
IsHitTestVisible="False"/>
|
|
|
|
<Button Grid.Column="2"
|
|
|
|
Classes="icon_button"
|
2024-02-29 22:09:39 -08:00
|
|
|
Width="16" Height="16" Margin="12,0"
|
2024-02-05 23:08:37 -08:00
|
|
|
Command="{Binding #me.DataContext.(vm:Launcher).CloseTab}"
|
2024-04-29 00:22:06 -07:00
|
|
|
CommandParameter="{Binding}">
|
|
|
|
<ToolTip.Tip>
|
|
|
|
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
|
|
|
|
<TextBlock Text="{DynamicResource Text.PageTabBar.Tab.Close}" VerticalAlignment="Center"/>
|
2024-05-05 03:19:59 -07:00
|
|
|
<TextBlock Margin="16,0,0,0" Text="{OnPlatform Ctrl+W, macOS=⌘+W}" Opacity=".6" FontSize="11" VerticalAlignment="Center"/>
|
2024-04-29 00:22:06 -07:00
|
|
|
</StackPanel>
|
|
|
|
</ToolTip.Tip>
|
2024-02-05 23:08:37 -08:00
|
|
|
<Path Width="8" Height="8" Data="{StaticResource Icons.Window.Close}"/>
|
|
|
|
</Button>
|
|
|
|
<Rectangle Grid.Column="2" Width=".5" Height="20" HorizontalAlignment="Right" VerticalAlignment="Center" Fill="{DynamicResource Brush.FG2}">
|
|
|
|
<Rectangle.IsVisible>
|
|
|
|
<MultiBinding Converter="{x:Static c:LauncherPageConverters.ToTabSeperatorVisible}">
|
|
|
|
<Binding/>
|
|
|
|
<Binding Path="$parent[ListBox].SelectedItem"/>
|
|
|
|
<Binding Path="#me.DataContext.(vm:Launcher).Pages"/>
|
|
|
|
</MultiBinding>
|
|
|
|
</Rectangle.IsVisible>
|
|
|
|
</Rectangle>
|
2024-02-29 22:09:39 -08:00
|
|
|
</v:LauncherTab>
|
2024-02-05 23:08:37 -08:00
|
|
|
</Border>
|
|
|
|
</DataTemplate>
|
|
|
|
</ListBox.ItemTemplate>
|
|
|
|
</ListBox>
|
|
|
|
|
|
|
|
<Button Classes="icon_button"
|
|
|
|
Width="16" Height="16"
|
|
|
|
Margin="8,0"
|
2024-05-05 03:19:59 -07:00
|
|
|
Command="{Binding AddNewTab}">
|
2024-04-29 00:22:06 -07:00
|
|
|
<ToolTip.Tip>
|
|
|
|
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
|
|
|
|
<TextBlock Text="{DynamicResource Text.PageTabBar.New}" VerticalAlignment="Center"/>
|
2024-05-05 03:19:59 -07:00
|
|
|
<TextBlock Margin="16,0,0,0" Text="{OnPlatform Ctrl+T, macOS=⌘+T}" Opacity=".6" FontSize="11" VerticalAlignment="Center"/>
|
2024-04-29 00:22:06 -07:00
|
|
|
</StackPanel>
|
|
|
|
</ToolTip.Tip>
|
|
|
|
|
2024-02-05 23:08:37 -08:00
|
|
|
<Path Width="12" Height="12" Data="{StaticResource Icons.Plus}"/>
|
|
|
|
</Button>
|
|
|
|
</StackPanel>
|
|
|
|
</ScrollViewer>
|
|
|
|
|
2024-05-11 07:50:49 -07:00
|
|
|
<RepeatButton x:Name="rightScrollIndicator" Grid.Column="2" Classes="icon_button" Width="18" Height="30" Click="ScrollTabsRight">
|
2024-02-05 23:08:37 -08:00
|
|
|
<Path Width="8" Height="14" Stretch="Fill" Data="{StaticResource Icons.TriangleRight}"/>
|
2024-05-11 07:50:49 -07:00
|
|
|
</RepeatButton>
|
2024-02-05 23:08:37 -08:00
|
|
|
</Grid>
|
|
|
|
|
2024-03-14 03:23:36 -07:00
|
|
|
<!-- Caption Buttons (Windows/Linux)-->
|
|
|
|
<Border Grid.Column="2" Margin="32,0,0,0" IsVisible="{OnPlatform True, macOS=False}">
|
2024-02-05 23:08:37 -08:00
|
|
|
<v:CaptionButtons Height="30" VerticalAlignment="Top"/>
|
|
|
|
</Border>
|
|
|
|
</Grid>
|
|
|
|
|
2024-03-02 06:45:14 -08:00
|
|
|
<!-- Page body -->
|
|
|
|
<v:LauncherBody Grid.Row="1" Background="{DynamicResource Brush.ToolBar}" Data="{Binding ActivePage.Data}"/>
|
2024-02-05 23:08:37 -08:00
|
|
|
|
|
|
|
<!-- Popup container -->
|
2024-03-07 23:52:40 -08:00
|
|
|
<Grid Grid.Row="1" Margin="0,36,0,0" IsVisible="{Binding ActivePage.Popup, Converter={x:Static ObjectConverters.IsNotNull}}">
|
|
|
|
<Border Background="Transparent" PointerPressed="OnPopupCancelByClickMask"/>
|
|
|
|
|
|
|
|
<Grid Width="500" HorizontalAlignment="Center" VerticalAlignment="Top">
|
|
|
|
<ContentControl Content="{Binding ActivePage.Popup}" ClipToBounds="True">
|
|
|
|
<ContentControl.DataTemplates>
|
|
|
|
<DataTemplate DataType="vm:Popup">
|
|
|
|
<Border Margin="8,0,8,8"
|
|
|
|
Background="{DynamicResource Brush.Popup}"
|
|
|
|
BorderBrush="{DynamicResource Brush.Border0}">
|
|
|
|
<Border.CornerRadius>
|
|
|
|
<OnPlatform Default="0,0,4,4" Linux="0"/>
|
|
|
|
</Border.CornerRadius>
|
2024-02-05 23:08:37 -08:00
|
|
|
|
2024-03-08 01:41:10 -08:00
|
|
|
<Border.BorderThickness>
|
|
|
|
<OnPlatform Default="0" Linux="1,0,1,1"/>
|
|
|
|
</Border.BorderThickness>
|
|
|
|
|
2024-03-06 20:08:54 -08:00
|
|
|
<Border.Effect>
|
2024-03-07 23:52:40 -08:00
|
|
|
<OnPlatform>
|
|
|
|
<On Options="Windows, macOS">
|
|
|
|
<DropShadowEffect BlurRadius="8" OffsetX="0" OffsetY="0" Color="Black" Opacity=".5"/>
|
|
|
|
</On>
|
|
|
|
</OnPlatform>
|
2024-03-06 20:08:54 -08:00
|
|
|
</Border.Effect>
|
2024-03-07 23:52:40 -08:00
|
|
|
|
|
|
|
<StackPanel Margin="8" Orientation="Vertical">
|
|
|
|
<!-- Popup Widget -->
|
|
|
|
<ContentPresenter Margin="0,8"
|
|
|
|
Content="{Binding View}"
|
|
|
|
IsHitTestVisible="{Binding InProgress, Converter={x:Static BoolConverters.Not}}"/>
|
2024-02-05 23:08:37 -08:00
|
|
|
|
2024-03-07 23:52:40 -08:00
|
|
|
<!-- Options -->
|
|
|
|
<StackPanel Margin="0,8,0,0"
|
|
|
|
Height="32"
|
|
|
|
Orientation="Horizontal"
|
|
|
|
HorizontalAlignment="Right"
|
|
|
|
IsVisible="{Binding InProgress, Converter={x:Static BoolConverters.Not}}">
|
|
|
|
<Button Classes="flat primary"
|
|
|
|
Width="80"
|
|
|
|
Content="{DynamicResource Text.Sure}"
|
2024-04-02 01:23:47 -07:00
|
|
|
Click="OnPopupSure"
|
|
|
|
HotKey="Enter"/>
|
2024-03-07 23:52:40 -08:00
|
|
|
<Button Classes="flat"
|
|
|
|
Width="80"
|
|
|
|
Margin="8,0,0,0"
|
|
|
|
Content="{DynamicResource Text.Cancel}"
|
|
|
|
Click="OnPopupCancel"/>
|
|
|
|
</StackPanel>
|
2024-02-05 23:08:37 -08:00
|
|
|
|
2024-03-07 23:52:40 -08:00
|
|
|
<!-- Running -->
|
|
|
|
<StackPanel Orientation="Vertical" Margin="8" IsVisible="{Binding InProgress}">
|
|
|
|
<Rectangle Height="1" Margin="-8,0" HorizontalAlignment="Stretch" Fill="{DynamicResource Brush.Border1}" />
|
|
|
|
<StackPanel Orientation="Horizontal" Margin="0,8">
|
|
|
|
<Path Width="12" Height="12" Classes="waiting" Data="{StaticResource Icons.Waiting}" IsVisible="{Binding InProgress}"/>
|
|
|
|
<TextBlock Margin="6,0,0,0" FontSize="14" FontWeight="Bold" Text="{DynamicResource Text.Running}"/>
|
|
|
|
</StackPanel>
|
|
|
|
<TextBlock HorizontalAlignment="Stretch"
|
|
|
|
TextWrapping="Wrap"
|
2024-03-21 21:03:04 -07:00
|
|
|
FontSize="{Binding Source={x:Static vm:Preference.Instance}, Path=DefaultFontSize, Converter={x:Static c:FontSizeModifyConverters.Decrease}}"
|
2024-03-07 23:52:40 -08:00
|
|
|
FontStyle="Italic"
|
|
|
|
Text="{Binding ProgressDescription}"/>
|
|
|
|
<ProgressBar Margin="0,8,0,0"
|
|
|
|
HorizontalAlignment="Stretch"
|
|
|
|
IsIndeterminate="True"
|
2024-05-20 19:54:19 -07:00
|
|
|
Background="{DynamicResource Brush.FG2}" Foreground="{DynamicResource Brush.Accent}"
|
2024-03-07 23:52:40 -08:00
|
|
|
Minimum="0" Maximum="100"/>
|
2024-02-05 23:08:37 -08:00
|
|
|
</StackPanel>
|
|
|
|
</StackPanel>
|
2024-03-07 23:52:40 -08:00
|
|
|
</Border>
|
|
|
|
</DataTemplate>
|
|
|
|
</ContentControl.DataTemplates>
|
|
|
|
</ContentControl>
|
|
|
|
</Grid>
|
|
|
|
</Grid>
|
2024-02-05 23:08:37 -08:00
|
|
|
|
|
|
|
<!-- Notification container -->
|
|
|
|
<Grid Grid.Row="1" Width="360" Margin="0,36,0,0" HorizontalAlignment="Right" VerticalAlignment="Top">
|
|
|
|
<ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
|
|
|
|
<ItemsControl ItemsSource="{Binding ActivePage.Notifications}">
|
|
|
|
<ItemsControl.ItemTemplate>
|
|
|
|
<DataTemplate DataType="m:Notification">
|
|
|
|
<Grid Width="320" Margin="8">
|
2024-03-07 23:52:40 -08:00
|
|
|
<Border Background="{DynamicResource Brush.Window}" BorderBrush="{DynamicResource Brush.Border0}" BorderThickness="1" CornerRadius="4" Effect="drop-shadow(0 0 8 #40000000)"/>
|
2024-02-05 23:08:37 -08:00
|
|
|
|
|
|
|
<Grid Margin="8" RowDefinitions="26,Auto,Auto">
|
|
|
|
<StackPanel Grid.Row="0" Margin="8,0,0,0" Orientation="Horizontal" IsVisible="{Binding IsError}">
|
|
|
|
<Path Width="14" Height="14" Data="{StaticResource Icons.Error}" Fill="Red"/>
|
|
|
|
<TextBlock Margin="8,0,0,0" FontWeight="Bold" FontSize="14" Text="{DynamicResource Text.Launcher.Error}"/>
|
|
|
|
</StackPanel>
|
|
|
|
<StackPanel Grid.Row="0" Margin="8,0,0,0" Orientation="Horizontal" IsVisible="{Binding !IsError}">
|
|
|
|
<Path Width="14" Height="14" Data="{StaticResource Icons.Info}" Fill="Green"/>
|
|
|
|
<TextBlock Margin="8,0,0,0" FontWeight="Bold" FontSize="14" Text="{DynamicResource Text.Launcher.Info}"/>
|
|
|
|
</StackPanel>
|
|
|
|
|
|
|
|
<TextBox Grid.Row="1"
|
|
|
|
Classes="no_background no_border"
|
|
|
|
IsReadOnly="True"
|
|
|
|
TextWrapping="Wrap"
|
|
|
|
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
|
|
|
MaxHeight="100"
|
|
|
|
Margin="8" Padding="0"
|
|
|
|
VerticalContentAlignment="Top"
|
|
|
|
Text="{Binding Message}"/>
|
|
|
|
<Button Grid.Row="3"
|
|
|
|
Classes="flat primary"
|
2024-03-07 23:52:40 -08:00
|
|
|
Height="30"
|
2024-02-05 23:08:37 -08:00
|
|
|
Margin="4,0"
|
|
|
|
Command="{Binding #me.DataContext.(vm:Launcher).ActivePage.DismissNotification}"
|
|
|
|
CommandParameter="{Binding}"
|
|
|
|
Content="{DynamicResource Text.Close}"
|
|
|
|
HorizontalAlignment="Right"
|
|
|
|
HorizontalContentAlignment="Center"
|
|
|
|
VerticalContentAlignment="Center"/>
|
|
|
|
</Grid>
|
|
|
|
</Grid>
|
|
|
|
</DataTemplate>
|
|
|
|
</ItemsControl.ItemTemplate>
|
|
|
|
</ItemsControl>
|
|
|
|
</ScrollViewer>
|
|
|
|
</Grid>
|
2024-03-14 03:23:36 -07:00
|
|
|
|
|
|
|
<!-- Custom window sizer for Linux -->
|
2024-03-28 21:15:52 -07:00
|
|
|
<Grid Grid.Row="0" Grid.RowSpan="2" IsVisible="{OnPlatform False, Linux=True}" IsHitTestVisible="{Binding #me.WindowState, Converter={x:Static c:WindowStateConverters.IsNormal}}">
|
2024-03-14 03:23:36 -07:00
|
|
|
<Border Width="4" Height="4"
|
|
|
|
Background="Transparent"
|
|
|
|
HorizontalAlignment="Left" VerticalAlignment="Top"
|
|
|
|
Cursor="TopLeftCorner"
|
|
|
|
Tag="{x:Static WindowEdge.NorthWest}"
|
|
|
|
PointerPressed="CustomResizeWindow"/>
|
|
|
|
|
|
|
|
<Border Height="4" Margin="4,0"
|
|
|
|
Background="Transparent"
|
|
|
|
HorizontalAlignment="Stretch" VerticalAlignment="Top"
|
|
|
|
Cursor="TopSide"
|
|
|
|
Tag="{x:Static WindowEdge.North}"
|
|
|
|
PointerPressed="CustomResizeWindow"/>
|
|
|
|
|
|
|
|
<Border Width="4" Height="4"
|
|
|
|
Background="Transparent"
|
|
|
|
HorizontalAlignment="Right" VerticalAlignment="Top"
|
|
|
|
Cursor="TopRightCorner"
|
|
|
|
Tag="{x:Static WindowEdge.NorthEast}"
|
|
|
|
PointerPressed="CustomResizeWindow"/>
|
|
|
|
|
|
|
|
<Border Width="4" Margin="0,4"
|
|
|
|
Background="Transparent"
|
|
|
|
HorizontalAlignment="Left" VerticalAlignment="Stretch"
|
|
|
|
Cursor="LeftSide"
|
|
|
|
Tag="{x:Static WindowEdge.West}"
|
|
|
|
PointerPressed="CustomResizeWindow"/>
|
|
|
|
|
|
|
|
<Border Width="4" Margin="0,4"
|
|
|
|
Background="Transparent"
|
|
|
|
HorizontalAlignment="Right" VerticalAlignment="Stretch"
|
|
|
|
Cursor="RightSide"
|
|
|
|
Tag="{x:Static WindowEdge.East}"
|
|
|
|
PointerPressed="CustomResizeWindow"/>
|
|
|
|
|
|
|
|
<Border Width="4" Height="4"
|
|
|
|
Background="Transparent"
|
|
|
|
HorizontalAlignment="Left" VerticalAlignment="Bottom"
|
|
|
|
Cursor="BottomLeftCorner"
|
|
|
|
Tag="{x:Static WindowEdge.SouthWest}"
|
|
|
|
PointerPressed="CustomResizeWindow"/>
|
|
|
|
|
|
|
|
<Border Height="4" Margin="4,0"
|
|
|
|
Background="Transparent"
|
|
|
|
HorizontalAlignment="Stretch" VerticalAlignment="Bottom"
|
|
|
|
Cursor="BottomSide"
|
|
|
|
Tag="{x:Static WindowEdge.South}"
|
|
|
|
PointerPressed="CustomResizeWindow"/>
|
|
|
|
|
|
|
|
<Border Width="4" Height="4"
|
|
|
|
Background="Transparent"
|
|
|
|
HorizontalAlignment="Right" VerticalAlignment="Bottom"
|
|
|
|
Cursor="BottomRightCorner"
|
|
|
|
Tag="{x:Static WindowEdge.SouthEast}"
|
|
|
|
PointerPressed="CustomResizeWindow"/>
|
|
|
|
</Grid>
|
2024-02-05 23:08:37 -08:00
|
|
|
</Grid>
|
|
|
|
</Window>
|