- Верхняя полоса и экран входа: логотип-изображение ALL MARKET из ресурсов (avares Assets/), color на светлой теме и white на тёмной (Brand.ApplyLogo). - Заголовок окна «ALL MARKET · Касса»; иконка окна и ApplicationIcon = allmarket.ico (собрана из фирменных PNG 32/180/192). - Чек: в шапке — название точки/магазина (резолвится из RetailPoint, PosSession.StoreName), внизу мелко «ALL MARKET — система учёта торговли» (был хардкод «Food Market» в шапке). - AppImage .desktop: Name «ALL MARKET Касса» + фирменная иконка. - Эталон-макет pos-mockup.html — логотип «all market». - AssemblyName/exe (foodmarket.Pos) и имена артефактов не менялись (инфраструктура). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
67 lines
6 KiB
XML
67 lines
6 KiB
XML
<UserControl xmlns="https://github.com/avaloniaui"
|
||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||
xmlns:vm="clr-namespace:foodmarket.Pos.ViewModels"
|
||
x:Class="foodmarket.Pos.Views.LoginView"
|
||
x:DataType="vm:LoginViewModel">
|
||
<Grid Background="{DynamicResource PosBg}">
|
||
<Border Classes="card" Width="440" Padding="28" VerticalAlignment="Center" HorizontalAlignment="Center" CornerRadius="18">
|
||
<StackPanel Spacing="16">
|
||
<StackPanel Spacing="10" HorizontalAlignment="Center">
|
||
<Image x:Name="BrandLogo" Height="48" HorizontalAlignment="Center" Margin="0,4,0,0"/>
|
||
<TextBlock Text="Касса · Вход кассира" Foreground="{DynamicResource PosTextMuted}" FontSize="14" HorizontalAlignment="Center"/>
|
||
</StackPanel>
|
||
|
||
<!-- PIN -->
|
||
<StackPanel Spacing="12" IsVisible="{Binding PinMode}">
|
||
<Border Background="{DynamicResource PosSubtle}" CornerRadius="12" Height="56">
|
||
<TextBlock Text="{Binding PinMasked}" Foreground="{DynamicResource PosText}" FontSize="30" LetterSpacing="8" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||
</Border>
|
||
<TextBlock Text="{Binding Error}" Foreground="{DynamicResource PosDanger}" TextWrapping="Wrap" HorizontalAlignment="Center" IsVisible="{Binding Error, Converter={x:Static ObjectConverters.IsNotNull}}"/>
|
||
<Grid ColumnDefinitions="*,*,*" RowDefinitions="Auto,Auto,Auto,Auto">
|
||
<Button Grid.Row="0" Grid.Column="0" Classes="key" Margin="4" Height="58" Content="1" Command="{Binding PinDigitCommand}" CommandParameter="1"/>
|
||
<Button Grid.Row="0" Grid.Column="1" Classes="key" Margin="4" Height="58" Content="2" Command="{Binding PinDigitCommand}" CommandParameter="2"/>
|
||
<Button Grid.Row="0" Grid.Column="2" Classes="key" Margin="4" Height="58" Content="3" Command="{Binding PinDigitCommand}" CommandParameter="3"/>
|
||
<Button Grid.Row="1" Grid.Column="0" Classes="key" Margin="4" Height="58" Content="4" Command="{Binding PinDigitCommand}" CommandParameter="4"/>
|
||
<Button Grid.Row="1" Grid.Column="1" Classes="key" Margin="4" Height="58" Content="5" Command="{Binding PinDigitCommand}" CommandParameter="5"/>
|
||
<Button Grid.Row="1" Grid.Column="2" Classes="key" Margin="4" Height="58" Content="6" Command="{Binding PinDigitCommand}" CommandParameter="6"/>
|
||
<Button Grid.Row="2" Grid.Column="0" Classes="key" Margin="4" Height="58" Content="7" Command="{Binding PinDigitCommand}" CommandParameter="7"/>
|
||
<Button Grid.Row="2" Grid.Column="1" Classes="key" Margin="4" Height="58" Content="8" Command="{Binding PinDigitCommand}" CommandParameter="8"/>
|
||
<Button Grid.Row="2" Grid.Column="2" Classes="key" Margin="4" Height="58" Content="9" Command="{Binding PinDigitCommand}" CommandParameter="9"/>
|
||
<Button Grid.Row="3" Grid.Column="0" Classes="key" Margin="4" Height="58" FontSize="18" Content="⌫" Command="{Binding PinBackCommand}"/>
|
||
<Button Grid.Row="3" Grid.Column="1" Classes="key" Margin="4" Height="58" Content="0" Command="{Binding PinDigitCommand}" CommandParameter="0"/>
|
||
<Button Grid.Row="3" Grid.Column="2" Classes="key primary" Margin="4" Height="58" FontSize="17" Content="Войти" Command="{Binding PinLoginCommand}" IsEnabled="{Binding !Busy}"/>
|
||
</Grid>
|
||
<Button Classes="pos ghost" HorizontalAlignment="Stretch" Height="42" FontSize="13" Content="Вход по логину и паролю" Command="{Binding UsePasswordCommand}"/>
|
||
</StackPanel>
|
||
|
||
<!-- Логин/пароль -->
|
||
<StackPanel Spacing="14" IsVisible="{Binding !PinMode}">
|
||
<StackPanel Spacing="4">
|
||
<TextBlock Text="Адрес сервера" Foreground="{DynamicResource PosTextMuted}" FontSize="13"/>
|
||
<TextBox Classes="pos" Text="{Binding ServerUrl}" FontSize="15"/>
|
||
</StackPanel>
|
||
<StackPanel Spacing="4">
|
||
<TextBlock Text="Логин кассира" Foreground="{DynamicResource PosTextMuted}" FontSize="13"/>
|
||
<TextBox Classes="pos" Text="{Binding Username}" FontSize="17"/>
|
||
</StackPanel>
|
||
<StackPanel Spacing="4">
|
||
<TextBlock Text="PIN / пароль" Foreground="{DynamicResource PosTextMuted}" FontSize="13"/>
|
||
<TextBox Classes="pos" Text="{Binding Pin}" PasswordChar="●" FontSize="17"/>
|
||
</StackPanel>
|
||
<TextBlock Text="{Binding Error}" Foreground="{DynamicResource PosDanger}" TextWrapping="Wrap" IsVisible="{Binding Error, Converter={x:Static ObjectConverters.IsNotNull}}"/>
|
||
<Button Classes="pos primary" HorizontalAlignment="Stretch" Height="54" FontSize="18" Content="Войти" Command="{Binding LoginCommand}" IsDefault="True" IsEnabled="{Binding !Busy}" IsVisible="{Binding !RequirePointSelection}"/>
|
||
|
||
<StackPanel Spacing="8" IsVisible="{Binding RequirePointSelection}">
|
||
<TextBlock Text="Регистрация кассы — выберите точку продаж:" Foreground="{DynamicResource PosText}" FontSize="14"/>
|
||
<ComboBox ItemsSource="{Binding Points}" SelectedItem="{Binding SelectedPoint}" HorizontalAlignment="Stretch" FontSize="15"/>
|
||
<Button Classes="pos primary" HorizontalAlignment="Stretch" Height="50" Content="Зарегистрировать на этой точке" Command="{Binding ConfirmPointCommand}"/>
|
||
</StackPanel>
|
||
|
||
<Button Classes="pos ghost" HorizontalAlignment="Stretch" Height="40" FontSize="13" Content="Быстрый вход по PIN" Command="{Binding UsePinCommand}" IsVisible="{Binding DeviceRegistered}"/>
|
||
<Button Classes="pos ghost" HorizontalAlignment="Stretch" Height="38" FontSize="12.5" Content="Сменить точку продаж (админ)" Command="{Binding ResetDeviceCommand}" ToolTip.Tip="Сбросить регистрацию устройства. Новую точку выберет только администратор."/>
|
||
</StackPanel>
|
||
</StackPanel>
|
||
</Border>
|
||
</Grid>
|
||
</UserControl>
|