feat(home-dialog): populate home_dialog_list on /mypage/index

Walk-down behavior: each call emits the highest-priority unfired
active dialog; subsequent calls walk to the next-priority entry.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
gamer147
2026-06-08 18:55:48 -04:00
parent 7e757ebcd2
commit 9d6a5cc3b9
4 changed files with 233 additions and 2 deletions

View File

@@ -0,0 +1,37 @@
using System.Text.Json.Serialization;
using MessagePack;
namespace SVSim.EmulatedEntrypoint.Models.Dtos.Common;
/// <summary>
/// One entry in /mypage/index data.home_dialog_list. Client parser
/// (Wizard/MyPageHomeDialogData.cs) only reads [0]; up to 3 buttons supported
/// (switch on 0/1/2/3 in MyPageHomeDialog.cs).
/// </summary>
[MessagePackObject]
public class HomeDialog
{
/// <summary>Wire "type" — prod sends "1"; client parser ignores it. Stringly-typed.
/// Null is omitted by the global WhenWritingNull policy.</summary>
[JsonPropertyName("type")] [Key("type")] public string? Type { get; set; }
/// <summary>Localization key resolved client-side via Data.SystemText.Get.</summary>
[JsonPropertyName("title_text_id")] [Key("title_text_id")] public string TitleTextId { get; set; } = string.Empty;
/// <summary>Asset name resolved via ResourcesManager.AssetLoadPathType.UiDownLoad.</summary>
[JsonPropertyName("image")] [Key("image")] public string Image { get; set; } = string.Empty;
[JsonPropertyName("button_list")] [Key("button_list")] public List<HomeDialogButtonDto> ButtonList { get; set; } = new();
}
[MessagePackObject]
public class HomeDialogButtonDto
{
[JsonPropertyName("button_text_id")] [Key("button_text_id")] public string ButtonTextId { get; set; } = string.Empty;
/// <summary>Scene id consumed by MyPageBannerBase.SceneChangeBySetting (e.g. "card_pack", "mission").</summary>
[JsonPropertyName("scene")] [Key("scene")] public string Scene { get; set; } = string.Empty;
/// <summary>Contextual id passed to the scene (e.g. parent_gacha_id "80032"). Stringly-typed on the wire.</summary>
[JsonPropertyName("status")] [Key("status")] public string Status { get; set; } = string.Empty;
}

View File

@@ -123,7 +123,7 @@ public class MyPageIndexResponse
[JsonPropertyName("home_dialog_list")]
[Key("home_dialog_list")]
public List<object> HomeDialogList { get; set; } = new();
public List<Common.HomeDialog> HomeDialogList { get; set; } = new();
// ── Room type in session (Special-format windows) ──────────────────────