39 lines
1.5 KiB
Plaintext
39 lines
1.5 KiB
Plaintext
@page "/profile"
|
|
|
|
@using FoodsharingSiegen.Server.Dialogs
|
|
@using FoodsharingSiegen.Server.BaseClasses
|
|
|
|
@inherits FsBase
|
|
|
|
<PageTitle>Profil</PageTitle>
|
|
|
|
<div style="width: 100%; max-width: 500px;">
|
|
<h4>Mein Profil</h4>
|
|
<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>
|
|
|
|
<h3>Sicherheit</h3>
|
|
<Button Color="Color.Primary" Class="mb-2" Clicked="() => PasswordModal?.Show(User)!">Passwort ändern</Button>
|
|
<Button Color="Color.Danger" Class="mb-2" Clicked="RemoveAccount">Konto löschen</Button>
|
|
</div>
|
|
|
|
<SetPasswordModal @ref="PasswordModal" OnPasswortSet="OnPasswordSet"></SetPasswordModal> |