- Modelos renombrados para coincidir con columnas de MariaDB (ApPaterno/ApMaterno, HoraSalida, FechaFin, IdAsistenciaProfesor) - Agregado campo IdAlumno a DetalleContrato - Seed data con IDs reales de produccion (16451, 16493, profesor 15668563-1) - Login offline: solo valida RUT contra BD local, sin contraseña - ConnectivityService: checkea internet al inicio, bloquea si hay conexion - ViewLocator corregido: busca tipos en todos los ensamblados - Todos los ViewModels heredan de ViewModelBase - Publicacion self-contained para win-x64, linux-x64, osx-x64, osx-arm64 - Agregado .gitignore, removidos bin/obj/publish del tracking
50 lines
2.2 KiB
XML
50 lines
2.2 KiB
XML
<UserControl xmlns="https://github.com/avaloniaui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:vm="using:Asistencia.ViewModels"
|
|
x:Class="Asistencia.Views.LoginView"
|
|
x:DataType="vm:LoginViewModel">
|
|
|
|
<Design.DataContext>
|
|
<vm:LoginViewModel />
|
|
</Design.DataContext>
|
|
|
|
<Panel Background="{DynamicResource BackgroundSecondary}">
|
|
<Border HorizontalAlignment="Center" VerticalAlignment="Center"
|
|
CornerRadius="16" Padding="48" Width="420"
|
|
Background="{DynamicResource BackgroundPrimary}"
|
|
BorderBrush="{DynamicResource BorderColor}" BorderThickness="1">
|
|
|
|
<StackPanel Spacing="8">
|
|
<TextBlock Text="Sistema de Asistencia"
|
|
FontSize="28" FontWeight="Bold"
|
|
Foreground="{DynamicResource PrimaryNavy}"
|
|
HorizontalAlignment="Center" />
|
|
|
|
<TextBlock Text="Modo offline — Ingrese su RUT"
|
|
FontSize="14" Foreground="{DynamicResource TextSecondary}"
|
|
HorizontalAlignment="Center" Margin="0,0,0,24" />
|
|
|
|
<TextBlock Text="RUT" FontSize="13" FontWeight="SemiBold"
|
|
Foreground="{DynamicResource TextPrimary}" />
|
|
<TextBox PlaceholderText="Ej: 12345678-9"
|
|
Text="{Binding Rut}"
|
|
FontSize="14" Margin="0,0,0,16" />
|
|
|
|
<Button Content="Ingresar"
|
|
Command="{Binding LoginCommand}"
|
|
Classes="primary"
|
|
HorizontalAlignment="Stretch"
|
|
Height="44"
|
|
IsEnabled="{Binding !IsLoading}" />
|
|
|
|
<TextBlock Text="{Binding ErrorMessage}"
|
|
Foreground="{DynamicResource DangerColor}"
|
|
FontSize="13"
|
|
HorizontalAlignment="Center"
|
|
IsVisible="{Binding HasError}"
|
|
Margin="0,8,0,0" />
|
|
</StackPanel>
|
|
</Border>
|
|
</Panel>
|
|
</UserControl>
|