btcpayserver/BTCPayServer/Views/Shared/LayoutPartials/SyncModal.cshtml
d11n ed7031981b
Bootstrap v5 migration (#2490)
* Swap bootstrap asset files

* Update themes and color definitions

* Move general bootstrap customizations

* Theme updates

Theme updates

* Remove BuildBundlerMinifier

This lead to an error, because BuildBundlerMinifier and BundlerMinifier.Core seem to conflict here. Details: https://stackoverflow.com/a/61119586

* Rewplace btn-block class with w-100

* Update badge classes

* Remove old font family head variable

* Update margin classes

* Cleanups

* Update float classes

* Update text classes

* Update padding classes

* Update border classes

* UPdate dropdown classes

* Update select classes

* Update neutral custom props

* Update bootstrap and customizations

* Update ChromeDriver; disable smooth scroll

https://github.com/SeleniumHQ/selenium/issues/8295

* Improve alert messages

* Improve bootstrap customizations

* Disable reduced motion

See also 7358282f

* Update Bootstrap data attributes

* Update file inputs

* Update input groups

* Replace deprecated jumbotron class

* Update variables; re-add negative margin util classes

* Update cards

* Update form labels

* Debug alerts

* Fix aria-labelledby associations

* Dropdown-related test fixes

* Fix CanUseWebhooks test

* Test fixes

* Nav updates

* Fix nav usage in wallet send and payouts

* Update alert and modal close buttons

* Re-add backdrop properties

* Upgrade Bootstrap to v5 final

* Update screen reader classes

* Update font-weight classes

* Update monospace font classes

* Update accordians

* Update close icon usage

* Cleanup

* Update scripts and style integrations

* Update input group texts

* Update LN node setup page

* Update more form control classes

* Update inline forms

* Add js specific test

* Upgrade Vue.js

* Remove unused JS

* Upgrade Bootstrap to v5.0.1

* Try container related test updates

* Separate jQuery bundle

* Remove jQuery from LND seed backup page

* Remove unused code

* Refactor email autofill js

* Refactor camera scanner JS

* Re-add tests

* Re-add BuildBundlerMinifier

* Do not minify bundles containing Bootstrap

Details https://github.com/madskristensen/BundlerMinifier/issues/558

* Update bundles

* Cleanup JS test

* Cleanup tests involving dropdowns

* Cleanup tests involving collapses

* Cleanup locale additions in ConfigureCore

* Cleanup bundles

* Remove duplicate status message

* Cleanup formatting

* Fix missing validation scripts

* Remove unused unminified Bootstrap js files

* Fix classic theme

* Fix Casa theme

* Fix PoS validation
2021-05-19 11:39:27 +09:00

79 lines
3.3 KiB
Text

@using BTCPayServer.Abstractions.Contracts
@inject IEnumerable<ISyncSummaryProvider> SyncSummaryProviders;
@if (SyncSummaryProviders.Any(provider => !provider.AllAvailable()))
{
<!-- Modal -->
<div id="syncModal" class="modal-dialog">
<div class="modal-content">
<a class="modal-header btn-link border-0 text-decoration-none cursor-pointer align-items-center" data-bs-toggle="collapse" data-bs-target="#syncModalContent">
<h4 class="modal-title">Your nodes are synching...</h4>
<span class="fa fa-chevron-down"></span>
</a>
<div id="syncModalContent" class="collapse show">
<div class="modal-body pt-0">
<p>
Your node is synching the entire blockchain and validating the consensus rules...
</p>
@foreach (var provider in SyncSummaryProviders)
{
<partial name="@provider.Partial"/>
}
<p>
<a href="https://www.youtube.com/watch?v=OrYDehC-8TU" target="_blank">Watch this video</a> to understand the importance of blockchain synchronization.
</p>
<p class="mb-0">If you really don't want to synch and you are familiar with the command line, check <a href="https://github.com/btcpayserver/btcpayserver-docker/blob/master/contrib/FastSync/README.md" target="_blank">FastSync</a>.</p>
</div>
</div>
</div>
</div>
@section PageHeadContent {
<style type="text/css">
#syncModal {
position: fixed;
bottom: 40px;
right: 10px;
margin: 0;
z-index: 1000;
width: 500px;
max-width: 100%;
}
#syncModal .modal-body {
max-height: 400px;
overflow-y: scroll;
}
#syncModal .fa-chevron-down {
font-size: 1em;
text-decoration: none;
transition: transform .35s;
}
#syncModal .collapsed .fa-chevron-down {
transform: rotate(-90deg);
}
</style>
}
@section PageFootContent {
<script>
var syncModalContent = $('#syncModalContent');
var syncModal = $('#syncModal');
if (localStorage.getItem("sync-collapsed")){
syncModalContent.removeClass("show");
}
syncModalContent.on('hidden.bs.collapse', function () {
localStorage.setItem("sync-collapsed", "true");
}).on('shown.bs.collapse', function () {
localStorage.removeItem("sync-collapsed");
});
function handleFooterBottom() {
if (document.getElementsByTagName("footer")[0].getBoundingClientRect().top < window.innerHeight){
syncModal.stop().animate({"bottom":"40px"}, 200);
} else {
syncModal.stop().animate({"bottom":"10px"}, 200);
}
}
$(document).on("scroll", handleFooterBottom);
handleFooterBottom();
</script>
}
}