aboutsummaryrefslogtreecommitdiff
path: root/Hotline/Views/FilesView.swift
diff options
context:
space:
mode:
authorDustin Mierau <dustin@mierau.me>2023-12-07 00:14:31 -0800
committerDustin Mierau <dustin@mierau.me>2023-12-07 00:14:31 -0800
commitf0e278db3b6e9022355ac8a25c301936f15454cf (patch)
tree5d5e62efcb4a626edf2c4ad885d069aad5b36c13 /Hotline/Views/FilesView.swift
parent2305aa8eab18ec5e60d940351793642145de5bd5 (diff)
Few style changes in chat and files and news.
Diffstat (limited to 'Hotline/Views/FilesView.swift')
-rw-r--r--Hotline/Views/FilesView.swift50
1 files changed, 34 insertions, 16 deletions
diff --git a/Hotline/Views/FilesView.swift b/Hotline/Views/FilesView.swift
index 3b2b236..1395ca6 100644
--- a/Hotline/Views/FilesView.swift
+++ b/Hotline/Views/FilesView.swift
@@ -44,28 +44,46 @@ struct FilesView: View {
var body: some View {
NavigationStack {
List(hotline.fileList, id: \.self, children: \.files) { tree in
- HStack {
if tree.isFolder {
- HStack(alignment: /*@START_MENU_TOKEN@*/.center/*@END_MENU_TOKEN@*/) {
- Image(systemName: "folder.fill")
+ DisclosureGroup {
+ HStack {
+ HStack(alignment: /*@START_MENU_TOKEN@*/.center/*@END_MENU_TOKEN@*/) {
+ Image(systemName: "folder.fill")
+ }
+ .frame(minWidth: 25)
+ Text("File").fontWeight(.medium)
+ Spacer()
+ Text("4").foregroundStyle(.secondary)
+// HStack(alignment: /*@START_MENU_TOKEN@*/.center/*@END_MENU_TOKEN@*/) {
+// }
+// .frame(minWidth: 25)
+// ProgressView(value: 0.8)
+ }
+ } label: {
+ HStack {
+ HStack(alignment: /*@START_MENU_TOKEN@*/.center/*@END_MENU_TOKEN@*/) {
+ Image(systemName: "folder.fill")
+ }
+ .frame(minWidth: 25)
+ Text(tree.name).fontWeight(.medium)
+ Spacer()
+ Text("\(tree.fileSize)").foregroundStyle(.secondary)
+ }
}
- .frame(minWidth: 25)
- Text(tree.name).bold()
- Spacer()
- Text("\(tree.fileSize)").foregroundStyle(.gray)
}
else {
- HStack(alignment: /*@START_MENU_TOKEN@*/.center/*@END_MENU_TOKEN@*/) {
- Image(uiImage: fileIcon(name: tree.name))
- .renderingMode(.template)
- .foregroundColor(.accentColor)
+ HStack {
+ HStack(alignment: /*@START_MENU_TOKEN@*/.center/*@END_MENU_TOKEN@*/) {
+ Image(uiImage: fileIcon(name: tree.name))
+ .renderingMode(.template)
+ .foregroundColor(.accentColor)
+ }
+ .frame(minWidth: 25)
+ Text(tree.name)
+ Spacer()
+ Text(formattedFileSize(tree.fileSize)).foregroundStyle(.gray)
}
- .frame(minWidth: 25)
- Text(tree.name).bold()
- Spacer()
- Text(formattedFileSize(tree.fileSize)).foregroundStyle(.gray)
}
- }
}
.listStyle(.plain)
.task {