mirror of
https://github.com/stride3d/stride.git
synced 2026-10-12 02:23:23 +00:00
Launcher: release notes are loaded from their new URL in the documentation (https://doc.stride3d.net/en/release-notes/<version>.md)
This commit is contained in:
@@ -106,7 +106,7 @@ The Stride documentation is organized across different locations. Here's how it'
|
||||
2. [Stride Docs](https://doc.stride3d.net/) - The official documentation, including:
|
||||
- [Manual](https://doc.stride3d.net/latest/en/manual/index.html)
|
||||
- [Tutorials](https://doc.stride3d.net/latest/en/tutorials/index.html)
|
||||
- [Release Notes](https://doc.stride3d.net/latest/en/ReleaseNotes/ReleaseNotes.html)
|
||||
- [Release Notes](https://doc.stride3d.net/en/release-notes/index.html)
|
||||
- [Ways to contribute](https://doc.stride3d.net/latest/en/contributors/index.html)
|
||||
- [API Reference](https://doc.stride3d.net/latest/en/api/index.html)
|
||||
- [Community Resources](https://doc.stride3d.net/latest/en/community-resources/index.html) - Demos, articles, shaders, physics examples, and more.
|
||||
|
||||
@@ -25,6 +25,7 @@ public sealed partial class ReleaseNotesViewModel : DispatcherViewModel
|
||||
private const string RootUrl = "https://doc.stride3d.net";
|
||||
private const string ReleaseNotesFileName = "ReleaseNotes.md";
|
||||
private readonly string baseUrl;
|
||||
private readonly string releaseNotesFileName;
|
||||
|
||||
internal ReleaseNotesViewModel(MainViewModel launcher, string version)
|
||||
: base(launcher.SafeArgument(nameof(launcher)).ServiceProvider)
|
||||
@@ -34,7 +35,9 @@ public sealed partial class ReleaseNotesViewModel : DispatcherViewModel
|
||||
|
||||
this.launcher = launcher;
|
||||
Version = version;
|
||||
baseUrl = $"{RootUrl}/{Version}/ReleaseNotes/";
|
||||
// The release notes of every version (betas included) are in one place
|
||||
baseUrl = $"{RootUrl}/en/release-notes/";
|
||||
releaseNotesFileName = $"{Version}.md";
|
||||
#if DEBUG
|
||||
if (Environment.CommandLine.ToLowerInvariant().Contains("/previewreleasenotes"))
|
||||
{
|
||||
@@ -43,6 +46,7 @@ public sealed partial class ReleaseNotesViewModel : DispatcherViewModel
|
||||
if (File.Exists($"{mdPath}{ReleaseNotesFileName}"))
|
||||
{
|
||||
baseUrl = $"file:///{mdPath.Replace("\\", "/")}";
|
||||
releaseNotesFileName = ReleaseNotesFileName;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -72,7 +76,7 @@ public sealed partial class ReleaseNotesViewModel : DispatcherViewModel
|
||||
|
||||
try
|
||||
{
|
||||
using var response = await httpClient.GetAsync($"{BaseUrl}{ReleaseNotesFileName}");
|
||||
using var response = await httpClient.GetAsync($"{BaseUrl}{releaseNotesFileName}");
|
||||
response.EnsureSuccessStatusCode();
|
||||
releaseNotesMarkdown = await response.Content.ReadAsStringAsync();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user