Skip to content

Commit

Permalink
Move stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
dennisreimann committed Nov 9, 2023
1 parent ca48d28 commit 558b9b5
Show file tree
Hide file tree
Showing 22 changed files with 31 additions and 113 deletions.
85 changes: 0 additions & 85 deletions BTCPayApp.UI/BTCPayIcons.cs

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@using Newtonsoft.Json.Linq

<form class="d-flex flex-column gap-4" @onsubmit="Submit">
<div ref="display" class="d-flex flex-column align-items-center px-4 mb-auto">
<div class="fw-semibold text-muted" id="Currency">@CurrencyCode</div>
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,24 @@
@inherits Fluxor.Blazor.Web.Components.FluxorComponent

<div id="OnboardingCarousel" class="carousel slide">
<div class="carousel-indicators">
<button type="button" data-bs-target="#OnboardingCarousel" data-bs-slide-to="0" class="active" aria-current="true" aria-label="Slide 1"></button>
<button type="button" data-bs-target="#OnboardingCarousel" data-bs-slide-to="1" aria-label="Slide 2"></button>
<button type="button" data-bs-target="#OnboardingCarousel" data-bs-slide-to="2" aria-label="Slide 3"></button>
</div>
<div class="carousel-inner">
<div class="carousel-item active">
<Icon Symbol="logo-btcpay" />
<Icon Symbol="logo-btcpay"/>
<h4>Welcome To BTCPay Server</h4>
<p>No fees, no third-party. All payments go through your node, running on your phone!</p>
</div>
<div class="carousel-item">
<Icon Symbol="key" />
<Icon Symbol="key"/>
<h4>Keep your wallet and bitcoin secure</h4>
<p>Cloud backups, enhanced accounting functionality and ability to easily refund your customers</p>
</div>
<div class="carousel-item">
<Icon Symbol="pointofsale" />
<Icon Symbol="pointofsale"/>
<h4>Start Accepting Bitcoin Payments</h4>
<p>Free and open-source bitcoin point of sale. With 0% Fees & No Third-party.</p>
<NavLink class="btn btn-primary" href="@Routes.WalletSetup" data-testid="StandaloneButton">Get Started</NavLink>
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
@using BTCPayApp.UI.Pages
@using BTCPayApp.UI.Features
@using BTCPayApp.UI.Features

<div class="form-group">
<label class="form-label">Theme</label>
<InputSelect class="form-select w-auto" @bind-Value="ThemeMode">
<option value="@Constants.SystemTheme">System</option>
<option value="@Constants.LightTheme">Light</option>
<option value="@Constants.DarkTheme">Dark</option>
<option value="@Themes.System">System</option>
<option value="@Themes.Light">Light</option>
<option value="@Themes.Dark">Dark</option>
</InputSelect>
</div>


@code {
[Parameter]
public string Theme { get; set; } = Constants.SystemTheme;
public string Theme { get; set; } = Themes.System;

[Parameter]
public EventCallback<string> OnThemeChange { get; set; }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
@using System.Linq.Expressions
@implements IDisposable

<EditForm EditContext="EditContext" OnSubmit="OnSubmit" @attributes="@InputAttributes">
<DataAnnotationsValidator/>
<CascadingValue Value="MessageStore">
Expand Down Expand Up @@ -95,4 +96,4 @@
EditContext.OnValidationStateChanged -= EditContextOnOnValidationStateChanged;
}

}
}
File renamed without changes.
8 changes: 0 additions & 8 deletions BTCPayApp.UI/Constants.cs

This file was deleted.

15 changes: 11 additions & 4 deletions BTCPayApp.UI/Features/UIState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,18 @@

namespace BTCPayApp.UI.Features;

public static class Themes
{
public const string Dark = "dark";
public const string Light = "light";
public const string System = "system";
}

[FeatureState]
public class UIState
{
public string SelectedTheme { get; init; } = Constants.SystemTheme;
private string SystemTheme { get; init; } = Constants.LightTheme;
public string SelectedTheme { get; init; } = Themes.System;
private string SystemTheme { get; init; } = Themes.Light;
public bool IsDarkMode { get; set; }

public record ApplyUserTheme(string Theme);
Expand All @@ -16,12 +23,12 @@ public record SetUserTheme(string Theme);
[ReducerMethod]
public static UIState Reduce(UIState state, SetUserTheme action)
{
var effectiveTheme = action.Theme == Constants.SystemTheme ? state.SystemTheme : action.Theme;
var effectiveTheme = action.Theme == Themes.System ? state.SystemTheme : action.Theme;
return new UIState
{
SystemTheme = state.SystemTheme,
SelectedTheme = action.Theme,
IsDarkMode = effectiveTheme == Constants.DarkTheme
IsDarkMode = effectiveTheme == Themes.Dark
};
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
@using BTCPayApp.UI.Pages
@inherits Fluxor.Blazor.Web.Components.FluxorLayout
@inherits Fluxor.Blazor.Web.Components.FluxorLayout

<div id="MainLayout">
<header id="MainMenu" class="btcpay-header d-flex flex-column d-print-none">
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion BTCPayApp.UI/Pages/Routes.cs → BTCPayApp.UI/Routes.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace BTCPayApp.UI.Pages;
namespace BTCPayApp.UI;

public static class Routes
{
Expand Down
4 changes: 2 additions & 2 deletions BTCPayApp.UI/_Imports.razor
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
@using Microsoft.JSInterop
@using Fluxor
@using BTCPayApp.UI
@using BTCPayApp.UI.Shared
@using BTCPayApp.UI.Shared.Configuration
@using BTCPayApp.UI.Layout
@using BTCPayApp.UI.Components

0 comments on commit 558b9b5

Please sign in to comment.