-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Andrii Momot
committed
Oct 18, 2024
1 parent
17a3632
commit 5afefea
Showing
16 changed files
with
167 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
Demo/Sources/Assets/Assets.xcassets/PushNotificationNudging/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
Demo/Sources/Assets/Assets.xcassets/PushNotificationNudging/bell.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "bell.pdf", | ||
"idiom" : "universal" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Binary file added
BIN
+2.49 KB
Demo/Sources/Assets/Assets.xcassets/PushNotificationNudging/bell.imageset/bell.pdf
Binary file not shown.
12 changes: 12 additions & 0 deletions
12
Demo/Sources/Assets/Assets.xcassets/PushNotificationNudging/bellOff.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "bellOff.pdf", | ||
"idiom" : "universal" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Binary file added
BIN
+3.7 KB
Demo/Sources/Assets/Assets.xcassets/PushNotificationNudging/bellOff.imageset/bellOff.pdf
Binary file not shown.
15 changes: 15 additions & 0 deletions
15
...ces/Assets/Assets.xcassets/PushNotificationNudging/bottomSheetBell.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "bottomSheetBell.pdf", | ||
"idiom" : "universal" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
}, | ||
"properties" : { | ||
"template-rendering-intent" : "template" | ||
} | ||
} |
Binary file added
BIN
+2.85 KB
...sets/Assets.xcassets/PushNotificationNudging/bottomSheetBell.imageset/bottomSheetBell.pdf
Binary file not shown.
15 changes: 15 additions & 0 deletions
15
...Assets/Assets.xcassets/PushNotificationNudging/bottomSheetFeedback.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "bottomSheetFeedback.pdf", | ||
"idiom" : "universal" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
}, | ||
"properties" : { | ||
"template-rendering-intent" : "template" | ||
} | ||
} |
Binary file added
BIN
+2.21 KB
...ets.xcassets/PushNotificationNudging/bottomSheetFeedback.imageset/bottomSheetFeedback.pdf
Binary file not shown.
15 changes: 15 additions & 0 deletions
15
...Assets.xcassets/PushNotificationNudging/bottomSheetSearchFavorites.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "bottomSheetSearchFavorites.pdf", | ||
"idiom" : "universal" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
}, | ||
"properties" : { | ||
"template-rendering-intent" : "template" | ||
} | ||
} |
Binary file added
BIN
+2.64 KB
...ushNotificationNudging/bottomSheetSearchFavorites.imageset/bottomSheetSearchFavorites.pdf
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
Demo/Sources/SwiftUI/PushNotificationNudgingBottomSheetDemoView.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import DemoKit | ||
import FinniversKit | ||
import Foundation | ||
import SwiftUI | ||
|
||
struct PushNotificationNudgingBottomSheetDemoView_Previews: PreviewProvider, Demoable { | ||
static var previews: some View { | ||
let section1 = PushNotificationNudgingBottomSheetViewModel.Section( | ||
icon: Image(uiImage: UIImage(named: .bottomSheetBell)), | ||
description: "Get real-time alerts when somebody wants to buy your item." | ||
) | ||
let section2 = PushNotificationNudgingBottomSheetViewModel.Section( | ||
icon: Image(uiImage: UIImage(named: .bottomSheetFeedback)), | ||
description: "Reply faster to messages and increase your chances to a quick sale." | ||
) | ||
let section3 = PushNotificationNudgingBottomSheetViewModel.Section( | ||
icon: Image(uiImage: UIImage(named: .bottomSheetSearchFavorites)), | ||
description: "Hear instantly of a new match in your saved search or a price drop on a favourite." | ||
) | ||
|
||
let allowButton = PushNotificationNudgingBottomSheetViewModel.Button( | ||
kind: .allow, | ||
title: "Allow Push Notifications" | ||
) | ||
let notNowButton = PushNotificationNudgingBottomSheetViewModel.Button( | ||
kind: .notNow, | ||
title: "Not now" | ||
) | ||
|
||
let viewModel = PushNotificationNudgingBottomSheetViewModel( | ||
title: "Don’t miss out on important stuff", | ||
sections: [section1, section2, section3], | ||
buttons: [allowButton, notNowButton] | ||
) | ||
|
||
return PushNotificationNudgingBottomSheet(viewModel: viewModel) | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
Demo/Sources/SwiftUI/PushNotificationNudgingDemoView.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import DemoKit | ||
import FinniversKit | ||
import Foundation | ||
import SwiftUI | ||
|
||
struct PushNotificationNudgingDemoView_Previews: PreviewProvider, Demoable { | ||
static var previews: some View { | ||
VStack { | ||
PushNotificationNudgingView(viewModel: PushNotificationNudgingViewModel( | ||
icon: Image(uiImage: UIImage(named: .bellOff)), | ||
title: "Boost your chances of a quick sale!", | ||
description: "Get real-time alerts when buyers message you or express interest in your items.", | ||
state: .initialPrompt | ||
)) | ||
|
||
PushNotificationNudgingView(viewModel: PushNotificationNudgingViewModel( | ||
icon: Image(uiImage: UIImage(named: .bellOff)), | ||
title: "You won’t get notifications for now", | ||
description: "If you change your mind, you can edit your notification settings anytime.", | ||
state: .tunedOff | ||
)) | ||
|
||
PushNotificationNudgingView(viewModel: PushNotificationNudgingViewModel( | ||
icon: Image(uiImage: UIImage(named: .bell)), | ||
title: "You’re all set!", | ||
state: .allSet | ||
)) | ||
} | ||
} | ||
} |