Skip to content

Commit

Permalink
Tweak file manager page and link to it
Browse files Browse the repository at this point in the history
  • Loading branch information
dabreegster committed Aug 8, 2024
1 parent d2c163b commit 9335ee6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
10 changes: 7 additions & 3 deletions src/lib/ToolLayout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,14 @@
<AlphaBanner />

<div style="margin-bottom: 30px">
<img src={folderUrl} alt="Manage files" style="vertical-align: middle;" />
<a href="{base}/{tool}">Manage files</a>
<img
src={folderUrl}
alt="Manage my schemes"
style="vertical-align: middle;"
/>
<a href="{base}/{tool}">Manage my schemes</a>
<span class="govuk-body" style="margin-left: 8px;">
Editing file <u>{$currentFile}</u>
You are editing: {$currentFile}
</span>
</div>

Expand Down
11 changes: 5 additions & 6 deletions src/lib/files/FileManager.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import { base } from "$app/paths";
import { LocalStorageFiles, downloadGeneratedFile } from "./index";
import {
ButtonGroup,
FileInput,
WarningButton,
SecondaryButton,
Expand Down Expand Up @@ -154,7 +153,7 @@
<tr>
<th>File name</th>
<th>Scheme name</th>
<th class="govuk-!-width-one-half">Action</th>
<th>Action</th>
</tr>
</thead>
<tbody>
Expand All @@ -169,16 +168,16 @@
{filename}
</a>
</td>
<td>TODO</td>
<td>{files.describeFile(filename)}</td>
<td>
<ButtonGroup>
<div class="govuk-button-group" style="flex-wrap: nowrap">
<SecondaryButton on:click={() => renameFile(filename)}>
Rename
</SecondaryButton>
<WarningButton on:click={() => deleteFile(filename)}>
Delete
</WarningButton>
</ButtonGroup>
</div>
</td>
</tr>
{/each}
Expand All @@ -191,7 +190,7 @@

<div class="govuk-grid-column-one-third">
<h2 class="green-bar">Create or import a file</h2>
<SecondaryButton on:click={newFile}>New blank file</SecondaryButton>
<SecondaryButton on:click={newFile}>New blank scheme file</SecondaryButton>
<hr />
<FileInput label="Import from a .json file" onLoad={importJsonFile} />

Expand Down

0 comments on commit 9335ee6

Please sign in to comment.