12 lines
3.0 KiB
Plaintext
12 lines
3.0 KiB
Plaintext
@model BookRecoveryPage
|
|
@{ViewData["Title"]="Back up books";}
|
|
<div class="page-heading" data-pwa-header><div><p class="eyebrow">Your writing, safely portable</p><h1>Back up books <help-icon key="bookRecovery.overview" /></h1><p>Choose one, several or every book. Necessary shared project information travels with them.</p></div><a class="btn btn-outline-secondary" asp-controller="Projects" asp-action="Index">Projects</a></div>
|
|
@if(Model.Error!=""){<div class="alert alert-warning" role="alert">@Model.Error</div>}
|
|
@if(Model.Projects.Length==0){<p class="alert alert-info">There are no projects you own to back up yet. Create or restore a book first.</p>}
|
|
<section class="edit-panel"><form method="get"><label for="projectId" class="form-label">Project</label><div class="input-group"><select name="projectId" id="projectId" class="form-select">@foreach(var p in Model.Projects){<option value="@p.ProjectID" selected="@(p.ProjectID==Model.ProjectID)">@p.ProjectName @(p.IsArchived?"· Archived project":"")</option>}</select><button class="btn btn-outline-primary">Choose project</button></div></form></section>
|
|
@if(Model.Source is not null){<section class="edit-panel mt-3"><form asp-action="ReviewBackup" method="post"><input type="hidden" name="projectId" value="@Model.ProjectID"/><h2>Choose books</h2>@if(Model.Source.Data.Books.Count==0){<p class="alert alert-info">This project has no books to back up.</p>}<p>Archived books are included when selected. Archive status does not release subscription capacity.</p><div class="button-row"><button type="button" class="btn btn-outline-secondary btn-sm" data-books-all>Select all</button><button type="button" class="btn btn-outline-secondary btn-sm" data-books-none>Clear selection</button></div>
|
|
@foreach(var b in Model.Source.Data.Books.OrderBy(b=>b.SortOrder)){<div class="form-check my-3"><input class="form-check-input" type="checkbox" name="books" value="@b.BookID" id="book-@b.BookID" checked="@(!Model.BookID.HasValue||Model.BookID==b.BookID)"/><label class="form-check-label" for="book-@b.BookID"><strong>@b.BookDisplayTitle</strong> @(b.IsArchived?"· Archived":"")</label></div>}
|
|
<details class="my-3"><summary>What is included?</summary><p>Selected chapters, scenes, saved prose, planning and author review decisions; common characters, locations, relationships, maps, floor plans, plot lines, assets and required files. A selection with an unresolved cross-book dependency is refused rather than losing it.</p></details>
|
|
<p class="alert alert-info">Keep backup files private: they may contain manuscript prose, research and personal information. Downloading does not delete books, release capacity or prove your file is safely stored. Verify your local copy before separately choosing Delete Forever.</p><button class="btn btn-primary" disabled="@(Model.Source.Data.Books.Count==0)">Review selected backup</button> <a asp-action="Restore" class="btn btn-outline-secondary">Restore books</a></form></section>}
|
|
@section Scripts{<script src="~/js/book-recovery.js" asp-append-version="true"></script>}
|