damus

nostr ios client
git clone git://jb55.com/damus
Log | Files | Refs | README | LICENSE

commit a18304f4a32033831176903838422cd2b2e8a2cc
parent 5e3afd0b1641787a68c6ea43016f71a46fca6761
Author: Daniel D’Aquino <daniel@daquino.me>
Date:   Fri,  6 Oct 2023 19:47:13 +0000

ui: Add merch store button to sidebar menu

Features:
- Merch button on sidebar menu
- Damus icon at the top opens sidebar
- Merch link passes `ref` param, to help with website analytics

Testing
-------

1. Ensured that link appears correctly with image on both iOS versions
2. Ensured that link takes user to the store
3. Ensured that ref param is passed to the store
4. Ensured that Damus icon opens sidebar menu
5. Ensured that when sidebar is open, clicking where the damus icon would be does not close the sidebar menu (it is behind the sidebar menu)

Closes: https://github.com/damus-io/damus/issues/845
Changelog-Added: Added merch store button to sidebar menu
Changelog-Changed: Damus icon now opens sidebar
Signed-off-by: Daniel D’Aquino <daniel@daquino.me>
Signed-off-by: William Casarin <jb55@jb55.com>

Diffstat:
Mdamus/ContentView.swift | 3+++
Mdamus/Views/SideMenuView.swift | 4++++
2 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/damus/ContentView.swift b/damus/ContentView.swift @@ -184,6 +184,9 @@ struct ContentView: View { .shadow(color: DamusColors.purple, radius: 2) .opacity(isSideBarOpened ? 0 : 1) .animation(isSideBarOpened ? .none : .default, value: isSideBarOpened) + .onTapGesture { + isSideBarOpened.toggle() + } } else { timelineNavItem .opacity(isSideBarOpened ? 0 : 1) diff --git a/damus/Views/SideMenuView.swift b/damus/Views/SideMenuView.swift @@ -76,6 +76,10 @@ struct SideMenuView: View { navLabel(title: NSLocalizedString("Bookmarks", comment: "Sidebar menu label for Bookmarks view."), img: "bookmark") } + Link(destination: URL(string: "https://store.damus.io/?ref=damus_ios_app")!) { + navLabel(title: NSLocalizedString("Merch", comment: "Sidebar menu label for merch store link."), img: "basket") + } + NavigationLink(value: Route.Config) { navLabel(title: NSLocalizedString("Settings", comment: "Sidebar menu label for accessing the app settings"), img: "settings") }