@@ -8,6 +8,7 @@ import androidx.compose.foundation.verticalScroll
88import androidx.compose.material3.AlertDialog
99import androidx.compose.material3.MaterialTheme
1010import androidx.compose.material3.Text
11+ import androidx.compose.material3.TextButton
1112import androidx.compose.runtime.Composable
1213import androidx.compose.runtime.LaunchedEffect
1314import androidx.compose.runtime.NonRestartableComposable
@@ -26,6 +27,7 @@ import androidx.compose.ui.text.style.TextDecoration
2627import kotlinx.coroutines.Dispatchers
2728import kotlinx.coroutines.withContext
2829import org.schabi.newpipe.R
30+ import org.schabi.newpipe.util.external_communication.ShareUtils
2931
3032private val SOFTWARE_COMPONENTS = listOf (
3133 SoftwareComponent (
@@ -148,8 +150,19 @@ fun LicenseTab() {
148150
149151 AlertDialog (
150152 onDismissRequest = { selectedLicense = null },
151- confirmButton = {},
152- title = { Text (text = it.name) },
153+ confirmButton = {
154+ TextButton (onClick = { ShareUtils .openUrlInApp(context, it.link) }) {
155+ Text (text = stringResource(R .string.open_website_license))
156+ }
157+ },
158+ dismissButton = {
159+ TextButton (onClick = { selectedLicense = null }) {
160+ Text (text = stringResource(R .string.done))
161+ }
162+ },
163+ title = {
164+ Text (text = it.name, color = MaterialTheme .colorScheme.onBackground)
165+ },
153166 text = {
154167 val styles = TextLinkStyles (SpanStyle (textDecoration = TextDecoration .Underline ))
155168 Text (
0 commit comments