Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/jaino/#38 #39

Merged
merged 38 commits into from
Oct 27, 2023
Merged
Show file tree
Hide file tree
Changes from 36 commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
baac204
[CHORE] #32 : Firebase Manager Const μΆ”κ°€
jeongjaino Oct 21, 2023
a73e1e1
[FEATURE] #32 : λ§€λ‹ˆμ € 쑰회 둜직 κ΅¬ν˜„
jeongjaino Oct 21, 2023
b14a2a0
[FEATURE] #32 : ManageDataSource binds λ©”μ†Œλ“œ μΆ”κ°€
jeongjaino Oct 21, 2023
8c1d897
[FEATURE] #32 : ManageRepository binds λ©”μ†Œλ“œ μΆ”κ°€
jeongjaino Oct 21, 2023
5ba3b14
[FEATURE] #32 : λ“±λ‘λœ λ§€λ‹ˆμ € 쑰회 μœ μŠ€μΌ€μ΄μŠ€ κ΅¬ν˜„
jeongjaino Oct 21, 2023
46aa779
[CHORE] #32 : code collection const μΆ”κ°€
jeongjaino Oct 21, 2023
fbe4b51
[FEATURE] #32 : μš΄μ˜μ§„ μ½”λ“œ 검증 둜직 및 μš΄μ˜μ§„ 등둝 둜직 μΆ”κ°€
jeongjaino Oct 21, 2023
10e1be4
[FEATURE] #32 : μš΄μ˜μ§„ μ½”λ“œ 검증 μœ μŠ€μΌ€μ΄μŠ€ κ΅¬ν˜„
jeongjaino Oct 21, 2023
138fdd0
[REFACTOR] #32 : μš΄μ˜μ§„ μ½”λ“œ 인증 λ©”μ†Œλ“œ 넀이밍 및 λ°˜ν™˜ νƒ€μž… μˆ˜μ •
jeongjaino Oct 21, 2023
c224478
[REFACTOR] #32 : 검증, 미검증 νƒ€μž… 클래슀 μƒμ„±μœΌλ‘œ, 검증 μ‹€νŒ¨ 경우 μΆ”κ°€ κ΅¬ν˜„
jeongjaino Oct 21, 2023
cd311e9
[CHORE] #32 : Singleton Hilt scoped μΆ”κ°€
jeongjaino Oct 21, 2023
c3f6301
[CHORE] #38 : Color Naming μˆ˜μ • Color + μƒ‰μƒμ½”λ“œ 2 char
jeongjaino Oct 22, 2023
9129995
[FEATURE] #38 : 곡용 TopBar κ΅¬ν˜„
jeongjaino Oct 22, 2023
d8b6e27
[CHORE] #38 : TopBar Modifier λ§€κ°œλ³€μˆ˜ μΆ”κ°€
jeongjaino Oct 22, 2023
c7dbe6e
[CHORE] #38 : κΈ°μ‘΄ TopBar 곡용으둜 λ³€κ²½
jeongjaino Oct 22, 2023
1219603
[CHORE] #38 : Title 22sp -> 18sp 둜 μˆ˜μ •
jeongjaino Oct 22, 2023
4023dee
[CHORE] #38 : 쒅속성 μΆ”κ°€
jeongjaino Oct 22, 2023
7d1ae38
[REFACTOR] #38 : λ§€λ‹ˆμ € State κ΅¬ν•˜λŠ” λ©”μ†Œλ“œ λ°˜ν™˜κ°’ μˆ˜μ •
jeongjaino Oct 22, 2023
8dad305
[REFACTOR] #38 : λ°˜ν™˜ κ°’ μˆ˜μ • Unit -> Boolean
jeongjaino Oct 22, 2023
9d18cb8
[STYLE] #38 : Verification -> Validation으둜 μˆ˜μ •
jeongjaino Oct 22, 2023
af1a5cd
[STYLE] #38 : Rename ManagerCode -> ManageCode
jeongjaino Oct 22, 2023
f159417
[CHORE] #38 : nav_manage -> nav_management rename
jeongjaino Oct 22, 2023
8c77ce1
[CHORE] #38 : bottomNavView add controller
jeongjaino Oct 22, 2023
ea95a3e
[CHORE] #38 : delete manage fragment xml view
jeongjaino Oct 22, 2023
9adf0fd
[FEATURE] #38 : 곡용 Button κ΅¬ν˜„
jeongjaino Oct 22, 2023
83a9f05
[CHORE] #38 : firestore field name μˆ˜μ •
jeongjaino Oct 22, 2023
74cc7fa
[CHORE] #38 : toast extensions κ΅¬ν˜„
jeongjaino Oct 23, 2023
7bb8f8b
[CHORE] #38 : 관리 νŽ˜μ΄μ§€ string 등둝
jeongjaino Oct 23, 2023
fa40799
[FEATURE] #38 : 곡용 TextField κ΅¬ν˜„
jeongjaino Oct 23, 2023
1e6015e
[FEATURE] #38 : 관리 νŽ˜μ΄μ§€ κ΅¬ν˜„
jeongjaino Oct 23, 2023
44c3884
[FEATURE] #38 : μš΄μ˜μ§„ 검증 둜직이 ν¬ν•¨λœ ManageviewModel κ΅¬ν˜„
jeongjaino Oct 23, 2023
75dba23
[FEATURE] #38 : μš΄μ˜μ§„ μ½”λ“œ 인증 λ””μ•Œλ‘œκ·Έ κ΅¬ν˜„
jeongjaino Oct 23, 2023
1c7c72e
[FEATURE] #38 : ManageFragment에 Screen, Dialog λ³΄μ—¬μ§€λŠ” 둜직 κ΅¬ν˜„
jeongjaino Oct 23, 2023
4057923
[CHORE] #38 : String.xml νšŒμ› -> μš΄μ˜μ§„ μ •μ •
jeongjaino Oct 23, 2023
1037bc1
[CHORE] #38 : Lint 였λ₯˜ μˆ˜μ •
jeongjaino Oct 23, 2023
b76b616
[CHORE] #38 : ktlint unused parameter ν•΄κ²°
jeongjaino Oct 23, 2023
7c1eff3
[CHORE] #38 : Context -> Activity Extensions 주체 λ³€κ²½
jeongjaino Oct 27, 2023
2da1f1f
Merge branch 'develop' into feature/jaino/#38
jeongjaino Oct 27, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions app/src/main/java/com/wap/wapp/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import androidx.appcompat.app.AppCompatActivity
import androidx.core.view.isVisible
import androidx.navigation.NavController
import androidx.navigation.fragment.NavHostFragment
import androidx.navigation.ui.setupWithNavController
import com.wap.wapp.databinding.ActivityMainBinding
import dagger.hilt.android.AndroidEntryPoint

