-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainWindow.xaml
More file actions
248 lines (237 loc) · 16.2 KB
/
Copy pathMainWindow.xaml
File metadata and controls
248 lines (237 loc) · 16.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
<Window x:Class="Lucy_windows_installer.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Lucy Installer" Height="500" Width="1000"
Background="#141414" Foreground="#141414"
WindowStyle="None"
ResizeMode="NoResize"
Icon="/assets/logo.png"
FontFamily="Cascadia Mono" FontSize="12">
<Window.Resources>
<Style TargetType="Button" x:Key="SecondaryButtonStyle">
<Setter Property="Background" Value="#1f1f1f"/>
<Setter Property="Foreground" Value="#00ff41"/>
<Setter Property="BorderBrush" Value="#00ff41"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Background" Value="#4d4d4d"/>
<Setter Property="Foreground" Value="#d9d9d9"/>
<Setter Property="BorderBrush" Value="#4d4d4d"/>
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Foreground" Value="#FFFFFF"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="Button" x:Key="PrimaryButtonStyle">
<Setter Property="Background" Value="#00ff41"/>
<Setter Property="Foreground" Value="#000000"/>
<Setter Property="BorderBrush" Value="#00ff41"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Background" Value="#4d4d4d"/>
<Setter Property="Foreground" Value="#d9d9d9"/>
<Setter Property="BorderBrush" Value="#4d4d4d"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="ComboBox" x:Key="DarkComboBoxStyle">
<Setter Property="Background" Value="#141414"/>
<Setter Property="Foreground" Value="#FFFFFF"/>
<Setter Property="BorderBrush" Value="#00ff41"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Padding" Value="6,3"/>
<Setter Property="OverridesDefaultStyle" Value="True"/>
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Disabled"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ComboBox">
<Grid>
<Border x:Name="Border"
Background="#141414"
BorderBrush="#00ff41"
BorderThickness="1"
CornerRadius="0"
SnapsToDevicePixels="True">
<Grid>
<ContentPresenter Margin="8,4,28,4"
IsHitTestVisible="False"
VerticalAlignment="Center"
HorizontalAlignment="Left"
Content="{TemplateBinding SelectionBoxItem}"
ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"
ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}"/>
<ToggleButton x:Name="ToggleButton"
HorizontalAlignment="Right"
Width="28"
Background="#141414"
BorderThickness="0"
Focusable="False"
IsChecked="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
ClickMode="Press">
<ToggleButton.Template>
<ControlTemplate TargetType="ToggleButton">
<Border Background="#141414" BorderBrush="#00ff41" BorderThickness="1,0,0,0">
<TextBlock Text="▾" Foreground="#FFFFFF" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="14"/>
</Border>
</ControlTemplate>
</ToggleButton.Template>
</ToggleButton>
</Grid>
</Border>
<Popup IsOpen="{TemplateBinding IsDropDownOpen}"
Placement="Bottom"
AllowsTransparency="True"
Focusable="False">
<Border Background="#141414" BorderBrush="#00ff41" BorderThickness="1">
<ScrollViewer VerticalScrollBarVisibility="Hidden" Background="#141414">
<ItemsPresenter/>
</ScrollViewer>
</Border>
</Popup>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="ItemTemplate">
<Setter.Value>
<DataTemplate>
<TextBlock Text="{Binding Name}" Foreground="#FFFFFF" Background="#141414" Padding="8,4"/>
</DataTemplate>
</Setter.Value>
</Setter>
<Setter Property="ItemContainerStyle">
<Setter.Value>
<Style TargetType="ComboBoxItem">
<Setter Property="Background" Value="#141414"/>
<Setter Property="Foreground" Value="#FFFFFF"/>
<Setter Property="Padding" Value="0"/>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#1f1f1f"/>
<Setter Property="Foreground" Value="#FFFFFF"/>
</Trigger>
<Trigger Property="IsSelected" Value="True">
<Setter Property="Background" Value="#00ff41"/>
<Setter Property="Foreground" Value="#000000"/>
</Trigger>
</Style.Triggers>
</Style>
</Setter.Value>
</Setter>
</Style>
</Window.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Border Grid.Row="0" Height="36" Background="#0a0a0a" BorderBrush="#00ff41" BorderThickness="0,0,0,1" MouseLeftButtonDown="TitleBar_MouseLeftButtonDown">
<Grid Margin="10,0,8,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="0" Orientation="Horizontal" VerticalAlignment="Center">
<TextBlock Text="Lucy Installer" Foreground="#00ff41" FontWeight="Bold" VerticalAlignment="Center" FontSize="18"/>
</StackPanel>
<Button Grid.Column="2" Width="24" Height="24" Content="✕" Background="Transparent" BorderThickness="0" Foreground="#00ff41" Click="CloseButton_Click" FontSize="14" FontWeight="Bold" VerticalAlignment="Center"/>
</Grid>
</Border>
<Grid Grid.Row="1" Margin="10">
<!-- Pages container -->
<Grid Name="PagesGrid">
<!-- Page 1: Welcome -->
<StackPanel Name="PageWelcome" Visibility="Visible" Margin="6" VerticalAlignment="Center" HorizontalAlignment="Center">
<TextBlock Text="Lucy" FontSize="70" FontWeight="Bold" Margin="0,0,0,16" Foreground="#00ff41" TextAlignment="Center"/>
<TextBlock Text="One platform, any robot. Configure, simulate & control from your browser." FontSize="13" Foreground="#CCCCCC" TextAlignment="Center" TextWrapping="Wrap" Margin="0,0,0,24" MaxWidth="400"/>
<TextBlock Text="This installer will clone the Lucy workspace from GitHub and configure your environment." FontSize="12" Foreground="#999999" TextAlignment="Center" TextWrapping="Wrap" MaxWidth="400"/>
</StackPanel>
<!-- Page 2: Install location -->
<StackPanel Name="PageLocation" Visibility="Collapsed" Margin="6">
<TextBlock Text="Install Location" FontSize="16" FontWeight="SemiBold" Margin="0,0,0,8" Foreground="#00ff41"/>
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
<TextBox Name="InstallPathTextBox" Width="480" MinWidth="200" Margin="0,0,8,0" Background="#1f1f1f" Foreground="#FFFFFF" BorderBrush="#00ff41" />
<Button Name="BrowseButton" Width="80" Click="BrowseButton_Click" Background="#00ff41" Foreground="#000000" FontWeight="Bold">Browse...</Button>
</StackPanel>
<CheckBox Name="AdvancedConfigCheckbox" Content="Advanced configuration" Foreground="#CCCCCC" Margin="0,12,0,0"/>
<TextBlock Margin="0,8,0,0" TextWrapping="Wrap" Foreground="#CCCCCC">
Select an empty or new folder where the repository will be cloned.
</TextBlock>
</StackPanel>
<!-- Page 3: Advanced -->
<ScrollViewer Name="PageAdvanced" Visibility="Visible" Margin="6" VerticalScrollBarVisibility="Hidden" HorizontalScrollBarVisibility="Disabled">
<StackPanel>
<TextBlock Text="Advanced Options" FontSize="16" FontWeight="SemiBold" Margin="0,0,0,8" Foreground="#00ff41"/>
<TextBlock Text="(Optional)" FontSize="11" Foreground="#999999" Margin="0,0,0,12" FontStyle="Italic"/>
<TextBlock Text="Source type" Foreground="#CCCCCC" Margin="0,0,0,4"/>
<StackPanel Orientation="Horizontal" Margin="0,0,0,12">
<RadioButton Name="BranchRadioButton" Content="Branch" IsChecked="True" Foreground="#00ff41" GroupName="SourceType" Checked="SourceTypeRadioButton_Checked" Margin="0,0,18,0"/>
<RadioButton Name="ReleaseTagRadioButton" Content="Release tag" Foreground="#00ff41" GroupName="SourceType" Checked="SourceTypeRadioButton_Checked"/>
</StackPanel>
<StackPanel Name="BranchSelectionPanel" Orientation="Horizontal" VerticalAlignment="Center" Margin="0,0,0,12">
<Button Name="LoadBranchesButton" Click="LoadBranchesButton_Click" Width="120" Padding="6,3" Background="#00ff41" Foreground="#000000" FontWeight="Bold">Refresh</Button>
<TextBlock Text=" " Width="8"/>
<ComboBox Name="BranchesComboBox" Width="300" IsEditable="False" DisplayMemberPath="Name" Style="{StaticResource DarkComboBoxStyle}"/>
</StackPanel>
<StackPanel Name="TagSelectionPanel" Orientation="Horizontal" VerticalAlignment="Center" Margin="0,0,0,12" Visibility="Collapsed">
<Button Name="LoadTagsButton" Click="LoadTagsButton_Click" Width="120" Padding="6,3" Background="#00ff41" Foreground="#000000" FontWeight="Bold">Refresh</Button>
<TextBlock Text=" " Width="8"/>
<ComboBox Name="TagsComboBox" Width="300" IsEditable="False" DisplayMemberPath="Name" Style="{StaticResource DarkComboBoxStyle}"/>
</StackPanel>
</StackPanel>
</ScrollViewer>
<!-- Page 4: Progress / Log -->
<Grid Name="PageProgress" Visibility="Collapsed" Margin="6">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<TextBlock Grid.Row="0" Text="Progress" FontSize="16" FontWeight="SemiBold" Margin="0,0,0,8" Foreground="#00ff41"/>
<ProgressBar Grid.Row="1" Name="ProgressBar" Height="18" Minimum="0" Maximum="100" Margin="0,0,0,8" Background="#1f1f1f" Foreground="#00ff41"/>
<TextBox Grid.Row="2" Name="LogTextBox"
MinHeight="80"
VerticalScrollBarVisibility="Auto"
HorizontalScrollBarVisibility="Auto"
IsReadOnly="True"
AcceptsReturn="True"
TextWrapping="NoWrap"
VerticalContentAlignment="Top"
Background="#0a0a0a"
Foreground="#00ff41"
BorderBrush="#00ff41"/>
</Grid>
</Grid>
</Grid>
<!-- Navigation buttons -->
<StackPanel Orientation="Horizontal" Grid.Row="2" HorizontalAlignment="Right" Margin="0,12,10,10">
<Button Name="BackButton" Width="70" Padding="6,3" Click="BackButton_Click" IsEnabled="False" Margin="0,0,8,0" Style="{StaticResource SecondaryButtonStyle}">Back</Button>
<Button Name="NextButton" Width="70" Padding="6,3" Click="NextButton_Click" FontWeight="Bold" Style="{StaticResource PrimaryButtonStyle}">Next</Button>
<Button Name="CancelButton" Width="70" Padding="6,3" Click="CancelButton_Click" Margin="8,0,0,0" Style="{StaticResource SecondaryButtonStyle}">Cancel</Button>
</StackPanel>
</Grid>
</Window>