mirror of
https://github.com/InsanusMokrassar/KotlinPublicationScriptsBuilder.git
synced 2025-09-03 06:59:17 +00:00
Compare commits
2 Commits
build-ffe0
...
master
Author | SHA1 | Date | |
---|---|---|---|
a360f081f2 | |||
c954e2cf42 |
@@ -41,7 +41,7 @@ if ((project.hasProperty('SONATYPE_USER') || System.getenv('SONATYPE_USER') != n
|
|||||||
.build()
|
.build()
|
||||||
def uploadResponse = client.send(uploadRequest, HttpResponse.BodyHandlers.ofString())
|
def uploadResponse = client.send(uploadRequest, HttpResponse.BodyHandlers.ofString())
|
||||||
if (uploadResponse.statusCode() != 200) {
|
if (uploadResponse.statusCode() != 200) {
|
||||||
throw IllegalStateException("Faced error of uploading for repo with key ${"$"}it. Response: ${"$"}uploadResponse")
|
throw new IllegalStateException("Faced error of uploading for repo with key ${"$"}it. Response: ${"$"}uploadResponse")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,11 +1,18 @@
|
|||||||
package dev.inmo.kmppscriptbuilder.core.ui
|
package dev.inmo.kmppscriptbuilder.core.ui
|
||||||
|
|
||||||
import androidx.compose.foundation.layout.Column
|
import androidx.compose.foundation.layout.Column
|
||||||
|
import androidx.compose.foundation.layout.height
|
||||||
|
import androidx.compose.foundation.layout.heightIn
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
|
import androidx.compose.foundation.rememberScrollState
|
||||||
|
import androidx.compose.foundation.verticalScroll
|
||||||
import androidx.compose.material.Button
|
import androidx.compose.material.Button
|
||||||
import androidx.compose.material.Divider
|
import androidx.compose.material.Divider
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
|
import androidx.compose.runtime.mutableStateOf
|
||||||
|
import androidx.compose.runtime.remember
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
|
import androidx.compose.ui.focus.onFocusChanged
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import dev.inmo.kmppscriptbuilder.core.ui.utils.CommonText
|
import dev.inmo.kmppscriptbuilder.core.ui.utils.CommonText
|
||||||
import dev.inmo.kmppscriptbuilder.core.ui.utils.CommonTextField
|
import dev.inmo.kmppscriptbuilder.core.ui.utils.CommonTextField
|
||||||
@@ -14,17 +21,29 @@ import dev.inmo.kmppscriptbuilder.core.ui.utils.Drawer
|
|||||||
actual object LicensesDrawer : Drawer<LicensesView> {
|
actual object LicensesDrawer : Drawer<LicensesView> {
|
||||||
@Composable
|
@Composable
|
||||||
override fun LicensesView.draw() {
|
override fun LicensesView.draw() {
|
||||||
if (searchFieldFocused.value) {
|
val internalFocusState = remember { mutableStateOf(false) }
|
||||||
Column {
|
if (searchFieldFocused.value || internalFocusState.value) {
|
||||||
licensesOffersToShow.value.forEach {
|
}
|
||||||
Column(Modifier.padding(16.dp, 8.dp, 8.dp, 8.dp)) {
|
Column(
|
||||||
CommonText(it.title) {
|
Modifier
|
||||||
itemsList.add(it.toLicenseState())
|
.let {
|
||||||
licenseSearchFilter = ""
|
if (searchFieldFocused.value) {
|
||||||
}
|
it.heightIn(max = 128.dp)
|
||||||
Divider()
|
} else {
|
||||||
|
it.height(0.dp)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.verticalScroll(rememberScrollState())
|
||||||
|
) {
|
||||||
|
licensesOffersToShow.value.forEach {
|
||||||
|
Column(Modifier.padding(16.dp, 8.dp, 8.dp, 8.dp)) {
|
||||||
|
CommonText(it.title) {
|
||||||
|
itemsList.add(it.toLicenseState())
|
||||||
|
licenseSearchFilter = ""
|
||||||
|
internalFocusState.value = false
|
||||||
|
}
|
||||||
|
Divider()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -12,6 +12,7 @@ import androidx.compose.material.Divider
|
|||||||
import androidx.compose.material.OutlinedTextField
|
import androidx.compose.material.OutlinedTextField
|
||||||
import androidx.compose.material.Switch
|
import androidx.compose.material.Switch
|
||||||
import androidx.compose.material.Text
|
import androidx.compose.material.Text
|
||||||
|
import androidx.compose.material.TextButton
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
@@ -73,7 +74,11 @@ actual fun CommonTextField(
|
|||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
actual fun CommonText(text: String, onClick: (() -> Unit)?) {
|
actual fun CommonText(text: String, onClick: (() -> Unit)?) {
|
||||||
Text(text, modifier = Modifier.run { onClick ?.let { clickable(onClick = it) } ?: this })
|
onClick ?.let {
|
||||||
|
TextButton(it) {
|
||||||
|
Text(text)
|
||||||
|
}
|
||||||
|
} ?: Text(text)
|
||||||
}
|
}
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
|
Reference in New Issue
Block a user