mirror of
https://github.com/Sebclem/hassio-nextcloud-backup.git
synced 2024-11-15 05:52:59 +01:00
66 lines
3.4 KiB
Plaintext
66 lines
3.4 KiB
Plaintext
<% if (locals.backups) { %>
|
|
<div class="list-group ">
|
|
<% for(const index in backups) { %>
|
|
<a class="list-group-item list-group-item-action d-flex justify-content-between align-items-center"
|
|
href="#"
|
|
data-id="<%= backups[index].etag %>"
|
|
data-bs-toggle="modal"
|
|
data-bs-target="#modal-<%= backups[index].etag %>">
|
|
<%= backups[index].basename %>
|
|
<span class="badge bg-primary">
|
|
<%= DateTime.fromRFC2822(backups[index].lastmod).toFormat("MMM dd, yyyy HH:mm") %>
|
|
</span>
|
|
</a>
|
|
|
|
<div id="modal-<%= backups[index].etag %>" class="modal fade">
|
|
<div class="modal-dialog modal-lg">
|
|
<div class="modal-content bg-dark">
|
|
<div class="modal-header border-secondary">
|
|
<h5 class="modal-title" id="exampleModalLabel"> Backup Detail</h5>
|
|
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal"
|
|
aria-label="Close"></button>
|
|
</div>
|
|
<div class="modal-body">
|
|
|
|
<div class="mb-3">
|
|
<label for="name-<%= backups[index].etag %>" class="form-label">Name</label>
|
|
<input disabled type="text" class="form-control bg-secondary border-dark text-accent"
|
|
id="name-<%= backups[index].etag %>"
|
|
value="<%= backups[index].basename %>"/>
|
|
</div>
|
|
|
|
|
|
<div class="mb-3">
|
|
<label for="date-<%= backups[index].etag %>" class="form-label">Date</label>
|
|
<input disabled type="text" class="form-control bg-secondary border-dark text-accent"
|
|
id="date-<%= backups[index].etag %>"
|
|
value="<%= DateTime.fromRFC2822(backups[index].lastmod).toFormat("MMM dd, yyyy HH:mm") %>"/>
|
|
|
|
</div>
|
|
<div class="input-field col s12">
|
|
<label for="size-<%= backups[index].etag %>" class="form-label">Size</label>
|
|
<input disabled type="text" class="form-control bg-secondary border-dark text-accent"
|
|
id="size-<%= backups[index].etag %>"
|
|
value="<%= humanFileSize(backups[index].size, false) %>"/>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="modal-footer border-secondary">
|
|
<button data-bs-dismiss="modal" class="btn btn-danger">Close</button>
|
|
<button class="btn btn-success restore"
|
|
data-id="<%= backups[index].filename %>"
|
|
data-name='<%= backups[index].basename ? backups[index].basename : backups[index].etag %>'
|
|
data-bs-dismiss="modal">
|
|
Upload to HA
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<% } %>
|
|
</div>
|
|
|
|
|
|
<% } %> |