Skip to content

Commit 3633915

Browse files
committed
🚧 文本调整
1 parent 1648d65 commit 3633915

File tree

8 files changed

+45
-1
lines changed

8 files changed

+45
-1
lines changed

src/BD.WTTS.Client.Plugins.Accelerator/Services/Mvvm/GameAcceleratorService.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
using Avalonia.Platform.Storage;
33
using Avalonia.Threading;
44
using BD.Common.Models;
5+
using BD.WTTS.Helpers;
56
using BD.WTTS.UI.Views.Controls;
67
using BD.WTTS.UI.Views.Pages;
78
using FluentAvalonia.UI.Controls;
@@ -52,7 +53,7 @@ public sealed partial class GameAcceleratorService
5253
[Reactive]
5354
public DateTime? VipEndTime { get; set; }
5455

55-
const string VipEndTimeStringDef = "新用户免费试用 2";
56+
const string VipEndTimeStringDef = "新用户免费试用";
5657

5758
[Reactive]
5859
public string? VipEndTimeString { get; set; } = VipEndTimeStringDef;
@@ -356,6 +357,12 @@ public async Task GameAccelerator(XunYouGameViewModel app)
356357
app.IsAccelerating = false;
357358
return;
358359
}
360+
361+
TracepointHelper.TrackEvent(nameof(GameAccelerator), new Dictionary<string, string> {
362+
{ "GameId", app.Id.ToString() },
363+
{ "GameName", app.Name ?? string.Empty },
364+
});
365+
359366
var xunYouIsInstall = await Ioc.Get<IAcceleratorService>().XY_IsInstall();
360367
if (xunYouIsInstall.HandleUI(out var isInstall))
361368
{
@@ -604,6 +611,7 @@ public static async Task InstallAccelerator()
604611
Toast.Show(ToastIcon.Info, "已安装Watt加速器");
605612
return;
606613
}
614+
TracepointHelper.TrackEvent("DownloadInstallAccelerator");
607615
var td = new TaskDialog
608616
{
609617
Title = "下载插件",

src/BD.WTTS.Client.Plugins.Accelerator/Services/Mvvm/ProxyService.Operate.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
// ReSharper disable once CheckNamespace
2+
using BD.WTTS.Helpers;
3+
24
namespace BD.WTTS.Services;
35

46
partial class ProxyService
@@ -36,6 +38,11 @@ async Task<OperateProxyServiceResult> StartProxyServiceCoreAsync()
3638
Toast.Show(ToastIcon.Warning, Strings.CommunityFix_AccEmpty);
3739
}
3840

41+
TracepointHelper.TrackEvent("StartProxy", new Dictionary<string, string> {
42+
{ "ProxyType", ProxySettings.ProxyMode.Value.ToString() },
43+
{ "ProxyScriptStatus", ProxySettings.IsEnableScript.Value.ToString() },
44+
});
45+
3946
IReadOnlyCollection<ScriptIPCDTO>? scripts = default;
4047
bool isEnableScript = ProxySettings.IsEnableScript.Value;
4148
bool isOnlyWorkSteamBrowser = ProxySettings.IsOnlyWorkSteamBrowser.Value;

src/BD.WTTS.Client.Plugins.Accelerator/Services/Mvvm/ProxyService.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// ReSharper disable once CheckNamespace
22
using Avalonia.Data;
3+
using BD.WTTS.Helpers;
34
using Google.Protobuf.WellKnownTypes;
45
using Org.BouncyCastle.Bcpg.OpenPgp;
56
using System.Linq;

src/BD.WTTS.Client.Plugins.Accelerator/UI/Views/Controls/AcceleratorPathAskBox.axaml.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using Avalonia.Controls;
22
using Avalonia.Platform.Storage;
33
using Avalonia.ReactiveUI;
4+
using BD.WTTS.Helpers;
45

56
namespace BD.WTTS.UI.Views.Controls;
67

@@ -9,6 +10,8 @@ public partial class AcceleratorPathAskBox : ReactiveUserControl<MessageBoxWindo
910
public AcceleratorPathAskBox()
1011
{
1112
InitializeComponent();
13+
14+
TracepointHelper.TrackEvent("AcceleratorPathAskBoxShow");
1215
}
1316

