Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
@using System.Globalization
<!DOCTYPE html>
<html lang="en">
<html lang="@CultureInfo.CurrentUICulture.TwoLetterISOLanguageName">

<head>
<meta charset="utf-8" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,32 +6,32 @@

@inject IQuerySession QuerySession
@inject NavigationManager NavigationManager
@inject IStringLocalizer<Strings> L

<AppPageTitle Title="Home" Breadcrumb="Home" />
<AppPageTitle Title="@L["Home.PageTitle"]" Breadcrumb="@L["Home.PageTitle"]" />

<div class="rz-p-4 rz-p-md-8">
<RadzenStack Gap="1.5rem" Style="max-width: 40rem; margin: 0 auto;">

<RadzenText TextStyle="TextStyle.H3" TagName="TagName.H1">AppFoundation Sample</RadzenText>
<RadzenText TextStyle="TextStyle.H3" TagName="TagName.H1">@L["Home.Heading"]</RadzenText>

<RadzenText TextStyle="TextStyle.Body1">
A minimal host that wires the AppFoundation packages. Use it to exercise the setup,
sign-in, and administration flows against a real PostgreSQL started by .NET Aspire.
@L["Home.Description"]
</RadzenText>

<RadzenStack Orientation="Orientation.Horizontal" Gap="1rem" Wrap="FlexWrap.Wrap">
@if (setupComplete)
{
<RadzenButton Text="Dashboard"
<RadzenButton Text="@L["Home.DashboardButton"]"
Icon="dashboard"
Click="@(() => NavigationManager.NavigateTo("/dashboard"))" />
<RadzenButton Text="Sign in"
<RadzenButton Text="@L["Home.SignInButton"]"
ButtonStyle="ButtonStyle.Secondary"
Click="@(() => NavigationManager.NavigateTo("/Account/Login"))" />
}
else
{
<RadzenButton Text="Run initial setup"
<RadzenButton Text="@L["Home.RunSetupButton"]"
Icon="install_desktop"
Click="@(() => NavigationManager.NavigateTo("/Setup"))" />
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
@using static Microsoft.AspNetCore.Components.Web.RenderMode
@using Microsoft.AspNetCore.Components.Web.Virtualization
@using Microsoft.JSInterop
@using Microsoft.Extensions.Localization
@using AndreGoepel.AppFoundation
@using AndreGoepel.AppFoundation.Components.Layout
@using AndreGoepel.AppFoundation.Components.Shared
Expand All @@ -14,5 +15,6 @@
@using AndreGoepel.Marten.Identity.Blazor.Components.Account.Shared
@using AndreGoepel.AppFoundation.Sample
@using AndreGoepel.AppFoundation.Sample.Components
@using AndreGoepel.AppFoundation.Sample.Resources
@using Radzen
@using Radzen.Blazor
9 changes: 9 additions & 0 deletions samples/AndreGoepel.AppFoundation.Sample/Resources/Strings.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
namespace AndreGoepel.AppFoundation.Sample.Resources;

/// <summary>
/// Marker type for the sample app's own UI strings — the generic argument of
/// <c>IStringLocalizer&lt;Strings&gt;</c>. Kept separate from the RCL's
/// <c>AppFoundationStrings</c>: the host translates its own content independently of
/// the identity/foundation UI it consumes.
/// </summary>
public sealed class Strings;
73 changes: 73 additions & 0 deletions samples/AndreGoepel.AppFoundation.Sample/Resources/Strings.de.resx
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
German UI strings for the sample app. Mirrors the keys in Strings.resx
(English, neutral) — keep both files in sync.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>

<!-- Home.razor -->
<data name="Home.PageTitle" xml:space="preserve"><value><![CDATA[Start]]></value></data>
<data name="Home.Heading" xml:space="preserve"><value><![CDATA[AppFoundation Beispiel]]></value></data>
<data name="Home.Description" xml:space="preserve"><value><![CDATA[Ein minimaler Host, der die AppFoundation-Pakete verdrahtet. Nutzen Sie ihn, um die Einrichtungs-, Anmelde- und Administrationsabläufe gegen ein echtes, von .NET Aspire gestartetes PostgreSQL zu testen.]]></value></data>
<data name="Home.DashboardButton" xml:space="preserve"><value><![CDATA[Dashboard]]></value></data>
<data name="Home.SignInButton" xml:space="preserve"><value><![CDATA[Anmelden]]></value></data>
<data name="Home.RunSetupButton" xml:space="preserve"><value><![CDATA[Ersteinrichtung starten]]></value></data>
</root>
74 changes: 74 additions & 0 deletions samples/AndreGoepel.AppFoundation.Sample/Resources/Strings.resx
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
English (neutral) UI strings for the sample app — the source of truth. Every
<value> is wrapped in CDATA so ampersands and inline HTML do not need manual
escaping. Keep Strings.de.resx in sync.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>

<!-- Home.razor -->
<data name="Home.PageTitle" xml:space="preserve"><value><![CDATA[Home]]></value></data>
<data name="Home.Heading" xml:space="preserve"><value><![CDATA[AppFoundation Sample]]></value></data>
<data name="Home.Description" xml:space="preserve"><value><![CDATA[A minimal host that wires the AppFoundation packages. Use it to exercise the setup, sign-in, and administration flows against a real PostgreSQL started by .NET Aspire.]]></value></data>
<data name="Home.DashboardButton" xml:space="preserve"><value><![CDATA[Dashboard]]></value></data>
<data name="Home.SignInButton" xml:space="preserve"><value><![CDATA[Sign in]]></value></data>
<data name="Home.RunSetupButton" xml:space="preserve"><value><![CDATA[Run initial setup]]></value></data>
</root>
Loading