fix of build
This commit is contained in:
parent
9216c013ec
commit
5bbe0b8a0e
@ -8,7 +8,6 @@ import dev.inmo.postssystem.features.auth.client.ui.*
|
|||||||
import dev.inmo.postssystem.features.common.common.baseKoin
|
import dev.inmo.postssystem.features.common.common.baseKoin
|
||||||
import dev.inmo.postssystem.features.common.common.getAllDistinct
|
import dev.inmo.postssystem.features.common.common.getAllDistinct
|
||||||
import dev.inmo.postssystem.features.common.common.ui.fsm.UIFSMHandler
|
import dev.inmo.postssystem.features.common.common.ui.fsm.UIFSMHandler
|
||||||
import dev.inmo.postssystem.features.common.common.ui.fsm.UIFSMStateSerializer
|
|
||||||
import dev.inmo.postssystem.services.posts.client.ui.list.PostsListUIFSMState
|
import dev.inmo.postssystem.services.posts.client.ui.list.PostsListUIFSMState
|
||||||
import dev.inmo.postssystem.services.posts.client.ui.list.PostsListUIState
|
import dev.inmo.postssystem.services.posts.client.ui.list.PostsListUIState
|
||||||
import kotlinx.browser.*
|
import kotlinx.browser.*
|
||||||
@ -29,8 +28,7 @@ val defaultTypedSerializer = TypedSerializer<Any>(
|
|||||||
"Short" to Short.serializer(),
|
"Short" to Short.serializer(),
|
||||||
"Byte" to Byte.serializer(),
|
"Byte" to Byte.serializer(),
|
||||||
"Float" to Float.serializer(),
|
"Float" to Float.serializer(),
|
||||||
"Double" to Double.serializer(),
|
"Double" to Double.serializer()
|
||||||
"UIFSMState" to UIFSMStateSerializer
|
|
||||||
)
|
)
|
||||||
val defaultSerialFormat = Json {
|
val defaultSerialFormat = Json {
|
||||||
ignoreUnknownKeys = true
|
ignoreUnknownKeys = true
|
||||||
|
@ -4,9 +4,9 @@ import kotlinx.serialization.Serializable
|
|||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
sealed interface AuthUIError {
|
sealed interface AuthUIError {
|
||||||
@Serializable
|
// @Serializable
|
||||||
object ServerUnavailable : AuthUIError
|
object ServerUnavailable : AuthUIError
|
||||||
@Serializable
|
// @Serializable
|
||||||
object AuthIncorrect : AuthUIError
|
object AuthIncorrect : AuthUIError
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -14,9 +14,9 @@ sealed interface AuthUIError {
|
|||||||
sealed interface AuthUIState {
|
sealed interface AuthUIState {
|
||||||
@Serializable
|
@Serializable
|
||||||
data class Init(val showError: AuthUIError? = null) : AuthUIState
|
data class Init(val showError: AuthUIError? = null) : AuthUIState
|
||||||
@Serializable
|
// @Serializable
|
||||||
object Loading : AuthUIState
|
object Loading : AuthUIState
|
||||||
@Serializable
|
// @Serializable
|
||||||
object Authorized : AuthUIState
|
object Authorized : AuthUIState
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
|
@ -25,8 +25,8 @@ typealias ContentIds = List<ContentId>
|
|||||||
* @see RegisteredPost
|
* @see RegisteredPost
|
||||||
*/
|
*/
|
||||||
@Serializable
|
@Serializable
|
||||||
sealed class Post {
|
sealed interface Post {
|
||||||
abstract val content: ContentIds
|
val content: ContentIds
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -35,7 +35,7 @@ sealed class Post {
|
|||||||
@Serializable
|
@Serializable
|
||||||
data class NewPost(
|
data class NewPost(
|
||||||
override val content: ContentIds
|
override val content: ContentIds
|
||||||
) : Post()
|
) : Post
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Registered [Post]
|
* Registered [Post]
|
||||||
@ -46,12 +46,12 @@ data class RegisteredPost(
|
|||||||
override val content: ContentIds,
|
override val content: ContentIds,
|
||||||
@Serializable(DateTimeSerializer::class)
|
@Serializable(DateTimeSerializer::class)
|
||||||
val creationDate: DateTime
|
val creationDate: DateTime
|
||||||
) : Post()
|
) : Post
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
data class PostWithContent(
|
data class PostWithContent(
|
||||||
val post: Post,
|
val post: Post,
|
||||||
val content: List<Content>
|
val content: List<@Polymorphic Content>
|
||||||
)
|
)
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
|
@ -3,14 +3,14 @@ package dev.inmo.postssystem.services.posts.client.ui.create
|
|||||||
import kotlinx.serialization.Serializable
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
sealed class PostCreateUIState {
|
sealed interface PostCreateUIState {
|
||||||
@Serializable
|
// @Serializable
|
||||||
object Init : PostCreateUIState()
|
object Init : PostCreateUIState
|
||||||
@Serializable
|
// @Serializable
|
||||||
object Uploading : PostCreateUIState()
|
object Uploading : PostCreateUIState
|
||||||
@Serializable
|
// @Serializable
|
||||||
object Fail : PostCreateUIState()
|
object Fail : PostCreateUIState
|
||||||
@Serializable
|
// @Serializable
|
||||||
object Completed : PostCreateUIState()
|
object Completed : PostCreateUIState
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -4,13 +4,13 @@ import dev.inmo.postssystem.features.posts.common.RegisteredPostWithContent
|
|||||||
import kotlinx.serialization.Serializable
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
sealed class PostsListUIState {
|
sealed interface PostsListUIState {
|
||||||
@Serializable
|
// @Serializable
|
||||||
object Loading : PostsListUIState()
|
object Loading : PostsListUIState
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
data class Show(
|
data class Show(
|
||||||
val posts: List<RegisteredPostWithContent>
|
val posts: List<RegisteredPostWithContent>
|
||||||
) : PostsListUIState()
|
) : PostsListUIState
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user