From b2a24fca5795196ee50f8976cd95e89efd80b2d0 Mon Sep 17 00:00:00 2001 From: Leo Vasanko Date: Mon, 20 Nov 2023 13:47:41 -0800 Subject: [PATCH] Fixed renames and breadcrumbs for gallery. --- cista/watching.py | 3 ++- frontend/src/components/BreadCrumb.vue | 1 + frontend/src/components/FileRenameInput.vue | 6 ++++++ frontend/src/components/Gallery.vue | 17 ++++++++-------- frontend/src/components/GalleryFigure.vue | 22 +++++++++++++++------ frontend/src/components/HeaderMain.vue | 1 - frontend/src/utils/fileutil.ts | 7 +++++-- 7 files changed, 39 insertions(+), 18 deletions(-) diff --git a/cista/watching.py b/cista/watching.py index ab276bb..d36c216 100644 --- a/cista/watching.py +++ b/cista/watching.py @@ -153,13 +153,14 @@ def walk(rel: PurePosixPath, stat: stat_result | None = None) -> list[FileEntry] isfile=entry.isfile, ) ret.extend(sub) - ret[0] = entry except FileNotFoundError: pass # Things may be rapidly in motion except OSError as e: if e.errno == 13: # Permission denied pass logger.error(f"Watching {path=}: {e!r}") + if ret: + ret[0] = entry return ret diff --git a/frontend/src/components/BreadCrumb.vue b/frontend/src/components/BreadCrumb.vue index c35f669..ee3b34b 100644 --- a/frontend/src/components/BreadCrumb.vue +++ b/frontend/src/components/BreadCrumb.vue @@ -122,6 +122,7 @@ watchEffect(() => { min-height: 2em; margin: 0; padding: 0 1em 0 0; + overflow: hidden; } .breadcrumb > a { flex: 0 4 auto; diff --git a/frontend/src/components/FileRenameInput.vue b/frontend/src/components/FileRenameInput.vue index 6f1aff2..d9e06e6 100644 --- a/frontend/src/components/FileRenameInput.vue +++ b/frontend/src/components/FileRenameInput.vue @@ -56,4 +56,10 @@ input#FileRenameInput { outline: none; font: inherit; } +.gallery input#FileRenameInput { + padding: .75em; + font-weight: 600; + width: auto; +} + diff --git a/frontend/src/components/Gallery.vue b/frontend/src/components/Gallery.vue index dd2471f..3de61f9 100644 --- a/frontend/src/components/Gallery.vue +++ b/frontend/src/components/Gallery.vue @@ -1,18 +1,19 @@