diff --git a/e2e/dir.fixture b/e2e/dir.fixture index 1306937..4b41f8f 100755 --- a/e2e/dir.fixture +++ b/e2e/dir.fixture @@ -24,7 +24,7 @@ - + diff --git a/e2e/search.fixture b/e2e/search.fixture index 15a16e4..37161a0 100755 --- a/e2e/search.fixture +++ b/e2e/search.fixture @@ -24,7 +24,7 @@ - + diff --git a/internal/crawler_os_test.go b/internal/crawler_os_test.go index 0baaa0a..aae63c1 100644 --- a/internal/crawler_os_test.go +++ b/internal/crawler_os_test.go @@ -12,5 +12,5 @@ func TestCrawlerOS(t *testing.T) { files, err := NewCrawlerOS("../test").Scan("../test/index.tinytune") require.NoError(err) - require.Len(files, 17) + require.Len(files, 20) } diff --git a/pkg/preview/image.go b/pkg/preview/image.go index bd8413a..106bcfd 100644 --- a/pkg/preview/image.go +++ b/pkg/preview/image.go @@ -5,6 +5,7 @@ import ( "fmt" "log/slog" "runtime" + "strings" "github.com/davidbyttow/govips/v2/vips" ) @@ -76,6 +77,13 @@ func downScale(image *vips.ImageRef, imageType int) ([]byte, error) { bytes, _, err := image.ExportWebp(ep) if err != nil { + // vips return stack traces for some corrupted files, so let's just hide stack trace + if strings.Contains(err.Error(), "Stack") { + errorMsg := strings.Split(err.Error(), "\n") + //nolint:err113 + return nil, fmt.Errorf("%w: %w", ErrImageExport, errors.New(errorMsg[0])) + } + return nil, fmt.Errorf("%w: %w", ErrImageExport, err) } diff --git a/test/big-named-folder-1231231231313123123123312312312312312312/second-big-nested-folder-name/pexels-mikhaelmayim-29523821.jpg b/test/big-named-folder-1231231231313123123123312312312312312312/second-big-nested-folder-name/pexels-mikhaelmayim-29523821.jpg new file mode 100644 index 0000000..926f000 Binary files /dev/null and b/test/big-named-folder-1231231231313123123123312312312312312312/second-big-nested-folder-name/pexels-mikhaelmayim-29523821.jpg differ diff --git a/web/scss/_navbar.scss b/web/scss/_navbar.scss index 2573adf..3e4f735 100644 --- a/web/scss/_navbar.scss +++ b/web/scss/_navbar.scss @@ -18,10 +18,59 @@ margin-bottom: 2px; } +#navbarSupportedContent{ + min-width: 0; + + > :first-child{ + min-width: inherit; + + > :first-child{ + min-width: inherit; + } + } + +} + +.breadcrumb{ + padding-right: 1rem; + flex-direction: row; + flex-wrap: nowrap; + flex-shrink: 0; + + > :first-child { + flex-shrink: 1; + } + > :not(:first-child){ + flex-shrink: 2; + + > a, + > span { + text-overflow: ellipsis; + white-space: nowrap; + overflow:hidden; + } + } +} + + +.breadcrumb-item{ + display: contents; + flex-basis: auto; + width: auto; +} + @include media-breakpoint-down(lg) { .breadcrumb{ margin: 1rem 0; + flex-direction: column; + + > .breadcrumb-item{ + display: flex; + -webkit-box-orient: horizontal; + padding-left: 0; + } } + .additional-actions{ margin: 1rem auto; margin-top: 1.5rem; diff --git a/web/templates/navbar.html b/web/templates/navbar.html index e84ea40..690c550 100644 --- a/web/templates/navbar.html +++ b/web/templates/navbar.html @@ -11,7 +11,7 @@ {{ $length := len .Path }}{{ if eq $length 0 }}{{ else }} {{ end }} {{ range $i, $e := .Path }} - {{if eqMinusOne $i $length}} {{ else }} {{ end }} + {{if eqMinusOne $i $length}} {{ else }} {{ end }} {{ end }}