Update desktop host configuration
Adds desktop host options for browser shutdown behavior, app-mode preference, browser profile directory, startup URL, and development overrides.main
parent
47620fad08
commit
c60bfec891
|
|
@ -13,4 +13,30 @@ public sealed class DesktopHostOptions
|
|||
/// Optional URL to open. If empty, the first bound HTTP address from Kestrel is used.
|
||||
/// </summary>
|
||||
public string? BrowserUrl { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// When true (default for published desktop exe), stops the host when the launched browser window closes.
|
||||
/// </summary>
|
||||
public bool ExitWhenBrowserCloses { get; init; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// Seconds to wait after the page unloads before shutdown (allows cancel on reload).
|
||||
/// </summary>
|
||||
public int BrowserShutdownDelaySeconds { get; init; } = 2;
|
||||
|
||||
/// <summary>
|
||||
/// Prefer Edge/Chrome app-mode window (trackable process) on Windows before the default browser.
|
||||
/// </summary>
|
||||
public bool PreferAppModeBrowser { get; init; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// Dedicated Edge/Chrome profile directory so app-mode uses a trackable browser process.
|
||||
/// </summary>
|
||||
public string BrowserUserDataDir { get; init; } =
|
||||
@"C:\Users\Public\AVSCartonShipmentVerifier\browser-profile";
|
||||
|
||||
/// <summary>
|
||||
/// If the tracked browser process exits sooner than this, treat it as a launcher handoff (do not stop the app).
|
||||
/// </summary>
|
||||
public int MinimumBrowserProcessLifetimeSeconds { get; init; } = 5;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,8 @@
|
|||
"VerificationDatabase": "Server=192.168.90.147;Port=3306;Database=UIND;User ID=utopia;Password=Utopia01;SslMode=None;Allow User Variables=True;"
|
||||
},
|
||||
"DesktopHost": {
|
||||
"LaunchBrowser": false
|
||||
"LaunchBrowser": false,
|
||||
"ExitWhenBrowserCloses": false
|
||||
},
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
|
|
|
|||
|
|
@ -13,6 +13,11 @@
|
|||
|
||||
"DesktopHost": {
|
||||
"LaunchBrowser": true,
|
||||
"BrowserUrl": "http://localhost:5000"
|
||||
"BrowserUrl": "http://127.0.0.1:5000",
|
||||
"ExitWhenBrowserCloses": true,
|
||||
"BrowserShutdownDelaySeconds": 2,
|
||||
"PreferAppModeBrowser": true,
|
||||
"BrowserUserDataDir": "C:\\Users\\Public\\AVSCartonShipmentVerifier\\browser-profile",
|
||||
"MinimumBrowserProcessLifetimeSeconds": 5
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,12 @@
|
|||
},
|
||||
"DesktopHost": {
|
||||
"LaunchBrowser": true,
|
||||
"BrowserUrl": ""
|
||||
"BrowserUrl": "http://127.0.0.1:5000",
|
||||
"ExitWhenBrowserCloses": true,
|
||||
"BrowserShutdownDelaySeconds": 2,
|
||||
"PreferAppModeBrowser": true,
|
||||
"BrowserUserDataDir": "C:\\Users\\Public\\AVSCartonShipmentVerifier\\browser-profile",
|
||||
"MinimumBrowserProcessLifetimeSeconds": 5
|
||||
},
|
||||
"CartonVerification": {
|
||||
"TableName": "carton_verification_log",
|
||||
|
|
|
|||
Loading…
Reference in New Issue