Skip to content

Commit

Permalink
updated content
Browse files Browse the repository at this point in the history
  • Loading branch information
DatL4g committed Mar 9, 2024
1 parent 2d5fdf6 commit 127cdc1
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import dev.datlag.burningseries.shared.SharedRes
import dev.datlag.burningseries.shared.common.header
import dev.datlag.burningseries.shared.common.lifecycle.collectAsStateWithLifecycle
import dev.datlag.burningseries.shared.common.openInBrowser
import dev.datlag.burningseries.shared.other.Constants
import dev.icerock.moko.resources.compose.painterResource
import dev.icerock.moko.resources.compose.stringResource
import kotlinx.coroutines.flow.StateFlow
Expand Down Expand Up @@ -59,8 +60,37 @@ actual fun LazyGridScope.DeviceContent(release: StateFlow<Release?>, onDeviceRea
Text(text = stringResource(SharedRes.strings.github))
}
}
} else if (!reachable) {
Text(text = stringResource(SharedRes.strings.enable_custom_dns))
} else {
val context = LocalContext.current

Card(
modifier = Modifier.fillMaxWidth(),
onClick = {
Constants.GOOGLE_PLAY_PULZ.openInBrowser(context)
},
colors = CardDefaults.cardColors(
containerColor = MaterialTheme.colorScheme.primary,
contentColor = MaterialTheme.colorScheme.onPrimary,
)
) {
Row(
modifier = Modifier.fillMaxWidth().padding(16.dp),
verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.spacedBy(8.dp)
) {
Text(
modifier = Modifier.weight(1F),
text = stringResource(SharedRes.strings.google_play_pulz)
)
FilledTonalButton(
onClick = {
Constants.GOOGLE_PLAY_PULZ.openInBrowser(context)
}
) {
Text(text = stringResource(SharedRes.strings.yes))
}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package dev.datlag.burningseries.shared.other

data object Constants {
const val GOOGLE_PLAY_PULZ = "https://play.google.com/store/apps/details?id=dev.datlag.pulz"
}
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 @@ -74,4 +74,6 @@
<string name="unmuted">Unmuted</string>
<string name="loading_intent_series">Loading series</string>
<string name="enable_custom_dns">You should set a custom DNS to make sure you can access all features.</string>
<string name="google_play_pulz">Are you interested in Gaming or E-Sports?</string>
<string name="yes">Yes</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 @@ -74,4 +74,6 @@
<string name="unmuted">Nicht stumm</string>
<string name="loading_intent_series">Lade Serie</string>
<string name="enable_custom_dns">Du solltest einen DNS-Server einrichten, um alle Funktionen zuverlässig nutzen zu können.</string>
<string name="google_play_pulz">Bist du an Gaming oder E-Sport interessiert?</string>
<string name="yes">Ja</string>
</resources>

0 comments on commit 127cdc1

Please sign in to comment.