Add HideHeaderName option to registry settings
Build and Push Docker Image / build-and-push (push) Successful in 17s
Build and Push Docker Image / build-and-push (push) Successful in 17s
Introduce HideHeaderName property to RegistrySettings and related view models, allowing admins to hide the registry name/title on the public page. Update RegistryAdmin UI with a localized checkbox, adjust RegistryPublic rendering, and persist the setting in RegistryService. Add EF Core migration and update localization resources for all supported languages.
This commit is contained in:
@@ -7,6 +7,7 @@ public class RegistrySettings
|
||||
public string? BankAccountBic { get; set; }
|
||||
public string? BankAccountDisplayName { get; set; }
|
||||
public bool ShowBankAccountName { get; set; }
|
||||
public bool HideHeaderName { get; set; }
|
||||
public string? ContributionQrCodeUrl { get; set; }
|
||||
public string? ContributionAmountQrCodesJson { get; set; }
|
||||
|
||||
|
||||
+561
@@ -0,0 +1,561 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using BirthList.Infrastructure.Persistence;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace BirthList.Infrastructure.Migrations
|
||||
{
|
||||
[DbContext(typeof(RegistryDbContext))]
|
||||
[Migration("20260725163539_AddHideHeaderNameToRegistrySettings")]
|
||||
partial class AddHideHeaderNameToRegistrySettings
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "8.0.26")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
||||
|
||||
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("BirthList.Domain.Entities.ItemContribution", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<decimal>("Amount")
|
||||
.HasPrecision(18, 2)
|
||||
.HasColumnType("decimal(18,2)");
|
||||
|
||||
b.Property<DateTimeOffset>("ContributedAtUtc")
|
||||
.HasColumnType("datetimeoffset");
|
||||
|
||||
b.Property<string>("CurrencyCode")
|
||||
.IsRequired()
|
||||
.HasMaxLength(3)
|
||||
.HasColumnType("nvarchar(3)");
|
||||
|
||||
b.Property<Guid>("RegistryItemId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("TransferMessage")
|
||||
.IsRequired()
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.Property<string>("UserId")
|
||||
.IsRequired()
|
||||
.HasMaxLength(450)
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("RegistryItemId");
|
||||
|
||||
b.ToTable("ItemContributions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BirthList.Domain.Entities.ItemPurchase", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateTimeOffset>("PurchasedAtUtc")
|
||||
.HasColumnType("datetimeoffset");
|
||||
|
||||
b.Property<int>("Quantity")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<Guid>("RegistryItemId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("UserId")
|
||||
.IsRequired()
|
||||
.HasMaxLength(450)
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("RegistryItemId");
|
||||
|
||||
b.ToTable("ItemPurchases");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BirthList.Domain.Entities.PlatformOwner", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<DateTimeOffset>("AssignedAtUtc")
|
||||
.HasColumnType("datetimeoffset");
|
||||
|
||||
b.Property<string>("UserId")
|
||||
.IsRequired()
|
||||
.HasMaxLength(450)
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("UserId")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("PlatformOwners");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BirthList.Domain.Entities.Registry", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("BabyName")
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("nvarchar(100)");
|
||||
|
||||
b.Property<DateOnly?>("BirthDate")
|
||||
.HasColumnType("date");
|
||||
|
||||
b.Property<DateTimeOffset>("CreatedAtUtc")
|
||||
.HasColumnType("datetimeoffset");
|
||||
|
||||
b.Property<string>("CurrencyCode")
|
||||
.IsRequired()
|
||||
.HasMaxLength(3)
|
||||
.HasColumnType("nvarchar(3)");
|
||||
|
||||
b.Property<string>("HeaderContentHtml")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("HeroImageContentType")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<byte[]>("HeroImageData")
|
||||
.HasColumnType("varbinary(max)");
|
||||
|
||||
b.Property<string>("PublicLinkCode")
|
||||
.IsRequired()
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("nvarchar(100)");
|
||||
|
||||
b.Property<int>("RegistryType")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("ShippingAddress")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ThemeKey")
|
||||
.IsRequired()
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("nvarchar(100)");
|
||||
|
||||
b.Property<string>("Title")
|
||||
.IsRequired()
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("nvarchar(250)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("PublicLinkCode")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("Registries");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BirthList.Domain.Entities.RegistryAdmin", b =>
|
||||
{
|
||||
b.Property<Guid>("RegistryId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("UserId")
|
||||
.HasMaxLength(450)
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<DateTimeOffset>("AddedAtUtc")
|
||||
.HasColumnType("datetimeoffset");
|
||||
|
||||
b.HasKey("RegistryId", "UserId");
|
||||
|
||||
b.ToTable("RegistryAdmins");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BirthList.Domain.Entities.RegistryAdminInvite", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateTimeOffset>("ExpiresAtUtc")
|
||||
.HasColumnType("datetimeoffset");
|
||||
|
||||
b.Property<DateTimeOffset?>("RedeemedAtUtc")
|
||||
.HasColumnType("datetimeoffset");
|
||||
|
||||
b.Property<Guid>("RegistryId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("SentToEmail")
|
||||
.HasMaxLength(320)
|
||||
.HasColumnType("nvarchar(320)");
|
||||
|
||||
b.Property<string>("Token")
|
||||
.IsRequired()
|
||||
.HasMaxLength(120)
|
||||
.HasColumnType("nvarchar(120)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("RegistryId");
|
||||
|
||||
b.HasIndex("Token")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("RegistryAdminInvites");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BirthList.Domain.Entities.RegistryItem", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid>("CategoryId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateTimeOffset>("CreatedAtUtc")
|
||||
.HasColumnType("datetimeoffset");
|
||||
|
||||
b.Property<string>("CurrencyCode")
|
||||
.IsRequired()
|
||||
.HasMaxLength(3)
|
||||
.HasColumnType("nvarchar(3)");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("DesiredQuantity")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<bool>("IsGiven")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<decimal>("MoneyFulfilledAmount")
|
||||
.HasPrecision(18, 2)
|
||||
.HasColumnType("decimal(18,2)");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasMaxLength(300)
|
||||
.HasColumnType("nvarchar(300)");
|
||||
|
||||
b.Property<bool>("ParticipationAllowed")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<decimal?>("ParticipationTargetAmount")
|
||||
.HasPrecision(18, 2)
|
||||
.HasColumnType("decimal(18,2)");
|
||||
|
||||
b.Property<string>("PictureUrl")
|
||||
.HasMaxLength(2048)
|
||||
.HasColumnType("nvarchar(2048)");
|
||||
|
||||
b.Property<bool?>("PreferSecondHand")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<decimal?>("PriceAmount")
|
||||
.HasPrecision(18, 2)
|
||||
.HasColumnType("decimal(18,2)");
|
||||
|
||||
b.Property<string>("ProductUrl")
|
||||
.HasMaxLength(2048)
|
||||
.HasColumnType("nvarchar(2048)");
|
||||
|
||||
b.Property<int>("PurchasedQuantity")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<Guid>("RegistryId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<int>("SortOrder")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("RegistryId");
|
||||
|
||||
b.HasIndex("CategoryId", "SortOrder");
|
||||
|
||||
b.ToTable("RegistryItems");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BirthList.Domain.Entities.RegistryItemCategory", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateTimeOffset>("CreatedAtUtc")
|
||||
.HasColumnType("datetimeoffset");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("nvarchar(100)");
|
||||
|
||||
b.Property<Guid>("RegistryId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<int>("SortOrder")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("RegistryId", "Name");
|
||||
|
||||
b.HasIndex("RegistryId", "SortOrder");
|
||||
|
||||
b.ToTable("RegistryItemCategories");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BirthList.Domain.Entities.RegistrySettings", b =>
|
||||
{
|
||||
b.Property<Guid>("RegistryId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("BankAccountBic")
|
||||
.HasMaxLength(11)
|
||||
.HasColumnType("nvarchar(11)");
|
||||
|
||||
b.Property<string>("BankAccountDisplayName")
|
||||
.HasMaxLength(120)
|
||||
.HasColumnType("nvarchar(120)");
|
||||
|
||||
b.Property<string>("BankAccountIban")
|
||||
.HasMaxLength(34)
|
||||
.HasColumnType("nvarchar(34)");
|
||||
|
||||
b.Property<string>("ContributionAmountQrCodesJson")
|
||||
.HasMaxLength(4000)
|
||||
.HasColumnType("nvarchar(4000)");
|
||||
|
||||
b.Property<string>("ContributionQrCodeUrl")
|
||||
.HasMaxLength(2048)
|
||||
.HasColumnType("nvarchar(2048)");
|
||||
|
||||
b.Property<bool>("HideHeaderName")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<bool>("ShowBankAccountName")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.HasKey("RegistryId");
|
||||
|
||||
b.ToTable("RegistrySettings");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BirthList.Domain.Entities.RegistryVisit", b =>
|
||||
{
|
||||
b.Property<Guid>("RegistryId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("UserId")
|
||||
.HasMaxLength(450)
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<DateTimeOffset>("LastVisitedAtUtc")
|
||||
.HasColumnType("datetimeoffset");
|
||||
|
||||
b.HasKey("RegistryId", "UserId");
|
||||
|
||||
b.ToTable("RegistryVisits");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BirthList.Domain.Entities.UserActionLog", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<int>("ActionType")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<decimal>("Amount")
|
||||
.HasPrecision(18, 2)
|
||||
.HasColumnType("decimal(18,2)");
|
||||
|
||||
b.Property<DateTimeOffset>("CreatedAtUtc")
|
||||
.HasColumnType("datetimeoffset");
|
||||
|
||||
b.Property<string>("Details")
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.Property<int>("Quantity")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<Guid>("RegistryId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid?>("RegistryItemId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("UserId")
|
||||
.IsRequired()
|
||||
.HasMaxLength(450)
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("RegistryId");
|
||||
|
||||
b.ToTable("UserActionLogs");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BirthList.Domain.Entities.ItemContribution", b =>
|
||||
{
|
||||
b.HasOne("BirthList.Domain.Entities.RegistryItem", "RegistryItem")
|
||||
.WithMany("Contributions")
|
||||
.HasForeignKey("RegistryItemId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("RegistryItem");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BirthList.Domain.Entities.ItemPurchase", b =>
|
||||
{
|
||||
b.HasOne("BirthList.Domain.Entities.RegistryItem", "RegistryItem")
|
||||
.WithMany("Purchases")
|
||||
.HasForeignKey("RegistryItemId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("RegistryItem");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BirthList.Domain.Entities.RegistryAdmin", b =>
|
||||
{
|
||||
b.HasOne("BirthList.Domain.Entities.Registry", "Registry")
|
||||
.WithMany("Admins")
|
||||
.HasForeignKey("RegistryId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Registry");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BirthList.Domain.Entities.RegistryAdminInvite", b =>
|
||||
{
|
||||
b.HasOne("BirthList.Domain.Entities.Registry", "Registry")
|
||||
.WithMany("AdminInvites")
|
||||
.HasForeignKey("RegistryId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Registry");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BirthList.Domain.Entities.RegistryItem", b =>
|
||||
{
|
||||
b.HasOne("BirthList.Domain.Entities.RegistryItemCategory", "Category")
|
||||
.WithMany("Items")
|
||||
.HasForeignKey("CategoryId")
|
||||
.OnDelete(DeleteBehavior.NoAction)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("BirthList.Domain.Entities.Registry", "Registry")
|
||||
.WithMany("Items")
|
||||
.HasForeignKey("RegistryId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Category");
|
||||
|
||||
b.Navigation("Registry");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BirthList.Domain.Entities.RegistryItemCategory", b =>
|
||||
{
|
||||
b.HasOne("BirthList.Domain.Entities.Registry", "Registry")
|
||||
.WithMany("ItemCategories")
|
||||
.HasForeignKey("RegistryId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Registry");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BirthList.Domain.Entities.RegistrySettings", b =>
|
||||
{
|
||||
b.HasOne("BirthList.Domain.Entities.Registry", "Registry")
|
||||
.WithOne()
|
||||
.HasForeignKey("BirthList.Domain.Entities.RegistrySettings", "RegistryId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Registry");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BirthList.Domain.Entities.RegistryVisit", b =>
|
||||
{
|
||||
b.HasOne("BirthList.Domain.Entities.Registry", "Registry")
|
||||
.WithMany("Visits")
|
||||
.HasForeignKey("RegistryId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Registry");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BirthList.Domain.Entities.UserActionLog", b =>
|
||||
{
|
||||
b.HasOne("BirthList.Domain.Entities.Registry", "Registry")
|
||||
.WithMany("ActionLogs")
|
||||
.HasForeignKey("RegistryId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Registry");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BirthList.Domain.Entities.Registry", b =>
|
||||
{
|
||||
b.Navigation("ActionLogs");
|
||||
|
||||
b.Navigation("AdminInvites");
|
||||
|
||||
b.Navigation("Admins");
|
||||
|
||||
b.Navigation("ItemCategories");
|
||||
|
||||
b.Navigation("Items");
|
||||
|
||||
b.Navigation("Visits");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BirthList.Domain.Entities.RegistryItem", b =>
|
||||
{
|
||||
b.Navigation("Contributions");
|
||||
|
||||
b.Navigation("Purchases");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BirthList.Domain.Entities.RegistryItemCategory", b =>
|
||||
{
|
||||
b.Navigation("Items");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace BirthList.Infrastructure.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class AddHideHeaderNameToRegistrySettings : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "HideHeaderName",
|
||||
table: "RegistrySettings",
|
||||
type: "bit",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "HeroImageContentType",
|
||||
table: "Registries",
|
||||
type: "nvarchar(max)",
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "nvarchar(100)",
|
||||
oldMaxLength: 100,
|
||||
oldNullable: true);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "HideHeaderName",
|
||||
table: "RegistrySettings");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "HeroImageContentType",
|
||||
table: "Registries",
|
||||
type: "nvarchar(100)",
|
||||
maxLength: 100,
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "nvarchar(max)",
|
||||
oldNullable: true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -136,8 +136,7 @@ namespace BirthList.Infrastructure.Migrations
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("HeroImageContentType")
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("nvarchar(100)");
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<byte[]>("HeroImageData")
|
||||
.HasColumnType("varbinary(max)");
|
||||
@@ -351,6 +350,9 @@ namespace BirthList.Infrastructure.Migrations
|
||||
.HasMaxLength(2048)
|
||||
.HasColumnType("nvarchar(2048)");
|
||||
|
||||
b.Property<bool>("HideHeaderName")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<bool>("ShowBankAccountName")
|
||||
.HasColumnType("bit");
|
||||
|
||||
|
||||
@@ -367,6 +367,12 @@ else
|
||||
<small class="text-muted">@HeroImageUploadMessage</small>
|
||||
}
|
||||
</div>
|
||||
<div class="form-check mt-2">
|
||||
<InputCheckbox class="form-check-input" @bind-Value="SettingsModel.HideHeaderName" id="hideHeaderName" />
|
||||
<label class="form-check-label" for="hideHeaderName">
|
||||
@L["RegistryAdmin.HideHeaderName"]
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mt-3">
|
||||
|
||||
@@ -749,6 +749,7 @@ public partial class RegistryAdmin : ComponentBase
|
||||
SettingsModel.BankAccountIban = settings.BankAccountIban;
|
||||
SettingsModel.BankAccountBic = settings.BankAccountBic;
|
||||
SettingsModel.ShowBankAccountName = settings.ShowBankAccountName;
|
||||
SettingsModel.HideHeaderName = settings.HideHeaderName;
|
||||
SettingsModel.ContributionQrCodeUrl = settings.ContributionQrCodeUrl;
|
||||
SettingsModel.ContributionAmountQrCodes = settings.ContributionAmountQrCodes;
|
||||
PublicLinkCode = settings.PublicLinkCode;
|
||||
|
||||
@@ -19,7 +19,10 @@ else
|
||||
</div>
|
||||
}
|
||||
|
||||
<h1>@(string.IsNullOrWhiteSpace(Registry.BabyName) ? Registry.Title : Registry.BabyName)</h1>
|
||||
@if (!Registry.HideHeaderName)
|
||||
{
|
||||
<h1>@(string.IsNullOrWhiteSpace(Registry.BabyName) ? Registry.Title : Registry.BabyName)</h1>
|
||||
}
|
||||
|
||||
@if (Registry.IsAdmin)
|
||||
{
|
||||
|
||||
@@ -63,6 +63,7 @@ public sealed class RegistrySettingsEditModel
|
||||
public string? BankAccountBic { get; set; }
|
||||
public string? BankAccountDisplayName { get; set; }
|
||||
public bool ShowBankAccountName { get; set; }
|
||||
public bool HideHeaderName { get; set; }
|
||||
public string? ContributionQrCodeUrl { get; set; }
|
||||
public List<ContributionAmountQrCodeModel> ContributionAmountQrCodes { get; set; } = [];
|
||||
public string PublicLinkCode { get; set; } = string.Empty;
|
||||
@@ -94,6 +95,7 @@ public sealed class RegistryPublicViewModel
|
||||
public string? BankAccountBic { get; init; }
|
||||
public string? BankAccountDisplayName { get; init; }
|
||||
public bool ShowBankAccountName { get; init; }
|
||||
public bool HideHeaderName { get; init; }
|
||||
public string? ContributionQrCodeUrl { get; init; }
|
||||
public IReadOnlyList<ContributionAmountQrCodeModel> ContributionAmountQrCodes { get; init; } = [];
|
||||
public string? CurrentUserId { get; init; }
|
||||
|
||||
@@ -310,6 +310,7 @@ internal sealed class RegistryService(RegistryDbContext registryDbContext, Appli
|
||||
BankAccountBic = settings?.BankAccountBic,
|
||||
BankAccountDisplayName = settings?.BankAccountDisplayName,
|
||||
ShowBankAccountName = settings?.ShowBankAccountName ?? false,
|
||||
HideHeaderName = settings?.HideHeaderName ?? false,
|
||||
ContributionQrCodeUrl = settings?.ContributionQrCodeUrl,
|
||||
ContributionAmountQrCodes = ParseContributionAmountQrCodes(settings?.ContributionAmountQrCodesJson),
|
||||
CurrentUserId = userId,
|
||||
@@ -348,6 +349,7 @@ internal sealed class RegistryService(RegistryDbContext registryDbContext, Appli
|
||||
BankAccountBic = settings?.BankAccountBic,
|
||||
BankAccountDisplayName = settings?.BankAccountDisplayName,
|
||||
ShowBankAccountName = settings?.ShowBankAccountName ?? false,
|
||||
HideHeaderName = settings?.HideHeaderName ?? false,
|
||||
ContributionQrCodeUrl = settings?.ContributionQrCodeUrl,
|
||||
ContributionAmountQrCodes = ParseContributionAmountQrCodes(settings?.ContributionAmountQrCodesJson).ToList(),
|
||||
PublicLinkCode = registry.PublicLinkCode
|
||||
@@ -398,6 +400,7 @@ internal sealed class RegistryService(RegistryDbContext registryDbContext, Appli
|
||||
settings.BankAccountBic = string.IsNullOrWhiteSpace(model.BankAccountBic) ? null : model.BankAccountBic.Trim();
|
||||
settings.BankAccountDisplayName = string.IsNullOrWhiteSpace(model.BankAccountDisplayName) ? null : model.BankAccountDisplayName.Trim();
|
||||
settings.ShowBankAccountName = model.ShowBankAccountName;
|
||||
settings.HideHeaderName = model.HideHeaderName;
|
||||
settings.ContributionQrCodeUrl = string.IsNullOrWhiteSpace(model.ContributionQrCodeUrl) ? null : model.ContributionQrCodeUrl.Trim();
|
||||
settings.ContributionAmountQrCodesJson = SerializeContributionAmountQrCodes(model.ContributionAmountQrCodes);
|
||||
|
||||
|
||||
@@ -178,6 +178,7 @@
|
||||
<data name="RegistryAdmin.ShippingAddress" xml:space="preserve"><value>Adresse de livraison</value></data>
|
||||
<data name="RegistryAdmin.LineBreaksPreserved" xml:space="preserve"><value>Les sauts de ligne seront conservés</value></data>
|
||||
<data name="RegistryAdmin.HeroImage" xml:space="preserve"><value>Image héros</value></data>
|
||||
<data name="RegistryAdmin.HideHeaderName" xml:space="preserve"><value>Masquer le titre du nom sur la page publique</value></data>
|
||||
<data name="RegistryAdmin.UploadImage" xml:space="preserve"><value>Télécharger une image</value></data>
|
||||
<data name="RegistryAdmin.RemoveHeroImage" xml:space="preserve"><value>Supprimer l'image héros</value></data>
|
||||
<data name="RegistryAdmin.CurrentHeroImage" xml:space="preserve"><value>Image héros actuelle</value></data>
|
||||
|
||||
@@ -178,6 +178,7 @@
|
||||
<data name="RegistryAdmin.ShippingAddress" xml:space="preserve"><value>Leveringsadres</value></data>
|
||||
<data name="RegistryAdmin.LineBreaksPreserved" xml:space="preserve"><value>Regeleinden blijven behouden</value></data>
|
||||
<data name="RegistryAdmin.HeroImage" xml:space="preserve"><value>Hero-afbeelding</value></data>
|
||||
<data name="RegistryAdmin.HideHeaderName" xml:space="preserve"><value>Naamkop op openbare pagina verbergen</value></data>
|
||||
<data name="RegistryAdmin.UploadImage" xml:space="preserve"><value>Afbeelding uploaden</value></data>
|
||||
<data name="RegistryAdmin.RemoveHeroImage" xml:space="preserve"><value>Hero-afbeelding verwijderen</value></data>
|
||||
<data name="RegistryAdmin.CurrentHeroImage" xml:space="preserve"><value>Huidige hero-afbeelding</value></data>
|
||||
|
||||
@@ -510,6 +510,9 @@
|
||||
<data name="RegistryAdmin.HeroImage" xml:space="preserve">
|
||||
<value>[[Hero image]]</value>
|
||||
</data>
|
||||
<data name="RegistryAdmin.HideHeaderName" xml:space="preserve">
|
||||
<value>[[Hide name heading on public page]]</value>
|
||||
</data>
|
||||
<data name="RegistryAdmin.UploadImage" xml:space="preserve">
|
||||
<value>[[Upload image]]</value>
|
||||
</data>
|
||||
|
||||
@@ -185,6 +185,7 @@
|
||||
<data name="RegistryAdmin.ShippingAddress" xml:space="preserve"><value>Shipping address</value></data>
|
||||
<data name="RegistryAdmin.LineBreaksPreserved" xml:space="preserve"><value>Line breaks will be preserved</value></data>
|
||||
<data name="RegistryAdmin.HeroImage" xml:space="preserve"><value>Hero image</value></data>
|
||||
<data name="RegistryAdmin.HideHeaderName" xml:space="preserve"><value>Hide name heading on public page</value></data>
|
||||
<data name="RegistryAdmin.UploadImage" xml:space="preserve"><value>Upload image</value></data>
|
||||
<data name="RegistryAdmin.RemoveHeroImage" xml:space="preserve"><value>Remove hero image</value></data>
|
||||
<data name="RegistryAdmin.CurrentHeroImage" xml:space="preserve"><value>Current hero image</value></data>
|
||||
|
||||
Reference in New Issue
Block a user