diff --git a/src/AzureNamingTool.csproj b/src/AzureNamingTool.csproj index 67d6e7d..31988a9 100644 --- a/src/AzureNamingTool.csproj +++ b/src/AzureNamingTool.csproj @@ -4,21 +4,31 @@ net8.0 enable enable - 4.1.0 + 4.2.0 true eca63fb9-b7f9-454f-910b-5088ae877085 Linux . + + + + + + + + - - - - - - + + + + + + + + diff --git a/src/Components/App.razor b/src/Components/App.razor index e127ed8..9125653 100644 --- a/src/Components/App.razor +++ b/src/Components/App.razor @@ -55,6 +55,7 @@ + @@ -63,6 +64,8 @@ + + diff --git a/src/Components/General/NavMenu.razor b/src/Components/General/NavMenu.razor deleted file mode 100644 index 5da4ba1..0000000 --- a/src/Components/General/NavMenu.razor +++ /dev/null @@ -1,223 +0,0 @@ -@using AzureNamingTool.Helpers -@using AzureNamingTool.Models -@inject StateContainer state -@inject ProtectedSessionStorage session -@inject IJSRuntime JsRuntime -@inject ILogger Logger -@inject ProtectedLocalStorage storage -@inject NavigationManager NavigationManager - - - -
- -
- -@code { - [Parameter] - public Type? PageType { get; set; } - private bool collapseNavMenu = true; - private ServicesData servicesData = new(); - private bool admin; - private SiteConfiguration config = ConfigurationHelper.GetConfigurationData(); - private string NavMenuCssClass => collapseNavMenu ? "collapse" : String.Empty; - private bool latestnewsenabled = false; - private bool connected = true; - - protected override async Task OnAfterRenderAsync(bool firstRender) - { - var result = await session.GetAsync("admin"); - admin = (bool)result.Value; - if (firstRender) - { - if (await ConfigurationHelper.VerifyConnectivity()) - { - servicesData = await ServicesHelper.LoadServicesData(servicesData, admin); - try - { - result = await storage.GetAsync("latestnewsenabled"); - latestnewsenabled = result.Success ? result.Value : true; - } - catch - { - latestnewsenabled = true; - } - state.LatestNewsEnabled = latestnewsenabled; - } - else - { - connected = false; - } - StateHasChanged(); - } - else - { - if ((GeneralHelper.IsNotNull(servicesData)) || (state._reloadnav)) - { - servicesData = await ServicesHelper.LoadServicesData(servicesData, admin); - state.SetNavReload(false); - } - } - } - - private void ToggleNavMenu() - { - collapseNavMenu = !collapseNavMenu; - } - - private async void OnConfigNavClick(string e) - { - await JsRuntime.InvokeVoidAsync("scrollIntoView", e); - } - - private async void NewsChanged(ChangeEventArgs e) - { - if (GeneralHelper.IsNotNull(e.Value)) - { - latestnewsenabled = (bool)e.Value; - await storage.SetAsync("newsenabled", latestnewsenabled); - state.LatestNewsEnabled = latestnewsenabled; - StateHasChanged(); - } - } -} diff --git a/src/Components/General/NavMenu.razor.css b/src/Components/General/NavMenu.razor.css deleted file mode 100644 index acc5f9f..0000000 --- a/src/Components/General/NavMenu.razor.css +++ /dev/null @@ -1,62 +0,0 @@ -.navbar-toggler { - background-color: rgba(255, 255, 255, 0.1); -} - -.top-row { - height: 3.5rem; - background-color: rgba(0,0,0,0.4); -} - -.navbar-brand { - font-size: 1.1rem; -} - -.oi { - width: 2rem; - font-size: 1.1rem; - vertical-align: text-top; - top: -2px; -} - -.nav-item { - font-size: 0.9rem; - padding-bottom: 0.5rem; -} - - .nav-item:first-of-type { - padding-top: 1rem; - } - - .nav-item:last-of-type { - padding-bottom: 1rem; - } - - .nav-item ::deep a { - color: #d7d7d7; - border-radius: 4px; - height: 3rem; - display: flex; - align-items: center; - line-height: 3rem; - } - -.nav-item ::deep a.active { - background-color: rgba(255,255,255,0.25); - color: white; -} - -.nav-item ::deep a:hover { - background-color: rgba(255,255,255,0.1); - color: white; -} - -@media (min-width: 641px) { - .navbar-toggler { - display: none; - } - - .collapse { - /* Never collapse the sidebar for wide screens */ - display: block; - } -} diff --git a/src/Components/Instructions/AdminConfigurationInstructions.razor b/src/Components/Instructions/AdminConfigurationInstructions.razor index c5865bb..2a3b1af 100644 --- a/src/Components/Instructions/AdminConfigurationInstructions.razor +++ b/src/Components/Instructions/AdminConfigurationInstructions.razor @@ -16,11 +16,42 @@

This section displays the current tool version, along with any version alerts.

-
-
Global Admin Password
-

This section allows you to update the Global Admin password for the tool.

+
Customization
+
+

This section allows you to customize the Azure Naming Tool site with custom Home content, custom logos, and other configurations.

+
    +
  • + Custom Home Content +

    + You can enter custom Markdown content that will be displayed on the Home page. This can be used to provide additional information to users. +

    +
  • +
+
+
+
+
+
+
Security
+
+

This section allows for the configuration of the identity settings, if using an Identity provider for Authentication.

+
    +
  • + Global Admin Password +

    + This section allows you to update the Global Admin password for the tool. +

    +
  • +
  • + API Keys +

    + This section allows you to update the Full-Access and Read-Only API Keys for the tool. +

    +
  • +
+
@@ -58,14 +89,6 @@
-
-
-
API Keys
-

- The Azure Naming Tool provides a RESTful API. Each API function requires an API Key to be provided. This section provides the ability to view/update the API Key for the tool. -

-
-
Clear Cache
diff --git a/src/Components/Layout/NavMenu.razor b/src/Components/Layout/NavMenu.razor index dcbf3fe..a2e2a85 100644 --- a/src/Components/Layout/NavMenu.razor +++ b/src/Components/Layout/NavMenu.razor @@ -10,7 +10,7 @@