Skip to content

Commit 6342d77

Browse files
authored
πŸ”€ :: (#816) λ§ˆμ΄νŽ˜μ΄μ§€ κ΅¬ν˜„
πŸ”€ :: (#816) λ§ˆμ΄νŽ˜μ΄μ§€ κ΅¬ν˜„
2 parents 3bf8910 + 1271bcb commit 6342d77

File tree

66 files changed

+2421
-143
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+2421
-143
lines changed

β€Žapp/src/dev/AndroidManifest.xmlβ€Ž

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
<uses-permission android:name="android.permission.CAMERA" />
88
<uses-permission android:name="android.permission.VIBRATE" />
99
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
10+
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
11+
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" android:maxSdkVersion="32" />
1012

1113
<application
1214
android:name="team.aliens.dms.android.app.DevApplication"

β€Žapp/src/dev/kotlin/team/aliens/dms/android/app/DmsApp.ktβ€Ž

Lines changed: 177 additions & 85 deletions
Large diffs are not rendered by default.

β€Žapp/src/dev/kotlin/team/aliens/dms/android/app/MainActivity.ktβ€Ž

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package team.aliens.dms.android.app
22

33
import android.os.Bundle
4+
import android.util.Log
45
import android.view.WindowManager
56
import androidx.activity.ComponentActivity
67
import androidx.activity.compose.setContent
@@ -60,7 +61,7 @@ class MainActivity : ComponentActivity() {
6061
DmsTheme {
6162
DmsApp(
6263
windowSizeClass = windowSizeClass,
63-
isJwtAvailable = isJwtAvailable,
64+
isJwtAvailable = isJwtAvailable.value,
6465
mainViewModel = mainViewModel,
6566
)
6667
}

β€Žcore/design-system/src/dev/java/team/aliens/dms/android/core/designsystem/button/Button.ktβ€Ž

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,10 @@ fun DmsLayeredButton(
361361
buttonType: ButtonType,
362362
buttonColor: ButtonColor,
363363
enabled: Boolean = true,
364-
shape: RoundedCornerShape,
364+
shape: RoundedCornerShape = RoundedCornerShape(
365+
topStart = 32.dp,
366+
topEnd = 32.dp,
367+
),
365368
backgroundColor: Color = DmsTheme.colorScheme.surfaceVariant,
366369
layerOffset: Dp = 24.dp,
367370
isLoading: Boolean,
@@ -370,7 +373,6 @@ fun DmsLayeredButton(
370373
Box(
371374
modifier = modifier
372375
.background(color = Color.White, shape = shape)
373-
.windowInsetsPadding(WindowInsets.navigationBars)
374376
.padding(layerOffset),
375377
) {
376378
DmsButton(

β€Žcore/design-system/src/dev/java/team/aliens/dms/android/core/designsystem/button/DmsItemButton.ktβ€Ž

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package team.aliens.dms.android.core.designsystem.button
22

33
import androidx.annotation.DrawableRes
44
import androidx.compose.animation.animateColorAsState
5+
import androidx.compose.animation.core.animateFloatAsState
56
import androidx.compose.foundation.Image
67
import androidx.compose.foundation.background
78
import androidx.compose.foundation.layout.Row
@@ -20,6 +21,7 @@ import androidx.compose.runtime.setValue
2021
import androidx.compose.ui.Alignment
2122
import androidx.compose.ui.Modifier
2223
import androidx.compose.ui.draw.clip
24+
import androidx.compose.ui.draw.rotate
2325
import androidx.compose.ui.graphics.painter.Painter
2426
import androidx.compose.ui.res.painterResource
2527
import androidx.compose.ui.unit.dp
@@ -31,7 +33,7 @@ import team.aliens.dms.android.core.designsystem.util.clickable
3133
@Composable
3234
fun DmsItemButton(
3335
modifier: Modifier = Modifier,
34-
iconRes: Painter,
36+
@DrawableRes iconRes: Int,
3537
text: String,
3638
enabled: Boolean = true,
3739
onClick: () -> Unit,
@@ -61,8 +63,9 @@ fun DmsItemButton(
6163
verticalAlignment = Alignment.CenterVertically,
6264
) {
6365
Image(
64-
modifier = Modifier.size(24.dp),
65-
painter = iconRes,
66+
modifier = Modifier
67+
.size(24.dp),
68+
painter = painterResource(iconRes),
6669
contentDescription = null,
6770
)
6871
Text(
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
package team.aliens.dms.android.core.designsystem.dialog
2+
3+
import androidx.compose.foundation.shape.RoundedCornerShape
4+
import androidx.compose.runtime.Composable
5+
import androidx.compose.ui.Modifier
6+
import androidx.compose.ui.graphics.Color
7+
import androidx.compose.ui.graphics.Shape
8+
import androidx.compose.ui.unit.Dp
9+
import androidx.compose.ui.unit.dp
10+
import androidx.compose.ui.window.DialogProperties
11+
import team.aliens.dms.android.core.designsystem.DmsTheme
12+
13+
@Composable
14+
fun AlertDialog(
15+
onDismissRequest: () -> Unit,
16+
confirmButton: @Composable () -> Unit,
17+
modifier: Modifier = Modifier,
18+
dismissButton: @Composable (() -> Unit)? = null,
19+
icon: @Composable (() -> Unit)? = null,
20+
title: @Composable (() -> Unit)? = null,
21+
text: @Composable (() -> Unit)? = null,
22+
shape: Shape = RoundedCornerShape(24.dp),
23+
containerColor: Color = DmsTheme.colorScheme.surface,
24+
iconContentColor: Color = DmsTheme.colorScheme.onSurfaceVariant,
25+
titleContentColor: Color = DmsTheme.colorScheme.surfaceContainer,
26+
textContentColor: Color = DmsTheme.colorScheme.surfaceContainer,
27+
properties: DialogProperties = DialogProperties(),
28+
) = androidx.compose.material3.AlertDialog(
29+
onDismissRequest = onDismissRequest,
30+
confirmButton = confirmButton,
31+
modifier = modifier,
32+
dismissButton = dismissButton,
33+
icon = icon,
34+
title = title,
35+
text = text,
36+
shape = shape,
37+
containerColor = containerColor,
38+
iconContentColor = iconContentColor,
39+
titleContentColor = titleContentColor,
40+
textContentColor = textContentColor,
41+
properties = properties,
42+
)

β€Žcore/design-system/src/dev/java/team/aliens/dms/android/core/designsystem/foundation/DmsIcon.ktβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,5 @@ object DmsIcon {
5252
val SymbolDark = R.drawable.ic_symbol_dark
5353
val Cancel = R.drawable.ic_cancel
5454
val OutingPass = R.drawable.ic_outing_pass
55+
val Setting = R.drawable.ic_setting
5556
}

β€Žcore/design-system/src/dev/java/team/aliens/dms/android/core/designsystem/foundation/DmsSymbol.ktβ€Ž

Lines changed: 36 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,51 @@ package team.aliens.dms.android.core.designsystem.foundation
22

33
import androidx.compose.foundation.Image
44
import androidx.compose.foundation.isSystemInDarkTheme
5+
import androidx.compose.foundation.layout.Column
6+
import androidx.compose.foundation.layout.padding
7+
import androidx.compose.material3.Text
58
import androidx.compose.runtime.Composable
69
import androidx.compose.ui.Modifier
710
import androidx.compose.ui.res.painterResource
11+
import androidx.compose.ui.unit.dp
12+
import team.aliens.dms.android.core.designsystem.DmsTheme
13+
import team.aliens.dms.android.core.designsystem.bodyM
14+
import team.aliens.dms.android.core.designsystem.horizontalPadding
15+
import team.aliens.dms.android.core.designsystem.titleB
16+
import team.aliens.dms.android.core.designsystem.topPadding
817

918
@Composable
10-
fun DmsSymbol(modifier: Modifier = Modifier) {
19+
fun DmsSymbolContent(
20+
modifier: Modifier = Modifier,
21+
title: String = "",
22+
description: String = "",
23+
) {
1124
val symbol = if (isSystemInDarkTheme()) {
1225
DmsIcon.SymbolDark
1326
} else {
1427
DmsIcon.SymbolLight
1528
}
1629

17-
Image(
18-
modifier = modifier,
19-
painter = painterResource(symbol),
20-
contentDescription = "symbol",
21-
)
30+
Column(
31+
modifier = Modifier
32+
.horizontalPadding(24.dp)
33+
) {
34+
Image(
35+
modifier = modifier,
36+
painter = painterResource(symbol),
37+
contentDescription = "symbol",
38+
)
39+
Text(
40+
modifier = Modifier.topPadding(20.dp),
41+
text = title,
42+
style = DmsTheme.typography.titleB,
43+
color = DmsTheme.colorScheme.onTertiaryContainer,
44+
)
45+
Text(
46+
modifier = Modifier.topPadding(12.dp),
47+
text = description,
48+
style = DmsTheme.typography.bodyM,
49+
color = DmsTheme.colorScheme.inverseSurface
50+
)
51+
}
2252
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
2+
android:width="24dp"
3+
android:height="24dp"
4+
android:viewportWidth="24"
5+
android:viewportHeight="24">
6+
<path
7+
android:pathData="M10.309,22C9.704,22 9.194,21.549 9.119,20.949L8.935,19.478C8.883,19.06 8.597,18.719 8.238,18.5C7.879,18.282 7.439,18.224 7.052,18.387L5.674,18.966C5.117,19.2 4.473,18.983 4.171,18.461L2.481,15.543C2.178,15.019 2.313,14.351 2.796,13.985L4.255,12.88C4.422,12.753 4.5,12.547 4.5,12.337V11.663C4.5,11.453 4.422,11.247 4.255,11.12L2.796,10.015C2.313,9.65 2.178,8.981 2.481,8.457L4.171,5.539C4.473,5.017 5.117,4.8 5.674,5.034L7.052,5.613C7.439,5.776 7.879,5.717 8.241,5.505C8.244,5.503 8.247,5.502 8.25,5.5C8.609,5.291 8.882,4.946 8.933,4.534L9.119,3.051C9.194,2.451 9.704,2 10.309,2H13.691C14.296,2 14.807,2.451 14.882,3.051L15.066,4.522C15.118,4.94 15.403,5.281 15.763,5.5C16.121,5.718 16.562,5.776 16.949,5.613L18.326,5.034C18.883,4.8 19.527,5.017 19.83,5.539L21.519,8.457C21.822,8.981 21.688,9.65 21.205,10.015L19.745,11.12C19.579,11.247 19.5,11.453 19.5,11.663V12.337C19.5,12.544 19.559,12.757 19.723,12.882L21.18,13.985C21.663,14.351 21.797,15.019 21.494,15.543L19.806,18.458C19.503,18.982 18.857,19.198 18.299,18.962L16.95,18.39C16.562,18.226 16.121,18.283 15.757,18.496C15.755,18.497 15.752,18.499 15.75,18.5C15.392,18.709 15.118,19.054 15.067,19.466L14.882,20.949C14.807,21.549 14.296,22 13.691,22H10.309ZM12.05,15.5C13.017,15.5 13.842,15.158 14.525,14.475C15.208,13.792 15.55,12.967 15.55,12C15.55,11.033 15.208,10.208 14.525,9.525C13.842,8.842 13.017,8.5 12.05,8.5C11.067,8.5 10.238,8.842 9.563,9.525C8.888,10.208 8.55,11.033 8.55,12C8.55,12.967 8.888,13.792 9.563,14.475C10.238,15.158 11.067,15.5 12.05,15.5Z"
8+
android:fillColor="#B0B6C1"/>
9+
</vector>
3.21 KB
Loading

0 commit comments

Comments
Β (0)