Style update profile page

This commit is contained in:
Andre Beging
2025-03-28 17:31:07 +01:00
parent 52a2948528
commit e8e438b62a

View File

@@ -1,10 +1,5 @@
@page "/profile"
@using FoodsharingSiegen.Server.Dialogs
@using FoodsharingSiegen.Server.BaseClasses
@using FoodsharingSiegen.Contracts.Entity
@using FoodsharingSiegen.Contracts.Helper
@inherits FsBase
<PageTitle>Profil - @AppSettings.Terms.Title</PageTitle>
@@ -14,52 +9,69 @@
<h2>Mein Profil</h2>
<Button Color="Color.Primary" Clicked="SaveProfile">Speichern</Button>
<Fields Class="my-3">
<Validations @ref="ValidationsRef">
<Validation Validator="ValidationRule.IsNotEmpty">
<Field ColumnSize="ColumnSize.Is12">
<FieldLabel>Name</FieldLabel>
<FieldBody>
<TextEdit @bind-Text="User.Name"></TextEdit>
</FieldBody>
</Field>
</Validation>
<Validation Validator="ValidationRule.None">
<Field ColumnSize="ColumnSize.Is12">
<FieldLabel>Info über dich</FieldLabel>
<FieldBody>
<MemoEdit Rows="3" Placeholder="z.B. Bieb bei Rewe Musterhausen" @bind-Text="User.Memo"/>
</FieldBody>
</Field>
</Validation>
</Validations>
</Fields>
<div class="card mt-3">
<div class="card-body">
<Fields Class="my-3">
<Validations @ref="ValidationsRef">
<Validation Validator="ValidationRule.IsNotEmpty">
<Field ColumnSize="ColumnSize.Is12">
<FieldLabel>Name</FieldLabel>
<FieldBody>
<TextEdit @bind-Text="User.Name"></TextEdit>
</FieldBody>
</Field>
</Validation>
<Field ColumnSize="ColumnSize.Is12">
<FieldLabel>E-Mail</FieldLabel>
<FieldBody>
<TextEdit @bind-Text="User.Mail" ReadOnly="true"></TextEdit>
</FieldBody>
</Field>
@* <Validation Validator="ValidationRule.None"> *@
@* <Field ColumnSize="ColumnSize.Is12"> *@
@* <FieldLabel>Info über dich</FieldLabel> *@
@* <FieldBody> *@
@* <MemoEdit Rows="3" Placeholder="z.B. Bieb bei Rewe Musterhausen" @bind-Text="User.Memo"/> *@
@* </FieldBody> *@
@* </Field> *@
@* </Validation> *@
</Validations>
</Fields>
</div>
</div>
<hr/>
<h3>Allgemeines</h3>
<p class="mt-4 mb-1">
Die ausgewählte URL wird zum Beispiel verwendet, um die Profile der Neulinge zu verlinken
<Select TValue="FsNetworkType" @bind-SelectedValue="User.Network">
@foreach (var networkType in Enum.GetValues<FsNetworkType>())
{
<SelectItem Value="networkType">@networkType (@networkType.GetCustomValue())</SelectItem>
}
</Select>
</p>
<div class="card">
<div class="card-header" style="padding: .5rem 0 0 1rem;"><h5>Allgemeines</h5></div>
<div class="card-body">
Die ausgewählte URL wird zum Beispiel verwendet, um die Profile der Neulinge zu verlinken
<Select TValue="FsNetworkType" @bind-SelectedValue="User.Network">
@foreach (var networkType in Enum.GetValues<FsNetworkType>())
{
<SelectItem Value="networkType">@networkType (@networkType.GetCustomValue())</SelectItem>
}
</Select>
</div>
</div>
<hr/>
<h3>Sicherheit</h3>
<p class="mt-4 mb-1">
Die Änderung deines Passworts ist sofort aktiv. Im Anschluss wirst du ausgeloggt und kannst dich neu einloggen.
<Button Color="Color.Primary" Class="d-block" Clicked="() => PasswordModal?.Show(User)!"><i class="fa-solid fa-key"></i>&nbsp;Passwort ändern</Button>
</p>
<p class="mt-4 mb-1">
Dein Konto zu löschen ist endgültig und kann nicht rückgängig gemacht werden.
<Button Color="Color.Danger" Class="d-block" Clicked="RemoveAccount"><i class="fa-solid fa-trash"></i>&nbsp;Konto löschen</Button>
</p>
<div class="card">
<div class="card-header" style="padding: .5rem 0 0 1rem;"><h5>Sicherheit</h5></div>
<div class="card-body">
<p class="mt-4 mb-1">
Die Änderung deines Passworts ist sofort aktiv. Im Anschluss wirst du ausgeloggt und kannst dich neu einloggen.
<Button Color="Color.Primary" Class="d-block" Clicked="() => PasswordModal?.Show(User)!"><i class="fa-solid fa-key"></i>&nbsp;Passwort ändern</Button>
</p>
<p class="mt-4 mb-1">
Dein Konto zu löschen ist endgültig und kann nicht rückgängig gemacht werden.
<Button Color="Color.Danger" Class="d-block" Clicked="RemoveAccount"><i class="fa-solid fa-trash"></i>&nbsp;Konto löschen</Button>
</p>
</div>
</div>
</div>
<SetPasswordModal @ref="PasswordModal" OnPasswortSet="OnPasswordSet"></SetPasswordModal>