btcpayserver/BTCPayServer/Views/Shared/LayoutPartials/SyncModal.cshtml

62 lines
2.8 KiB
Text
Raw Normal View History

@using BTCPayServer.Abstractions.Contracts
2020-07-28 22:48:51 +02:00
@inject IEnumerable<ISyncSummaryProvider> SyncSummaryProviders;
@if (SyncSummaryProviders.Any(provider => !provider.AllAvailable()))
{
<!-- Modal -->
<div id="syncModal" class="modal-dialog">
<div class="modal-content">
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 04:39:27 +02:00
<a class="modal-header btn-link border-0 text-decoration-none cursor-pointer align-items-center" data-bs-toggle="collapse" data-bs-target="#syncModalContent">
2022-11-02 16:55:05 +01:00
<h4 class="modal-title h5 fw-semibold">Your nodes are synching …</h4>
<vc:icon symbol="caret-down"/>
</a>
<div id="syncModalContent" class="collapse show">
<div class="modal-body pt-0">
2022-11-02 16:55:05 +01:00
<p>Your node is synching the entire blockchain and validating the consensus rules.</p>
@foreach (var provider in SyncSummaryProviders)
{
<partial name="@provider.Partial"/>
}
2022-11-02 16:55:05 +01:00
<p class="mb-0">
<a href="https://www.youtube.com/watch?v=OrYDehC-8TU" target="_blank" rel="noreferrer noopener">Watch this video</a>
to understand the importance of blockchain synchronization.
If you really don't want to sync and you are familiar with the command line, check
<a href="https://docs.btcpayserver.org/Docker/fastsync/" target="_blank" rel="noreferrer noopener">FastSync</a>.
</p>
</div>
</div>
</div>
</div>
2021-07-26 16:44:41 +02:00
2022-10-18 20:29:29 +02:00
<style>
2022-11-02 16:55:05 +01:00
#syncModal {
--outer-margin-horizontal: var(--content-padding-horizontal);
--outer-margin-vertical: 50px;
position: fixed;
z-index: 1040;
bottom: 0;
right: 0;
margin: var(--outer-margin-vertical) var(--outer-margin-horizontal);
width: 500px;
max-width: calc(100% - var(--outer-margin-horizontal) * 2);
}
#syncModal .modal-body {
/* 92px is so that the header is still displayed */
max-height: min(360px, calc(100vh - 92px - var(--outer-margin-vertical) * 2));
overflow-y: scroll;
}
#syncModal .modal-body ul {
padding-left: 2em;
}
</style>
2021-07-26 16:44:41 +02:00
<script>
2022-11-02 16:55:05 +01:00
const $syncModalContent = document.getElementById('syncModalContent');
const $syncModal = document.getElementById('syncModal');
if (localStorage.getItem('sync-collapsed')) {
$syncModalContent.classList.remove('show');
}
delegate('hidden.bs.collapse', '#syncModalContent', () => { localStorage.setItem('sync-collapsed', 'true'); });
delegate('shown.bs.collapse', '#syncModalContent', () => { localStorage.removeItem('sync-collapsed') });
</script>
}