From b67ffefbff95c14864d34f28f16b12c6a44982c0 Mon Sep 17 00:00:00 2001 From: Dustin Mierau Date: Fri, 24 May 2024 10:27:34 -0700 Subject: Custom folder icons, including custom icons for dropbox/upload folders and admin folders (all name based like the original client). --- Hotline/macOS/FilesView.swift | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'Hotline/macOS/FilesView.swift') 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) -- cgit