Skip to content

Commit 5ac9842

Browse files
committed
Add "Support GitHub Store" feature and SponsorScreen
- Created a new `SponsorScreen` component providing options for financial support (GitHub Sponsors, Buy Me a Coffee) and community engagement (voting, starring, reporting bugs). - Integrated the sponsor section into the profile presentation layer by adding `SponsorCard` to the options list. - Added `OnSponsorClick` action to `ProfileAction` and updated `ProfileViewModel` and `ProfileRoot` to handle navigation. - Configured app navigation to include `SponsorScreen` in `AppNavigation` and `GithubStoreGraph`. - Added new string resources for the sponsor page, including specific messaging for the Golden Kodee Awards. - Cleaned up imports in `SortOrderMapper`.
1 parent a5d84bc commit 5ac9842

11 files changed

Lines changed: 630 additions & 1 deletion

File tree

92 Bytes
Binary file not shown.
85 Bytes
Binary file not shown.

composeApp/src/commonMain/kotlin/zed/rainxch/githubstore/app/navigation/AppNavigation.kt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,17 @@ fun AppNavigation(
238238
},
239239
onNavigateToDevProfile = { username ->
240240
navController.navigate(GithubStoreGraph.DeveloperProfileScreen(username))
241+
},
242+
onNavigateToSponsor = {
243+
navController.navigate(GithubStoreGraph.SponsorScreen)
244+
}
245+
)
246+
}
247+
248+
composable<GithubStoreGraph.SponsorScreen> {
249+
zed.rainxch.profile.presentation.SponsorScreen(
250+
onNavigateBack = {
251+
navController.navigateUp()
241252
}
242253
)
243254
}

composeApp/src/commonMain/kotlin/zed/rainxch/githubstore/app/navigation/GithubStoreGraph.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,7 @@ sealed interface GithubStoreGraph {
3737

3838
@Serializable
3939
data object AppsScreen : GithubStoreGraph
40+
41+
@Serializable
42+
data object SponsorScreen : GithubStoreGraph
4043
}

core/presentation/src/commonMain/composeResources/values/strings.xml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -463,4 +463,31 @@
463463
<string name="clear_cache">Clear Cache</string>
464464
<string name="current_size">Current size:</string>
465465
<string name="clear">Clear</string>
466+
467+
<!-- Sponsor -->
468+
<string name="sponsor_title">Support GitHub Store</string>
469+
<string name="sponsor_button">Support the Project</string>
470+
<string name="sponsor_hero_title">Built with love,\nmaintained with coffee</string>
471+
<string name="sponsor_hero_subtitle">GitHub Store has reached 130,000+ downloads and 7,700+ GitHub stars — 100% free, no ads, no tracking.</string>
472+
<string name="sponsor_personal_note">I built and maintain this entirely on my own while finishing high school. Your support — even a small amount — helps keep the app bug-free, fund infrastructure costs, and ship the features you request.</string>
473+
<string name="sponsor_kodee_title">Vote for GitHub Store!</string>
474+
<string name="sponsor_kodee_subtitle">GitHub Store is nominated for the Golden Kodee Awards at KotlinConf 2025. Your vote takes just 2 minutes and means the world.</string>
475+
<string name="sponsor_kodee_register">1. Register</string>
476+
<string name="sponsor_kodee_vote">2. Vote</string>
477+
<string name="sponsor_kodee_deadline">Voting closes March 22</string>
478+
<string name="sponsor_kodee_step1">1. Register on the awards platform (Continue with Google)</string>
479+
<string name="sponsor_kodee_step2">2. Tap Vote below to open the voting page</string>
480+
<string name="sponsor_kodee_step3">3. Find Usmon Narzullayev and click Vote</string>
481+
<string name="sponsor_github_sponsors">GitHub Sponsors</string>
482+
<string name="sponsor_github_sponsors_desc">Recurring or one-time via GitHub</string>
483+
<string name="sponsor_buy_me_coffee">Buy Me a Coffee</string>
484+
<string name="sponsor_buy_me_coffee_desc">Quick one-time support</string>
485+
<string name="sponsor_other_ways_title">OTHER WAYS TO HELP</string>
486+
<string name="sponsor_star_repo">Star the repository</string>
487+
<string name="sponsor_star_repo_desc">Helps others discover GitHub Store</string>
488+
<string name="sponsor_report_bugs">Report bugs</string>
489+
<string name="sponsor_report_bugs_desc">Makes the app better for everyone</string>
490+
<string name="sponsor_share">Share with friends</string>
491+
<string name="sponsor_share_desc">Spread the word to other developers</string>
492+
<string name="sponsor_thank_you">Every bit of support — financial or not — keeps this project alive. Thank you!</string>
466493
</resources>

feature/profile/presentation/src/commonMain/kotlin/zed/rainxch/profile/presentation/ProfileAction.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,5 @@ sealed interface ProfileAction {
2727
data object OnProxyPasswordVisibilityToggle : ProfileAction
2828
data object OnProxySave : ProfileAction
2929
data class OnAutoDetectClipboardToggled(val enabled: Boolean) : ProfileAction
30+
data object OnSponsorClick : ProfileAction
3031
}

feature/profile/presentation/src/commonMain/kotlin/zed/rainxch/profile/presentation/ProfileRoot.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ fun ProfileRoot(
4747
onNavigateToAuthentication: () -> Unit,
4848
onNavigateToStarredRepos: () -> Unit,
4949
onNavigateToFavouriteRepos: () -> Unit,
50+
onNavigateToSponsor: () -> Unit,
5051
viewModel: ProfileViewModel = koinViewModel()
5152
) {
5253
val state by viewModel.state.collectAsStateWithLifecycle()
@@ -119,6 +120,10 @@ fun ProfileRoot(
119120
onNavigateToDevProfile(action.username)
120121
}
121122

123+
ProfileAction.OnSponsorClick -> {
124+
onNavigateToSponsor()
125+
}
126+
122127
else -> {
123128
viewModel.onAction(action)
124129
}

feature/profile/presentation/src/commonMain/kotlin/zed/rainxch/profile/presentation/ProfileViewModel.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,10 @@ class ProfileViewModel(
281281
/* Handed in composable */
282282
}
283283

284+
ProfileAction.OnSponsorClick -> {
285+
/* Handed in composable */
286+
}
287+
284288
is ProfileAction.OnFontThemeSelected -> {
285289
viewModelScope.launch {
286290
themesRepository.setFontTheme(action.fontTheme)

0 commit comments

Comments
 (0)