Skip to content

Commit

Permalink
- Added Release Notes link in Admin Page
Browse files Browse the repository at this point in the history
  • Loading branch information
BryanSoltis committed Jul 31, 2023
1 parent ce03ffd commit 574afab
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
3 changes: 2 additions & 1 deletion src/Helpers/ModalHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public static async Task<bool> ShowConfirmationModal(IModalService modal, string
return response;
}

public static void ShowInformationModal(IModalService modal, ThemeInfo theme, string headerstyle, string title, string message, object component, bool admin)
public static void ShowInformationModal(IModalService modal, ThemeInfo theme, string headerstyle, string title, string message, object component, bool admin, string? externalurl = null)
{
try
{
Expand All @@ -55,6 +55,7 @@ public static void ShowInformationModal(IModalService modal, ThemeInfo theme, st
{ nameof(InformationModal.headerstyle), headerstyle },
{ nameof(InformationModal.component), component },
{ nameof(InformationModal.admin), admin },
{ nameof(InformationModal.externalurl), externalurl! },
{ "theme", theme }
};

Expand Down
12 changes: 7 additions & 5 deletions src/Pages/Admin.razor
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
</div>
<div class="collapse show card card-body @theme.ThemeStyle" id="versiondetails">
<div class="mb-3">
<strong>Current version:</strong> @appversion
<strong>Current version:</strong> @appversion (<a href="@releasenotesurl" target="_blank">Release Notes</a>)
</div>
@if (!String.IsNullOrEmpty(versionalert))
{
Expand All @@ -78,10 +78,10 @@
<div class="collapse card card-body @theme.ThemeStyle" id="environmentvariables">
<div class="mb-3">
<ul>
@foreach(var variable in environmentvariables)
{
<li>@variable.Key: @variable.Value</li>
}
@foreach (var variable in environmentvariables)
{
<li>@variable.Key: @variable.Value</li>
}
</ul>
</div>

Expand Down Expand Up @@ -449,6 +449,7 @@
private SiteConfiguration config = ConfigurationHelper.GetConfigurationData();
private string currentuser = String.Empty;
private List<KeyValuePair<string, string>> environmentvariables = new();
private string releasenotesurl = String.Empty;

protected override async Task OnAfterRenderAsync(bool firstRender)
{
Expand All @@ -459,6 +460,7 @@
if (GeneralHelper.IsNotNull(Assembly.GetEntryAssembly()))
{
appversion = Assembly.GetEntryAssembly()!.GetCustomAttribute<AssemblyInformationalVersionAttribute>()!.InformationalVersion;
releasenotesurl = "https://github.com/mspnp/AzureNamingTool/wiki/v" + appversion;
}

servicesData = await ServicesHelper.LoadServicesData(servicesData, true);
Expand Down

0 comments on commit 574afab

Please sign in to comment.