launcher: Photon AppId setup walkthrough

The two empty "REALTIME APPID / VOICE APPID" textboxes assumed the
user already knew what Photon was, where to sign up, and which app
type to create. New 5-step wizard fills that gap:

1. What's Photon? — one-paragraph explanation tying back to DorkNet
2. Make an account — Open Dashboard button launches browser
3. Create a Realtime app — numbered click-by-click instructions
4. Create a Voice app — same, with a Skip button (voice is optional)
5. Paste your AppIds — text fields with live regex validation,
   region picker, Save commits to AppState

Hyphens optional on input; we normalise to canonical 8-4-4-4-12 form
before writing back. The existing Photon section keeps its three
fields for advanced users, with a "Setup walkthrough" button at the
top opening the wizard prefilled with current values.
This commit is contained in:
Alexa
2026-05-27 11:14:23 +03:00
parent 3aa0b55512
commit 7c974e39ab
5 changed files with 413 additions and 3 deletions
+16
View File
@@ -231,6 +231,22 @@ public partial class MainWindow : Window
_state.Save();
}
private void OnOpenPhotonWizard(object sender, RoutedEventArgs e)
{
var wiz = new PhotonWizard(_state.PhotonAppId, _state.PhotonVoiceAppId, _state.PhotonRegion)
{
Owner = this,
};
if (wiz.ShowDialog() == true && wiz.Result is not null)
{
_state.PhotonAppId = wiz.Result.RealtimeAppId;
_state.PhotonVoiceAppId = wiz.Result.VoiceAppId;
_state.PhotonRegion = wiz.Result.Region;
_state.Save();
ReflectStateInUi();
}
}
private void OnHostingModeChanged(object sender, RoutedEventArgs e)
{
// RadioButton.Checked fires twice on selection-change (once for