diff --git a/Multiplatform/Shared/Assets.xcassets/markAllAsRead.symbolset/Contents.json b/Multiplatform/Shared/Assets.xcassets/markAllAsRead.symbolset/Contents.json new file mode 100644 index 000000000..81428a2de --- /dev/null +++ b/Multiplatform/Shared/Assets.xcassets/markAllAsRead.symbolset/Contents.json @@ -0,0 +1,12 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + }, + "symbols" : [ + { + "filename" : "markAllAsRead.svg", + "idiom" : "universal" + } + ] +} diff --git a/Multiplatform/Shared/Assets.xcassets/markAllAsRead.symbolset/markAllAsRead.svg b/Multiplatform/Shared/Assets.xcassets/markAllAsRead.symbolset/markAllAsRead.svg new file mode 100644 index 000000000..58170a6ba --- /dev/null +++ b/Multiplatform/Shared/Assets.xcassets/markAllAsRead.symbolset/markAllAsRead.svg @@ -0,0 +1,142 @@ + + + + Untitled + Created with Sketch. + + + + + + + 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 width of the blue rectangles. + + + 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.1.0 + + + Generated from circle + + + Typeset at 100 points + + + Small + + + Medium + + + Large + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Multiplatform/Shared/Sidebar/SidebarItemView.swift b/Multiplatform/Shared/Sidebar/SidebarItemView.swift index e1dcaa41b..9f977f1fb 100644 --- a/Multiplatform/Shared/Sidebar/SidebarItemView.swift +++ b/Multiplatform/Shared/Sidebar/SidebarItemView.swift @@ -29,7 +29,78 @@ struct SidebarItemView: View { if let feed = sidebarItem.represented as? Feed { feedImageLoader.loadImage(for: feed) } - } + }.contextMenu(menuItems: { + if let _ = sidebarItem.represented as? PseudoFeed { + Button(action: {}) { + HStack { + Text("Mark All as Read") + Spacer() + Image("markAllAsRead") + .resizable() + .aspectRatio(contentMode: .fit) + } + } + } else if let _ = sidebarItem.represented as? Feed { + Button(action: {}) { + HStack { + Text("Mark All as Read") + Spacer() + Image("markAllAsRead") + .resizable() + .aspectRatio(contentMode: .fit) + } + } + Divider() + Button(action: { + + }) { + HStack { + Text("Open Home Page") + Spacer() + Image(systemName: "safari") + } + } + Divider() + Button(action: {}) { + HStack { + Text("Copy Feed URL") + Spacer() + Image(systemName: "doc.on.doc") + } + } + Button(action: {}) { + HStack { + Text("Copy Home Page URL") + Spacer() + Image(systemName: "doc.on.doc") + } + } + Divider() + Button(action: {}) { + HStack { + Text("Rename") + Spacer() + Image(systemName: "textformat") + } + } + Button(action: {}) { + HStack { + Text("Delete").foregroundColor(.red) + Spacer() + Image(systemName: "trash").foregroundColor(.red) + } + } + } else { + Button(action: {}) { + HStack { + Text("Mark All As Read in \(sidebarItem.nameForDisplay)") + Spacer() + Image("markAllAsRead") + .resizable() + .aspectRatio(contentMode: .fit) + } + } + } + }) } - }