launcher: side-by-side versions.json fallback + empty-state UX

The version dropdown sat silently empty when the GitHub manifest
fetch 404'd (private repo, network down, etc.) and there was no
DORKNET_LOCAL_MANIFEST to fall back to. Two fixes:

- csproj copies the repo-root versions.json next to dorknet.exe on
  build, and LocalOverrides.GetLocalManifestPath checks that path
  as a fallback after the env var. Dev checkouts against a private
  repo now Just Work — no env vars needed.
- When the manifest can't be loaded, RefreshManifestAsync now
  inserts a disabled placeholder "(no versions - check internet or
  set DORKNET_LOCAL_MANIFEST)" in the dropdown so the user sees the
  problem at a glance instead of a silent blank.
- LocalOverrides.DescribeManifestSource shows in Settings whether
  the active manifest came from the env var, the side-by-side
  fallback, or the live GitHub fetch.
This commit is contained in:
Alexa
2026-05-27 12:05:21 +03:00
parent a5f1d74a8e
commit de98ea694f
3 changed files with 59 additions and 8 deletions
+13
View File
@@ -27,4 +27,17 @@
<PackageReference Include="QRCoder" Version="1.6.0" />
</ItemGroup>
<!-- Dev convenience: copy the repo-root versions.json next to dorknet.exe
on build, so a dev checkout works against the private repo without
needing DORKNET_LOCAL_MANIFEST set. LocalOverrides picks this up as
a side-by-side fallback. The file is harmless to ship in release
builds too — VersionsManifest still prefers the live GitHub fetch
when reachable. -->
<ItemGroup>
<None Include="..\versions.json" Condition="Exists('..\versions.json')">
<Link>versions.json</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>