mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-23 14:40:36 +01:00
* UI: Move section navigation to sidebar * Scroll active nav link into view * Move CTAs to top right * Server Settings: Make Policies first page * Responsive table fixes * Spacing fixes * Add breadcrumb samples * store settings fixes * payment request fixes * updates pull payment title * adds invoice detail fix * updates server settings breadcrumbs + copy fix * Don't open Server Settings on Plugins page * Add breadcrumbs to pull payment views * adds breadcrumbs to account * server and store breadcrumb fixes * fixes access tokens * Fix payment processor breadcrumbs * fixes webhook 404 * Final touches * Fix test * Add breadcrumb for email rules page * Design system updates --------- Co-authored-by: dstrukt <gfxdsign@gmail.com>
102 lines
5.4 KiB
Text
102 lines
5.4 KiB
Text
@using BTCPayServer.Client
|
|
@using Microsoft.AspNetCore.Mvc.TagHelpers
|
|
@using BTCPayServer.Abstractions.TagHelpers
|
|
@using BTCPayServer.Models.ServerViewModels
|
|
@model BTCPayServer.Models.EmailsViewModel
|
|
|
|
<div class="row">
|
|
<div class="col-xl-10 col-xxl-constrain">
|
|
@if (!ViewContext.ModelState.IsValid)
|
|
{
|
|
<div asp-validation-summary="All"></div>
|
|
}
|
|
<div class="form-group">
|
|
<div class="d-flex flex-wrap gap-2 align-items-center justify-content-between">
|
|
<label asp-for="Settings.Server" class="form-label">SMTP Server</label>
|
|
<div class="dropdown only-for-js mt-n2" id="quick-fill">
|
|
<button class="btn btn-link p-0 dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false" id="QuickFillDropdownToggle">
|
|
Quick Fill
|
|
</button>
|
|
<div class="dropdown-menu" aria-labelledby="QuickFillDropdownToggle">
|
|
<a class="dropdown-item" href="" data-server="smtp.gmail.com" data-port="587">Gmail.com</a>
|
|
<a class="dropdown-item" href="" data-server="mail.yahoo.com" data-port="587">Yahoo.com</a>
|
|
<a class="dropdown-item" href="" data-server="smtp.mailgun.org" data-port="587">Mailgun</a>
|
|
<a class="dropdown-item" href="" data-server="smtp.office365.com" data-port="587">Office365</a>
|
|
<a class="dropdown-item" href="" data-server="smtp.sendgrid.net" data-port="587">SendGrid</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<input asp-for="Settings.Server" data-fill="server" class="form-control" />
|
|
<span asp-validation-for="Settings.Server" class="text-danger"></span>
|
|
</div>
|
|
<div class="form-group">
|
|
<label asp-for="Settings.Port" class="form-label"></label>
|
|
<input asp-for="Settings.Port" data-fill="port" class="form-control"/>
|
|
<span asp-validation-for="Settings.Port" class="text-danger"></span>
|
|
</div>
|
|
<div class="form-group">
|
|
<label asp-for="Settings.From" class="form-label">Sender's Email Address</label>
|
|
<input asp-for="Settings.From" class="form-control" placeholder="Firstname Lastname <email@example.com>" />
|
|
<span asp-validation-for="Settings.From" class="text-danger"></span>
|
|
</div>
|
|
<div class="form-group">
|
|
<label asp-for="Settings.Login" class="form-label"></label>
|
|
<input asp-for="Settings.Login" class="form-control"/>
|
|
<div class="form-text">For many email providers (like Gmail) your login is your email address.</div>
|
|
<span asp-validation-for="Settings.Login" class="text-danger"></span>
|
|
</div>
|
|
<div class="form-group" permission="@(Model is ServerEmailsViewModel ? Policies.CanModifyServerSettings : Policies.CanModifyStoreSettings)">
|
|
@if (!Model.PasswordSet)
|
|
{
|
|
<label asp-for="Settings.Password" class="form-label"></label>
|
|
<input asp-for="Settings.Password" type="password" class="form-control"/>
|
|
<span asp-validation-for="Settings.Password" class="text-danger"></span>
|
|
}
|
|
else
|
|
{
|
|
<label asp-for="Settings.Password" class="form-label"></label>
|
|
<div class="input-group">
|
|
<input value="Configured" type="text" readonly class="form-control"/>
|
|
<button type="submit" class="btn btn-danger" name="command" value="ResetPassword" id="ResetPassword">Reset</button>
|
|
</div>
|
|
}
|
|
</div>
|
|
<input asp-for="PasswordSet" type="hidden"/>
|
|
<div class="my-4">
|
|
<button class="d-inline-flex align-items-center btn btn-link text-primary fw-semibold p-0" type="button" id="AdvancedSettingsButton" data-bs-toggle="collapse" data-bs-target="#AdvancedSettings" aria-expanded="false" aria-controls="AdvancedSettings">
|
|
<vc:icon symbol="caret-down"/>
|
|
<span class="ms-1">Advanced settings</span>
|
|
</button>
|
|
<div id="AdvancedSettings" class="collapse">
|
|
<div class="pt-3 pb-1">
|
|
<div class="d-flex">
|
|
<input asp-for="Settings.EnabledCertificateCheck" type="checkbox" class="btcpay-toggle me-3" />
|
|
<label asp-for="Settings.EnabledCertificateCheck" class="form-check-label">TLS certificate security checks</label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
document.addEventListener("DOMContentLoaded", function () {
|
|
delegate('click', '#quick-fill .dropdown-menu a', function (e) {
|
|
e.preventDefault();
|
|
|
|
const data = e.target.dataset;
|
|
Object.keys(data).forEach(function (key) {
|
|
const value = data[key];
|
|
const input = document.querySelector('input[data-fill="' + key + '"]');
|
|
if (input) {
|
|
const type = input.getAttribute('type');
|
|
if (type === 'checkbox') {
|
|
input.checked = value;
|
|
} else {
|
|
input.value = value;
|
|
}
|
|
}
|
|
});
|
|
});
|
|
});
|
|
</script>
|