Skip to content

Commit

Permalink
🚧 文本调整
Browse files Browse the repository at this point in the history
  • Loading branch information
rmbadmin committed Nov 25, 2024
1 parent 1648d65 commit 3633915
Show file tree
Hide file tree
Showing 8 changed files with 45 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using Avalonia.Platform.Storage;
using Avalonia.Threading;
using BD.Common.Models;
using BD.WTTS.Helpers;
using BD.WTTS.UI.Views.Controls;
using BD.WTTS.UI.Views.Pages;
using FluentAvalonia.UI.Controls;
Expand Down Expand Up @@ -52,7 +53,7 @@ public sealed partial class GameAcceleratorService
[Reactive]
public DateTime? VipEndTime { get; set; }

const string VipEndTimeStringDef = "新用户免费试用 2 天";
const string VipEndTimeStringDef = "新用户免费试用";

[Reactive]
public string? VipEndTimeString { get; set; } = VipEndTimeStringDef;
Expand Down Expand Up @@ -356,6 +357,12 @@ public async Task GameAccelerator(XunYouGameViewModel app)
app.IsAccelerating = false;
return;
}

TracepointHelper.TrackEvent(nameof(GameAccelerator), new Dictionary<string, string> {
{ "GameId", app.Id.ToString() },
{ "GameName", app.Name ?? string.Empty },
});

var xunYouIsInstall = await Ioc.Get<IAcceleratorService>().XY_IsInstall();
if (xunYouIsInstall.HandleUI(out var isInstall))
{
Expand Down Expand Up @@ -604,6 +611,7 @@ public static async Task InstallAccelerator()
Toast.Show(ToastIcon.Info, "已安装Watt加速器");
return;
}
TracepointHelper.TrackEvent("DownloadInstallAccelerator");
var td = new TaskDialog
{
Title = "下载插件",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// ReSharper disable once CheckNamespace
using BD.WTTS.Helpers;

namespace BD.WTTS.Services;

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

TracepointHelper.TrackEvent("StartProxy", new Dictionary<string, string> {
{ "ProxyType", ProxySettings.ProxyMode.Value.ToString() },
{ "ProxyScriptStatus", ProxySettings.IsEnableScript.Value.ToString() },
});

IReadOnlyCollection<ScriptIPCDTO>? scripts = default;
bool isEnableScript = ProxySettings.IsEnableScript.Value;
bool isOnlyWorkSteamBrowser = ProxySettings.IsOnlyWorkSteamBrowser.Value;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// ReSharper disable once CheckNamespace
using Avalonia.Data;
using BD.WTTS.Helpers;
using Google.Protobuf.WellKnownTypes;
using Org.BouncyCastle.Bcpg.OpenPgp;
using System.Linq;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using Avalonia.Controls;
using Avalonia.Platform.Storage;
using Avalonia.ReactiveUI;
using BD.WTTS.Helpers;

namespace BD.WTTS.UI.Views.Controls;

Expand All @@ -9,6 +10,8 @@ public partial class AcceleratorPathAskBox : ReactiveUserControl<MessageBoxWindo
public AcceleratorPathAskBox()
{
InitializeComponent();

TracepointHelper.TrackEvent("AcceleratorPathAskBoxShow");
}

private async void SelectWattAcceleratorInstallPath(object? sender, Avalonia.Interactivity.RoutedEventArgs e)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
using Avalonia.Controls;
using Avalonia.Controls.Primitives;
using Avalonia.Interactivity;
using BD.WTTS.Helpers;
using BD.WTTS.UI.Views.Pages;
using FluentAvalonia.UI.Media.Animation;
using System.Runtime.Devices;

namespace BD.WTTS.UI.Views.Controls;

Expand All @@ -17,6 +19,10 @@ private void AuthenticatorImportPage_Tapped(object? sender, Avalonia.Input.Tappe
{
if (sender is AppItem item && item.Tag is AuthenticatorImportMethod importMethod && item.ClickCommand == null && AuthenticatorImportPage.InnerFrame != null)
{
TracepointHelper.TrackEvent("AuthenticatorImport", new Dictionary<string, string> {
{ "ImportMethod", importMethod.Name },
});

AuthenticatorImportPage.InnerFrame.Navigate(importMethod.PageType, null, new SlideNavigationTransitionInfo
{
Effect = SlideNavigationTransitionEffect.FromRight,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using SJsonSerializer = System.Text.Json.JsonSerializer;
using Avalonia.Platform;
using BD.WTTS.UI.Views.Pages;
using BD.WTTS.Helpers;

namespace BD.WTTS.UI.ViewModels;

Expand Down Expand Up @@ -46,6 +47,9 @@ public GameAccountPageViewModel()

public void AddPlatform(PlatformAccount platform)
{
TracepointHelper.TrackEvent("GameAccountAddPlatform", new Dictionary<string, string> {
{ "Name", platform.Platform.ToString() },
});
GamePlatforms?.Add(platform);
AddGamePlatforms?.Remove(platform);
GameAccountSettings.EnablePlatforms.Add(platform.FullName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
using BD.SteamClient.Services;
using BD.SteamClient.Constants;
using Avalonia.Threading;
using System.Runtime.Devices;
using BD.WTTS.Helpers;

namespace BD.WTTS.UI.ViewModels;

Expand Down Expand Up @@ -112,6 +114,8 @@ public async Task IdleRunStartOrStop_Click()

if (!RunState)
{
TracepointHelper.TrackEvent("IdleCardRun");

if (SteamLoginState.Success && SteamLoginState.SteamId != (ulong?)SteamConnectService.Current.CurrentSteamUser?.SteamId64)
{
Toast.Show(ToastIcon.Warning, Strings.SteamIdle_LoginSteamUserError);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// ReSharper disable once CheckNamespace
using BD.WTTS.Helpers;

namespace BD.WTTS.UI.ViewModels.Abstractions;

public abstract partial class ItemViewModel : ViewModelBase
Expand Down Expand Up @@ -84,4 +86,13 @@ public virtual bool SelectsOnInvoked
}

#endregion

public override void Activation()
{
base.Activation();

TracepointHelper.TrackEvent("PageActivation", new Dictionary<string, string> {
{ "PageName", Name },
});
}
}

0 comments on commit 3633915

Please sign in to comment.