diff --git a/BeReal.xcodeproj/project.pbxproj b/BeReal.xcodeproj/project.pbxproj index 7cbebec..e142b2f 100644 --- a/BeReal.xcodeproj/project.pbxproj +++ b/BeReal.xcodeproj/project.pbxproj @@ -18,6 +18,7 @@ 02CE5554293B130100730DC9 /* DocumentItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02CE5553293B130100730DC9 /* DocumentItem.swift */; }; 02CE5557293B134200730DC9 /* Image+Helpers.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02CE5556293B134200730DC9 /* Image+Helpers.swift */; }; 02CE5559293B1AB600730DC9 /* Text+Helpers.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02CE5558293B1AB600730DC9 /* Text+Helpers.swift */; }; + 02CE555B293B1D8400730DC9 /* BrowseView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02CE555A293B1D8400730DC9 /* BrowseView.swift */; }; 02FFFD7B29395DD200306533 /* String+Constants.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02FFFD7A29395DD200306533 /* String+Constants.swift */; }; 4694AAA0293A7C8800D54903 /* Modules in Frameworks */ = {isa = PBXBuildFile; productRef = 4694AA9F293A7C8800D54903 /* Modules */; }; /* End PBXBuildFile section */ @@ -55,6 +56,7 @@ 02CE5553293B130100730DC9 /* DocumentItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DocumentItem.swift; sourceTree = ""; }; 02CE5556293B134200730DC9 /* Image+Helpers.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Image+Helpers.swift"; sourceTree = ""; }; 02CE5558293B1AB600730DC9 /* Text+Helpers.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Text+Helpers.swift"; sourceTree = ""; }; + 02CE555A293B1D8400730DC9 /* BrowseView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BrowseView.swift; sourceTree = ""; }; 02FFFD7A29395DD200306533 /* String+Constants.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "String+Constants.swift"; sourceTree = ""; }; /* End PBXFileReference section */ @@ -157,6 +159,7 @@ 02B334E5293A93C400C45E31 /* Views */ = { isa = PBXGroup; children = ( + 02CE555A293B1D8400730DC9 /* BrowseView.swift */, ); path = Views; sourceTree = ""; @@ -328,6 +331,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 02CE555B293B1D8400730DC9 /* BrowseView.swift in Sources */, 02B334E8293A93DC00C45E31 /* FolderItem.swift in Sources */, 02AE64F129363DBF005A4AF3 /* ContentView.swift in Sources */, 02CE5554293B130100730DC9 /* DocumentItem.swift in Sources */, diff --git a/BeReal/Browse/Components/DocumentItem.swift b/BeReal/Browse/Components/DocumentItem.swift index 8b6f311..11ee561 100644 --- a/BeReal/Browse/Components/DocumentItem.swift +++ b/BeReal/Browse/Components/DocumentItem.swift @@ -39,7 +39,7 @@ struct DocumentItem: View { .foregroundColor(.secondary) } } - .padding(16) + .padding(.vertical, 8) } } diff --git a/BeReal/Browse/Components/FolderItem.swift b/BeReal/Browse/Components/FolderItem.swift index bb1862b..fd89e77 100644 --- a/BeReal/Browse/Components/FolderItem.swift +++ b/BeReal/Browse/Components/FolderItem.swift @@ -30,7 +30,7 @@ struct FolderItem: View { .foregroundColor(.secondary) .font(.headline) } - .padding(16) + .padding(.vertical, 8) } } diff --git a/BeReal/Browse/Extensions/Text+Helpers.swift b/BeReal/Browse/Extensions/Text+Helpers.swift index 5fe430a..1c0a9aa 100644 --- a/BeReal/Browse/Extensions/Text+Helpers.swift +++ b/BeReal/Browse/Extensions/Text+Helpers.swift @@ -1,6 +1,6 @@ // // Text+Helpers.swift -// BeReal +// Browse // // Created by Javier Cicchelli on 03/12/2022. // Copyright © 2022 Röck+Cöde. All rights reserved. diff --git a/BeReal/Browse/Views/BrowseView.swift b/BeReal/Browse/Views/BrowseView.swift new file mode 100644 index 0000000..2654010 --- /dev/null +++ b/BeReal/Browse/Views/BrowseView.swift @@ -0,0 +1,75 @@ +// +// BrowseView.swift +// Browse +// +// Created by Javier Cicchelli on 03/12/2022. +// Copyright © 2022 Röck+Cöde. All rights reserved. +// + +import SwiftUI + +struct BrowseView: View { + var body: some View { + List { + Group { + FolderItem(name: "Some folder #1 name") + FolderItem(name: "Some folder #2 name") + FolderItem(name: "Some folder #3 name") + FolderItem(name: "Some folder #4 name") + FolderItem(name: "Some folder #5 name") + FolderItem(name: "Some folder #6 name") + FolderItem(name: "Some folder #7 name") + } + Group { + DocumentItem( + name: "Some document #1 name", + lastModified: "3 months ago", + fileSize: "1,23 Mbytes" + ) + DocumentItem( + name: "Some document #2 name", + lastModified: "2 years ago", + fileSize: "123 Kbytes" + ) + DocumentItem( + name: "Some document #3 name", + lastModified: "13 days ago", + fileSize: "12 bytes" + ) + DocumentItem( + name: "Some document #4 name", + lastModified: "13 hours ago", + fileSize: "12,3 Gbytes" + ) + DocumentItem( + name: "Some document #5 name", + lastModified: "13 minutes ago", + fileSize: "123 Tbytes" + ) + DocumentItem( + name: "Some document #6 name", + lastModified: "13 seconds ago", + fileSize: "123 Tbytes" + ) + DocumentItem( + name: "Some document #7 name", + lastModified: "13 nanoseconds ago", + fileSize: "123 Tbytes" + ) + } + } + .listStyle(.inset) + .background(Color.red) + .navigationTitle("Folder name") + } +} + +// MARK: - Previews + +struct BrowseView_Previews: PreviewProvider { + static var previews: some View { + NavigationView { + BrowseView() + } + } +}