diff --git a/front/capstone_front/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/front/capstone_front/android/app/src/main/res/mipmap-hdpi/ic_launcher.png index db77bb4b7b..cc6e33219d 100644 Binary files a/front/capstone_front/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and b/front/capstone_front/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/front/capstone_front/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/front/capstone_front/android/app/src/main/res/mipmap-mdpi/ic_launcher.png index 17987b79bb..6765be7ad2 100644 Binary files a/front/capstone_front/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and b/front/capstone_front/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/front/capstone_front/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/front/capstone_front/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png index 09d4391482..51d8332f76 100644 Binary files a/front/capstone_front/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and b/front/capstone_front/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/front/capstone_front/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/front/capstone_front/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png index d5f1c8d34e..a379f5916c 100644 Binary files a/front/capstone_front/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and b/front/capstone_front/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/front/capstone_front/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/front/capstone_front/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png index 4d6372eebd..77e05b900b 100644 Binary files a/front/capstone_front/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and b/front/capstone_front/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/front/capstone_front/assets/images/app_logo_icon.png b/front/capstone_front/assets/images/app_logo_icon.png new file mode 100644 index 0000000000..57a668b40d Binary files /dev/null and b/front/capstone_front/assets/images/app_logo_icon.png differ diff --git a/front/capstone_front/assets/translations/ko-KR.json b/front/capstone_front/assets/translations/ko-KR.json index 6fe40e09eb..96d6467f5c 100644 --- a/front/capstone_front/assets/translations/ko-KR.json +++ b/front/capstone_front/assets/translations/ko-KR.json @@ -13,20 +13,26 @@ "kmu_email": "국민대 이메일", "password": "비밀번호", "password_re": "비밀번호 재입력", + "weak_password": "비밀번호는 6자리 이상이어야 합니다", + "duplicated_email": "이미 사용된 아이디입니다", + "password_not_same": "비밀번호가 일치하지 않습니다", "country": "국가", "college": "단과대학", "department": "학부ㆍ학과", + "name": "이름", "student_number": "학번", + "enter_name": "이름, 학번을 입력해주세요", "enter_kmuemail": "국민대 이메일을 입력해주세요", "enter_password": "비밀번호를 입력해주세요", - "auth_email": "이메일 인증을 완료해주세요", "enter_college_department": "단과대학 및 학과를 입력해주세요", "enter_college": "단과대학을 골라주세요", "enter_department": "학부ㆍ학과를 골라주세요", "enter_country": "국가를 입력해주세요", "select_country": "국가를 골라주세요", + "auth_email": "인증 메일이 발송되었습니다", "detail_auth_email": "메일 내 인증 링크를 통해 인증을 완료해주세요\n메일이 보이지 않는다면 스펨메일함을 확인해주세요", - "complete_signup": "회원가입 완료" + "complete_signup": "회원가입 완료", + "ok": "확인" }, "mainScreen": { "home": "홈", diff --git a/front/capstone_front/flutter_launcher_icons.yaml b/front/capstone_front/flutter_launcher_icons.yaml new file mode 100644 index 0000000000..5a8035140f --- /dev/null +++ b/front/capstone_front/flutter_launcher_icons.yaml @@ -0,0 +1,5 @@ +flutter_icons: + ios: true + android: true + image_path: "assets/images/app_logo_icon.png" + remove_alpha_ios: true diff --git a/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json index d36b1fab2d..65b74d7ef1 100644 --- a/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json +++ b/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -1,122 +1 @@ -{ - "images" : [ - { - "size" : "20x20", - "idiom" : "iphone", - "filename" : "Icon-App-20x20@2x.png", - "scale" : "2x" - }, - { - "size" : "20x20", - "idiom" : "iphone", - "filename" : "Icon-App-20x20@3x.png", - "scale" : "3x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@1x.png", - "scale" : "1x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@2x.png", - "scale" : "2x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@3x.png", - "scale" : "3x" - }, - { - "size" : "40x40", - "idiom" : "iphone", - "filename" : "Icon-App-40x40@2x.png", - "scale" : "2x" - }, - { - "size" : "40x40", - "idiom" : "iphone", - "filename" : "Icon-App-40x40@3x.png", - "scale" : "3x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "Icon-App-60x60@2x.png", - "scale" : "2x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "Icon-App-60x60@3x.png", - "scale" : "3x" - }, - { - "size" : "20x20", - "idiom" : "ipad", - "filename" : "Icon-App-20x20@1x.png", - "scale" : "1x" - }, - { - "size" : "20x20", - "idiom" : "ipad", - "filename" : "Icon-App-20x20@2x.png", - "scale" : "2x" - }, - { - "size" : "29x29", - "idiom" : "ipad", - "filename" : "Icon-App-29x29@1x.png", - "scale" : "1x" - }, - { - "size" : "29x29", - "idiom" : "ipad", - "filename" : "Icon-App-29x29@2x.png", - "scale" : "2x" - }, - { - "size" : "40x40", - "idiom" : "ipad", - "filename" : "Icon-App-40x40@1x.png", - "scale" : "1x" - }, - { - "size" : "40x40", - "idiom" : "ipad", - "filename" : "Icon-App-40x40@2x.png", - "scale" : "2x" - }, - { - "size" : "76x76", - "idiom" : "ipad", - "filename" : "Icon-App-76x76@1x.png", - "scale" : "1x" - }, - { - "size" : "76x76", - "idiom" : "ipad", - "filename" : "Icon-App-76x76@2x.png", - "scale" : "2x" - }, - { - "size" : "83.5x83.5", - "idiom" : "ipad", - "filename" : "Icon-App-83.5x83.5@2x.png", - "scale" : "2x" - }, - { - "size" : "1024x1024", - "idiom" : "ios-marketing", - "filename" : "Icon-App-1024x1024@1x.png", - "scale" : "1x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} +{"images":[{"size":"60x60","expected-size":"180","filename":"180.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"40x40","expected-size":"80","filename":"80.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"40x40","expected-size":"120","filename":"120.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"60x60","expected-size":"120","filename":"120.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"57x57","expected-size":"57","filename":"57.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"1x"},{"size":"29x29","expected-size":"58","filename":"58.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"29x29","expected-size":"29","filename":"29.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"1x"},{"size":"29x29","expected-size":"87","filename":"87.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"57x57","expected-size":"114","filename":"114.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"20x20","expected-size":"40","filename":"40.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"20x20","expected-size":"60","filename":"60.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"1024x1024","filename":"1024.png","expected-size":"1024","idiom":"ios-marketing","folder":"Assets.xcassets/AppIcon.appiconset/","scale":"1x"},{"size":"40x40","expected-size":"80","filename":"80.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"72x72","expected-size":"72","filename":"72.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"76x76","expected-size":"152","filename":"152.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"50x50","expected-size":"100","filename":"100.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"29x29","expected-size":"58","filename":"58.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"76x76","expected-size":"76","filename":"76.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"29x29","expected-size":"29","filename":"29.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"50x50","expected-size":"50","filename":"50.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"72x72","expected-size":"144","filename":"144.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"40x40","expected-size":"40","filename":"40.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"83.5x83.5","expected-size":"167","filename":"167.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"20x20","expected-size":"20","filename":"20.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"20x20","expected-size":"40","filename":"40.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"}]} \ No newline at end of file diff --git a/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png deleted file mode 100644 index dc9ada4725..0000000000 Binary files a/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png and /dev/null differ diff --git a/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png deleted file mode 100644 index 7353c41ecf..0000000000 Binary files a/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png and /dev/null differ diff --git a/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png deleted file mode 100644 index 797d452e45..0000000000 Binary files a/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png and /dev/null differ diff --git a/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png deleted file mode 100644 index 6ed2d933e1..0000000000 Binary files a/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png and /dev/null differ diff --git a/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png deleted file mode 100644 index 4cd7b0099c..0000000000 Binary files a/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png and /dev/null differ diff --git a/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png deleted file mode 100644 index fe730945a0..0000000000 Binary files a/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png and /dev/null differ diff --git a/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png deleted file mode 100644 index 321773cd85..0000000000 Binary files a/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png and /dev/null differ diff --git a/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png deleted file mode 100644 index 797d452e45..0000000000 Binary files a/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png and /dev/null differ diff --git a/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png deleted file mode 100644 index 502f463a9b..0000000000 Binary files a/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png and /dev/null differ diff --git a/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png deleted file mode 100644 index 0ec3034392..0000000000 Binary files a/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png and /dev/null differ diff --git a/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png deleted file mode 100644 index 0ec3034392..0000000000 Binary files a/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png and /dev/null differ diff --git a/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png deleted file mode 100644 index e9f5fea27c..0000000000 Binary files a/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png and /dev/null differ diff --git a/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png deleted file mode 100644 index 84ac32ae7d..0000000000 Binary files a/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png and /dev/null differ diff --git a/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png deleted file mode 100644 index 8953cba090..0000000000 Binary files a/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png and /dev/null differ diff --git a/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png deleted file mode 100644 index 0467bf12aa..0000000000 Binary files a/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png and /dev/null differ diff --git a/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/100.png b/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/100.png new file mode 100644 index 0000000000..f4aa617fb4 Binary files /dev/null and b/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/100.png differ diff --git a/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/1024.png b/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/1024.png new file mode 100644 index 0000000000..94a5e5fc49 Binary files /dev/null and b/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/1024.png differ diff --git a/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/114.png b/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/114.png new file mode 100644 index 0000000000..3adfc86fc7 Binary files /dev/null and b/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/114.png differ diff --git a/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/120.png b/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/120.png new file mode 100644 index 0000000000..ce98eb078c Binary files /dev/null and b/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/120.png differ diff --git a/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/144.png b/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/144.png new file mode 100644 index 0000000000..a379f5916c Binary files /dev/null and b/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/144.png differ diff --git a/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/152.png b/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/152.png new file mode 100644 index 0000000000..b6f32f3adc Binary files /dev/null and b/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/152.png differ diff --git a/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/167.png b/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/167.png new file mode 100644 index 0000000000..676f70a4d2 Binary files /dev/null and b/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/167.png differ diff --git a/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/180.png b/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/180.png new file mode 100644 index 0000000000..c15a23775e Binary files /dev/null and b/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/180.png differ diff --git a/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/20.png b/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/20.png new file mode 100644 index 0000000000..ee7feba68a Binary files /dev/null and b/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/20.png differ diff --git a/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/29.png b/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/29.png new file mode 100644 index 0000000000..3a66bf948b Binary files /dev/null and b/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/29.png differ diff --git a/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/40.png b/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/40.png new file mode 100644 index 0000000000..6010a4ce4f Binary files /dev/null and b/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/40.png differ diff --git a/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/50.png b/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/50.png new file mode 100644 index 0000000000..cbd3a69439 Binary files /dev/null and b/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/50.png differ diff --git a/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/57.png b/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/57.png new file mode 100644 index 0000000000..2e4b7fb6ee Binary files /dev/null and b/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/57.png differ diff --git a/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/58.png b/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/58.png new file mode 100644 index 0000000000..e55c4a20b6 Binary files /dev/null and b/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/58.png differ diff --git a/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/60.png b/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/60.png new file mode 100644 index 0000000000..0d7322b86f Binary files /dev/null and b/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/60.png differ diff --git a/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/72.png b/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/72.png new file mode 100644 index 0000000000..cc6e33219d Binary files /dev/null and b/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/72.png differ diff --git a/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/76.png b/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/76.png new file mode 100644 index 0000000000..014a1c8b31 Binary files /dev/null and b/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/76.png differ diff --git a/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/80.png b/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/80.png new file mode 100644 index 0000000000..d16e299c14 Binary files /dev/null and b/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/80.png differ diff --git a/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/87.png b/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/87.png new file mode 100644 index 0000000000..58d1ca9d83 Binary files /dev/null and b/front/capstone_front/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/87.png differ diff --git a/front/capstone_front/lib/main.dart b/front/capstone_front/lib/main.dart index 928a87f356..945e426dc3 100644 --- a/front/capstone_front/lib/main.dart +++ b/front/capstone_front/lib/main.dart @@ -13,6 +13,7 @@ import 'package:capstone_front/screens/signup/signup_college_screen.dart'; import 'package:capstone_front/screens/signup/signup_country_screen.dart'; import 'package:capstone_front/screens/signup/signup_email_screen.dart'; import 'package:capstone_front/screens/signup/signup_email_auth_screen.dart'; +import 'package:capstone_front/screens/signup/signup_name.dart'; import 'package:capstone_front/screens/signup/signup_service.dart'; import 'package:capstone_front/screens/main_screen.dart'; import 'package:capstone_front/screens/notice/notice_screen.dart'; @@ -23,13 +24,14 @@ import 'package:capstone_front/screens/qna/qna_write/qna_write_screen.dart'; import 'package:capstone_front/screens/signup/singup_password_screen.dart'; import 'package:capstone_front/screens/speech_practice/speech_practice_screen.dart'; import 'package:capstone_front/screens/speech_practice/speech_screen.dart'; -import 'package:capstone_front/screens/speech_practice/speech_select_sentence_screen.dart'; +import 'package:capstone_front/screens/speech_practice/speech_example_sentences/speech_select_sentence_screen.dart'; import 'package:capstone_front/utils/page_animation.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:firebase_core/firebase_core.dart'; import 'package:flutter/material.dart'; import 'package:flutter_dotenv/flutter_dotenv.dart'; import 'package:flutter_secure_storage/flutter_secure_storage.dart'; +import 'package:fluttertoast/fluttertoast.dart'; import 'package:go_router/go_router.dart'; import 'package:provider/provider.dart'; @@ -138,18 +140,18 @@ final GoRouter router = GoRouter( GoRoute( name: 'signup', path: '/signup', - builder: (context, state) => const SignupEmailScreen(), + builder: (context, state) => const SignupNameScreen(), routes: [ + GoRoute( + name: 'email', + path: 'email', + builder: (context, state) => const SignupEmailScreen(), + ), GoRoute( name: 'password', path: 'password', builder: (context, state) => const SignupPasswordScreen(), ), - GoRoute( - name: 'emailAuth', - path: 'emailAuth', - builder: (context, state) => const SignupEmailAuthScreen(), - ), GoRoute( name: 'college', path: 'college', diff --git a/front/capstone_front/lib/models/api_fail_response.dart b/front/capstone_front/lib/models/api_fail_response.dart new file mode 100644 index 0000000000..050e65f268 --- /dev/null +++ b/front/capstone_front/lib/models/api_fail_response.dart @@ -0,0 +1,16 @@ +class ApiFailResponse { + final bool success; + final String message; + final String code; + + ApiFailResponse({ + required this.success, + required this.message, + required this.code, + }); + + ApiFailResponse.fromJson(Map json) + : success = json['success'] as bool, + message = json['message'] as String, + code = json['code'] as String; +} diff --git a/front/capstone_front/lib/models/api_response.dart b/front/capstone_front/lib/models/api_response.dart deleted file mode 100644 index d35147ec17..0000000000 --- a/front/capstone_front/lib/models/api_response.dart +++ /dev/null @@ -1,11 +0,0 @@ -class ApiResponse { - final String success; - final String? message; - final Map response; - - ApiResponse({ - required this.success, - required this.message, - required this.response, - }); -} diff --git a/front/capstone_front/lib/models/api_success_response.dart b/front/capstone_front/lib/models/api_success_response.dart new file mode 100644 index 0000000000..125b8fbfdd --- /dev/null +++ b/front/capstone_front/lib/models/api_success_response.dart @@ -0,0 +1,16 @@ +class ApiSuccessResponse { + final bool success; + final String message; + final Map response; + + ApiSuccessResponse({ + required this.success, + required this.message, + required this.response, + }); + + ApiSuccessResponse.fromJson(Map json) + : success = json['success'] as bool, + message = json['message'] as String, + response = json['response']; +} diff --git a/front/capstone_front/lib/screens/chatbot/chatbot.dart b/front/capstone_front/lib/screens/chatbot/chatbot.dart index 0288449950..303ad142c5 100644 --- a/front/capstone_front/lib/screens/chatbot/chatbot.dart +++ b/front/capstone_front/lib/screens/chatbot/chatbot.dart @@ -37,16 +37,9 @@ class _ChatbotScreenState extends State { return Scaffold( resizeToAvoidBottomInset: true, appBar: AppBar( - iconTheme: const IconThemeData( - color: Colors.white, - ), - backgroundColor: Theme.of(context).primaryColor, + scrolledUnderElevation: 0, title: Text( tr('chatbotScreen.chatbot'), - style: const TextStyle( - color: Colors.white, - fontWeight: FontWeight.bold, - ), ), ), body: Column( @@ -77,8 +70,10 @@ class _ChatbotScreenState extends State { painter: BubblePainter(), child: Padding( padding: const EdgeInsets.all(10.0), - child: - Text(_messages[_messages.length - 1 - index]), + child: Text( + _messages[_messages.length - 1 - index], + style: const TextStyle(color: Colors.white), + ), ), ), ), @@ -87,12 +82,12 @@ class _ChatbotScreenState extends State { ), ), ), - const Divider( - height: 0.0, - color: Colors.white, - ), + // const Divider( + // height: 0.0, + // color: Colors.white, + // ), Padding( - padding: const EdgeInsets.all(10.0), + padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 10), child: Container( decoration: BoxDecoration( color: const Color(0xFFDFE7EE), diff --git a/front/capstone_front/lib/screens/helper/helper_board/helper_board_screen.dart b/front/capstone_front/lib/screens/helper/helper_board/helper_board_screen.dart index 9ca020e7dd..a3cb42fabb 100644 --- a/front/capstone_front/lib/screens/helper/helper_board/helper_board_screen.dart +++ b/front/capstone_front/lib/screens/helper/helper_board/helper_board_screen.dart @@ -20,41 +20,36 @@ class _HelperBoardState extends State { tr('helper.need_helpee'), ]; int _selectedHelperIndex = 0; - final int _selectedPageIndex = 0; @override Widget build(BuildContext context) { return Scaffold( body: Stack( children: [ - Column( - children: [ - Container( - height: 5, - color: Colors.white, - ), - selectWritingType(context), - Container( - color: Colors.white, - height: 10, - ), - // Container( - // height: 1, - // decoration: const BoxDecoration( - // color: Color(0xffd2d7dd), - // ), - // ), - Expanded( - child: ListView.builder( - itemBuilder: (BuildContext context, int index) { - return HelperWritingCard( - index: index, - ); - }, - itemCount: helperWriting.length, + Padding( + padding: const EdgeInsets.symmetric(horizontal: 15.0), + child: Column( + children: [ + selectWritingType(context), + Container( + color: Colors.white, + height: 10, ), - ), - ], + Expanded( + child: ListView.builder( + itemBuilder: (BuildContext context, int index) { + return Padding( + padding: const EdgeInsets.only(bottom: 10), + child: HelperWritingCard( + index: index, + ), + ); + }, + itemCount: helperWriting.length, + ), + ), + ], + ), ), Positioned( bottom: 20, @@ -114,7 +109,7 @@ class _HelperBoardState extends State { scrollDirection: Axis.horizontal, itemBuilder: (context, index) { return Padding( - padding: EdgeInsets.only(left: index == 0 ? 20 : 10), + padding: EdgeInsets.only(left: index == 0 ? 0 : 10), child: GestureDetector( onTap: () { setState(() { @@ -123,18 +118,21 @@ class _HelperBoardState extends State { }, child: Container( padding: const EdgeInsets.symmetric( - horizontal: 15, + horizontal: 10, ), decoration: BoxDecoration( - color: _selectedHelperIndex == index - ? const Color(0xb4000000) - : Colors.white, - borderRadius: BorderRadius.circular(16), - border: _selectedHelperIndex == index - ? Border.all(color: const Color(0x00000000)) - : Border.all( - color: const Color(0xffE4E7EB), - )), + color: _selectedHelperIndex == index + ? const Color(0xb4000000) + : Colors.white, + borderRadius: BorderRadius.circular(16), + border: _selectedHelperIndex == index + ? Border.all( + color: const Color(0x00000000), + width: 1.5, + ) + : Border.all( + color: const Color(0xffE4E7EB), width: 1.5), + ), child: Align( alignment: Alignment.center, child: Text( diff --git a/front/capstone_front/lib/screens/helper/helper_board/helper_writing_card.dart b/front/capstone_front/lib/screens/helper/helper_board/helper_writing_card.dart index 1b360cf7d0..18a8a3ebc9 100644 --- a/front/capstone_front/lib/screens/helper/helper_board/helper_writing_card.dart +++ b/front/capstone_front/lib/screens/helper/helper_board/helper_writing_card.dart @@ -16,54 +16,44 @@ class HelperWritingCard extends StatefulWidget { class _HelperWritingCardState extends State { @override Widget build(BuildContext context) { - return Column( - children: [ - Padding( - padding: const EdgeInsets.symmetric(horizontal: 10), - child: Container( - decoration: const BoxDecoration( - border: Border( - top: BorderSide( - color: Color(0xffd2d7dd), - width: 1, - ), - ), - ), + return InkWell( + onTap: () { + context.push('/helper/writing', extra: widget.index); + }, + child: Container( + width: double.infinity, + padding: const EdgeInsets.all(10), + decoration: BoxDecoration( + border: Border.all( + color: const Color(0xffd2d7dd), + width: 1.5, ), + borderRadius: BorderRadius.circular(16), ), - InkWell( - onTap: () { - context.push('/helper/writing', extra: widget.index); - }, - child: Container( - width: double.infinity, - padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 10), - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - helperWriting[widget.index][0], - style: Theme.of(context).textTheme.titleMedium, - overflow: TextOverflow.ellipsis, - maxLines: 1, - ), - Text( - '${helperWriting[widget.index][1]} | ${helperWriting[widget.index][2]}', - style: const TextStyle( - fontFamily: 'pretendard', - fontSize: 14, - fontWeight: FontWeight.w400, - color: Color(0xff868e96), - ), - overflow: TextOverflow.ellipsis, - maxLines: 1, - ), - ], + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + helperWriting[widget.index][0], + style: Theme.of(context).textTheme.titleMedium, + overflow: TextOverflow.ellipsis, + maxLines: 1, ), - ), + Text( + '${helperWriting[widget.index][1]} | ${helperWriting[widget.index][2]}', + style: const TextStyle( + fontFamily: 'pretendard', + fontSize: 14, + fontWeight: FontWeight.w400, + color: Color(0xff868e96), + ), + overflow: TextOverflow.ellipsis, + maxLines: 1, + ), + ], ), - ], + ), ); } } diff --git a/front/capstone_front/lib/screens/helper/helper_chatting/helper_chatting_card.dart b/front/capstone_front/lib/screens/helper/helper_chatting/helper_chatting_card.dart index 325ccc88c6..13fe85be80 100644 --- a/front/capstone_front/lib/screens/helper/helper_chatting/helper_chatting_card.dart +++ b/front/capstone_front/lib/screens/helper/helper_chatting/helper_chatting_card.dart @@ -22,7 +22,14 @@ class _HelperChattingCardState extends State { onTap: () {}, child: Container( width: double.infinity, - padding: const EdgeInsets.symmetric(vertical: 10, horizontal: 20), + padding: const EdgeInsets.symmetric(vertical: 15), + decoration: const BoxDecoration( + // border: Border( + // bottom: BorderSide( + // color: Color(0xffd2d7dd), + // ), + // ), + ), child: Row( children: [ SizedBox( @@ -33,7 +40,7 @@ class _HelperChattingCardState extends State { child: Image.asset('assets/images/carrot_profile.png'), ), ), - const SizedBox(width: 20), + const SizedBox(width: 15), Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ diff --git a/front/capstone_front/lib/screens/helper/helper_chatting/helper_chatting_screen.dart b/front/capstone_front/lib/screens/helper/helper_chatting/helper_chatting_screen.dart index 93ab509a54..5bcfc96e9f 100644 --- a/front/capstone_front/lib/screens/helper/helper_chatting/helper_chatting_screen.dart +++ b/front/capstone_front/lib/screens/helper/helper_chatting/helper_chatting_screen.dart @@ -16,8 +16,11 @@ class _HelperChattingScreenState extends State { return Scaffold( body: ListView.builder( itemBuilder: (BuildContext context, int index) { - return HelperChattingCard( - index: index, + return Padding( + padding: const EdgeInsets.symmetric(horizontal: 15), + child: HelperChattingCard( + index: index, + ), ); }, itemCount: helperChatting.length, diff --git a/front/capstone_front/lib/screens/home/home_screen.dart b/front/capstone_front/lib/screens/home/home_screen.dart index 53da3f362f..fccd712527 100644 --- a/front/capstone_front/lib/screens/home/home_screen.dart +++ b/front/capstone_front/lib/screens/home/home_screen.dart @@ -59,7 +59,7 @@ class _HomeScreenState extends State { color: Theme.of(context).colorScheme.primary, ), Padding( - padding: const EdgeInsets.symmetric(horizontal: 20), + padding: const EdgeInsets.symmetric(horizontal: 15), child: Transform.translate( offset: const Offset(0, -80), child: Column( @@ -79,7 +79,7 @@ class _HomeScreenState extends State { ), ], ), - SizedBox(height: 20), + SizedBox(height: 15), Text("소프트웨어융합대학 소프트웨어학부"), Text( "20191557", @@ -89,7 +89,7 @@ class _HomeScreenState extends State { ], ), ), - const SizedBox(height: 20), + const SizedBox(height: 15), WhiteBox( content: Column( crossAxisAlignment: CrossAxisAlignment.start, @@ -161,7 +161,7 @@ class _HomeScreenState extends State { ), ), const SizedBox( - height: 20, + height: 15, ), WhiteBox( content: Column( @@ -355,7 +355,7 @@ class _HomeScreenState extends State { children: [ Text(tr('mainScreen.language_setting')), const SizedBox( - height: 20, + height: 15, ), Row( children: [ diff --git a/front/capstone_front/lib/screens/login/login_screen.dart b/front/capstone_front/lib/screens/login/login_screen.dart index ff32df4bcb..07d79f34cb 100644 --- a/front/capstone_front/lib/screens/login/login_screen.dart +++ b/front/capstone_front/lib/screens/login/login_screen.dart @@ -1,3 +1,4 @@ +import 'package:capstone_front/services/auth_service.dart'; import 'package:capstone_front/services/login_service.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:firebase_auth/firebase_auth.dart'; @@ -58,12 +59,20 @@ class _LoginScreenState extends State { '${_userInfo[0]}@kookmin.ac.kr', _userInfo[1]); switch (result) { case "success": - makeToast("로그인에 성공하였습니다"); await storage.write(key: 'isLogin', value: 'true'); await storage.write( key: 'userEmail', value: '${_userInfo[0]}@kookmin.ac.kr'); - context.go('/'); + var uuid = await storage.read(key: 'uuid'); + var isLogined = await AuthService.signIn({ + "uuid": uuid, + "email": '${_userInfo[0]}@kookmin.ac.kr', + }); + if (isLogined) { + makeToast("로그인에 성공하였습니다"); + context.go('/'); + } + case "email": makeToast("이메일이 인증되지 않았습니다"); case "invalid-credential": diff --git a/front/capstone_front/lib/screens/main_screen.dart b/front/capstone_front/lib/screens/main_screen.dart index ca28db64f1..7c6bfa7e93 100644 --- a/front/capstone_front/lib/screens/main_screen.dart +++ b/front/capstone_front/lib/screens/main_screen.dart @@ -5,6 +5,8 @@ import 'package:capstone_front/screens/qna/qna_list_screen/qna_list_screen.dart' import 'package:capstone_front/screens/speech_practice/speech_screen.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:fluttertoast/fluttertoast.dart'; class MainScreen extends StatefulWidget { const MainScreen({super.key}); @@ -23,6 +25,8 @@ class _MainScreenState extends State { ]; int selectedPageIndex = 2; @override + DateTime? backButtonPressedTime; + @override Widget build(BuildContext context) { return Scaffold( body: screenList.elementAt(selectedPageIndex), @@ -68,4 +72,20 @@ class _MainScreenState extends State { ), ); } + + // void _goBack(BuildContext context) async { + // DateTime currentTime = DateTime.now(); + + // if (backButtonPressedTime == null || + // currentTime.difference(backButtonPressedTime!) > + // const Duration(seconds: 2)) { + // backButtonPressedTime = currentTime; + // Fluttertoast.showToast( + // msg: "뒤로가기 버튼을 한번 더 누르면 종료됩니다.", + // gravity: ToastGravity.BOTTOM, + // ); + // } else { + // SystemNavigator.pop(); + // } + // } } diff --git a/front/capstone_front/lib/screens/signup/signup_college_screen.dart b/front/capstone_front/lib/screens/signup/signup_college_screen.dart index 037a802069..13186986dd 100644 --- a/front/capstone_front/lib/screens/signup/signup_college_screen.dart +++ b/front/capstone_front/lib/screens/signup/signup_college_screen.dart @@ -1,6 +1,5 @@ import 'package:capstone_front/screens/signup/college_department.dart'; import 'package:capstone_front/screens/signup/signup_service.dart'; -import 'package:capstone_front/screens/signup/signup_util.dart'; import 'package:capstone_front/utils/basic_button.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; @@ -50,7 +49,6 @@ class _SignupCollegeScreenState extends State { fontWeight: FontWeight.w600, ), ), - const SizedBox(height: 5), Row( children: [ Expanded( @@ -88,7 +86,10 @@ class _SignupCollegeScreenState extends State { }); }, child: Ink( - child: Text(_college), + child: Padding( + padding: const EdgeInsets.symmetric(vertical: 10.0), + child: Text(_college), + ), ), ), ), @@ -102,7 +103,6 @@ class _SignupCollegeScreenState extends State { fontWeight: FontWeight.w600, ), ), - const SizedBox(height: 5), Row( children: [ Expanded( @@ -136,7 +136,10 @@ class _SignupCollegeScreenState extends State { }); }, child: Ink( - child: Text(_department), + child: Padding( + padding: const EdgeInsets.symmetric(vertical: 10.0), + child: Text(_department), + ), ), ), ), diff --git a/front/capstone_front/lib/screens/signup/signup_country_screen.dart b/front/capstone_front/lib/screens/signup/signup_country_screen.dart index b41eb5e226..070dacdba5 100644 --- a/front/capstone_front/lib/screens/signup/signup_country_screen.dart +++ b/front/capstone_front/lib/screens/signup/signup_country_screen.dart @@ -102,24 +102,25 @@ class _SignupCountryScreenState extends State { const SizedBox(height: 5), const Spacer(), BasicButton( - text: tr('signup.complete_signup'), + text: tr('signup.next'), onPressed: () async { if (_country != tr('signup.select_country')) { userInfo['country'] = _country; - print(userInfo['id']); - print(userInfo['pw']); - print(userInfo['college']); - print(userInfo['department']); - print(userInfo['country']); + context.push('/signup/email'); + // print(userInfo['id']); + // print(userInfo['pw']); + // print(userInfo['college']); + // print(userInfo['department']); + // print(userInfo['country']); - String result = await signup(); - switch (result) { - case "success": - context.go('/login'); - makeToast("회원가입에 성공하였습니다"); - default: - makeToast("에러: $result"); - } + // String result = await signup(); + // switch (result) { + // case "success": + // context.go('/login'); + // makeToast("회원가입에 성공하였습니다"); + // default: + // makeToast("에러: $result"); + // } } }, ), diff --git a/front/capstone_front/lib/screens/signup/signup_email_auth_screen.dart b/front/capstone_front/lib/screens/signup/signup_email_auth_screen.dart index 033b5f6963..df8ed3eb06 100644 --- a/front/capstone_front/lib/screens/signup/signup_email_auth_screen.dart +++ b/front/capstone_front/lib/screens/signup/signup_email_auth_screen.dart @@ -1,57 +1,57 @@ -import 'package:capstone_front/screens/signup/signup_service.dart'; -import 'package:capstone_front/screens/signup/signup_util.dart'; -import 'package:capstone_front/utils/basic_button.dart'; -import 'package:easy_localization/easy_localization.dart'; -import 'package:flutter/material.dart'; -import 'package:go_router/go_router.dart'; +// import 'package:capstone_front/screens/signup/signup_service.dart'; +// import 'package:capstone_front/screens/signup/signup_util.dart'; +// import 'package:capstone_front/utils/basic_button.dart'; +// import 'package:easy_localization/easy_localization.dart'; +// import 'package:flutter/material.dart'; +// import 'package:go_router/go_router.dart'; -class SignupEmailAuthScreen extends StatefulWidget { - const SignupEmailAuthScreen({super.key}); +// class SignupEmailAuthScreen extends StatefulWidget { +// const SignupEmailAuthScreen({super.key}); - @override - State createState() => _SignupEmailAuthScreenState(); -} +// @override +// State createState() => _SignupEmailAuthScreenState(); +// } -class _SignupEmailAuthScreenState extends State { - @override - Widget build(BuildContext context) { - return Scaffold( - appBar: AppBar( - automaticallyImplyLeading: false, - ), - body: Padding( - padding: const EdgeInsets.symmetric(horizontal: 20.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - tr('signup.auth_email'), - style: const TextStyle( - fontSize: 24, - fontWeight: FontWeight.w600, - ), - ), - const SizedBox(height: 10), - Text('${tr('signup.kmu_email')}: ${userInfo['id']}@kookmin.ac.kr'), - const SizedBox(height: 10), - Text(tr('signup.detail_auth_email')), - const Spacer(), - BasicButton( - text: tr('signup.next'), - onPressed: () async { - String result = await isEmailAuth( - '${userInfo['id']}@kookmin.ac.kr', userInfo['pw']!); - print(result); - if (result == "success") { - context.push('/signup/college'); - } else { - makeToast("이메일이 인증되지 않았습니다"); - } - }), - const SizedBox(height: 20), - ], - ), - ), - ); - } -} +// class _SignupEmailAuthScreenState extends State { +// @override +// Widget build(BuildContext context) { +// return Scaffold( +// appBar: AppBar( +// automaticallyImplyLeading: false, +// ), +// body: Padding( +// padding: const EdgeInsets.symmetric(horizontal: 20.0), +// child: Column( +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// Text( +// tr('signup.auth_email'), +// style: const TextStyle( +// fontSize: 24, +// fontWeight: FontWeight.w600, +// ), +// ), +// const SizedBox(height: 10), +// Text('${tr('signup.kmu_email')}: ${userInfo['id']}@kookmin.ac.kr'), +// const SizedBox(height: 10), +// Text(tr('signup.detail_auth_email')), +// const Spacer(), +// BasicButton( +// text: tr('signup.next'), +// onPressed: () async { +// String result = await isEmailAuth( +// '${userInfo['id']}@kookmin.ac.kr', userInfo['pw']!); +// print(result); +// if (result == "success") { +// context.push('/signup/college'); +// } else { +// makeToast("이메일이 인증되지 않았습니다"); +// } +// }), +// const SizedBox(height: 20), +// ], +// ), +// ), +// ); +// } +// } diff --git a/front/capstone_front/lib/screens/signup/signup_name.dart b/front/capstone_front/lib/screens/signup/signup_name.dart new file mode 100644 index 0000000000..f810b6df1b --- /dev/null +++ b/front/capstone_front/lib/screens/signup/signup_name.dart @@ -0,0 +1,61 @@ +import 'package:capstone_front/screens/signup/signup_service.dart'; +import 'package:capstone_front/screens/signup/signup_util.dart'; +import 'package:capstone_front/utils/basic_button.dart'; +import 'package:easy_localization/easy_localization.dart'; +import 'package:flutter/material.dart'; +import 'package:go_router/go_router.dart'; + +class SignupNameScreen extends StatefulWidget { + const SignupNameScreen({super.key}); + + @override + State createState() => _SignupNameScreenState(); +} + +class _SignupNameScreenState extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + automaticallyImplyLeading: false, + ), + body: Padding( + padding: const EdgeInsets.symmetric(horizontal: 20.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + tr('signup.enter_name'), + style: const TextStyle( + fontSize: 24, + fontWeight: FontWeight.w600, + ), + ), + const SizedBox(height: 10), + SignupTextField( + context: context, + label: tr('signup.name'), + info: 'name', + isObscure: false, + userInfo: userInfo), + SignupTextField( + context: context, + label: tr('signup.student_number'), + info: 'studentNum', + isObscure: false, + userInfo: userInfo), + const Spacer(), + BasicButton( + text: tr('signup.next'), + onPressed: () { + if (userInfo['name'] != '' && userInfo['studentNum'] != '') { + context.push('/signup/college'); + } + }), + const SizedBox(height: 20), + ], + ), + ), + ); + } +} diff --git a/front/capstone_front/lib/screens/signup/signup_service.dart b/front/capstone_front/lib/screens/signup/signup_service.dart index c14944484b..f30e0f09f9 100644 --- a/front/capstone_front/lib/screens/signup/signup_service.dart +++ b/front/capstone_front/lib/screens/signup/signup_service.dart @@ -1,5 +1,7 @@ +import 'dart:convert'; import 'dart:ui'; +import 'package:capstone_front/models/api_success_response.dart'; import 'package:capstone_front/screens/signup/college_department.dart'; import 'package:capstone_front/screens/signup/signup_email_screen.dart'; import 'package:capstone_front/screens/signup/signup_util.dart'; @@ -14,10 +16,14 @@ import 'package:fluttertoast/fluttertoast.dart'; import 'package:go_router/go_router.dart'; import 'package:provider/provider.dart'; +late UserCredential credential; + Map userInfo = { + 'uuid': '', 'id': '', 'pw': '', 'pwRe': '', + 'name': '', 'studentNum': '', 'college': '', 'department': '', @@ -26,66 +32,52 @@ Map userInfo = { int selectedPageIndex = 0; Future signup() async { - try { - // UserCredential credential = - // await FirebaseAuth.instance.createUserWithEmailAndPassword( - // email: '${userInfo['id']}@kookmin.ac.kr', - // password: userInfo['pw']!, - // ); - // await credential.user!.sendEmailVerification(); - - // TODO 우리 서버에 signup 요청 여기서 - // signupInfo 에는 실제 유저에게 입력받은 정보가 들어가야함 - - // final Map signupInfo = { - // // "uuid": credential.user!.uid, - // "uuid": 'messi', - // "email": 'jihunchoi@kookmin.ac.kr', - // "name": 'jihun', - // "country": 'korea', - // "phoneNumber": '010-8276-8291', - // "major": "sw", - // }; - // var response = AuthService.signUp(signupInfo); - - // response의 결과에 따라 성공, 실패, 이유 띄워야함 + Map userData = { + 'uuid': userInfo['uuid'], + 'email': "${userInfo['id']}@kookmin.ac.kr", + 'name': userInfo['name'], + 'country': userInfo['country'], + 'phoneNumber': '010-8276-8291', + 'major': userInfo['department'], + }; + var isSucceed = await AuthService.signUp(userData); + if (isSucceed) { return 'success'; - } on FirebaseAuthException catch (e) { - return e.code; - } catch (e) { - return e.toString(); } + throw Exception('there is something problem while signup'); } -Future sendEmailAuth(String email, String pw) async { +Future sendEmailAuth(String email, String pw) async { + FlutterSecureStorage storage = const FlutterSecureStorage(); + try { - UserCredential credential = - await FirebaseAuth.instance.createUserWithEmailAndPassword( + credential = await FirebaseAuth.instance.createUserWithEmailAndPassword( email: '${userInfo['id']}@kookmin.ac.kr', password: userInfo['pw']!, ); - await credential.user!.sendEmailVerification(); - User? user = credential.user; - await user!.reload(); - user = FirebaseAuth.instance.currentUser; + userInfo['uuid'] = credential.user!.uid; + await storage.write(key: 'uuid', value: credential.user!.uid); + await credential.user?.sendEmailVerification(); + + return "success"; } on FirebaseAuthException catch (e) { - print(e.code); + return e.code; } } Future isEmailAuth(String email, String pw) async { + FlutterSecureStorage storage = const FlutterSecureStorage(); try { - UserCredential credential = await FirebaseAuth.instance - .signInWithEmailAndPassword(email: email, password: pw); - User? user = credential.user; await user!.reload(); user = FirebaseAuth.instance.currentUser; if (user!.emailVerified) { user = credential.user; + userInfo['uuid'] = user!.uid; + await storage.write(key: 'uuid', value: user.uid); return "success"; } else { return "email"; diff --git a/front/capstone_front/lib/screens/signup/singup_password_screen.dart b/front/capstone_front/lib/screens/signup/singup_password_screen.dart index 1fd21b5d5a..1b7cdf81b4 100644 --- a/front/capstone_front/lib/screens/signup/singup_password_screen.dart +++ b/front/capstone_front/lib/screens/signup/singup_password_screen.dart @@ -48,11 +48,38 @@ class _SignupPasswordScreenState extends State { BasicButton( text: tr('signup.next'), onPressed: () async { - // Todo: 비밀번호 조건 적용 필요(6자 이상 등) - if (userInfo['pw'] != '' && - userInfo['pw'] == userInfo['pwRe']) { - await sendEmailAuth(userInfo['id']!, userInfo['pw']!); - context.push('/signup/emailAuth'); + if (userInfo['pw'] != userInfo['pwRe']) { + makeToast(tr('signup.password_not_same')); + } else if (userInfo['pw'] != '') { + // 파이어베이스에 계정 생성을 시도하면서 인증 메일 전송 + String result = + await sendEmailAuth(userInfo['id']!, userInfo['pw']!); + // 파이어베이스에 계정 생성 완료, 인증 메일 전송 완료 + if (result == "success") { + // 우리 서버로 회원가입 요청 + await signup(); + + showDialog( + context: context, + builder: (BuildContext context) => AlertDialog( + title: Text(tr('signup.auth_email')), + content: Text(tr('signup.detail_auth_email')), + actions: [ + ElevatedButton( + onPressed: () => context.go('/login'), + child: Text(tr('signup.ok'))), + ], + ), + ); + } + // 파이어베이스에 계정 생성 실패 + else { + if (result == "weak-password") { + makeToast(tr('signup.weak_password')); + } else if (result == "email-already-in-use") { + makeToast(tr('signup.duplicated_email')); + } + } } }), const SizedBox(height: 20), diff --git a/front/capstone_front/lib/screens/speech_practice/speech_custom_sentence.dart b/front/capstone_front/lib/screens/speech_practice/speech_custom_sentence/speech_custom_sentence.dart similarity index 95% rename from front/capstone_front/lib/screens/speech_practice/speech_custom_sentence.dart rename to front/capstone_front/lib/screens/speech_practice/speech_custom_sentence/speech_custom_sentence.dart index e8ff27a38b..ff99079126 100644 --- a/front/capstone_front/lib/screens/speech_practice/speech_custom_sentence.dart +++ b/front/capstone_front/lib/screens/speech_practice/speech_custom_sentence/speech_custom_sentence.dart @@ -22,7 +22,7 @@ class _SpeechCustomSentenceScreenState }, child: Scaffold( body: Padding( - padding: const EdgeInsets.symmetric(horizontal: 20), + padding: const EdgeInsets.symmetric(horizontal: 15), child: Column( children: [ Container( @@ -58,7 +58,7 @@ class _SpeechCustomSentenceScreenState context.push('/speech/practice', extra: [_textController.text, '']); }), - const SizedBox(height: 20), + const SizedBox(height: 15), ], ), ), diff --git a/front/capstone_front/lib/screens/speech_practice/speech_practice_card.dart b/front/capstone_front/lib/screens/speech_practice/speech_custom_sentence/speech_practice_card.dart similarity index 98% rename from front/capstone_front/lib/screens/speech_practice/speech_practice_card.dart rename to front/capstone_front/lib/screens/speech_practice/speech_custom_sentence/speech_practice_card.dart index f10df79286..560dd34b81 100644 --- a/front/capstone_front/lib/screens/speech_practice/speech_practice_card.dart +++ b/front/capstone_front/lib/screens/speech_practice/speech_custom_sentence/speech_practice_card.dart @@ -32,7 +32,7 @@ class _SpeechPracitceCardState extends State { borderRadius: BorderRadius.circular(16), border: Border.all( color: const Color(0xffd2d7dd), - width: 2, + width: 1.5, ), ), child: Padding( diff --git a/front/capstone_front/lib/screens/speech_practice/speech_select_sentence_screen.dart b/front/capstone_front/lib/screens/speech_practice/speech_example_sentences/speech_select_sentence_screen.dart similarity index 84% rename from front/capstone_front/lib/screens/speech_practice/speech_select_sentence_screen.dart rename to front/capstone_front/lib/screens/speech_practice/speech_example_sentences/speech_select_sentence_screen.dart index 5bb1c2ee04..4bade1e913 100644 --- a/front/capstone_front/lib/screens/speech_practice/speech_select_sentence_screen.dart +++ b/front/capstone_front/lib/screens/speech_practice/speech_example_sentences/speech_select_sentence_screen.dart @@ -1,4 +1,4 @@ -import 'package:capstone_front/screens/speech_practice/speech_sentence_card.dart'; +import 'package:capstone_front/screens/speech_practice/speech_example_sentences/speech_sentence_card.dart'; import 'package:capstone_front/screens/speech_practice/utils/example_sentences.dart'; import 'package:flutter/material.dart'; @@ -14,7 +14,7 @@ class _SpeechSentenceScreenState extends State { Widget build(BuildContext context) { return Scaffold( body: Padding( - padding: const EdgeInsets.symmetric(horizontal: 20), + padding: const EdgeInsets.symmetric(horizontal: 15), child: ListView.builder( itemBuilder: (BuildContext context, int index) { return Padding( diff --git a/front/capstone_front/lib/screens/speech_practice/speech_sentence_card.dart b/front/capstone_front/lib/screens/speech_practice/speech_example_sentences/speech_sentence_card.dart similarity index 99% rename from front/capstone_front/lib/screens/speech_practice/speech_sentence_card.dart rename to front/capstone_front/lib/screens/speech_practice/speech_example_sentences/speech_sentence_card.dart index fec2f68289..0c5e71a9a4 100644 --- a/front/capstone_front/lib/screens/speech_practice/speech_sentence_card.dart +++ b/front/capstone_front/lib/screens/speech_practice/speech_example_sentences/speech_sentence_card.dart @@ -46,7 +46,7 @@ class _SpeechSentenceCardState extends State { borderRadius: BorderRadius.circular(16), border: Border.all( color: const Color(0xffd2d7dd), - width: 2, + width: 1.5, ), ), child: Padding( diff --git a/front/capstone_front/lib/screens/speech_practice/speech_practice_screen.dart b/front/capstone_front/lib/screens/speech_practice/speech_practice_screen.dart index 4d69b8640e..c4d577ac97 100644 --- a/front/capstone_front/lib/screens/speech_practice/speech_practice_screen.dart +++ b/front/capstone_front/lib/screens/speech_practice/speech_practice_screen.dart @@ -1,4 +1,4 @@ -import 'package:capstone_front/screens/speech_practice/speech_practice_card.dart'; +import 'package:capstone_front/screens/speech_practice/speech_custom_sentence/speech_practice_card.dart'; import 'package:capstone_front/screens/speech_practice/utils/example_sentences.dart'; import 'package:capstone_front/screens/speech_practice/utils/simple_recorder.dart'; import 'package:easy_localization/easy_localization.dart'; @@ -32,7 +32,7 @@ class _SpeechScreenState extends State { child: Column( children: [ Padding( - padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 10), + padding: const EdgeInsets.symmetric(horizontal: 15, vertical: 10), child: SpeechPracticeCard( sentence1: sentenceList[0], sentence2: sentenceList[1], @@ -51,7 +51,8 @@ class _SpeechScreenState extends State { borderRadius: BorderRadius.circular(25), ), child: Padding( - padding: const EdgeInsets.all(30.0), + padding: const EdgeInsets.symmetric( + vertical: 30.0, horizontal: 20), child: Column( children: [ dividerWithText(" 정확도 총점 "), diff --git a/front/capstone_front/lib/screens/speech_practice/speech_screen.dart b/front/capstone_front/lib/screens/speech_practice/speech_screen.dart index 0680f1a162..e0a8d63ecb 100644 --- a/front/capstone_front/lib/screens/speech_practice/speech_screen.dart +++ b/front/capstone_front/lib/screens/speech_practice/speech_screen.dart @@ -1,5 +1,5 @@ -import 'package:capstone_front/screens/speech_practice/speech_custom_sentence.dart'; -import 'package:capstone_front/screens/speech_practice/speech_select_sentence_screen.dart'; +import 'package:capstone_front/screens/speech_practice/speech_custom_sentence/speech_custom_sentence.dart'; +import 'package:capstone_front/screens/speech_practice/speech_example_sentences/speech_select_sentence_screen.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; diff --git a/front/capstone_front/lib/services/auth_service.dart b/front/capstone_front/lib/services/auth_service.dart index b2636dabd5..2eaaa982b7 100644 --- a/front/capstone_front/lib/services/auth_service.dart +++ b/front/capstone_front/lib/services/auth_service.dart @@ -1,6 +1,9 @@ import 'dart:convert'; +import 'package:capstone_front/models/api_fail_response.dart'; +import 'package:capstone_front/models/api_success_response.dart'; import 'package:flutter_dotenv/flutter_dotenv.dart'; +import 'package:flutter_secure_storage/flutter_secure_storage.dart'; import 'package:http/http.dart' as http; import 'package:crypto/crypto.dart'; @@ -8,21 +11,10 @@ class AuthService { static String baseUrl = dotenv.get('BASE_URL'); static final List key = base64Decode(dotenv.get('HMAC_SECRET')); - static Future> signUp( - Map userInfo) async { + static Future signUp(Map userInfo) async { var hmacSha256 = Hmac(sha256, key); final url = Uri.parse('$baseUrl/user/signup'); - var dummy = { - "uuid": "string", - "email": "aㅁqazzaamclub4@kookmin.ac.kr", - "name": "string", - "country": "string", - "phoneNumber": "010-8276-8291", - "major": "string" - }; - - // var json = jsonEncode(dummy); var json = jsonEncode(userInfo); var bytes = utf8.encode(json); var digest = hmacSha256.convert(bytes); @@ -37,18 +29,19 @@ class AuthService { body: json, ); - final String decodedBody = utf8.decode(response.bodyBytes); - final Map res = jsonDecode(decodedBody); - if (response.statusCode != 201) { + final String decodedBody = utf8.decode(response.bodyBytes); + final ApiFailResponse apiFailResponse = jsonDecode(decodedBody); print('Request failed with status: ${response.statusCode}.'); - print('Request failed with status: ${response.body}'); + print('Request failed with status: ${apiFailResponse.message}'); + return false; } - return res; + return true; } - static Future> signIn(Map info) async { + static Future signIn(Map info) async { + FlutterSecureStorage storage = const FlutterSecureStorage(); var hmacSha256 = Hmac(sha256, key); final url = Uri.parse('$baseUrl/user/signin'); @@ -67,35 +60,62 @@ class AuthService { ); final String decodedBody = utf8.decode(response.bodyBytes); - final Map res = jsonDecode(decodedBody); - - if (response.statusCode != 200) { - print('Request failed with status: ${response.statusCode}.'); - print('Request failed with status: ${response.body}'); + final Map jsonMap = jsonDecode(decodedBody); + if (response.statusCode == 200) { + final ApiSuccessResponse apiSuccessResponse = + ApiSuccessResponse.fromJson(jsonMap); + await storage.write( + key: 'accessToken', + value: apiSuccessResponse.response['accessToken'], + ); + await storage.write( + key: 'refreshToken', + value: apiSuccessResponse.response['refreshToken'], + ); + } else { + final ApiFailResponse apiFailResponse = ApiFailResponse.fromJson(jsonMap); + print(response.statusCode); + print(apiFailResponse.message); + throw Exception("fail to get toekns"); } - return res; + return true; } - static Future> reissue( - Map refreshTokenObj) async { + static void reissue() async { + FlutterSecureStorage storage = const FlutterSecureStorage(); + final url = Uri.parse('$baseUrl/auth/reissue'); + final refreshToken = storage.read(key: 'refreshToken'); final response = await http.post( url, headers: { 'Content-Type': 'application/json; charset=UTF-8', }, - body: jsonEncode(refreshTokenObj), + body: jsonEncode({ + "refreshToekn": refreshToken, + }), ); final String decodedBody = utf8.decode(response.bodyBytes); - final Map res = jsonDecode(decodedBody); - - if (response.statusCode != 200) { - print('Request failed with status: ${response.statusCode}.'); + final Map jsonMap = jsonDecode(decodedBody); + if (response.statusCode == 200) { + final ApiSuccessResponse apiSuccessResponse = + ApiSuccessResponse.fromJson(jsonMap); + await storage.write( + key: 'accessToken', + value: apiSuccessResponse.response['accessToken'], + ); + await storage.write( + key: 'refreshToken', + value: apiSuccessResponse.response['refreshToken'], + ); + } else { + final ApiFailResponse apiFailResponse = ApiFailResponse.fromJson(jsonMap); + print(response.statusCode); + print(apiFailResponse.message); + throw Exception("fail to reissue"); } - - return res; } } diff --git a/front/capstone_front/lib/utils/bubble_painter1.dart b/front/capstone_front/lib/utils/bubble_painter1.dart index 8925a29bb8..0e7a1465ff 100644 --- a/front/capstone_front/lib/utils/bubble_painter1.dart +++ b/front/capstone_front/lib/utils/bubble_painter1.dart @@ -3,7 +3,7 @@ import 'package:flutter/material.dart'; class BubblePainter extends CustomPainter { final Color bubbleColor; - BubblePainter({this.bubbleColor = Colors.yellow}); + BubblePainter({this.bubbleColor = const Color(0xff6E2FF4)}); @override void paint(Canvas canvas, Size size) {