Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CoffeeTracker/CoffeeTracker/Fixtures/BeanFixtures.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ var testRoast = BeanModel(name: "Swiftly Brewed",
roaster: "Apple Inc",
roastedOn: Date.now,
boughtOn: Date.now,
notes: "Sold in Maegan's hopes and dreams",
notes: "Sold in Maegan's hopes and dreams. Single origin \n- Costa Rica",
beanType: "pods",
image: UIImage(systemName: SFSymbols.photo)!)

Expand Down
2 changes: 2 additions & 0 deletions CoffeeTracker/CoffeeTracker/Views/BeanRowView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ struct BeanRowView: View {
.resizable()
.scaledToFit()
.cornerRadius(Design.base)
.overlay(RoundedRectangle(cornerRadius: 10)
.stroke(.black.opacity(0.5), lineWidth: 0.5))
.frame(maxWidth: Design.base*10)
VStack(alignment: .leading, spacing: Design.base/2) {
HStack(alignment: .top) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ struct CoffeeShareImageView: View {
.resizable()
.scaledToFit()
.cornerRadius(Design.base)
.frame(maxWidth: Design.base*10, maxHeight: Design.base*10, alignment: .top)
.overlay(RoundedRectangle(cornerRadius: 10)
.stroke(.black.opacity(0.5), lineWidth: 0.5))
.frame(maxWidth: Design.base*10, maxHeight: Design.base*10, alignment: .topLeading)
VStack(alignment: .leading, spacing: Design.base/2) {
HStack(alignment: .top) {
VStack(alignment: .leading) {
Expand Down Expand Up @@ -59,8 +61,7 @@ struct CoffeeShareImageView: View {
}
}
}
}.padding(.horizontal, Design.base).padding(.top, Design.base)
.padding(.bottom, Design.base)
}
Group {
if showBoughtDate {
HStack {
Expand Down Expand Up @@ -100,6 +101,7 @@ struct CoffeeShareImageView: View {
}
Text(coffee.notes)
.lineLimit(nil)
.multilineTextAlignment(.leading)
}
}
}
Expand All @@ -116,13 +118,10 @@ struct CoffeeShareImageView: View {
}
}.padding(.all, Design.base/2)
}
.frame(maxWidth: .infinity, alignment: .center)
.row()
.padding(.all)
.border(Color.black.opacity(0.5), width: 0.5)
.background(Image("Background")
.resizable()
.ignoresSafeArea()
.cornerRadius(10))
.edgesIgnoringSafeArea(.all)
.resizable())
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,14 @@ struct CoffeeShareView: View {
var body: some View {
NavigationView {
ScrollView {
VStack(alignment: .leading, spacing: 20) {
VStack(alignment: .leading) {
// View to share
CoffeeShareImageView(showBoughtDate: $showBoughtDate,
showRoastedDate: $showRoastedDate,
showNotes: $showNotes,
showWatermark: $showWatermark,
coffee: coffee)
.padding()

Button {
let image = CoffeeShareImageView(showBoughtDate: $showBoughtDate,
showRoastedDate: $showRoastedDate,
Expand Down