Skip to content

Commit

Permalink
Unifications and fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dennisreimann committed Aug 30, 2023
1 parent 0b54e25 commit 5f0c136
Show file tree
Hide file tree
Showing 11 changed files with 60 additions and 55 deletions.
3 changes: 1 addition & 2 deletions BTCPayApp.Desktop/StartupExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.Runtime.InteropServices;
using System.Text.Json;
using System.Text.Json;
using BTCPayApp.Core.Contracts;
using Microsoft.AspNetCore.DataProtection;
using Microsoft.Extensions.Configuration;
Expand Down
1 change: 1 addition & 0 deletions BTCPayApp.Maui/Platforms/Android/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application android:allowBackup="true" android:supportsRtl="true" android:icon="@mipmap/ic_launcher"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.INTERNET" />
</manifest>
38 changes: 18 additions & 20 deletions BTCPayApp.Maui/wwwroot/index.html
Original file line number Diff line number Diff line change
@@ -1,29 +1,27 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover" />
<title>BTCPay Server</title>
<base href="/" />
<link href="_content/MudBlazor/MudBlazor.min.css" rel="stylesheet" />
<link href="_content/BTCPayApp.UI/css/site.css" rel="stylesheet" />
<link rel="icon" type="image/png" href="_content/BTCPayApp.UI/favicon.png"/>
<base href="/"/>
<meta charset="utf-8"/>
<meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no,viewport-fit=cover" name="viewport"/>
<title>BTCPay Server</title>
<link href="/_content/MudBlazor/MudBlazor.min.css" rel="stylesheet"/>
<link href="/_content/BTCPayApp.UI/css/mudblazor-overrides.css" rel="stylesheet"/>
<link href="/_content/BTCPayApp.UI/css/theme.css" rel="stylesheet"/>
<link href="/_content/BTCPayApp.UI/css/fonts.css" rel="stylesheet"/>
<link href="/_content/BTCPayApp.UI/css/site.css" rel="stylesheet"/>
<link href="/_content/BTCPayApp.UI/favicon.png" rel="icon" type="image/png"/>
</head>

<body>

<div class="status-bar-safe-area"></div>

<div id="app">Loading...</div>

<div id="blazor-error-ui">
<div class="status-bar-safe-area"></div>
<div id="app">Loading...</div>
<div id="blazor-error-ui">
An unhandled error has occurred.
<a href="" class="reload">Reload</a>
<a class="reload" href="">Reload</a>
<a class="dismiss">🗙</a>
</div>

<script src="_framework/blazor.webview.js" autostart="false"></script>
<script src="_content/MudBlazor/MudBlazor.min.js"></script>
</div>
<script src="/_content/BTCPayApp.UI/js/site.js"></script>
<script src="/_content/MudBlazor/MudBlazor.min.js"></script>
<script src="/_framework/blazor.webview.js" autostart="false"></script>
</body>

</html>
9 changes: 8 additions & 1 deletion BTCPayApp.Photino/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
using BTCPayApp.Desktop;
using BTCPayApp.UI;
using Microsoft.AspNetCore.Components.Web;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Photino.Blazor;
using PhotinoNET;

