Skip to content

Commit

Permalink
Merge pull request #301 from twenty-three-23/deploy/TT-511-delpoyVers…
Browse files Browse the repository at this point in the history
…ion21

TT-511 버전 21 배포
  • Loading branch information
Seungman-dev authored Nov 21, 2024
2 parents 0877ca1 + 5e828ff commit 4511136
Show file tree
Hide file tree
Showing 34 changed files with 605 additions and 85 deletions.
24 changes: 12 additions & 12 deletions ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -475,8 +475,8 @@
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
FLUTTER_BUILD_NAME = 1.0.19;
FLUTTER_BUILD_NUMBER = 20;
FLUTTER_BUILD_NAME = 1.0.20;
FLUTTER_BUILD_NUMBER = 21;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
Expand Down Expand Up @@ -504,8 +504,8 @@
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
DEVELOPMENT_TEAM = 2Y3R4N58K2;
ENABLE_BITCODE = NO;
FLUTTER_BUILD_NAME = 1.0.19;
FLUTTER_BUILD_NUMBER = 20;
FLUTTER_BUILD_NAME = 1.0.20;
FLUTTER_BUILD_NUMBER = 21;
INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
Expand Down Expand Up @@ -605,8 +605,8 @@
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
FLUTTER_BUILD_NAME = 1.0.19;
FLUTTER_BUILD_NUMBER = 20;
FLUTTER_BUILD_NAME = 1.0.20;
FLUTTER_BUILD_NUMBER = 21;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
Expand Down Expand Up @@ -665,8 +665,8 @@
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
FLUTTER_BUILD_NAME = 1.0.19;
FLUTTER_BUILD_NUMBER = 20;
FLUTTER_BUILD_NAME = 1.0.20;
FLUTTER_BUILD_NUMBER = 21;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
Expand Down Expand Up @@ -696,8 +696,8 @@
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
DEVELOPMENT_TEAM = 2Y3R4N58K2;
ENABLE_BITCODE = NO;
FLUTTER_BUILD_NAME = 1.0.19;
FLUTTER_BUILD_NUMBER = 20;
FLUTTER_BUILD_NAME = 1.0.20;
FLUTTER_BUILD_NUMBER = 21;
INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
Expand All @@ -722,8 +722,8 @@
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
DEVELOPMENT_TEAM = 2Y3R4N58K2;
ENABLE_BITCODE = NO;
FLUTTER_BUILD_NAME = 1.0.19;
FLUTTER_BUILD_NUMBER = 20;
FLUTTER_BUILD_NAME = 1.0.20;
FLUTTER_BUILD_NUMBER = 21;
INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
Expand Down
2 changes: 1 addition & 1 deletion lib/features/common/controllers/app_info_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class AppInfoController extends GetxController {
bool? appAvailable;

final String _androidAppId = "com.twenty_three.swm_peech_flutter"; // Android 패키지 이름
final String _iosAppId = "none"; // TODO iOS 앱스토어 ID
final String _iosAppId = "id6612018644"; // iOS 앱스토어 ID

Uri _getStoreUrl(BuildContext context) {
if (PlatformDeviceInfo.isIOS()) {
Expand Down
12 changes: 12 additions & 0 deletions lib/features/common/controllers/social_login_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import 'package:swm_peech_flutter/features/common/models/user_gender.dart';
import 'package:swm_peech_flutter/features/common/platform/platform_device_info/platform_device_info.dart';
import 'package:swm_peech_flutter/features/common/platform/platform_funnel/platform_funnel.dart';
import 'package:swm_peech_flutter/features/common/widgets/show_common_dialog.dart';
import 'package:swm_peech_flutter/firebase_messaging/firebase_messaging_manager.dart';
import 'package:url_launcher/url_launcher.dart';

class SocialLoginCtr extends GetxController {
Expand Down Expand Up @@ -62,6 +63,8 @@ class SocialLoginCtr extends GetxController {
loginChoiceViewLoginFailed.value = false;
print('카카오톡으로 로그인 성공');

loginFinish(); // 로그인 성공시 호출하는 함수

//추가 정보 입력 분기
await Future.delayed(const Duration(milliseconds: 500));
if (authTokenResponseModel.statusCode == 411) {
Expand Down Expand Up @@ -114,6 +117,8 @@ class SocialLoginCtr extends GetxController {
loginChoiceViewLoginFailed.value = false;
print('카카오톡으로 로그인 성공');

loginFinish(); // 로그인 성공시 호출하는 함수

//추가 정보 입력 분기
await Future.delayed(const Duration(milliseconds: 500));
if (authTokenResponseModel.statusCode == 411) {
Expand Down Expand Up @@ -163,6 +168,8 @@ class SocialLoginCtr extends GetxController {
loginChoiceViewLoginFailed.value = false;
print('apple id로 로그인 성공');

loginFinish(); // 로그인 성공시 호출하는 함수

// 추가정보 입력 분기
await Future.delayed(const Duration(milliseconds: 500));
if (authTokenResponseModel.statusCode == 411) {
Expand Down Expand Up @@ -304,4 +311,9 @@ class SocialLoginCtr extends GetxController {
}
return checkPrivacyAgreement.value;
}

void loginFinish() {
print('[loginFinish]');
FirebaseMessagingManager.putFcmToken();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import 'package:shared_preferences/shared_preferences.dart';

class LocalDeviceUuidStorage {
static final LocalDeviceUuidStorage _instance = LocalDeviceUuidStorage._internal();
late SharedPreferences _prefs;

static const DEVICE_UUID_KEY = "deviceUuid";

factory LocalDeviceUuidStorage() {
return _instance;
}

LocalDeviceUuidStorage._internal();

Future<void> init() async {
_prefs = await SharedPreferences.getInstance();
}

Future<void> setDeviceUuid(String uuid) async {
await _prefs.setString(DEVICE_UUID_KEY, uuid);
}

Future<String?> getDeviceUuid() async {
return await _prefs.getString(DEVICE_UUID_KEY);
}
}
4 changes: 0 additions & 4 deletions lib/features/common/utils/record_file_util.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ import 'package:flutter_sound/flutter_sound.dart';
import 'package:swm_peech_flutter/features/common/platform/platform_record_file/platform_record_file.dart';

class RecordFileUtil {
//TODO 1. 이런식으로 해도 괜찮을까?
//TODO 2. 녹음 시작, 종료 등의 기능도 여기다가 구현해 두고 사용해야 하나?

FlutterSoundPlayer player = FlutterSoundPlayer();

RecordFileUtil() {
Expand All @@ -19,7 +16,6 @@ class RecordFileUtil {
return PlatformRecordFile.getRecodingFile();
}

//TODO 이런식으로 구하는게 맞나?
Future<Duration> getDuration() async {
String path = await getFilePath();
Duration? duration = await player.startPlayer(
Expand Down
2 changes: 1 addition & 1 deletion lib/features/home/controller/home_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ class HomeCtr extends GetxController {
void gotoSpeedAnalyticsBtn(BuildContext context) {
LocalPracticeModeStorage().setMode(PracticeMode.noScript);
userInfoController.saveDefaultTheme();
Navigator.pushNamed(context, "/voiceRecodeNoScript");
Navigator.pushNamed(context, "/voiceRecordeNoScript");
}

void gotoInterviewQuestionsBtn(BuildContext context) {
Expand Down
3 changes: 3 additions & 0 deletions lib/features/mypage/controller/mypage_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import 'package:swm_peech_flutter/features/common/constant/constants.dart';
import 'package:swm_peech_flutter/features/common/controllers/user_info_controller.dart';
import 'package:swm_peech_flutter/features/common/widgets/show_common_dialog.dart';
import 'package:swm_peech_flutter/features/mypage/data_source/remote/remote_user_data_source.dart';
import 'package:swm_peech_flutter/firebase_messaging/firebase_messaging_manager.dart';
import 'package:url_launcher/url_launcher.dart';

import '../../common/data_source/local/local_auth_token_storage.dart';
Expand Down Expand Up @@ -37,6 +38,7 @@ class MyPageController extends GetxController {
}

void _logOut() async {
await FirebaseMessagingManager.deleteFcmToken();
LocalAuthTokenStorage().removeAllAuthToken();
}

Expand Down Expand Up @@ -71,6 +73,7 @@ class MyPageController extends GetxController {
}

void _deleteUser() async {
await FirebaseMessagingManager.deleteFcmToken();
var remoteUserDataSource = RemoteUserDataSource(AuthDioFactory().dio);
await remoteUserDataSource.deleteUser();
LocalAuthTokenStorage().removeAllAuthToken();
Expand Down
18 changes: 15 additions & 3 deletions lib/features/practice_history/controller/history_controller.dart
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import 'package:dio/dio.dart';
import 'package:flutter/cupertino.dart';
import 'package:get/get.dart';
import 'package:swm_peech_flutter/features/common/controllers/social_login_controller.dart';
import 'package:swm_peech_flutter/features/common/controllers/user_info_controller.dart';
import 'package:swm_peech_flutter/features/common/controllers/user_info_controller.dart';
import 'package:swm_peech_flutter/features/common/data_source/local/local_practice_mode_storage.dart';
import 'package:swm_peech_flutter/features/common/data_source/local/local_practice_theme_storage.dart';
Expand All @@ -14,6 +12,7 @@ import 'package:swm_peech_flutter/features/common/models/script_input_paragraphs
import 'package:swm_peech_flutter/features/practice_history/data_source/mock/mock_history_major_data_source.dart';
import 'package:swm_peech_flutter/features/practice_history/data_source/mock/mock_history_minor_data_source.dart';
import 'package:swm_peech_flutter/features/practice_history/data_source/mock/mock_history_theme_data_source.dart';
import 'package:swm_peech_flutter/features/practice_history/data_source/remote/remote_ai_analysis_result_data_source.dart';
import 'package:swm_peech_flutter/features/practice_history/data_source/remote/remote_major_detail_data_source.dart';
import 'package:swm_peech_flutter/features/practice_history/data_source/remote/remote_major_list_data_source.dart';
import 'package:swm_peech_flutter/features/practice_history/data_source/remote/remote_minor_detail_data_source.dart';
Expand Down Expand Up @@ -61,6 +60,9 @@ class HistoryCtr extends GetxController {

Rx<ParagraphListModel?> practiceResult = Rx<ParagraphListModel?>(null); //데이터 받아오고, 요청 보낼때만 수정

Rx<String?> aiAnalysisResult = Rx<String?>(null);
Rx<bool> aiAnalysisIsShow = Rx<bool>(false);

// 바텀 네비게이션 통해서 진입시 실행되는 함수
void enter() {
getDefaultList();
Expand All @@ -80,6 +82,14 @@ class HistoryCtr extends GetxController {
super.onClose();
}

void aiAnalysisBtn() {
aiAnalysisIsShow.value = !aiAnalysisIsShow.value;
}

void getAiAnalysis(int scriptId) async {
aiAnalysisResult.value = await RemoteAiAnalysisResultDataSource(AuthDioFactory().dio).getAnalysisResult(scriptId);
}

Future<void> getMajorDetail(int themeId, int scriptId) async {
try {
final remoteMajorDetailDataSource = RemoteMajorDetailDataSource(AuthDioFactory().dio);
Expand Down Expand Up @@ -281,7 +291,7 @@ class HistoryCtr extends GetxController {
isLoading.value = true;
await LocalPracticeThemeStorage().setThemeId((historyPath.value.theme ?? 0).toString());
await LocalPracticeModeStorage().setMode(PracticeMode.noScript);
Navigator.pushNamed(context, '/voiceRecodeNoScript');
Navigator.pushNamed(context, '/voiceRecordeNoScript');
isLoading.value = false;
}

Expand Down Expand Up @@ -377,8 +387,10 @@ class HistoryCtr extends GetxController {
}

void gotoDetailBtn(BuildContext context, int scriptId) {
aiAnalysisIsShow.value = false;
Navigator.pushNamed(context, '/historyDetail');
getPracticeResult(scriptId);
getAiAnalysis(scriptId);
}

void getPracticeResult(int scriptId) async {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import 'package:retrofit/retrofit.dart' as retrofit;
import 'package:dio/dio.dart';
import 'package:swm_peech_flutter/features/common/constant/constants.dart';

part 'remote_ai_analysis_result_data_source.g.dart';

@retrofit.RestApi(baseUrl: Constants.baseUrl)
abstract class RemoteAiAnalysisResultDataSource {
factory RemoteAiAnalysisResultDataSource(Dio dio, {String baseUrl}) = _RemoteAiAnalysisResultDataSource;

@retrofit.GET('/api/v2/script/{scriptId}/analyze-result')
@retrofit.Headers({'accessToken': 'true'})
Future<String?> getAnalysisResult(@retrofit.Path() int scriptId);
}
85 changes: 80 additions & 5 deletions lib/features/practice_history/view/history_detail.dart
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:flutter/painting.dart';
import 'package:flutter/widgets.dart';
import 'package:get/get.dart';
import 'package:swm_peech_flutter/features/common/widgets/common_scaffold.dart';
import 'package:swm_peech_flutter/features/common/widgets/colored_button.dart';
import 'package:swm_peech_flutter/features/interview_question/controller/interview_question_input_controller.dart';
import 'package:swm_peech_flutter/features/practice_history/controller/history_controller.dart';
import 'package:swm_peech_flutter/features/practice_result/controller/practice_result_controller.dart';
import 'package:swm_peech_flutter/features/practice_result/widget/editing_dialog.dart';

class HistoryDetail extends StatefulWidget {
const HistoryDetail({super.key});
Expand Down Expand Up @@ -72,6 +67,86 @@ class _HistoryDetailState extends State<HistoryDetail> {
itemBuilder: (BuildContext context, int index) {
return Column(
children: [
if (index == 0)
Column(
children: [
OutlinedButton(
style: OutlinedButton.styleFrom(
backgroundColor: Colors.white,
padding: const EdgeInsets.fromLTRB(16, 8, 16, 8),
side: const BorderSide(color: Colors.grey),
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)),
),
onPressed: () {
controller.aiAnalysisBtn();
},
child: GetX<HistoryCtr>(
builder: (_) => Column(
children: [
if (controller.aiAnalysisIsShow == false)
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
'AI의 분석 펼쳐보기',
style: TextStyle(
fontSize: 15,
fontWeight: FontWeight.w600,
),
),
Icon(
Icons.keyboard_arrow_down,
size: 20,
)
],
),
if (controller.aiAnalysisIsShow.value == true)
Column(
children: [
SizedBox(height: 6),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
'AI의 분석 접기',
style: TextStyle(
fontSize: 15,
fontWeight: FontWeight.w600,
),
),
Icon(
Icons.keyboard_arrow_up,
size: 20,
)
],
),
SizedBox(height: 16),
if (controller.aiAnalysisResult.value == null)
CircularProgressIndicator(
strokeWidth: 1.5,
color: Color(0xff3B3E43),
),
if (controller.aiAnalysisResult.value != null)
Text(
controller.aiAnalysisResult.value ?? '',
style: TextStyle(
fontSize: 15,
fontWeight: FontWeight.w600,
color: Color(0xFF3B3E43),
),
),
SizedBox(height: 16),
],
)
],
),
),
),
SizedBox(height: 16),
],
),
Container(
decoration: BoxDecoration(
color: Colors.white, // 배경 색상
Expand Down
Loading

0 comments on commit 4511136

Please sign in to comment.