Skip to content

Commit

Permalink
added project
Browse files Browse the repository at this point in the history
  • Loading branch information
DatL4g committed Mar 16, 2024
1 parent ef93352 commit dbdede1
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.dp
Expand All @@ -24,7 +25,7 @@ import dev.icerock.moko.resources.compose.stringResource
actual fun ProjectCard(project: Project, modifier: Modifier) {
val context = LocalContext.current

if (context.isPackageInstalled(project.`package`)) {
if (!context.isPackageInstalled(project.`package`)) {
ElevatedCard(
modifier = modifier,
onClick = {
Expand All @@ -38,9 +39,9 @@ actual fun ProjectCard(project: Project, modifier: Modifier) {
) {
project.icon?.let {
Image(
modifier = Modifier.size(64.dp),
modifier = Modifier.size(64.dp).clip(MaterialTheme.shapes.medium),
painter = painterResource(it),
contentDescription = stringResource(project.title)
contentDescription = stringResource(project.title),
)
}
Column(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,13 @@ sealed interface Project {
override val googlePlay: String? = "https://play.google.com/store/apps/details?id=$`package`"
override val github: String? = "https://github.com/DatL4g/PulZ"
}

data object AniFlow : Project {
override val icon: ImageResource = SharedRes.images.ayaya
override val title: StringResource = SharedRes.strings.aniflow
override val subTitle: StringResource = SharedRes.strings.aniflow_subtitle
override val `package`: String = "dev.datlag.aniflow"
override val googlePlay: String? = null
override val github: String = "https://github.com/DatL4g/AniFlow"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -132,5 +132,8 @@ fun SponsorScreen(component: SponsorComponent) {
item {
ProjectCard(Project.PULZ, modifier = Modifier.fillParentMaxWidth())
}
item {
ProjectCard(Project.AniFlow, modifier = Modifier.fillParentMaxWidth())
}
}
}
2 changes: 2 additions & 0 deletions app/shared/src/commonMain/resources/MR/base/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,6 @@
<string name="free_support_text">You\'re unable to support me financially? No problem, here are some projects you can check out instead.</string>
<string name="pulz">PulZ</string>
<string name="pulz_subtitle">Gaming and E-Sport content</string>
<string name="aniflow">AniFlow</string>
<string name="aniflow_subtitle">Sync your Anime watch progress with AniList or MyAnimeList. (Currently under development)</string>
</resources>
2 changes: 2 additions & 0 deletions app/shared/src/commonMain/resources/MR/de/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,6 @@
<string name="free_support_text">Du kannst dir eine finanzielle Unterstützung nicht leisten? Kein Problem, sieh dir stattdessen doch einfach diese Projekte an.</string>
<string name="pulz">PulZ</string>
<string name="pulz_subtitle">Gaming und E-Sport Infos</string>
<string name="aniflow">AniFlow</string>
<string name="aniflow_subtitle">Synchronisier deinen Anime Fortschritt mit AniList oder MyAnimeList. (Momentan in der Entwicklung)</string>
</resources>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit dbdede1

Please sign in to comment.