add copy hint for #1074

This commit is contained in:
DismissedLight
2023-11-06 20:53:29 +08:00
parent 5bc957c6a5
commit bdb406c451
3 changed files with 9 additions and 3 deletions

View File

@@ -2741,6 +2741,9 @@
<data name="WebGachaConfigTypeWeaponEventWish" xml:space="preserve">
<value>武器活动祈愿</value>
</data>
<data name="WebGameResourcePathCopySucceed" xml:space="preserve">
<value>下载链接复制成功</value>
</data>
<data name="WebIndexOrSpiralAbyssVerificationFailed" xml:space="preserve">
<value>验证失败,请手动验证或前往「米游社-我的角色」页面查看</value>
</data>

View File

@@ -49,7 +49,7 @@
HorizontalAlignment="Right"
VerticalAlignment="Center"
Command="{Binding CopyPathCommand}"
Content="{StaticResource FontIconContentOpenInNewWindow}"
Content="{StaticResource FontIconContentCopy}"
FontFamily="{StaticResource SymbolThemeFontFamily}"/>
</Grid>
</DataTemplate>
@@ -93,7 +93,7 @@
HorizontalAlignment="Right"
VerticalAlignment="Center"
Command="{Binding CopyPathCommand}"
Content="{StaticResource FontIconContentOpenInNewWindow}"
Content="{StaticResource FontIconContentCopy}"
FontFamily="{StaticResource SymbolThemeFontFamily}"/>
<MenuFlyoutSeparator Grid.Row="2" Margin="4,16,4,0"/>
<ItemsControl

View File

@@ -2,6 +2,7 @@
// Licensed under the MIT license.
using Snap.Hutao.Core.IO.DataTransfer;
using Snap.Hutao.Service.Notification;
namespace Snap.Hutao.Web.Hoyolab.SdkStatic.Hk4e.Launcher;
@@ -31,6 +32,8 @@ internal partial class PathMd5
[Command("CopyPathCommand")]
private void CopyPathToClipboard()
{
Ioc.Default.GetRequiredService<IClipboardInterop>().SetText(Path);
IServiceProvider serviceProvider = Ioc.Default;
serviceProvider.GetRequiredService<IClipboardInterop>().SetText(Path);
serviceProvider.GetRequiredService<IInfoBarService>().Success(SH.WebGameResourcePathCopySucceed);
}
}