Expand All @@ -27,6 +28,7 @@ class MainActivity : AppCompatActivity() {
navController = navHostFragment.navController

bnvMainBottomNaviView.itemIconTintList = null
bnvMainBottomNaviView.setupWithNavController(navController)

setBottomNavigationVisiblity()
}
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/menu/menu_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
android:icon="@drawable/selector_profile" />

<item
android:id="@+id/nav_manage"
android:id="@+id/nav_management"
android:title="@string/manage"
android:icon="@drawable/selector_manage" />
</menu>
</menu>
2 changes: 1 addition & 1 deletion app/src/main/res/navigation/nav_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
app:startDestination="@id/nav_splash">

<include app:graph="@navigation/nav_auth" />
<include app:graph="@navigation/nav_manage" />
<include app:graph="@navigation/nav_management" />
<include app:graph="@navigation/nav_notice" />
<include app:graph="@navigation/nav_profile" />
<include app:graph="@navigation/nav_survey" />
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package com.wap.wapp.core.commmon.extensions

import android.content.Context
import android.widget.Toast

fun Context.showToast(message: String) {
Toast.makeText(this, message, Toast.LENGTH_SHORT).show()
}

fun Context.showLongToast(message: String) {
Toast.makeText(this, message, Toast.LENGTH_LONG).show()
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸ˜πŸ˜πŸ˜πŸ˜πŸ‘πŸ‘πŸ‘πŸ‘

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Activity 와 Context 의 ν™•μž₯ ν•¨μˆ˜ 쀑 μ–΄λ–€ 게 더 μ ν•©ν• κΉŒμš”?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Activityμ—μ„œλ§Œ ν˜ΈμΆœλ˜λŠ” μ΅μŠ€ν…μ…˜μ΄λΌ Acitivty μͺ½μœΌλ‘œ μˆ˜μ •ν•˜λŠ”κ²Œ λ§žλŠ” 것 κ°™λ„€μš”! μˆ˜μ •ν•˜κ² μŠ΅λ‹ˆλ‹€

Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package com.wap.wapp.core.data.di

import com.wap.wapp.core.data.repository.manage.ManageRepository
import com.wap.wapp.core.data.repository.manage.ManageRepositoryImpl
import com.wap.wapp.core.data.repository.user.UserRepository
import com.wap.wapp.core.data.repository.user.UserRepositoryImpl
import dagger.Binds
Expand All @@ -16,4 +18,10 @@ abstract class DataModule {
abstract fun bindsUserRepository(
userRepositoryImpl: UserRepositoryImpl,
): UserRepository

@Binds
@Singleton
abstract fun bindsManageRepository(
manageRepositoryImpl: ManageRepositoryImpl,
): ManageRepository
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package com.wap.wapp.core.data.repository.manage

interface ManageRepository {
suspend fun getManager(userId: String): Result<Boolean>

suspend fun postManager(userId: String): Result<Unit>

suspend fun getManageCode(code: String): Result<Boolean>
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package com.wap.wapp.core.data.repository.manage

import com.wap.wapp.core.network.source.manage.ManageDataSource
import javax.inject.Inject

class ManageRepositoryImpl @Inject constructor(
private val manageDataSource: ManageDataSource,
) : ManageRepository {
override suspend fun getManager(userId: String): Result<Boolean> {
return manageDataSource.getManager(userId)
}

override suspend fun postManager(userId: String): Result<Unit> {
return manageDataSource.postManager(userId)
}

override suspend fun getManageCode(code: String): Result<Boolean> {
return manageDataSource.getManageCode(code)
}
}
30 changes: 15 additions & 15 deletions core/designsystem/src/main/java/com/wap/designsystem/Color.kt
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,23 @@ import androidx.compose.ui.graphics.Color
val White = Color(0xFFFFFFFF)
val Black = Color(0xFF000000)
val BackgroundBlack = Color(0xFF131313)
val Black3 = Color(0xFF828282)
val Black2 = Color(0xFF424242)
val Black1 = Color(0xFF252424)
val Gray2 = Color(0xFFF4F4F4)
val Gray1 = Color(0xFFA2A2A2)
val Black82 = Color(0xFF828282) // 3
val Black42 = Color(0xFF424242) // 2
val Black25 = Color(0xFF252424) // 1
val GrayF4 = Color(0xFFF4F4F4) // 2
val GrayA2 = Color(0xFFA2A2A2) // 1
val Yellow = Color(0xFFFBCF34)

@Stable
class WappColor(
white: Color = White,
black: Color = Black,
backgroundBlack: Color = BackgroundBlack,
black1: Color = Black1,
black2: Color = Black2,
black3: Color = Black3,
gray1: Color = Gray1,
gray2: Color = Gray2,
black25: Color = Black25,
black42: Color = Black42,
black82: Color = Black82,
grayA2: Color = GrayA2,
grayF4: Color = GrayF4,
yellow: Color = Yellow,
) {
var white by mutableStateOf(white)
Expand All @@ -34,15 +34,15 @@ class WappColor(
private set
var backgroundBlack by mutableStateOf(backgroundBlack)
private set
var black1 by mutableStateOf(black1)
var black25 by mutableStateOf(Black25)
private set
var black2 by mutableStateOf(black2)
var black42 by mutableStateOf(Black42)
private set
var black3 by mutableStateOf(black3)
var black82 by mutableStateOf(Black82)
private set
var gray1 by mutableStateOf(gray1)
var grayA2 by mutableStateOf(GrayA2)
private set
var gray2 by mutableStateOf(gray2)
var grayF4 by mutableStateOf(GrayF4)
private set
var yellow by mutableStateOf(yellow)
private set
Expand Down
6 changes: 3 additions & 3 deletions core/designsystem/src/main/java/com/wap/designsystem/Type.kt
Original file line number Diff line number Diff line change
Expand Up @@ -86,21 +86,21 @@ class WappTypography internal constructor(
fun WappTypography(): WappTypography {
return WappTypography(
titleBold = TextStyle(
fontSize = 22.sp,
fontSize = 18.sp,
fontFamily = NotoSansBold,
platformStyle = PlatformTextStyle(
includeFontPadding = false,
),
),
titleMedium = TextStyle(
fontSize = 22.sp,
fontSize = 18.sp,
fontFamily = NotoSansMedium,
platformStyle = PlatformTextStyle(
includeFontPadding = false,
),
),
titleRegular = TextStyle(
fontSize = 22.sp,
fontSize = 18.sp,
fontFamily = NotoSansRegular,
platformStyle = PlatformTextStyle(
includeFontPadding = false,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
package com.wap.designsystem.component

import androidx.annotation.StringRes
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material3.Button
import androidx.compose.material3.ButtonDefaults
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp
import com.wap.designsystem.WappTheme
import com.wap.wapp.core.designsystem.R

@Composable
fun WappButton(
modifier: Modifier = Modifier,
@StringRes textRes: Int = R.string.done,
onClick: () -> Unit,
isEnabled: Boolean = true,
) {
Button(
modifier = modifier
.fillMaxWidth()
.height(48.dp),
onClick = { onClick() },
enabled = isEnabled,
colors = ButtonDefaults.buttonColors(
contentColor = WappTheme.colors.black,
containerColor = WappTheme.colors.yellow,
disabledContentColor = WappTheme.colors.white,
disabledContainerColor = WappTheme.colors.grayA2,
),
shape = RoundedCornerShape(10.dp),
content = { Text(text = stringResource(textRes)) },
)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
package com.wap.designsystem.component

import androidx.annotation.StringRes
import androidx.compose.material3.Text
import androidx.compose.material3.TextField
import androidx.compose.material3.TextFieldDefaults
import androidx.compose.runtime.Composable
import androidx.compose.ui.res.stringResource
import com.wap.designsystem.WappTheme

@Composable
fun WappTextField(
value: String,
onValueChanged: (String) -> Unit,
@StringRes label: Int,
isError: Boolean = false,
supportingText: String = "",
) {
TextField(
value = value,
onValueChange = { value -> onValueChanged(value) },
colors = TextFieldDefaults.colors(
unfocusedContainerColor = WappTheme.colors.black25,
focusedContainerColor = WappTheme.colors.black25,
errorContainerColor = WappTheme.colors.black25,
unfocusedLabelColor = WappTheme.colors.white,
focusedLabelColor = WappTheme.colors.white,
unfocusedTextColor = WappTheme.colors.white,
focusedTextColor = WappTheme.colors.white,
errorTextColor = WappTheme.colors.white,
unfocusedSupportingTextColor = WappTheme.colors.white,
focusedSupportingTextColor = WappTheme.colors.white,
focusedIndicatorColor = WappTheme.colors.yellow,
cursorColor = WappTheme.colors.yellow,
),
label = {
Text(text = stringResource(label))
},
isError = isError,
supportingText = {
Text(text = supportingText)
},
)
}
Loading