Skip to content

Commit

Permalink
add hint for mihoyo passport login
Browse files Browse the repository at this point in the history
  • Loading branch information
Lightczx committed Mar 29, 2024
1 parent 0242d3d commit d5eec58
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 20 deletions.
3 changes: 3 additions & 0 deletions src/Snap.Hutao/Snap.Hutao/Resource/Localization/SH.resx
Original file line number Diff line number Diff line change
Expand Up @@ -2345,6 +2345,9 @@
<data name="ViewPageLoginHoyoverseUserHint" xml:space="preserve">
<value>请输入你的 HoYoLab Uid</value>
</data>
<data name="ViewPageLoginMihoyoUserDescription" xml:space="preserve">
<value>你正在通过由我们提供的内嵌网页视图登录 米哈游通行证,我们会在你点击 我已登录 按钮后,读取你的 Cookie 信息,你的账号与密码不会泄漏</value>
</data>
<data name="ViewPageLoginMihoyoUserLoggedInAction" xml:space="preserve">
<value>我已登录</value>
</data>
Expand Down
26 changes: 16 additions & 10 deletions src/Snap.Hutao/Snap.Hutao/View/Page/LoginHoyoverseUserPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,22 @@
<RowDefinition Height="auto"/>
<RowDefinition/>
</Grid.RowDefinitions>
<TextBlock
Grid.Row="0"
Margin="12,0,0,0"
VerticalAlignment="Center"
Text="{shcm:ResourceString Name=ViewPageLoginMihoyoUserTitle}"/>
<Button
Margin="16"
HorizontalAlignment="Right"
Command="{x:Bind HandleCurrentCookieCommand}"
Content="{shcm:ResourceString Name=ViewPageLoginMihoyoUserLoggedInAction}"/>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="0" Margin="12">
<TextBlock Text="{shcm:ResourceString Name=ViewPageLoginMihoyoUserTitle}"/>
<TextBlock Text="{shcm:ResourceString Name=ViewPageLoginMihoyoUserDescription}"/>
</StackPanel>
<Button
Grid.Column="1"
Margin="12"
Command="{x:Bind HandleCurrentCookieCommand}"
Content="{shcm:ResourceString Name=ViewPageLoginMihoyoUserLoggedInAction}"/>
</Grid>
<WebView2 x:Name="WebView" Grid.Row="2"/>
</Grid>

</Page>
26 changes: 16 additions & 10 deletions src/Snap.Hutao/Snap.Hutao/View/Page/LoginMihoyoUserPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,22 @@
<RowDefinition Height="auto"/>
<RowDefinition/>
</Grid.RowDefinitions>
<TextBlock
Grid.Row="0"
Margin="12,0,0,0"
VerticalAlignment="Center"
Text="{shcm:ResourceString Name=ViewPageLoginMihoyoUserTitle}"/>
<Button
Margin="16"
HorizontalAlignment="Right"
Command="{x:Bind HandleCurrentCookieCommand}"
Content="{shcm:ResourceString Name=ViewPageLoginMihoyoUserLoggedInAction}"/>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="0" Margin="12">
<TextBlock Text="{shcm:ResourceString Name=ViewPageLoginMihoyoUserTitle}"/>
<TextBlock Text="{shcm:ResourceString Name=ViewPageLoginMihoyoUserDescription}"/>
</StackPanel>
<Button
Grid.Column="1"
Margin="12"
Command="{x:Bind HandleCurrentCookieCommand}"
Content="{shcm:ResourceString Name=ViewPageLoginMihoyoUserLoggedInAction}"/>
</Grid>
<WebView2 x:Name="WebView" Grid.Row="2"/>
</Grid>

</Page>

0 comments on commit d5eec58

Please sign in to comment.