From a11268326bec18c717ac6a3415bfd0f4c16d81b7 Mon Sep 17 00:00:00 2001 From: Xin Liu Date: Fri, 21 Jul 2023 00:27:57 -0700 Subject: [PATCH] Croptop: Post settings --- Planet.xcodeproj/project.pbxproj | 2 ++ Planet/versioning.xcconfig | 2 +- PlanetLite/AppContentItemMenuView.swift | 9 +++++++++ PlanetLite/AppSidebarView.swift | 5 +++++ 4 files changed, 17 insertions(+), 1 deletion(-) diff --git a/Planet.xcodeproj/project.pbxproj b/Planet.xcodeproj/project.pbxproj index 061d5e12..7cc358b9 100644 --- a/Planet.xcodeproj/project.pbxproj +++ b/Planet.xcodeproj/project.pbxproj @@ -259,6 +259,7 @@ 2AFDF8AA2A3A1E8500386B9A /* ASMediaView in Frameworks */ = {isa = PBXBuildFile; productRef = 2AFDF8A92A3A1E8500386B9A /* ASMediaView */; }; 2AFFD51B28AD760400EDB020 /* HelpLinkButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2AFFD51A28AD760400EDB020 /* HelpLinkButton.swift */; }; 6A0624D22876BF130014DDDD /* MigrationProgressView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A0624D12876BF130014DDDD /* MigrationProgressView.swift */; }; + 6A0B9EAA2A6A680100D2286B /* MyArticleSettingsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A900192296C9F3800BC088E /* MyArticleSettingsView.swift */; }; 6A18F2062A0F0FA700FC4050 /* RebuildProgressView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A18F2052A0F0FA700FC4050 /* RebuildProgressView.swift */; }; 6A1DA07D28B4278300C6B5A9 /* DecentralizedApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A1DA07C28B4278300C6B5A9 /* DecentralizedApp.swift */; }; 6A1DF9CF28E8E4B6000499E3 /* RSS.xml in Resources */ = {isa = PBXBuildFile; fileRef = 6A1DF9CE28E8E4B6000499E3 /* RSS.xml */; }; @@ -1387,6 +1388,7 @@ 2A95E6572A19A3A2001288B8 /* WalletAccountView.swift in Sources */, 2A95E6782A19A3C4001288B8 /* KeychainHelper.swift in Sources */, 2A95E63F2A18B1B6001288B8 /* PlanetUI.swift in Sources */, + 6A0B9EAA2A6A680100D2286B /* MyArticleSettingsView.swift in Sources */, 6A74E49D2A5929BB00FF2F2A /* CPNSettings.swift in Sources */, 2A95E6412A19A317001288B8 /* PlanetQuickShareView.swift in Sources */, 2A95E6742A19A3C4001288B8 /* Lifetimes.swift in Sources */, diff --git a/Planet/versioning.xcconfig b/Planet/versioning.xcconfig index cd4d39d9..69c13e98 100644 --- a/Planet/versioning.xcconfig +++ b/Planet/versioning.xcconfig @@ -1 +1 @@ -CURRENT_PROJECT_VERSION = 1530 +CURRENT_PROJECT_VERSION = 1531 diff --git a/PlanetLite/AppContentItemMenuView.swift b/PlanetLite/AppContentItemMenuView.swift index c207748d..2e93a1aa 100644 --- a/PlanetLite/AppContentItemMenuView.swift +++ b/PlanetLite/AppContentItemMenuView.swift @@ -21,6 +21,15 @@ struct AppContentItemMenuView: View { } label: { Text("Edit Post") } + + Button { + PlanetStore.shared.selectedArticle = article + PlanetStore.shared.isShowingMyArticleSettings = true + } label: { + Text("Settings") + } + + Divider() } Group { diff --git a/PlanetLite/AppSidebarView.swift b/PlanetLite/AppSidebarView.swift index c2cd428e..9e2d6be1 100644 --- a/PlanetLite/AppSidebarView.swift +++ b/PlanetLite/AppSidebarView.swift @@ -90,6 +90,11 @@ struct AppSidebarView: View { .frame(width: .sheetWidth) .frame(minHeight: .sheetHeight) } + .sheet(isPresented: $planetStore.isShowingMyArticleSettings) { + if let article: MyArticleModel = planetStore.selectedArticle as? MyArticleModel { + MyArticleSettingsView(article: article) + } + } .onReceive(NotificationCenter.default.publisher(for: .publishMyPlanet)) { aNotification in if let userObject = aNotification.object, let planet = userObject as? MyPlanetModel {