Extracted term-related properties from AppSettings to a new TermSettings class for improved organization and separation of concerns. Updated appsettings.json to reflect the new structure.
65 lines
2.4 KiB
Plaintext
65 lines
2.4 KiB
Plaintext
@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>
|
|
|
|
<div style="width: 100%; max-width: 500px;">
|
|
|
|
<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>
|
|
|
|
<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>
|
|
|
|
|
|
<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> 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> Konto löschen</Button>
|
|
</p>
|
|
</div>
|
|
|
|
<SetPasswordModal @ref="PasswordModal" OnPasswortSet="OnPasswordSet"></SetPasswordModal> |