mirror of
https://github.com/JustinZeus/Wholphin.git
synced 2026-07-09 16:11:20 +02:00
Add dependency license info
This commit is contained in:
parent
6f18f780eb
commit
de36eb7072
10 changed files with 471 additions and 12 deletions
|
|
@ -224,11 +224,11 @@ sealed interface AppPreference<T> {
|
|||
// summary = R.string.update_url_summary,
|
||||
// )
|
||||
|
||||
// val OssLicenseInfo =
|
||||
// AppDestinationPreference(
|
||||
// title = R.string.oss_license_info,
|
||||
// destination = Destination.LicenseInfo,
|
||||
// )
|
||||
val OssLicenseInfo =
|
||||
AppDestinationPreference(
|
||||
title = R.string.license_info,
|
||||
destination = Destination.License,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -245,6 +245,7 @@ val basicPreferences =
|
|||
AppPreference.HomePageItems,
|
||||
AppPreference.RewatchNextUp,
|
||||
AppPreference.PlayThemeMusic,
|
||||
AppPreference.OssLicenseInfo,
|
||||
),
|
||||
),
|
||||
)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,16 @@
|
|||
package com.github.damontecres.dolphin.ui.components
|
||||
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.getValue
|
||||
import androidx.compose.ui.Modifier
|
||||
import com.mikepenz.aboutlibraries.ui.compose.android.rememberLibraries
|
||||
import com.mikepenz.aboutlibraries.ui.compose.m3.LibrariesContainer
|
||||
|
||||
@Composable
|
||||
fun LicenseInfo(modifier: Modifier) {
|
||||
val libraries by rememberLibraries()
|
||||
MaterialTheme {
|
||||
LibrariesContainer(libraries, modifier)
|
||||
}
|
||||
}
|
||||
|
|
@ -50,4 +50,7 @@ sealed class Destination(
|
|||
val positionMs: Long,
|
||||
@Transient val item: BaseItem? = null,
|
||||
) : Destination(true)
|
||||
|
||||
@Serializable
|
||||
data object License : Destination(true)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import androidx.compose.runtime.Composable
|
|||
import androidx.compose.ui.Modifier
|
||||
import androidx.tv.material3.Text
|
||||
import com.github.damontecres.dolphin.preferences.UserPreferences
|
||||
import com.github.damontecres.dolphin.ui.components.LicenseInfo
|
||||
import com.github.damontecres.dolphin.ui.detail.CollectionFolderDetails
|
||||
import com.github.damontecres.dolphin.ui.detail.EpisodeDetails
|
||||
import com.github.damontecres.dolphin.ui.detail.SeasonDetails
|
||||
|
|
@ -112,6 +113,8 @@ fun DestinationContent(
|
|||
}
|
||||
}
|
||||
|
||||
Destination.License -> LicenseInfo(modifier)
|
||||
|
||||
Destination.Search -> TODO()
|
||||
Destination.Setup -> TODO()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,6 +8,36 @@ import androidx.tv.material3.MaterialTheme
|
|||
import androidx.tv.material3.darkColorScheme
|
||||
import androidx.tv.material3.lightColorScheme
|
||||
|
||||
private val lightSchemeMaterial =
|
||||
androidx.compose.material3.lightColorScheme(
|
||||
primary = primaryLight,
|
||||
onPrimary = onPrimaryLight,
|
||||
primaryContainer = primaryContainerLight,
|
||||
onPrimaryContainer = onPrimaryContainerLight,
|
||||
secondary = secondaryLight,
|
||||
onSecondary = onSecondaryLight,
|
||||
secondaryContainer = secondaryContainerLight,
|
||||
onSecondaryContainer = onSecondaryContainerLight,
|
||||
tertiary = tertiaryLight,
|
||||
onTertiary = onTertiaryLight,
|
||||
tertiaryContainer = tertiaryContainerLight,
|
||||
onTertiaryContainer = onTertiaryContainerLight,
|
||||
error = errorLight,
|
||||
onError = onErrorLight,
|
||||
errorContainer = errorContainerLight,
|
||||
onErrorContainer = onErrorContainerLight,
|
||||
background = backgroundLight,
|
||||
onBackground = onBackgroundLight,
|
||||
surface = surfaceLight,
|
||||
onSurface = onSurfaceLight,
|
||||
surfaceVariant = surfaceVariantLight,
|
||||
onSurfaceVariant = onSurfaceVariantLight,
|
||||
scrim = scrimLight,
|
||||
inverseSurface = inverseSurfaceLight,
|
||||
inverseOnSurface = inverseOnSurfaceLight,
|
||||
inversePrimary = inversePrimaryLight,
|
||||
)
|
||||
|
||||
private val lightScheme =
|
||||
lightColorScheme(
|
||||
primary = primaryLight,
|
||||
|
|
@ -39,6 +69,36 @@ private val lightScheme =
|
|||
border = inversePrimaryLight,
|
||||
)
|
||||
|
||||
private val darkSchemeMaterial =
|
||||
androidx.compose.material3.darkColorScheme(
|
||||
primary = primaryDark,
|
||||
onPrimary = onPrimaryDark,
|
||||
primaryContainer = primaryContainerDark,
|
||||
onPrimaryContainer = onPrimaryContainerDark,
|
||||
secondary = secondaryDark,
|
||||
onSecondary = onSecondaryDark,
|
||||
secondaryContainer = secondaryContainerDark,
|
||||
onSecondaryContainer = onSecondaryContainerDark,
|
||||
tertiary = tertiaryDark,
|
||||
onTertiary = onTertiaryDark,
|
||||
tertiaryContainer = tertiaryContainerDark,
|
||||
onTertiaryContainer = onTertiaryContainerDark,
|
||||
error = errorDark,
|
||||
onError = onErrorDark,
|
||||
errorContainer = errorContainerDark,
|
||||
onErrorContainer = onErrorContainerDark,
|
||||
background = backgroundDark,
|
||||
onBackground = onBackgroundDark,
|
||||
surface = surfaceDark,
|
||||
onSurface = onSurfaceDark,
|
||||
surfaceVariant = surfaceVariantDark,
|
||||
onSurfaceVariant = onSurfaceVariantDark,
|
||||
scrim = scrimDark,
|
||||
inverseSurface = inverseSurfaceDark,
|
||||
inverseOnSurface = inverseOnSurfaceDark,
|
||||
inversePrimary = inversePrimaryDark,
|
||||
)
|
||||
|
||||
private val darkScheme =
|
||||
darkColorScheme(
|
||||
primary = primaryDark,
|
||||
|
|
@ -96,10 +156,14 @@ fun DolphinTheme(
|
|||
darkTheme -> darkScheme
|
||||
else -> lightScheme
|
||||
}
|
||||
|
||||
MaterialTheme(
|
||||
colorScheme = colorScheme,
|
||||
typography = AppTypography,
|
||||
content = content,
|
||||
)
|
||||
androidx.compose.material3.MaterialTheme(
|
||||
colorScheme = if (darkTheme) darkSchemeMaterial else lightSchemeMaterial,
|
||||
typography = androidx.compose.material3.Typography(),
|
||||
) {
|
||||
MaterialTheme(
|
||||
colorScheme = colorScheme,
|
||||
typography = AppTypography,
|
||||
content = content,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue