更新项目配置,新增设备同步模块,优化WebSocket和Swagger配置,增强SCADA系统的免登录接口,支持数据字典项和登录日志的免登录查询与记录。调整Java编译设置,确保更好的开发体验。
This commit is contained in:
168
yy-admin-master/YY.Admin/Views/LoginWindow.xaml
Normal file
168
yy-admin-master/YY.Admin/Views/LoginWindow.xaml
Normal file
@@ -0,0 +1,168 @@
|
||||
<hc:Window x:Class="YY.Admin.Views.LoginWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
xmlns:prism="http://prismlibrary.com/"
|
||||
xmlns:md="http://materialdesigninxaml.net/winfx/xaml/themes"
|
||||
xmlns:consts="clr-namespace:YY.Admin.Core.Const;assembly=YY.Admin.Core"
|
||||
xmlns:ctls="clr-namespace:YY.Admin.Core.Controls;assembly=YY.Admin.Core"
|
||||
prism:ViewModelLocator.AutoWireViewModel="True"
|
||||
Icon="/Resources/Icon/logo.ico"
|
||||
Title="{Binding Title}"
|
||||
Width="650"
|
||||
Height="500"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
ResizeMode="CanMinimize"
|
||||
ShowInTaskbar="True"
|
||||
KeyDown="Window_KeyDown"
|
||||
FontSize="{StaticResource FontSize }">
|
||||
|
||||
<Window.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<!-- 使用独立的HandyControl主题资源,不受主题切换影响 -->
|
||||
<ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/SkinDefault.xaml"/>
|
||||
<ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Theme.xaml"/>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</Window.Resources>
|
||||
<Grid Background="{DynamicResource RegionBrush}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="260"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Image
|
||||
Source="/Resources/Icon/login.png"
|
||||
Stretch="Uniform"/>
|
||||
|
||||
<Border Grid.Column="1">
|
||||
<Grid>
|
||||
<Button
|
||||
Command="{Binding OpenServerSettingsCommand}"
|
||||
Width="34"
|
||||
Height="34"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Top"
|
||||
Margin="0,8,8,0"
|
||||
ToolTip="服务器设置">
|
||||
<ctls:FontAwesomeIcon Icon="" IconFamily="Solid"/>
|
||||
</Button>
|
||||
<StackPanel Margin="20 0 20 20">
|
||||
<!-- Logo和标题 -->
|
||||
<StackPanel HorizontalAlignment="Center" Margin="0,20,0,40">
|
||||
<TextBlock
|
||||
Text="{x:Static consts:CommonConst.SystemName}"
|
||||
FontSize="24"
|
||||
FontWeight="Bold"
|
||||
HorizontalAlignment="Center"
|
||||
Margin="0,15,0,0"/>
|
||||
</StackPanel>
|
||||
|
||||
<!-- 登录表单 -->
|
||||
<StackPanel x:Name="LoginForm">
|
||||
<!-- 用户名 -->
|
||||
<Grid VerticalAlignment="Center">
|
||||
<hc:TextBox
|
||||
Text="{Binding LoginInput.Username, UpdateSourceTrigger=PropertyChanged}"
|
||||
hc:InfoElement.Placeholder="请输入用户名"
|
||||
hc:InfoElement.Title="用户名"
|
||||
hc:InfoElement.ShowClearButton="True"
|
||||
hc:InfoElement.ContentHeight="32"
|
||||
Margin="0,0,0,20"
|
||||
Padding="30 0 8 0 "/>
|
||||
|
||||
<ctls:FontAwesomeIcon
|
||||
Icon=""
|
||||
IconFamily="Solid"
|
||||
Foreground="#c0c4cc"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Left"
|
||||
Margin="8,4,0,0"/>
|
||||
</Grid>
|
||||
|
||||
<Grid VerticalAlignment="Center">
|
||||
<hc:PasswordBox
|
||||
UnsafePassword="{Binding LoginInput.Password, UpdateSourceTrigger=PropertyChanged}"
|
||||
hc:InfoElement.Placeholder="请输入密码"
|
||||
hc:InfoElement.Title="密码"
|
||||
hc:InfoElement.ShowClearButton="True"
|
||||
hc:InfoElement.ContentHeight="32"
|
||||
IsSafeEnabled="False"
|
||||
VerticalAlignment="Center"
|
||||
Margin="0,0,0,20"
|
||||
Padding="30,0,8,0"/>
|
||||
|
||||
<ctls:FontAwesomeIcon
|
||||
Icon=""
|
||||
IconFamily="Solid"
|
||||
Foreground="#c0c4cc"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Left"
|
||||
Margin="8,4,0,0"/>
|
||||
</Grid>
|
||||
|
||||
<!-- 记住我 -->
|
||||
<CheckBox
|
||||
Content="记住我"
|
||||
IsChecked="{Binding LoginInput.RememberMe}"
|
||||
Margin="0,0,0,20"
|
||||
HorizontalAlignment="Left"
|
||||
FontSize="{StaticResource FontSize}"/>
|
||||
|
||||
<!-- 错误信息 -->
|
||||
<TextBlock
|
||||
Text="{Binding LoginMessage}"
|
||||
Foreground="Red"
|
||||
TextWrapping="Wrap"
|
||||
Margin="0,0,0,10"
|
||||
Visibility="{Binding LoginMessage, Converter={StaticResource String2VisibilityConverter}}"/>
|
||||
|
||||
<!-- 登录按钮 -->
|
||||
<Button
|
||||
x:Name="LoginButton"
|
||||
Click="Submit_Click"
|
||||
Style="{StaticResource ButtonPrimary}"
|
||||
Height="32"
|
||||
FontSize="{StaticResource FontSize}"
|
||||
HorizontalAlignment="Stretch"
|
||||
IsEnabled="{Binding CanInteractWithLogin}"
|
||||
Margin="0,10,0,8">
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
<ctls:FontAwesomeIcon Icon="" Spin="True" Margin="0 0 10 0" Visibility="{Binding IsLoading, Converter={StaticResource Boolean2VisibilityConverter}}"/>
|
||||
<TextBlock Text="{Binding LoginButtonText}"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
|
||||
<!-- 一键同步 Jeecg 用户到本地库(SCADA 免登录接口) -->
|
||||
<Button
|
||||
Command="{Binding SyncJeecgUsersCommand}"
|
||||
Style="{StaticResource ButtonDefault}"
|
||||
Height="32"
|
||||
FontSize="{StaticResource FontSize}"
|
||||
HorizontalAlignment="Stretch"
|
||||
Margin="0,0,0,20"
|
||||
ToolTip="无需登录,从 Jeecg SCADA 接口拉取用户写入 SQLite(需在配置中启用 Jeecg 且 UserListPath 为 scada/queryUser)">
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
<ctls:FontAwesomeIcon Icon="" Margin="0 0 8 0" Spin="{Binding IsSyncingJeecgUsers}"/>
|
||||
<TextBlock Text="{Binding SyncJeecgUsersButtonText}"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
|
||||
<!-- 后端连接状态指示器 -->
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Left" Margin="0,0,0,8">
|
||||
<Ellipse Width="10" Height="10" Fill="{Binding BackendConnectionStatusBrush}" VerticalAlignment="Center" Margin="0,0,6,0"/>
|
||||
<TextBlock Text="{Binding BackendConnectionStatusText}" Foreground="#666666" FontSize="12" VerticalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
|
||||
<!-- 其他链接 -->
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
||||
<TextBlock Text="忘记密码?" Foreground="#1890ff" Cursor="Hand" Margin="0,0,20,0"/>
|
||||
<TextBlock Text="注册账号" Foreground="#1890ff" Cursor="Hand"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Grid>
|
||||
</hc:Window>
|
||||
Reference in New Issue
Block a user