diff options
| author | Dustin Mierau <dustin@mierau.me> | 2024-05-24 10:27:34 -0700 |
|---|---|---|
| committer | Dustin Mierau <dustin@mierau.me> | 2024-05-24 10:27:34 -0700 |
| commit | b67ffefbff95c14864d34f28f16b12c6a44982c0 (patch) | |
| tree | 2e7f6c334f4c2d295ea54dfb084da4feff55693c /Hotline/macOS/FilesView.swift | |
| parent | d5a825e54a22fceec0a8d602d83f09b4534ad0b9 (diff) | |
Custom folder icons, including custom icons for dropbox/upload folders and admin folders (all name based like the original client).
Diffstat (limited to 'Hotline/macOS/FilesView.swift')
| -rw-r--r-- | Hotline/macOS/FilesView.swift | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/Hotline/macOS/FilesView.swift b/Hotline/macOS/FilesView.swift index 77db291..9624563 100644 --- a/Hotline/macOS/FilesView.swift +++ b/Hotline/macOS/FilesView.swift @@ -41,9 +41,25 @@ struct FileView: View { .frame(width: 16, height: 16) .opacity(0.5) } + else if file.isAdminDropboxFolder { + Image("Admin Drop Box") + .resizable() + .scaledToFit() + .frame(width: 16, height: 16) + } + else if file.isDropboxFolder { + Image("Drop Box") + .resizable() + .scaledToFit() + .frame(width: 16, height: 16) + } else if file.isFolder { - FolderIconView() + Image("Folder") + .resizable() + .scaledToFit() .frame(width: 16, height: 16) +// FolderIconView(dropbox: file.isUploadFolder) +// .frame(width: 16, height: 16) } else { FileIconView(filename: file.name) @@ -64,7 +80,7 @@ struct FileView: View { Spacer() if !file.isUnavailable { if file.isFolder { - Text("^[\(file.fileSize) \("file")](inflect: true)") + Text(file.fileSize == 0 ? "Empty" : "^[\(file.fileSize) \("file")](inflect: true)") .foregroundStyle(.secondary) .lineLimit(1) .padding(.trailing, 6) |