From d120b3f0aa4c19f102169035a0a82fe04275bd99 Mon Sep 17 00:00:00 2001 From: Gerrit Linnemann Date: Sun, 30 Aug 2020 10:02:19 +0200 Subject: [PATCH] Working Skeleton --- .../folder.symbolset/Contents.json | 12 ++ .../folder.symbolset/folder.svg | 161 ++++++++++++++++++ YAPS/YAPS/ContentView.swift | 20 ++- YAPS/YAPS/Struct/YapsFileCell.swift | 2 - 4 files changed, 185 insertions(+), 10 deletions(-) create mode 100644 YAPS/YAPS/Assets.xcassets/folder.symbolset/Contents.json create mode 100644 YAPS/YAPS/Assets.xcassets/folder.symbolset/folder.svg diff --git a/YAPS/YAPS/Assets.xcassets/folder.symbolset/Contents.json b/YAPS/YAPS/Assets.xcassets/folder.symbolset/Contents.json new file mode 100644 index 0000000..3038316 --- /dev/null +++ b/YAPS/YAPS/Assets.xcassets/folder.symbolset/Contents.json @@ -0,0 +1,12 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + }, + "symbols" : [ + { + "filename" : "folder.svg", + "idiom" : "universal" + } + ] +} diff --git a/YAPS/YAPS/Assets.xcassets/folder.symbolset/folder.svg b/YAPS/YAPS/Assets.xcassets/folder.symbolset/folder.svg new file mode 100644 index 0000000..17e0ca7 --- /dev/null +++ b/YAPS/YAPS/Assets.xcassets/folder.symbolset/folder.svg @@ -0,0 +1,161 @@ + + + + + + + + + Weight/Scale Variations + Ultralight + Thin + Light + Regular + Medium + Semibold + Bold + Heavy + Black + + + + + + + + + + + Design Variations + Symbols are supported in up to nine weights and three scales. + For optimal layout with text and other symbols, vertically align + symbols with the adjacent text. + + + + + + Margins + Leading and trailing margins on the left and right side of each symbol + can be adjusted by modifying the x-location of the margin guidelines. + Modifications are automatically applied proportionally to all + scales and weights. + + + + Exporting + Symbols should be outlined when exporting to ensure the + design is preserved when submitting to Xcode. + Template v.2.0 + Requires Xcode 12 or greater + Generated from folder + Typeset at 100 points + Small + Medium + Large + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/YAPS/YAPS/ContentView.swift b/YAPS/YAPS/ContentView.swift index ce13241..de059cd 100644 --- a/YAPS/YAPS/ContentView.swift +++ b/YAPS/YAPS/ContentView.swift @@ -15,17 +15,21 @@ struct ContentView: View { var body: some View { HStack { VStack(alignment: .leading) { - Button(action: { - let files = FinderHelper.shared.askForFolderAndGetFiles() + HStack { + Image.init("folder") - if files.count > 0 { - self.fileList.removeAll() - self.fileList.append(contentsOf: files) + Button(action: { + let files = FinderHelper.shared.askForFolderAndGetFiles() - self.resetCurrentFile() + if files.count > 0 { + self.fileList.removeAll() + self.fileList.append(contentsOf: files) + + self.resetCurrentFile() + } + }) { + Text("􀈕 Select Folder") } - }) { - Text("Select Folder") } List { diff --git a/YAPS/YAPS/Struct/YapsFileCell.swift b/YAPS/YAPS/Struct/YapsFileCell.swift index 517e041..d37e920 100644 --- a/YAPS/YAPS/Struct/YapsFileCell.swift +++ b/YAPS/YAPS/Struct/YapsFileCell.swift @@ -40,7 +40,6 @@ struct YapsFileCell: View { } } } - //.background(self.focused ? Color.gray : Color.clear) } } @@ -64,6 +63,5 @@ struct YapsFileCell_Previews: PreviewProvider { .aspectRatio(contentMode: .fill) } } - .background(/*@START_MENU_TOKEN@*/Color.gray/*@END_MENU_TOKEN@*/) } }