1417
private async void SelectWattAcceleratorInstallPath(object? sender, Avalonia.Interactivity.RoutedEventArgs e)

src/BD.WTTS.Client.Plugins.Authenticator/UI/Views/Controls/AuthenticatorImportMethodSelect.axaml.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
using Avalonia.Controls;
22
using Avalonia.Controls.Primitives;
33
using Avalonia.Interactivity;
4+
using BD.WTTS.Helpers;
45
using BD.WTTS.UI.Views.Pages;
56
using FluentAvalonia.UI.Media.Animation;
7+
using System.Runtime.Devices;
68

79
namespace BD.WTTS.UI.Views.Controls;
810

@@ -17,6 +19,10 @@ private void AuthenticatorImportPage_Tapped(object? sender, Avalonia.Input.Tappe
1719
{
1820
if (sender is AppItem item && item.Tag is AuthenticatorImportMethod importMethod && item.ClickCommand == null && AuthenticatorImportPage.InnerFrame != null)
1921
{
22+
TracepointHelper.TrackEvent("AuthenticatorImport", new Dictionary<string, string> {
23+
{ "ImportMethod", importMethod.Name },
24+
});
25+
2026
AuthenticatorImportPage.InnerFrame.Navigate(importMethod.PageType, null, new SlideNavigationTransitionInfo
2127
{
2228
Effect = SlideNavigationTransitionEffect.FromRight,

src/BD.WTTS.Client.Plugins.GameAccount/UI/ViewModels/GameAccountPageViewModel.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
using SJsonSerializer = System.Text.Json.JsonSerializer;
33
using Avalonia.Platform;
44
using BD.WTTS.UI.Views.Pages;
5+
using BD.WTTS.Helpers;
56

67
namespace BD.WTTS.UI.ViewModels;
78

@@ -46,6 +47,9 @@ public GameAccountPageViewModel()
4647

4748
public void AddPlatform(PlatformAccount platform)
4849
{
50+
TracepointHelper.TrackEvent("GameAccountAddPlatform", new Dictionary<string, string> {
51+
{ "Name", platform.Platform.ToString() },
52+
});
4953
GamePlatforms?.Add(platform);
5054
AddGamePlatforms?.Remove(platform);
5155
GameAccountSettings.EnablePlatforms.Add(platform.FullName);

src/BD.WTTS.Client.Plugins.SteamIdleCard/UI/ViewModels/IdleCardPageViewModel.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
using BD.SteamClient.Services;
44
using BD.SteamClient.Constants;
55
using Avalonia.Threading;
6+
using System.Runtime.Devices;
7+
using BD.WTTS.Helpers;
68

79
namespace BD.WTTS.UI.ViewModels;
810

@@ -112,6 +114,8 @@ public async Task IdleRunStartOrStop_Click()
112114

113115
if (!RunState)
114116
{
117+
TracepointHelper.TrackEvent("IdleCardRun");
118+
115119
if (SteamLoginState.Success && SteamLoginState.SteamId != (ulong?)SteamConnectService.Current.CurrentSteamUser?.SteamId64)
116120
{
117121
Toast.Show(ToastIcon.Warning, Strings.SteamIdle_LoginSteamUserError);

src/BD.WTTS.Client/UI/ViewModels/Abstractions/Items/ItemViewModel.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
// ReSharper disable once CheckNamespace
2+
using BD.WTTS.Helpers;
3+
24
namespace BD.WTTS.UI.ViewModels.Abstractions;
35

46
public abstract partial class ItemViewModel : ViewModelBase
@@ -84,4 +86,13 @@ public virtual bool SelectsOnInvoked
8486
}
8587

8688
#endregion
89+
90+
public override void Activation()
91+
{
92+
base.Activation();
93+
94+
TracepointHelper.TrackEvent("PageActivation", new Dictionary<string, string> {
95+
{ "PageName", Name },
96+
});
97+
}
8798
}

0 commit comments

Comments
 (0)