From 37a84395fe69c5334196160c68ac7d5a43f44b0f Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Fri, 17 Jul 2020 17:34:11 -0500 Subject: [PATCH] Add in missing file --- .../Shared/Sidebar/SidebarContextMenu.swift | 112 ++++++++++++++++++ 1 file changed, 112 insertions(+) create mode 100644 Multiplatform/Shared/Sidebar/SidebarContextMenu.swift diff --git a/Multiplatform/Shared/Sidebar/SidebarContextMenu.swift b/Multiplatform/Shared/Sidebar/SidebarContextMenu.swift new file mode 100644 index 000000000..5ee2a87ea --- /dev/null +++ b/Multiplatform/Shared/Sidebar/SidebarContextMenu.swift @@ -0,0 +1,112 @@ +// +// SidebarContextMenu.swift +// NetNewsWire +// +// Created by Maurice Parker on 7/17/20. +// Copyright © 2020 Ranchero Software. All rights reserved. +// + +import SwiftUI + +struct SidebarContextMenu: View { + + var sidebarItem: SidebarItem + + @ViewBuilder var body: some View { + + if sidebarItem.representedType == .account { + Button(action: {}) { + Text("Get Info") + #if os(iOS) + AppAssets.getInfoImage + #endif + } + Button(action: {}) { + Text("Mark All As Read") + #if os(iOS) + AppAssets.markAllAsReadImage + #endif + } + } + + if sidebarItem.representedType == .pseudoFeed { + Button(action: {}) { + Text("Mark All As Read") + #if os(iOS) + AppAssets.markAllAsReadImage + #endif + } + } + + if sidebarItem.representedType == .webFeed { + Button(action: {}) { + Text("Get Info") + #if os(iOS) + AppAssets.getInfoImage + #endif + } + Button(action: {}) { + Text("Mark All As Read") + #if os(iOS) + AppAssets.markAllAsReadImage + #endif + } + Divider() + Button(action: {}) { + Text("Open Home Page") + #if os(iOS) + AppAssets.openInBrowserImage + #endif + } + Divider() + Button(action: {}) { + Text("Copy Feed URL") + #if os(iOS) + AppAssets.copyImage + #endif + } + Button(action: {}) { + Text("Copy Home Page URL") + #if os(iOS) + AppAssets.copyImage + #endif + } + Divider() + Button(action: {}) { + Text("Rename") + #if os(iOS) + AppAssets.renameImage + #endif + } + Button(action: {}) { + Text("Delete") + #if os(iOS) + AppAssets.deleteImage + #endif + } + } + + if sidebarItem.representedType == .folder { + Button(action: {}) { + Text("Mark All As Read") + #if os(iOS) + AppAssets.markAllAsReadImage + #endif + } + Divider() + Button(action: {}) { + Text("Rename") + #if os(iOS) + AppAssets.renameImage + #endif + } + Button(action: {}) { + Text("Delete") + #if os(iOS) + AppAssets.deleteImage + #endif + } + } + + } +}