mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2024-11-20 10:40:29 +01:00
ed7031981b
* 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
106 lines
4.0 KiB
Plaintext
106 lines
4.0 KiB
Plaintext
@model ViewFilesViewModel
|
|
@{
|
|
ViewData.SetActivePageAndTitle(ServerNavPages.Files, "File Storage");
|
|
}
|
|
|
|
<h2 class="mb-4">@ViewData["PageTitle"]</h2>
|
|
|
|
@if (!Model.StorageConfigured)
|
|
{
|
|
<p>
|
|
Before being able to upload you first need to
|
|
<a asp-action="storage" asp-route-forceChoice="true" asp-route-returnurl="@ViewData["ReturnUrl"]">
|
|
choose your file storage service provider
|
|
</a>.
|
|
<a href="https://docs.btcpayserver.org/FAQ/FAQ-ServerSettings/#how-to-upload-files-to-btcpay" target="_blank">
|
|
<span class="fa fa-question-circle-o text-secondary" title="More information..."></span>
|
|
</a>
|
|
</p>
|
|
}
|
|
else
|
|
{
|
|
<p>
|
|
Change your <a asp-action="storage" asp-route-forceChoice="true" asp-route-returnurl="@ViewData["ReturnUrl"]">file storage service</a> provider.
|
|
<a href="https://docs.btcpayserver.org/FAQ/FAQ-ServerSettings/#how-to-upload-files-to-btcpay" target="_blank">
|
|
<span class="fa fa-question-circle-o text-secondary" title="More information..."></span>
|
|
</a>
|
|
</p>
|
|
|
|
@if (Model.Files.Any())
|
|
{
|
|
<table class="table table-sm table-responsive-md">
|
|
<thead>
|
|
<tr>
|
|
<th>Name</th>
|
|
<th>Timestamp</th>
|
|
<th>User</th>
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach (var file in Model.Files)
|
|
{
|
|
<tr>
|
|
<td>@file.FileName</td>
|
|
<td>@file.Timestamp.ToBrowserDate()</td>
|
|
<td>@file.ApplicationUser.UserName</td>
|
|
<td>
|
|
<a asp-action="Files" asp-route-fileId="@file.Id">Get Link</a>
|
|
- <a asp-action="CreateTemporaryFileUrl" asp-route-fileId="@file.Id">Get Temp Link</a>
|
|
- <a asp-action="DeleteFile" asp-route-fileId="@file.Id">Remove</a>
|
|
</td>
|
|
</tr>
|
|
}
|
|
</tbody>
|
|
</table>
|
|
}
|
|
else
|
|
{
|
|
<p class="text-secondary mt-3">
|
|
There are no files yet.
|
|
</p>
|
|
}
|
|
}
|
|
|
|
|
|
@if (!string.IsNullOrEmpty(Model.SelectedFileId))
|
|
{
|
|
var file = Model.Files.Single(storedFile => storedFile.Id.Equals(Model.SelectedFileId, StringComparison.InvariantCultureIgnoreCase));
|
|
<div class="card mb-2">
|
|
<div class="card-text">
|
|
<ul class="list-group list-group-flush">
|
|
<li class="list-group-item">
|
|
@file.FileName
|
|
</li>
|
|
|
|
<li class="list-group-item">
|
|
<div class="row px-0 mx-0">
|
|
<span class="col-sm-12 col-md-2">Url: </span>
|
|
<a class="col-sm-12 col-md-10 text-end" asp-action="GetFile" asp-controller="Storage" asp-route-fileId="@Model.SelectedFileId" target="_blank">
|
|
@Url.Action("GetFile", "Storage", new
|
|
{
|
|
fileId = Model.SelectedFileId
|
|
}, Context.Request.Scheme, Context.Request.Host.ToString())
|
|
</a>
|
|
</div>
|
|
</li>
|
|
<li class="list-group-item ">
|
|
<div class="row px-0 mx-0">
|
|
<span class="col-sm-12 col-md-2">Direct Url: </span>
|
|
<a class="col-sm-12 col-md-10 text-end" href="@Model.DirectFileUrl" target="_blank">@Model.DirectFileUrl</a>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
}
|
|
|
|
@if (Model.StorageConfigured)
|
|
{
|
|
<form asp-action="CreateFile" method="post" enctype="multipart/form-data">
|
|
<h4 class="mt-5 mb-3">Upload File</h4>
|
|
<input type="file" class="form-control mb-3" name="file" id="file" required>
|
|
<button class="btn btn-primary" role="button"><span class="fa fa-plus"></span> Upload file</button>
|
|
</form>
|
|
}
|