Mercurial > public > lazybear
diff LazyBear/Views/Company/Helpers/NewsRow.swift @ 443:ffbb1dbab531
InsiderRosterHelper implemented
author | Dennis Concepción Martín <dennisconcepcionmartin@gmail.com> |
---|---|
date | Mon, 21 Jun 2021 20:17:46 +0200 |
parents | 6eae10397501 |
children | 8621ba6fd457 |
line wrap: on
line diff
--- a/LazyBear/Views/Company/Helpers/NewsRow.swift Mon Jun 21 13:28:45 2021 +0200 +++ b/LazyBear/Views/Company/Helpers/NewsRow.swift Mon Jun 21 20:17:46 2021 +0200 @@ -6,7 +6,6 @@ // import SwiftUI -import SDWebImageSwiftUI struct NewsRow: View { var new: LatestNewsModel @@ -14,28 +13,20 @@ var body: some View { HStack { - RoundedRectangle(cornerRadius: 10) - .frame(width: 65, height: 65, alignment: .center) - .overlay( - WebImage(url: URL(string: new.image)) - .resizable() - .placeholder { - Rectangle() - .foregroundColor(.gray) - } - .indicator(.activity) - .scaledToFill() - ) - .clipShape(RoundedRectangle(cornerRadius: 10)) - VStack(alignment: .leading) { - Text(new.headline) + Text("\(convertEpoch(new.datetime, true)) ago") + .font(.caption2) + .opacity(0.5) + + Text(new.headline.capitalized) .font(.callout) .fontWeight(.semibold) .fixedSize(horizontal: false, vertical: true) /// I need to add this to make lineLimit works correctly .lineLimit(3) } - .padding(.horizontal, 5) +// .padding(.horizontal, 5) + + Spacer() Button(action: { showWebArticle = true }) { Capsule()