add SessionVideoApi

This commit is contained in:
2026-08-07 13:39:00 +03:00
parent b851cf5d6d
commit 23d9912449
10 changed files with 119 additions and 50 deletions
@@ -10,7 +10,6 @@ import androiddev.apps.vbox.client.shared.generated.resources.edit_password
import androiddev.apps.vbox.client.shared.generated.resources.external_player_title
import androiddev.apps.vbox.client.shared.generated.resources.offline_video
import androiddev.apps.vbox.client.shared.generated.resources.user_tags
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
@@ -44,9 +43,9 @@ fun SettingsContent(comp: SettingsComponent, paddingValues: PaddingValues) {
if (servAddr != null && comp.isDebug) {
item {
TextPreference(
modifier = Modifier.clickable { comp.editServAddr() },
stringResource(Res.string.custom_serv_addr),
servAddr!!
{ comp.editServAddr() },
summary = servAddr!!
)
}
}
@@ -64,21 +63,21 @@ fun SettingsContent(comp: SettingsComponent, paddingValues: PaddingValues) {
item {
TextPreference(
text = stringResource(Res.string.offline_video),
modifier = Modifier.clickable { comp.showOffline() }
onClick = { comp.showOffline() }
)
}
}
item {
TextPreference(
text = stringResource(Res.string.user_tags),
modifier = Modifier.clickable { comp.showTags() }
onClick = { comp.showTags() }
)
}
if (comp.updateComponent.hasSupport) {
item {
TextPreference(
text = stringResource(Res.string.check_for_updates),
modifier = Modifier.clickable { comp.checkUpdates() }
onClick = { comp.checkUpdates() }
)
}
}
@@ -92,24 +91,22 @@ fun SettingsContent(comp: SettingsComponent, paddingValues: PaddingValues) {
Res.string.account_logout_auth
}
TextPreference(
modifier = Modifier.clickable {
if (needAuth) comp.doAuth() else comp.logout()
},
stringResource(msg)
stringResource(msg),
{ if (needAuth) comp.doAuth() else comp.logout() }
)
}
if (needAuth) {
item {
TextPreference(
modifier = Modifier.clickable { comp.doRegister() },
stringResource(Res.string.account_reg)
stringResource(Res.string.account_reg),
{ comp.doRegister() }
)
}
} else {
item {
TextPreference(
modifier = Modifier.clickable { comp.editPassword() },
stringResource(Res.string.edit_password)
stringResource(Res.string.edit_password),
{ comp.editPassword() }
)
}
}
@@ -8,7 +8,6 @@ import androiddev.apps.vbox.client.shared.generated.resources.user_tags_new_tag
import androiddev.apps.vbox.client.shared.generated.resources.user_tags_new_tag_save
import androiddev.apps.vbox.client.shared.generated.resources.user_tags_save
import androiddev.apps.vbox.client.shared.generated.resources.user_tags_tag_delete
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxSize
@@ -66,7 +65,7 @@ fun TagScreen(component: TagComponent) {
) { tag ->
TextPreference(
text = tag.tag,
modifier = Modifier.clickable { activeTag = tag }
{ activeTag = tag }
)
}
}