-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #136 from Team-Notitime/fix/134-navigation-detail
Fix/134 navigation detail
- Loading branch information
Showing
14 changed files
with
104 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 26 additions & 20 deletions
46
.../src/main/java/com/easyhz/noffice/core/design_system/component/image/AnnouncementImage.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,45 @@ | ||
package com.easyhz.noffice.core.design_system.component.image | ||
|
||
import androidx.compose.foundation.Image | ||
import androidx.compose.animation.AnimatedContent | ||
import androidx.compose.foundation.background | ||
import androidx.compose.foundation.layout.Box | ||
import androidx.compose.foundation.layout.fillMaxWidth | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.graphics.painter.ColorPainter | ||
import androidx.compose.ui.layout.ContentScale | ||
import androidx.compose.ui.res.painterResource | ||
import com.bumptech.glide.integration.compose.CrossFade | ||
import com.bumptech.glide.integration.compose.ExperimentalGlideComposeApi | ||
import com.bumptech.glide.integration.compose.GlideImage | ||
import com.bumptech.glide.integration.compose.placeholder | ||
import com.easyhz.noffice.core.design_system.R | ||
import com.easyhz.noffice.core.design_system.theme.Grey50 | ||
|
||
@OptIn(ExperimentalGlideComposeApi::class) | ||
@Composable | ||
fun AnnouncementImage( | ||
modifier: Modifier = Modifier, | ||
imageUrl: String | ||
) { | ||
if (imageUrl.isBlank() || imageUrl == "null") { | ||
Image( | ||
modifier = modifier.fillMaxWidth(), | ||
painter = painterResource(id = R.drawable.img_illust_1), | ||
contentScale = ContentScale.Crop, | ||
contentDescription = "image" | ||
) | ||
} else { | ||
GlideImage( | ||
modifier = modifier, | ||
model = imageUrl, | ||
contentDescription = imageUrl, | ||
loading = placeholder(R.drawable.img_illust_1), | ||
failure = placeholder(R.drawable.img_illust_1), | ||
contentScale = ContentScale.Crop, | ||
transition = CrossFade, | ||
) | ||
AnimatedContent(targetState = imageUrl, label = "announcementImage") { | ||
when (it.isBlank() || imageUrl == "null") { | ||
true -> { | ||
Box( | ||
modifier = modifier | ||
.fillMaxWidth() | ||
.background(Grey50), | ||
) | ||
} | ||
false -> { | ||
GlideImage( | ||
modifier = modifier, | ||
model = imageUrl, | ||
contentDescription = imageUrl, | ||
loading = placeholder(ColorPainter(Grey50)), | ||
failure = placeholder(ColorPainter(Grey50)), | ||
contentScale = ContentScale.Crop, | ||
transition = CrossFade, | ||
) | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
.../java/com/easyhz/noffice/feature/organization/contract/organization/OrganizationIntent.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
package com.easyhz.noffice.feature.organization.contract.organization | ||
|
||
import com.easyhz.noffice.core.common.base.UiIntent | ||
import com.easyhz.noffice.core.design_system.util.topBar.TopBarIconMenu | ||
|
||
sealed class OrganizationIntent: UiIntent() { | ||
data object ClickOrganizationCreation: OrganizationIntent() | ||
data class ClickTopBarIconMenu(val iconMenu: TopBarIconMenu): OrganizationIntent() | ||
data class ClickOrganization(val id: Int, val name: String): OrganizationIntent() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters