Skip to content

Commit

Permalink
Unify app name / title
Browse files Browse the repository at this point in the history
  • Loading branch information
codemonkey85 committed Nov 5, 2024
1 parent 77f5b34 commit 4dc729a
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 14 deletions.
6 changes: 3 additions & 3 deletions Pkmds.Web/Components/Layout/MainLayout.razor
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
Edge="@Edge.Start"
OnClick="@DrawerToggle" />
<MudText Typo="@Typo.h4" class="d-none d-lg-flex">
@AppTitle
@Constants.AppTitle
</MudText>
<MudText Typo="@Typo.h6" class="d-none d-md-flex d-lg-none">
@AppTitle
@Constants.AppTitle
</MudText>
<MudText Typo="@Typo.inherit" class="d-xs-flex d-md-none">
@AppTitle
@Constants.AppTitle
</MudText>
<MudSpacer />
<MudStack Row>
Expand Down
2 changes: 0 additions & 2 deletions Pkmds.Web/Components/Layout/MainLayout.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ namespace Pkmds.Web.Components.Layout;

public partial class MainLayout
{
private const string AppTitle = "PKMDS Save Editor";

private bool isDarkMode;
private MudThemeProvider? mudThemeProvider;

Expand Down
2 changes: 1 addition & 1 deletion Pkmds.Web/Components/Pages/Home.razor
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@page "/"

<PageTitle>
PKMDS Save Editor
@Constants.AppTitle
</PageTitle>

@if (AppState.SaveFile is null)
Expand Down
6 changes: 2 additions & 4 deletions Pkmds.Web/Components/SaveFileNameDisplay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,12 @@ public static class SaveFileNameDisplay
{
public static string SaveFileNameDisplayString(IAppState appState, IAppService appService, bool isPageTitle = false)
{
const string baseTitle = "PKMDS Save Editor";

if (appState.SaveFile is not { } saveFile)
{
return baseTitle;
return Constants.AppTitle;
}

var sbTitle = new StringBuilder(isPageTitle ? baseTitle : string.Empty);
var sbTitle = new StringBuilder(isPageTitle ? Constants.AppTitle : string.Empty);
if (isPageTitle)
{
sbTitle.Append(" - ");
Expand Down
2 changes: 2 additions & 0 deletions Pkmds.Web/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

public static class Constants
{
public const string AppTitle = "PKMDS: Pokémon Save Editor for Web";

public const string SelectedSlotStyle = "border: 4px solid orange; border-radius: 6px;";

public const long MaxFileSize = 67_108_864L; // 64 bytes in binary
Expand Down
9 changes: 6 additions & 3 deletions Pkmds.Web/wwwroot/BrowserNotSupported.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,18 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>PKMDS - Browser Not Supported</title>
<title>PKMDS: Pokémon Save Editor for Web - Browser Not Supported</title>
<link href="icon-512.png" rel="apple-touch-icon" sizes="512x512" />
<link href="icon-192.png" rel="apple-touch-icon" sizes="192x192" />
<link href="icon-512.png" type="image/png" rel="icon" />
</head>

<body>
This app is not supported in the current browser. For a list of compatible browsers, see here: <a
href="https://caniuse.com/wasm">https://caniuse.com/wasm</a>
<h1>
PKMDS: Pokémon Save Editor for Web
</h1>

PKMDS: Pokémon Save Editor for Web is not supported in the current browser. For a list of compatible browsers, see here: <a href="https://caniuse.com/wasm">https://caniuse.com/wasm</a>
</body>

</html>
2 changes: 1 addition & 1 deletion Pkmds.Web/wwwroot/manifest.webmanifest
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "PKMDS: Pokémon Save Editor for Web",
"short_name": "PKMDS Web",
"short_name": "PKMDS for Web",
"id": "./",
"start_url": "./",
"display": "standalone",
Expand Down

0 comments on commit 4dc729a

Please sign in to comment.