Skip to content

Commit

Permalink
Merge pull request #46 from pknu-wap/feature/tgyuu/#25
Browse files Browse the repository at this point in the history
Feature/tgyuu/#25
  • Loading branch information
tgyuuAn authored Nov 16, 2023
2 parents 6ea1c7a + 758034e commit b453e3f
Show file tree
Hide file tree
Showing 14 changed files with 337 additions and 74 deletions.
11 changes: 5 additions & 6 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -41,20 +41,19 @@ dependencies {
androidTestImplementation(libs.androidx.test.espresso)
}

/*tasks.getByPath(":app:preBuild").dependsOn("makeFileExecutable")
tasks.register<Exec>("makeFileExecutable") {
commandLine("chmod", "+x", "${rootProject.rootDir}/.git/hooks/pre-commit")
dependsOn("installGitHook")
}
/*tasks.getByPath(":app:preBuild").dependsOn("installGitHook")
tasks.register<Copy>("installGitHook") {
dependsOn("deletePreviousGitHook")
from("${rootProject.rootDir}/script/pre-commit")
into("${rootProject.rootDir}/.git/hooks")
eachFile {
fileMode = 777
}
}
tasks.register<Delete>("deletePreviousGitHook") {
val prePush = "${rootProject.rootDir}/.git/hooks/pre-commit"
if (file(prePush).exists()) {
delete(prePush)
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
android:id="@+id/bnv_main_bottomNaviView"
android:layout_width="match_parent"
android:layout_height="70dp"
android:background="@color/gray_2"
android:background="@color/black_1"
app:itemActiveIndicatorStyle="@style/Style.BottomNavigationView.Custom.Indicator"
app:itemTextColor="@drawable/selector_text_color"
app:layout_constraintBottom_toBottomOf="parent"
Expand Down
6 changes: 6 additions & 0 deletions build-logic/convention/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ java {
targetCompatibility = JavaVersion.VERSION_17
}

kotlin {
jvmToolchain {
languageVersion.set(JavaLanguageVersion.of("17"))
}
}

dependencies {
compileOnly(libs.android.build)
compileOnly(libs.kotlin.gradle)
Expand Down
28 changes: 18 additions & 10 deletions core/designsystem/src/main/java/com/wap/designsystem/Color.kt
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@ import androidx.compose.ui.graphics.Color
val White = Color(0xFFFFFFFF)
val Black = Color(0xFF000000)
val BackgroundBlack = Color(0xFF131313)
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 Black82 = Color(0xFF828282)
val Black42 = Color(0xFF424242)
val Black25 = Color(0xFF252424)
val Gray82 = Color(0xFF828282)
val GrayBD = Color(0xFFBDBDBD)
val GrayF4 = Color(0xFFF4F4F4)
val GrayA2 = Color(0xFFA2A2A2)
val Yellow = Color(0xFFFBCF34)

@Stable
Expand All @@ -26,6 +28,8 @@ class WappColor(
black82: Color = Black82,
grayA2: Color = GrayA2,
grayF4: Color = GrayF4,
grayBD: Color = GrayBD,
gray82: Color = Gray82,
yellow: Color = Yellow,
) {
var white by mutableStateOf(white)
Expand All @@ -34,15 +38,19 @@ class WappColor(
private set
var backgroundBlack by mutableStateOf(backgroundBlack)
private set
var black25 by mutableStateOf(Black25)
var black25 by mutableStateOf(black25)
private set
var black42 by mutableStateOf(Black42)
var black42 by mutableStateOf(black42)
private set
var black82 by mutableStateOf(Black82)
var black82 by mutableStateOf(black82)
private set
var grayA2 by mutableStateOf(GrayA2)
var grayA2 by mutableStateOf(grayA2)
private set
var grayF4 by mutableStateOf(GrayF4)
var grayF4 by mutableStateOf(grayF4)
private set
var grayBD by mutableStateOf(grayBD)
private set
var gray82 by mutableStateOf(gray82)
private set
var yellow by mutableStateOf(yellow)
private set
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package com.wap.wapp.core.domain.model

data class Notice(
val time: String,
val title: String,
val duration: String,
)
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.input.KeyboardType
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import androidx.hilt.navigation.compose.hiltViewModel
Expand Down Expand Up @@ -172,12 +171,3 @@ internal fun SignUpScreen(
}
}
}

@Preview
@Composable
fun previewSignUpScreen() {
SignUpScreen(
navigateToSignIn = { },
navigateToNotice = { },
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import com.wap.wapp.core.domain.usecase.user.PostUserProfileUseCase
import dagger.hilt.android.lifecycle.HiltViewModel
import javax.inject.Inject
import kotlinx.coroutines.flow.MutableSharedFlow
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.SharedFlow
import kotlinx.coroutines.flow.StateFlow
import kotlinx.coroutines.launch
import javax.inject.Inject

@HiltViewModel
class SignUpViewModel @Inject constructor(
Expand Down Expand Up @@ -61,12 +61,12 @@ class SignUpViewModel @Inject constructor(
_signUpSemester.value = semester
}

companion object {
const val FIRST_SEMESTER = "1학기"
}

sealed class SignUpEvent {
data object Success : SignUpEvent()
data class Failure(val throwable: Throwable) : SignUpEvent()
}

companion object {
const val FIRST_SEMESTER = "1학기"
}
}
1 change: 1 addition & 0 deletions feature/notice/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ android {
dependencies {
implementation(project(":core:designresource"))
implementation(project(":core:designsystem"))
implementation(project(":core:domain"))

implementation(libs.bundles.androidx)
implementation(libs.material)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,57 +4,32 @@ import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.compose.ui.platform.ComposeView
import androidx.fragment.app.Fragment
import com.wap.designsystem.WappTheme
import dagger.hilt.android.AndroidEntryPoint

// TODO: Rename parameter arguments, choose names that match
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
private const val ARG_PARAM1 = "param1"
private const val ARG_PARAM2 = "param2"

/**
* A simple [Fragment] subclass.
* Use the [NoticeFragment.newInstance] factory method to
* create an instance of this fragment.
*/
@AndroidEntryPoint
class NoticeFragment : Fragment() {
// TODO: Rename and change types of parameters
private var param1: String? = null
private var param2: String? = null

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
arguments?.let {
param1 = it.getString(ARG_PARAM1)
param2 = it.getString(ARG_PARAM2)
}
}
private lateinit var composeView: ComposeView

override fun onCreateView(
inflater: LayoutInflater,
container: ViewGroup?,
savedInstanceState: Bundle?,
): View? {
// Inflate the layout for this fragment
return inflater.inflate(R.layout.fragment_notice, container, false)
return ComposeView(requireContext()).also {
composeView = it
}
}

companion object {
/**
* Use this factory method to create a new instance of
* this fragment using the provided parameters.
*
* @param param1 Parameter 1.
* @param param2 Parameter 2.
* @return A new instance of fragment NoticeFragment.
*/
// TODO: Rename and change types and number of parameters
@JvmStatic
fun newInstance(param1: String, param2: String) =
NoticeFragment().apply {
arguments = Bundle().apply {
putString(ARG_PARAM1, param1)
putString(ARG_PARAM2, param2)
}
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
composeView.setContent {
WappTheme {
NoticeScreen()
}
}
}
}
Loading

0 comments on commit b453e3f

Please sign in to comment.