Files
Andre Beging bf64239625 Refactor enums and update Interaction entity field
Moved enums to a dedicated namespace and updated references across the codebase. Renamed the `Info` field in the `Interaction` entity to `Info1`, including necessary migrations and UI adjustments. These changes improve the organization and consistency of the codebase.
2025-04-01 10:41:09 +02:00

78 lines
3.2 KiB
Plaintext

@page "/profile"
@using FoodsharingSiegen.Contracts.Enums
@inherits FsBase
<PageTitle>Profil - @AppSettings.Terms.Title</PageTitle>
<div style="width: 100%; max-width: 500px;">
<h2>Mein Profil</h2>
<Button Color="Color.Primary" Clicked="SaveProfile">Speichern</Button>
<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/>
<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/>
<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>