fix revoke issue, fix dialogs
This commit is contained in:
@@ -10,7 +10,7 @@ import ru.shadowsparky.vbox.backend.presentation.configureRouting
|
||||
import ru.shadowsparky.vbox.backend.presentation.configureSerialization
|
||||
import ru.shadowsparky.vbox.backend.presentation.configureWebSocket
|
||||
|
||||
@KoinApplication
|
||||
@KoinApplication(modules = [BackendModule::class])
|
||||
object VBoxBackend
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
|
||||
+4
-4
@@ -28,6 +28,10 @@ fun Routing.setupAuthMethods(
|
||||
post(AuthTokenRepository.UPDATE_PATH) {
|
||||
call.respond(default.update(call.receive()))
|
||||
}
|
||||
post(AuthTokenRepository.REVOKE_PATH) {
|
||||
default.revoke(call.receive())
|
||||
call.respond(HttpStatusCode.OK)
|
||||
}
|
||||
authenticate(AUTH_JWT_NAME) {
|
||||
setupBaseMethods(routingEntryPoint.videoApi)
|
||||
setupSearch(searchFactory)
|
||||
@@ -42,9 +46,5 @@ fun Routing.setupAuthMethods(
|
||||
.changePassword(call.receive())
|
||||
call.respond(HttpStatusCode.OK)
|
||||
}
|
||||
post(AuthTokenRepository.REVOKE_PATH) {
|
||||
default.revoke(call.receive())
|
||||
call.respond(HttpStatusCode.OK)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
@@ -119,6 +119,7 @@ fun VideoScreenContent(
|
||||
if (error != null) {
|
||||
ErrorContent(
|
||||
error,
|
||||
modifier = Modifier.fillMaxSize(),
|
||||
buttonText = stringResource(Res.string.retry)
|
||||
) { onRefresh() }
|
||||
} else if (items != null) {
|
||||
|
||||
+1
@@ -104,6 +104,7 @@ fun OverviewScreen(component: OverviewComponent) {
|
||||
|
||||
errorState != null -> ErrorContent(
|
||||
errorState!!,
|
||||
modifier = Modifier.fillMaxSize(),
|
||||
buttonText = stringResource(Res.string.retry)
|
||||
) { component.loadDetailsIfNeeded() }
|
||||
|
||||
|
||||
+1
@@ -179,6 +179,7 @@ fun EpisodesOverviewList(
|
||||
if (errorCode != null) {
|
||||
ErrorContent(
|
||||
errorCode,
|
||||
modifier = Modifier.fillMaxSize(),
|
||||
buttonText = stringResource(Res.string.retry)
|
||||
) { loadLinks() }
|
||||
} else if (episodes != null) {
|
||||
|
||||
+2
@@ -4,6 +4,7 @@ import androiddev.apps.vbox.client.shared.generated.resources.Res
|
||||
import androiddev.apps.vbox.client.shared.generated.resources.retry
|
||||
import androiddev.apps.vbox.client.shared.generated.resources.seasons_overview
|
||||
import androidx.compose.foundation.layout.PaddingValues
|
||||
import androidx.compose.foundation.layout.fillMaxSize
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.material3.ExperimentalMaterial3Api
|
||||
import androidx.compose.material3.Text
|
||||
@@ -41,6 +42,7 @@ fun SeasonOverviewScreen(component: SeasonOverviewComponent) {
|
||||
if (err.value != null) {
|
||||
ErrorContent(
|
||||
err.value!!,
|
||||
modifier = Modifier.fillMaxSize(),
|
||||
buttonText = stringResource(Res.string.retry)
|
||||
) { component.load() }
|
||||
} else if (seasons.value != null) {
|
||||
|
||||
+1
-1
@@ -49,7 +49,7 @@ fun PlayerScreen(component: PlayerComponent) {
|
||||
is PlayerEvent.Error -> {
|
||||
ErrorContent(
|
||||
state.message,
|
||||
modifier = Modifier.padding(it),
|
||||
modifier = Modifier.fillMaxSize().padding(it),
|
||||
buttonText = stringResource(Res.string.retry),
|
||||
) { component.load() }
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ import ru.shadowsparky.hasAndroidSupport
|
||||
import ru.shadowsparky.hasMultiplatformSupport
|
||||
import ru.shadowsparky.implementation
|
||||
import ru.shadowsparky.isAndroidApp
|
||||
import ru.shadowsparky.isBackendApp
|
||||
import ru.shadowsparky.isWebApp
|
||||
|
||||
class Koin : Plugin<Project> {
|
||||
@@ -19,7 +20,7 @@ class Koin : Plugin<Project> {
|
||||
val libs = findLibs()
|
||||
plugins.apply(libs.findPlugin("koin.compiler").get().get().pluginId)
|
||||
koinCompiler {
|
||||
val checkSafety = isAndroidApp || isWebApp // || isBackendApp
|
||||
val checkSafety = isAndroidApp || isWebApp || isBackendApp
|
||||
compileSafety.set(checkSafety)
|
||||
}
|
||||
dependencies {
|
||||
|
||||
@@ -6,7 +6,6 @@ import androiddev.libs.ui.generated.resources.ok
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.Spacer
|
||||
import androidx.compose.foundation.layout.fillMaxSize
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.foundation.layout.height
|
||||
import androidx.compose.foundation.layout.padding
|
||||
@@ -32,7 +31,7 @@ fun ErrorContent(
|
||||
Column(
|
||||
verticalArrangement = Arrangement.Center,
|
||||
horizontalAlignment = Alignment.CenterHorizontally,
|
||||
modifier = modifier.fillMaxSize().padding(4.dp)
|
||||
modifier = modifier.padding(4.dp)
|
||||
) {
|
||||
Text(
|
||||
text = stringResource(Res.string.error_title),
|
||||
|
||||
Reference in New Issue
Block a user