feat(ui): truncate long file names and auto-close context menu

- Add `.file-name` class with ellipsis truncation for long file names to prevent layout overflow.
- Apply truncation to metadata and file items in download and preview pages.
- Add `title` attributes to truncated names to show the full text on hover.
- Automatically close the file context menu when the mouse moves more than 80px away from it.
This commit is contained in:
2026-05-25 17:37:06 +03:00
parent bba84d4194
commit 720b45a9a6
4 changed files with 41 additions and 2 deletions

View File

@@ -49,7 +49,7 @@
<img src="{{.ThumbnailURL}}" alt="" loading="lazy">
</a>
<a class="file-main" href="{{.DownloadURL}}?inline=1">
<strong>{{.Name}}</strong>
<strong class="file-name" title="{{.Name}}">{{.Name}}</strong>
<small>{{.Size}} · {{.ContentType}}</small>
</a>
{{if not $.Data.Locked}}