btcpayserver/BTCPayServer/Views/UIManage/Index.cshtml
d11n a962e60de9
More Translations (#6318)
* Store selector

* Footer

* Notifications

* Checkout Appearance

* Users list

* Forms

* Emails

* Pay Button

* Edit Dictionary

* Remove newlines, fix typos

* Forms

* Pull payments and payouts

* Various pages

* Use local docs link

* Fix

* Even more translations

* Fixes #6325

* Account pages

* Notifications

* Placeholders

* Various pages and components

* Add more
2024-10-25 22:48:53 +09:00

82 lines
4.1 KiB
Text

@using BTCPayServer.Abstractions.Contracts
@using BTCPayServer.Abstractions.Models
@using Microsoft.AspNetCore.Mvc.TagHelpers
@inject IFileService FileService
@model IndexViewModel
@{
ViewData.SetActivePage(ManageNavPages.Index, StringLocalizer["Update your account"]);
var canUpload = await FileService.IsAvailable();
}
<form method="post" enctype="multipart/form-data">
<div class="sticky-header">
<h2 text-translate="true">@ViewData["Title"]</h2>
<button id="page-primary" type="submit" class="btn btn-primary">Save</button>
</div>
<partial name="_StatusMessage" />
<div class="col-xxl-constrain col-xl-8">
@if (!ViewContext.ModelState.IsValid)
{
<div asp-validation-summary="All" class="@(ViewContext.ModelState.ErrorCount.Equals(1) ? "no-marker" : "")"></div>
}
<div class="form-group">
<div class="d-flex align-items-center justify-content-between gap-3">
<label asp-for="Email" class="form-label"></label>
@if (Model.RequiresEmailConfirmation)
{
<button asp-action="SendVerificationEmail" class="d-inline-flex align-items-center gap-1 btn btn-link p-0">
<vc:icon symbol="actions-email" />
<span text-translate="true">Send verification email</span>
</button>
}
else if (Model.EmailConfirmed)
{
<span class="d-inline-flex align-items-center gap-1 text-success">
<vc:icon symbol="checkmark" />
<span text-translate="true">confirmed</span>
</span>
}
</div>
<input asp-for="Email" class="form-control" />
<span asp-validation-for="Email" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Name" class="form-label"></label>
<input asp-for="Name" class="form-control" />
<span asp-validation-for="Name" class="text-danger"></span>
</div>
@if (canUpload)
{
<div class="form-group">
<div class="d-flex align-items-center justify-content-between gap-2">
<label asp-for="ImageFile" class="form-label"></label>
@if (!string.IsNullOrEmpty(Model.ImageUrl))
{
<button type="submit" class="btn btn-link p-0 text-danger" name="RemoveImageFile" value="true">
<vc:icon symbol="cross" />
<span text-translate="true">Remove</span>
</button>
}
</div>
<div class="d-flex align-items-center gap-3">
<input asp-for="ImageFile" type="file" class="form-control flex-grow">
@if (!string.IsNullOrEmpty(Model.ImageUrl))
{
<img src="@Model.ImageUrl" alt="@StringLocalizer["Profile Picture"]" class="profile-picture"/>
}
</div>
<span asp-validation-for="ImageFile" class="text-danger"></span>
</div>
}
<h3 class="mt-5 mb-4" text-translate="true">Delete Account</h3>
<div id="danger-zone">
<a id="delete-user" class="btn btn-outline-danger mb-5" data-confirm-input="DELETE" data-bs-toggle="modal" data-bs-target="#ConfirmModal" asp-action="DeleteUserPost" data-description="@StringLocalizer["This action will also delete all stores, invoices, apps and data associated with the user."]" text-translate="true">Delete Account</a>
</div>
</div>
</form>
<partial name="_Confirm"
model="@(new ConfirmModel(StringLocalizer["Delete user"], StringLocalizer["The user will be permanently deleted. This action will also delete all stores, invoices, apps and data associated with your user."], StringLocalizer["Delete"], actionName: nameof(BTCPayServer.Controllers.UIManageController.DeleteUserPost)))"/>
@section PageFootContent {
<partial name="_ValidationScriptsPartial"/>
}