Skip to content

Commit

Permalink
Merge pull request #170 from GSM-MSG/feature/#169_publishing_find_pas…
Browse files Browse the repository at this point in the history
…sword_screen

🔀 :: (#169) Publishing Find Password Screen
  • Loading branch information
Chaejongin12 authored Apr 28, 2024
2 parents 872201a + 622a070 commit bc0a2c4
Show file tree
Hide file tree
Showing 22 changed files with 442 additions and 69 deletions.
21 changes: 0 additions & 21 deletions app/proguard-rules.pro

This file was deleted.

1 change: 1 addition & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ plugins {
alias(libs.plugins.kotlin.serialization) apply false
alias(libs.plugins.hilt) apply false
alias(libs.plugins.android.library) apply false
alias(libs.plugins.jetbrainsKotlinAndroid) apply false
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import androidx.compose.ui.focus.onFocusChanged
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.text.input.ImeAction
import androidx.compose.ui.text.input.KeyboardType
import androidx.compose.ui.text.input.PasswordVisualTransformation
import androidx.compose.ui.text.input.VisualTransformation
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
Expand Down Expand Up @@ -65,6 +66,7 @@ fun DefaultTextField(
onClickLink: (() -> Unit)? = null,
onClick: (() -> Unit)? = null,
value: String? = null,
visualTransformationState: Boolean = false,
) {
var text by remember { mutableStateOf(value ?: "") }
val isFocused = remember { mutableStateOf(false) }
Expand Down Expand Up @@ -143,7 +145,8 @@ fun DefaultTextField(
readOnly = isReadOnly,
keyboardOptions = if (isNumberOnly) KeyboardOptions(keyboardType = KeyboardType.Number) else KeyboardOptions(
autoCorrect = false
)
),
visualTransformation = if (visualTransformationState) PasswordVisualTransformation() else VisualTransformation.None
)
if (isError || isLinked) {
val isAll: Boolean = isError && isLinked
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ fun GoBackTopBar(
.fillMaxWidth()
.background(colors.WHITE)
) {
Spacer(
modifier = modifier.width(28.dp)
)
IconButton(
onClick = onClick,
modifier = modifier
Expand Down
4 changes: 3 additions & 1 deletion core/design-system/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="login">로그인</string>
<string name="go_back">돌아가기</string>
<string name="project_name">빛고을\n직업교육\n혁신지구</string>
<string name="email">이메일</string>
<string name="error_text_email">이메일을 다시 한번 확인해주세요.</string>
<string name="password">비밀번호</string>
<string name="find_password">비밀번호 찾기</string>
<string name="forgot_password">비밀번호를 잊었나요?</string>
<string name="wrong_password">잘못된 비밀번호 입니다.</string>
<string name="email_authentication_process">이메일 인증을 진행합니다</string>
<string name="sign_up">회원가입</string>
<string name="lecture_list">강의 목록</string>
<string name="filter">필터</string>
Expand All @@ -33,7 +35,7 @@
<string name="select_credits_awarded">수여 학점 선택</string>
<string name="maximum_number_students">최대 수강 인원</string>
<string name="enter_maximum_number_students">최대 수강 인원 입력</string>
<string name="application_done">수강 신청 완료</string>
<string name="application_done">수강 신청 완료</string>
<string name="application_reject">신청 거부</string>
<string name="application_approve">신청 승인</string>
<string name="activity_detail_setting">활동 세부 설정</string>
Expand Down
1 change: 1 addition & 0 deletions feature/email/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
9 changes: 9 additions & 0 deletions feature/email/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
@Suppress("DSL_SCOPE_VIOLATION") // TODO: Remove once KTIJ-19369 is fixed
plugins {
id("bitgoeul.android.feature")
id("bitgoeul.android.hilt")
}

android {
namespace = "com.msg.email"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package com.bitgoeul.email

import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.ext.junit.runners.AndroidJUnit4

import org.junit.Test
import org.junit.runner.RunWith

import org.junit.Assert.*

/**
* Instrumented test, which will execute on an Android device.
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
@RunWith(AndroidJUnit4::class)
class ExampleInstrumentedTest {
@Test
fun useAppContext() {
// Context of the app under test.
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
assertEquals("com.bitgoeul.email.test", appContext.packageName)
}
}
4 changes: 4 additions & 0 deletions feature/email/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

</manifest>
37 changes: 37 additions & 0 deletions feature/email/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# For more information about using CMake with Android Studio, read the
# documentation: https://d.android.com/studio/projects/add-native-code.html.
# For more examples on how to use CMake, see https://github.com/android/ndk-samples.

# Sets the minimum CMake version required for this project.
cmake_minimum_required(VERSION 3.22.1)

# Declares the project name. The project name can be accessed via ${ PROJECT_NAME},
# Since this is the top level CMakeLists.txt, the project name is also accessible
# with ${CMAKE_PROJECT_NAME} (both CMake variables are in-sync within the top level
# build script scope).
project("email")

# Creates and names a library, sets it as either STATIC
# or SHARED, and provides the relative paths to its source code.
# You can define multiple libraries, and CMake builds them for you.
# Gradle automatically packages shared libraries with your APK.
#
# In this top level CMakeLists.txt, ${CMAKE_PROJECT_NAME} is used to define
# the target library name; in the sub-module's CMakeLists.txt, ${PROJECT_NAME}
# is preferred for the same purpose.
#
# In order to load a library into your app from Java/Kotlin, you must call
# System.loadLibrary() and pass the name of the library defined here;
# for GameActivity/NativeActivity derived applications, the same library name must be
# used in the AndroidManifest.xml file.
add_library(${CMAKE_PROJECT_NAME} SHARED
# List C/C++ source files with relative paths to this CMakeLists.txt.
email.cpp)

# Specifies libraries CMake should link to your target library. You
# can link libraries from various origins, such as libraries defined in this
# build script, prebuilt third-party libraries, or Android system libraries.
target_link_libraries(${CMAKE_PROJECT_NAME}
# List libraries link to the target library
android
log)
10 changes: 10 additions & 0 deletions feature/email/src/main/cpp/email.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#include <jni.h>
#include <string>

extern "C" JNIEXPORT jstring JNICALL
Java_com_bitgoeul_email_NativeLib_stringFromJNI(
JNIEnv* env,
jobject /* this */) {
std::string hello = "Hello from C++";
return env->NewStringUTF(hello.c_str());
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
package com.bitgoeul.email

import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.material3.Surface
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp
import com.msg.design_system.component.icon.GoBackIcon
import com.msg.design_system.component.topbar.GoBackTopBar
import com.msg.design_system.theme.BitgoeulAndroidTheme
import com.msg.design_system.R

@Composable
fun EmailSendInformScreen(
modifier: Modifier = Modifier
) {
BitgoeulAndroidTheme { color, typography ->
Surface {
Column(
modifier = modifier
.background(color = color.WHITE)
.padding(horizontal = 28.dp)
.fillMaxSize()
) {
Spacer(modifier = modifier.height(20.dp))

GoBackTopBar(
icon = { GoBackIcon() },
text = stringResource(id = R.string.go_back)
) {
// TODO onBackClicked() 추가하기
}

Spacer(modifier = modifier.weight(1f))

Text(
modifier = modifier.align(Alignment.CenterHorizontally),
text = "s22055@gsm.hs.kr 로",
style = typography.labelMedium,
color = color.G2
)

Text(
modifier = modifier.align(Alignment.CenterHorizontally),
text = "확인 이메일 발송됨",
style = typography.titleMedium,
color = color.BLACK
)

Spacer(modifier = modifier.weight(1f))

}

}
}
}
87 changes: 87 additions & 0 deletions feature/email/src/main/java/com/bitgoeul/email/InputEmailScreen.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
package com.bitgoeul.email

import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.material3.Surface
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.msg.design_system.component.icon.GoBackIcon
import com.msg.design_system.component.topbar.GoBackTopBar
import com.msg.design_system.theme.BitgoeulAndroidTheme
import com.msg.design_system.R
import com.msg.design_system.component.button.BitgoeulButton
import com.msg.design_system.component.button.ButtonState
import com.msg.design_system.component.textfield.DefaultTextField

@Composable
fun InputEmailScreen(
modifier: Modifier = Modifier
) {
BitgoeulAndroidTheme { color, typography ->
Surface {
Column(
modifier = modifier
.background(color = color.WHITE)
.padding(horizontal = 28.dp)
.fillMaxSize()
) {
Spacer(modifier = modifier.height(20.dp))

GoBackTopBar(
icon = { GoBackIcon() },
text = stringResource(id = R.string.go_back)
) {
// TODO onBackClicked() 추가하기
}

Spacer(modifier = modifier.height(16.dp))

Text(
text = stringResource(id = R.string.find_password),
style = typography.titleLarge,
color = color.BLACK
)

Text(
text = stringResource(id = R.string.email_authentication_process),
style = typography.bodySmall,
color = color.G2
)

Spacer(modifier = modifier.height(32.dp))

DefaultTextField(
modifier = modifier.fillMaxWidth(),
onValueChange = { },
errorText = "",
isDisabled = false,
isError = false,
isLinked = false,
isReverseTrailingIcon = false,
onClickButton = {},
placeholder = stringResource(id = R.string.email)
)

Spacer(modifier = modifier.weight(1f))

BitgoeulButton(
text = "다음으로",
modifier = Modifier
.padding(bottom = 14.dp)
.fillMaxWidth()
.height(52.dp),
state = ButtonState.Disable,
onClick = {}
)
}
}
}
}
Loading

0 comments on commit bc0a2c4

Please sign in to comment.