mirror of
https://github.com/JustinZeus/Wholphin.git
synced 2026-07-08 23:51:21 +02:00
Home page updates & UI tweaks
This commit is contained in:
parent
207f8656dd
commit
5fc3718e12
7 changed files with 59 additions and 40 deletions
|
|
@ -1,6 +1,7 @@
|
||||||
package com.github.damontecres.dolphin
|
package com.github.damontecres.dolphin
|
||||||
|
|
||||||
import android.app.Application
|
import android.app.Application
|
||||||
|
import android.util.Log
|
||||||
import dagger.hilt.android.HiltAndroidApp
|
import dagger.hilt.android.HiltAndroidApp
|
||||||
import timber.log.Timber
|
import timber.log.Timber
|
||||||
|
|
||||||
|
|
@ -10,8 +11,25 @@ class DolphinApplication : Application() {
|
||||||
instance = this
|
instance = this
|
||||||
|
|
||||||
if (BuildConfig.DEBUG) {
|
if (BuildConfig.DEBUG) {
|
||||||
// TODO minimal logging for release builds?
|
|
||||||
Timber.plant(Timber.DebugTree())
|
Timber.plant(Timber.DebugTree())
|
||||||
|
} else {
|
||||||
|
Timber.plant(
|
||||||
|
object : Timber.Tree() {
|
||||||
|
override fun isLoggable(
|
||||||
|
tag: String?,
|
||||||
|
priority: Int,
|
||||||
|
): Boolean = priority >= Log.INFO
|
||||||
|
|
||||||
|
override fun log(
|
||||||
|
priority: Int,
|
||||||
|
tag: String?,
|
||||||
|
message: String,
|
||||||
|
t: Throwable?,
|
||||||
|
) {
|
||||||
|
Log.println(priority, tag ?: "Dolphin", message)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -102,18 +102,21 @@ class CollectionFolderViewModel
|
||||||
val request =
|
val request =
|
||||||
GetItemsRequest(
|
GetItemsRequest(
|
||||||
parentId = item.id,
|
parentId = item.id,
|
||||||
isSeries = true,
|
|
||||||
mediaTypes = null,
|
|
||||||
// recursive = true,
|
|
||||||
enableImageTypes = listOf(ImageType.PRIMARY, ImageType.THUMB),
|
enableImageTypes = listOf(ImageType.PRIMARY, ImageType.THUMB),
|
||||||
includeItemTypes = includeItemTypes,
|
includeItemTypes = includeItemTypes,
|
||||||
|
recursive = true,
|
||||||
sortBy =
|
sortBy =
|
||||||
listOf(
|
listOf(
|
||||||
sortAndDirection.sort,
|
sortAndDirection.sort,
|
||||||
ItemSortBy.SORT_NAME,
|
ItemSortBy.SORT_NAME,
|
||||||
ItemSortBy.PRODUCTION_YEAR,
|
ItemSortBy.PRODUCTION_YEAR,
|
||||||
),
|
),
|
||||||
sortOrder = listOf(sortAndDirection.direction),
|
sortOrder =
|
||||||
|
listOf(
|
||||||
|
sortAndDirection.direction,
|
||||||
|
SortOrder.ASCENDING,
|
||||||
|
SortOrder.ASCENDING,
|
||||||
|
),
|
||||||
fields = DefaultItemFields,
|
fields = DefaultItemFields,
|
||||||
)
|
)
|
||||||
val newPager =
|
val newPager =
|
||||||
|
|
@ -145,6 +148,7 @@ class CollectionFolderViewModel
|
||||||
nameLessThan = letter.toString(),
|
nameLessThan = letter.toString(),
|
||||||
limit = 0,
|
limit = 0,
|
||||||
enableTotalRecordCount = true,
|
enableTotalRecordCount = true,
|
||||||
|
recursive = true,
|
||||||
)
|
)
|
||||||
val result by GetItemsRequestHandler.execute(api, request)
|
val result by GetItemsRequestHandler.execute(api, request)
|
||||||
result.totalRecordCount
|
result.totalRecordCount
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,6 @@ import androidx.compose.foundation.relocation.BringIntoViewRequester
|
||||||
import androidx.compose.foundation.relocation.bringIntoViewRequester
|
import androidx.compose.foundation.relocation.bringIntoViewRequester
|
||||||
import androidx.compose.material.icons.Icons
|
import androidx.compose.material.icons.Icons
|
||||||
import androidx.compose.material.icons.filled.PlayArrow
|
import androidx.compose.material.icons.filled.PlayArrow
|
||||||
import androidx.compose.material.icons.filled.Settings
|
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.runtime.LaunchedEffect
|
import androidx.compose.runtime.LaunchedEffect
|
||||||
import androidx.compose.runtime.getValue
|
import androidx.compose.runtime.getValue
|
||||||
|
|
@ -177,20 +176,20 @@ fun MovieDetails(
|
||||||
Destination.Playback(movie),
|
Destination.Playback(movie),
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
DialogItem(
|
// DialogItem(
|
||||||
"Playback Settings",
|
// "Playback Settings",
|
||||||
Icons.Default.Settings,
|
// Icons.Default.Settings,
|
||||||
// iconColor = Color.Green.copy(alpha = .8f),
|
// // iconColor = Color.Green.copy(alpha = .8f),
|
||||||
) {
|
// ) {
|
||||||
// TODO choose audio or subtitle tracks?
|
// // TODO choose audio or subtitle tracks?
|
||||||
},
|
// },
|
||||||
DialogItem(
|
// DialogItem(
|
||||||
"Play Version",
|
// "Play Version",
|
||||||
Icons.Default.PlayArrow,
|
// Icons.Default.PlayArrow,
|
||||||
iconColor = Color.Green.copy(alpha = .8f),
|
// iconColor = Color.Green.copy(alpha = .8f),
|
||||||
) {
|
// ) {
|
||||||
// TODO only show for multiple files
|
// // TODO only show for multiple files
|
||||||
},
|
// },
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -150,8 +150,8 @@ fun MovieDetailsHeader(
|
||||||
overflow = TextOverflow.Ellipsis,
|
overflow = TextOverflow.Ellipsis,
|
||||||
modifier =
|
modifier =
|
||||||
Modifier
|
Modifier
|
||||||
.padding(8.dp)
|
.padding(8.dp),
|
||||||
.height(60.dp),
|
// .height(60.dp),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -161,6 +161,8 @@ fun MovieDetailsHeader(
|
||||||
?.let {
|
?.let {
|
||||||
Text(
|
Text(
|
||||||
text = "Directed by $it",
|
text = "Directed by $it",
|
||||||
|
style = MaterialTheme.typography.bodyMedium,
|
||||||
|
color = MaterialTheme.colorScheme.onSurface,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
// Key-Values
|
// Key-Values
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,6 @@ package com.github.damontecres.dolphin.ui.detail.series
|
||||||
import androidx.compose.material.icons.Icons
|
import androidx.compose.material.icons.Icons
|
||||||
import androidx.compose.material.icons.automirrored.filled.ArrowForward
|
import androidx.compose.material.icons.automirrored.filled.ArrowForward
|
||||||
import androidx.compose.material.icons.filled.PlayArrow
|
import androidx.compose.material.icons.filled.PlayArrow
|
||||||
import androidx.compose.material.icons.filled.Settings
|
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.runtime.LaunchedEffect
|
import androidx.compose.runtime.LaunchedEffect
|
||||||
import androidx.compose.runtime.getValue
|
import androidx.compose.runtime.getValue
|
||||||
|
|
@ -188,7 +187,6 @@ fun SeriesOverview(
|
||||||
Icons.Default.PlayArrow,
|
Icons.Default.PlayArrow,
|
||||||
iconColor = Color.Green.copy(alpha = .8f),
|
iconColor = Color.Green.copy(alpha = .8f),
|
||||||
) {
|
) {
|
||||||
viewModel.release()
|
|
||||||
viewModel.navigateTo(
|
viewModel.navigateTo(
|
||||||
Destination.Playback(
|
Destination.Playback(
|
||||||
ep.id,
|
ep.id,
|
||||||
|
|
@ -202,7 +200,6 @@ fun SeriesOverview(
|
||||||
Icons.AutoMirrored.Filled.ArrowForward,
|
Icons.AutoMirrored.Filled.ArrowForward,
|
||||||
// iconColor = Color.Green.copy(alpha = .8f),
|
// iconColor = Color.Green.copy(alpha = .8f),
|
||||||
) {
|
) {
|
||||||
viewModel.release()
|
|
||||||
viewModel.navigateTo(
|
viewModel.navigateTo(
|
||||||
Destination.MediaItem(
|
Destination.MediaItem(
|
||||||
series.id,
|
series.id,
|
||||||
|
|
@ -211,20 +208,20 @@ fun SeriesOverview(
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
DialogItem(
|
// DialogItem(
|
||||||
"Playback Settings",
|
// "Playback Settings",
|
||||||
Icons.Default.Settings,
|
// Icons.Default.Settings,
|
||||||
|
// // iconColor = Color.Green.copy(alpha = .8f),
|
||||||
|
// ) {
|
||||||
|
// // TODO choose audio or subtitle tracks?
|
||||||
|
// },
|
||||||
|
// DialogItem(
|
||||||
|
// "Play Version",
|
||||||
|
// Icons.Default.PlayArrow,
|
||||||
// iconColor = Color.Green.copy(alpha = .8f),
|
// iconColor = Color.Green.copy(alpha = .8f),
|
||||||
) {
|
// ) {
|
||||||
// TODO choose audio or subtitle tracks?
|
// // TODO only show for multiple files
|
||||||
},
|
// },
|
||||||
DialogItem(
|
|
||||||
"Play Version",
|
|
||||||
Icons.Default.PlayArrow,
|
|
||||||
iconColor = Color.Green.copy(alpha = .8f),
|
|
||||||
) {
|
|
||||||
// TODO only show for multiple files
|
|
||||||
},
|
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -121,7 +121,7 @@ fun HomePageContent(
|
||||||
Modifier
|
Modifier
|
||||||
.fillMaxHeight(.7f)
|
.fillMaxHeight(.7f)
|
||||||
.fillMaxWidth(.7f)
|
.fillMaxWidth(.7f)
|
||||||
.alpha(.4f)
|
.alpha(.75f)
|
||||||
.align(Alignment.TopEnd)
|
.align(Alignment.TopEnd)
|
||||||
.drawWithContent {
|
.drawWithContent {
|
||||||
drawContent()
|
drawContent()
|
||||||
|
|
|
||||||
|
|
@ -311,7 +311,6 @@ fun NavigationDrawerScope.LibraryNavItem(
|
||||||
modifier: Modifier = Modifier,
|
modifier: Modifier = Modifier,
|
||||||
interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
|
interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
|
||||||
) {
|
) {
|
||||||
// TODO
|
|
||||||
val icon =
|
val icon =
|
||||||
when (library.data.collectionType) {
|
when (library.data.collectionType) {
|
||||||
CollectionType.MOVIES -> R.string.fa_film
|
CollectionType.MOVIES -> R.string.fa_film
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue