blob: cfe267b92280a2ba3d5b0b8e39d960c8d1313cb6 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
import SwiftUI
struct BookmarksListItemView: View {
@EnvironmentObject var settings: Settings
var bookmark: Bookmark
var body: some View {
VStack(alignment: .leading) {
HStack {
Text(bookmark.tags.joined(separator: ", "))
#if os(macOS)
Spacer()
Button {
settings.removeBookmark(withID: bookmark.id)
} label: {
Image(systemName: "trash")
}
#endif
}
HStack {
Text(bookmark.createdAt, style: .date)
.font(.caption)
.foregroundStyle(Color.secondary)
Spacer()
Text(bookmark.provider.rawValue)
.font(.caption)
.foregroundStyle(Color.secondary)
}
}
#if os(macOS)
.padding()
#endif
}
}
|