Expand All @@ -15,6 +17,12 @@ public static class Program
private static void Main(string[] args)
{
var builder = PhotinoBlazorAppBuilder.CreateDefault(args);
builder.Services.TryAddSingleton<IConfiguration>(_ =>
{
var configBuilder = new ConfigurationBuilder();
configBuilder.AddEnvironmentVariables();
return configBuilder.Build();
});
builder.Services.AddBTCPayAppUIServices();
builder.Services.ConfigureBTCPayAppCore();
builder.Services.ConfigureBTCPayAppDesktop();
Expand All @@ -28,7 +36,6 @@ private static void Main(string[] args)
app.MainWindow
.SetResizable(true)
.SetZoom(0)
// .SetIconFile("favicon.ico")
.SetTitle("BTCPay Server");

app.MainWindow.Center();
Expand Down
31 changes: 15 additions & 16 deletions BTCPayApp.Photino/wwwroot/index.html
Original file line number Diff line number Diff line change
@@ -1,28 +1,27 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover"
name="viewport"/>
<title>BTCPayApp</title>
<base href="/"/>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no,viewport-fit=cover" />
<title>BTCPay Server</title>
<link href="/_content/MudBlazor/MudBlazor.min.css" rel="stylesheet"/>
<link href="/_content/BTCPayApp.UI/css/mudblazor-overrides.css" rel="stylesheet"/>
<link href="/_content/BTCPayApp.UI/css/theme.css" rel="stylesheet"/>
<link href="/_content/BTCPayApp.UI/css/fonts.css" rel="stylesheet"/>
<link href="/_content/BTCPayApp.UI/css/site.css" rel="stylesheet"/>
<link href="/_content/BTCPayApp.UI/favicon.png" rel="icon" type="image/png"/>
</head>
<body>
<div class="status-bar-safe-area"></div>

<app>Loading...</app>

<div id="blazor-error-ui">
An unhandled error has occurred.
<a class="reload" href="">Reload</a>
<a class="dismiss">🗙</a>
</div>

<script src="/_framework/blazor.webview.js"></script>
<script src="/_content/MudBlazor/MudBlazor.min.js"></script>
<div class="status-bar-safe-area"></div>
<div id="app">Loading...</div>
<div id="blazor-error-ui">
An unhandled error has occurred.
<a class="reload" href="">Reload</a>
<a class="dismiss">🗙</a>
</div>
<script src="/_content/BTCPayApp.UI/js/site.js"></script>
<script src="/_content/MudBlazor/MudBlazor.min.js"></script>
<script src="/_framework/blazor.webview.js"></script>
</body>
</html>
13 changes: 7 additions & 6 deletions BTCPayApp.Server/Pages/_Host.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,11 @@
<head>
<base href="~/"/>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<script src="~/_framework/blazor.server.js" asp-append-version="true"></script>
<script src="~/_content/MudBlazor/MudBlazor.min.js" asp-append-version="true"></script>
<script src="./_content/BTCPayApp.UI/js/site.js" asp-append-version="true"></script>
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no,viewport-fit=cover" />
<title>BTCPay Server</title>
<link href="~/_content/MudBlazor/MudBlazor.min.css" rel="stylesheet" asp-append-version="true"/>
<link href="./_content/BTCPayApp.UI/css/mudblazor-overrides.css" rel="stylesheet" asp-append-version="true"/>
<link href="./_content/BTCPayApp.UI/css/theme.css" rel="stylesheet" asp-append-version="true"/>
<link href="~/_content/BTCPayApp.UI/css/mudblazor-overrides.css" rel="stylesheet" asp-append-version="true"/>
<link href="~/_content/BTCPayApp.UI/css/theme.css" rel="stylesheet" asp-append-version="true"/>
<link href="~/_content/BTCPayApp.UI/css/fonts.css" rel="stylesheet" asp-append-version="true"/>
<link href="~/_content/BTCPayApp.UI/css/site.css" rel="stylesheet" asp-append-version="true"/>
<link href="~/_content/BTCPayApp.UI/favicon.png" rel="icon" type="image/png" asp-append-version="true"/>
Expand All @@ -33,5 +31,8 @@
<a href="" class="reload">Reload</a>
<a class="dismiss">🗙</a>
</div>
<script src="~/_content/BTCPayApp.UI/js/site.js" asp-append-version="true"></script>
<script src="~/_content/MudBlazor/MudBlazor.min.js" asp-append-version="true"></script>
<script src="~/_framework/blazor.server.js" asp-append-version="true"></script>
</body>
</html>
5 changes: 2 additions & 3 deletions BTCPayApp.UI/Shared/Keypad.razor
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

<link href="./_content/BTCPayApp.UI/css/keypad.css" rel="stylesheet"/>

<MudContainer MaxWidth="MaxWidth.Small" Class="py-5">
<ValidationEditContext Model="this" @ref="_validationEditContext" OnValidSubmit="HandleSubmit" Class="d-flex flex-column gap-4 my-auto">
<MudContainer MaxWidth="MaxWidth.Small">
<ValidationEditContext Model="this" @ref="_validationEditContext" OnValidSubmit="HandleSubmit" Class="d-flex flex-column gap-4 py-5" Style="min-height:90vh">
<div class="d-flex flex-column align-center px-4 mb-auto">
<MudText Typo="Typo.overline" Color="Color.Tertiary" Class="fw-semibold">@Currency</MudText>
<MudText Typo="Typo.h1" Class="mb-4" Style="@AmountStyle">@FormatCurrency(Amount, false)</MudText>
Expand Down Expand Up @@ -102,7 +102,6 @@
</ValidationEditContext>
</MudContainer>


@code {
private ValidationEditContext _validationEditContext { get; set; }

Expand Down
2 changes: 1 addition & 1 deletion BTCPayApp.UI/Shared/LayoutBase.razor
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@using BTCPayApp.UI.Features
@using BTCPayApp.Core.Contracts
@inherits Fluxor.Blazor.Web.Components.FluxorLayout
@inherits Fluxor.Blazor.Web.Components.FluxorComponent
@inject IStateSelection<RootState, HashSet<RootState.LoadingHandles>> LoadingStateSelection
@inject IStateSelection<UIState, bool> DarkModeStateSelection
@inject IDispatcher Dispatcher
Expand Down
2 changes: 1 addition & 1 deletion BTCPayApp.UI/Shared/MainLayout.razor
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@using BTCPayApp.UI.Pages
@inherits LayoutComponentBase
@inherits Fluxor.Blazor.Web.Components.FluxorLayout

<LayoutBase>
<MudAppBar Elevation="1">
Expand Down
2 changes: 1 addition & 1 deletion BTCPayApp.UI/Shared/SimpleLayout.razor
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@inherits LayoutComponentBase
@inherits Fluxor.Blazor.Web.Components.FluxorLayout

<LayoutBase>
<MudMainContent>
Expand Down
9 changes: 5 additions & 4 deletions BTCPayApp.UI/wwwroot/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,12 @@
<head>
<base href="/"/>
<meta charset="utf-8"/>
<meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no,viewport-fit=cover" name="viewport"/>
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no,viewport-fit=cover" />
<title>BTCPay Server</title>
<script src="./_framework/blazor.webview.js"></script>
<script src="./_content/MudBlazor/MudBlazor.min.js"></script>
<script src="./_content/BTCPayApp.UI/js/site.js"></script>
<link href="./_content/MudBlazor/MudBlazor.min.css" rel="stylesheet"/>
<link href="./_content/BTCPayApp.UI/css/mudblazor-overrides.css" rel="stylesheet"/>
<link href="./_content/BTCPayApp.UI/css/theme.css" rel="stylesheet"/>
<link href="./_content/BTCPayApp.UI/css/fonts.css" rel="stylesheet"/>
<link href="./_content/BTCPayApp.UI/css/site.css" rel="stylesheet"/>
<link href="./_content/BTCPayApp.UI/favicon.png" rel="icon" type="image/png"/>
</head>
Expand All @@ -22,5 +20,8 @@
<a class="reload" href="">Reload</a>
<a class="dismiss">🗙</a>
</div>
<script src="./_content/BTCPayApp.UI/js/site.js"></script>
<script src="./_content/MudBlazor/MudBlazor.min.js"></script>
<script src="./_framework/blazor.webview.js"></script>
</body>
</html>

0 comments on commit 5f0c136

Please sign in to comment.