Formatted image file data structure that breaks down by subdir (#1102)

- New utility method for the web app, which sorts image files into dicts where the subdir is the key
- In the web ui, display each subdir in a table nested in a details tag.
- Allow for picking destination subdir when uploading files
- Style the expandable details blocks in the images table
- Add a check for ~ paths to the is_safe_path() utility method
This commit is contained in:
Daniel Markstedt
2023-02-24 17:28:58 -08:00
committed by GitHub
parent 983cff735b
commit dd00547f92
7 changed files with 99 additions and 27 deletions
@@ -104,6 +104,15 @@ ul.inline_list {
list-style: none;
}
summary.dirname {
text-decoration: underline;
font-family: monospace;
}
summary.filename {
text-decoration: underline;
}
.dropzone, .dropzone * {
box-sizing: border-box;
}
+11 -1
View File
@@ -53,7 +53,7 @@ input[type="radio"] {
margin: 0 0.1rem 0 0.75rem;
}
div.noscriptmsg {
div.notice {
background: var(--danger);
border-radius: var(--border-radius);
padding: 0.5rem;
@@ -717,6 +717,16 @@ section#files p {
margin-top: 1rem;
}
section#files details.subdir summary.dirname {
text-decoration: underline;
font-family: monospace;
margin: 0.5rem 0;
}
section#files details.contents summary.filename {
text-decoration: underline;
}
@media (max-width: 900px) {
section#files table#images tr th:nth-child(2),
section#files table#images tr td:nth-child(2) {