Skip to content

Commit

Permalink
Update app settings and homepage UI
Browse files Browse the repository at this point in the history
The app settings have been modified to include a new 'ClientID' field and an updated 'ApiAddress'. These changes are useful for handling the Discord Client ID for the application and updating the address of the API, respectively. Additionally, the homepage UI has been overhauled to include an installation button and update the welcome message.
  • Loading branch information
EpicOfficer committed Mar 31, 2024
1 parent d7ec171 commit 2aeadae
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 3 deletions.
5 changes: 5 additions & 0 deletions Blink3.Web/Configuration/AppOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,9 @@ public class AppOptions
/// Represents the address of the API.
/// </summary>
public string ApiAddress { get; set; } = default!;

/// <summary>
/// Represents the Discord Client ID for the application.
/// </summary>
public string ClientID { get; set; } = default!;
}
18 changes: 16 additions & 2 deletions Blink3.Web/Pages/Home.razor
Original file line number Diff line number Diff line change
@@ -1,7 +1,21 @@
@page "/"
@using Microsoft.Extensions.Options
@using Blink3.Web.Configuration

<PageTitle>Home</PageTitle>

<h1>Hello, world!</h1>
<h1>Blink3</h1>

Welcome to your new app.
Very early preview of Blink3

<Button Type="ButtonType.Link"
Color="ButtonColor.Primary"
class="d-block mt-3"
To="@InstallUrl">
Install
</Button>

@code {
[Inject] private IOptions<AppOptions> Config { get; set; } = default!;
private string InstallUrl => $"https://discord.com/oauth2/authorize?client_id={Config.Value.ClientID}";
}
3 changes: 2 additions & 1 deletion Blink3.Web/wwwroot/appsettings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"ApiAddress": "http://localhost:5288/"
"ApiAddress": "http://localhost:8288/",
"ClientID": "1223292750766674080"
}

0 comments on commit 2aeadae

Please sign in to comment.