Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Fix/#148 fix #155

Merged
merged 4 commits into from
Sep 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion assets/translations/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@
"chatting-report5": "Scam",
"chatting-report6": "Etc",
"chatting-report7": "Please write down the reason for reporting.",
"chatting-report8": "A report is received",
"chatting-report8": "A report is received. \nOnce you submit your app for reviews, it takes about 24-48 hrs",
"chatting-block1": "Block",
"chatting-block2": "Do you want to block this user?",
"chatting-block3": "You can't receive or send messages, and can't rematch with blocked users.",
Expand Down
3 changes: 1 addition & 2 deletions assets/translations/ko-KR.json
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@
"chatting-report5": "์‚ฌ๊ธฐ",
"chatting-report6": "๊ธฐํƒ€",
"chatting-report7": "์‹ ๊ณ  ์‚ฌ์œ ๋ฅผ ์ ์–ด์ฃผ์„ธ์š”.",
"chatting-report8": "์‹ ๊ณ ๊ฐ€ ์ ‘์ˆ˜๋˜์—ˆ์Šต๋‹ˆ๋‹ค.",
"chatting-report8": "์‹ ๊ณ ๊ฐ€ ์ ‘์ˆ˜๋˜์—ˆ์Šต๋‹ˆ๋‹ค. \n๊ฒ€ํ† ๊นŒ์ง€๋Š” ์ตœ๋Œ€ 24์‹œ๊ฐ„ ์†Œ์š”๋ฉ๋‹ˆ๋‹ค.",
"chatting-block1": "์ฐจ๋‹จํ•˜๊ธฐ",
"chatting-block2": "์‚ฌ์šฉ์ž๋ฅผ ์ฐจ๋‹จํ•˜์‹œ๊ฒ ์Šต๋‹ˆ๊นŒ?",
"chatting-block3": "๋ฉ”์„ธ์ง€ ์ˆ˜์‹  ๋ฐ ๋ฐœ์‹ ์ด ๋ชจ๋‘ ์ฐจ๋‹จ๋˜๋ฉฐ, ์ฐจ๋‹จ๋œ ์ƒ๋Œ€๋ฐฉ๊ณผ๋Š” ์žฌ๋งค์นญ์ด ๋ถˆ๊ฐ€ํ•ฉ๋‹ˆ๋‹ค.",
Expand All @@ -270,7 +270,6 @@
"market-posting-title-error": "์ตœ๋Œ€ 30์ž๊นŒ์ง€ ์ž…๋ ฅ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค.",
"market_noti": "์žฅํ„ฐ๊ฒŒ์‹œํŒ ์ด์šฉ ์‹œ ์ฃผ์˜์‚ฌํ•ญ",
"market-productStatus" : "์ƒํ’ˆ ์ƒํƒœ",
"modify": "์ˆ˜์ •ํ•˜๊ธฐ",


"board": "๊ฒŒ์‹œํŒ",
Expand Down
21 changes: 21 additions & 0 deletions ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -369,15 +369,22 @@
DEVELOPMENT_TEAM = 7CMQ9ZRHWF;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = Friendship;
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.social-networking";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.0;
PRODUCT_BUNDLE_IDENTIFIER = com.aliens.friendship;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = NO;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = YES;
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 1;
VERSIONING_SYSTEM = "apple-generic";
};
name = Profile;
Expand Down Expand Up @@ -502,16 +509,23 @@
DEVELOPMENT_TEAM = 7CMQ9ZRHWF;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = Friendship;
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.social-networking";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.0;
PRODUCT_BUNDLE_IDENTIFIER = com.aliens.friendship;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = NO;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = YES;
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 1;
VERSIONING_SYSTEM = "apple-generic";
};
name = Debug;
Expand All @@ -529,15 +543,22 @@
DEVELOPMENT_TEAM = 7CMQ9ZRHWF;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = Friendship;
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.social-networking";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.0;
PRODUCT_BUNDLE_IDENTIFIER = com.aliens.friendship;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = NO;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = YES;
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 1;
VERSIONING_SYSTEM = "apple-generic";
};
name = Release;
Expand Down
3 changes: 2 additions & 1 deletion lib/views/components/board_dialog_widget.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import 'package:aliens/mockdatas/board_mockdata.dart';
import 'package:aliens/models/memberDetails_model.dart';
import 'package:aliens/models/partner_model.dart';
import 'package:aliens/models/screenArgument.dart';
Expand Down Expand Up @@ -58,7 +59,7 @@ class BoardDialog extends StatelessWidget{
Navigator.pop(context);
showDialog(
context: context,
builder: (builder) => ReportDialog(partner: Partner(), context: context));
builder: (builder) => ReportDialog(memberId: board.member!.memberId!, context: context));
},
child: Container(
padding: EdgeInsets.all(13).r,
Expand Down
2 changes: 1 addition & 1 deletion lib/views/components/chat_dialog_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class ChatDialog extends StatelessWidget{
onTap: (){
Navigator.pop(context);
showDialog(context: context, builder: (context){
return ReportDialog(partner: partner, context: context);
return ReportDialog(memberId: partner.memberId!, context: context);
});
},
child: Container(
Expand Down
2 changes: 1 addition & 1 deletion lib/views/components/comment_dialog_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ class CommentDialog extends StatelessWidget{
Navigator.pop(context);
showDialog(
context: context,
builder: (builder) => ReportDialog(partner: Partner(), context: context));
builder: (builder) => ReportDialog(memberId: comment.member!.memberId!, context: context));

},
child: Container(
Expand Down
8 changes: 4 additions & 4 deletions lib/views/components/home_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class HomeWidget extends StatelessWidget{
fontSize: 24.spMin,
fontWeight: FontWeight.bold,
color: Colors.black,
height: 1.5)),
height: 1.5.h)),
TextSpan(
text: '${'homepage-welcome1.2'.tr()}\n',
style: TextStyle(
Expand All @@ -64,20 +64,20 @@ class HomeWidget extends StatelessWidget{
fontSize: 24.spMin,
fontWeight: FontWeight.bold,
color: Colors.black,
height: 1.5)),
height: 1.5.h)),
]),
TextSpan(
text: '${'homepage-happy'.tr()}\n',
style: TextStyle(
fontSize: 12.spMin,
color: Color(0xff888888),
height: 2)),
height: 2.h)),
TextSpan(
text: '${'homepage-positive1'.tr()} ',
style: TextStyle(
fontSize: 12.spMin,
color: Color(0xff888888),
height: 1.5)),
height: 1.5.h)),
TextSpan(
text: '${'homepage-positive2'.tr()}'
/*'${args.memberDetails?.mbti}'*/,
Expand Down
49 changes: 44 additions & 5 deletions lib/views/components/liked_post_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import 'package:aliens/apis/apis.dart';
import 'package:aliens/apis/apis.dart';
import 'package:aliens/models/memberDetails_model.dart';
import 'package:aliens/models/message_model.dart';
import 'package:aliens/models/screenArgument.dart';
import 'package:aliens/views/pages/board/article_writing_page.dart';
import 'package:aliens/views/pages/board/info_article_page.dart';
import 'package:easy_localization/easy_localization.dart';
Expand All @@ -14,17 +15,19 @@ import 'package:flutter_svg/svg.dart';
import 'package:provider/provider.dart';
import 'dart:convert';
import '../../models/board_model.dart';
import '../../models/market_articles.dart';
import '../../repository/board_provider.dart';
import '../pages/board/article_page.dart';
import '../pages/board/market_detail_page.dart';
import 'board_dialog_widget.dart';

class LikedArticleWidget extends StatefulWidget {

LikedArticleWidget({super.key, required this.board, required this.nationCode, required this.memberDetails, required this.index});
LikedArticleWidget({super.key, required this.board, required this.nationCode, required this.screenArguments, required this.index});

final Board board;
final String nationCode;
final MemberDetails memberDetails;
final ScreenArguments screenArguments;
final int index;
@override
State<StatefulWidget> createState() => _LikedArticleWidgetWidgetState();
Expand Down Expand Up @@ -138,7 +141,7 @@ class _LikedArticleWidgetWidgetState extends State<LikedArticleWidget>{
context: context,
builder: (builder) {
return BoardDialog(
context: context, board: widget.board, memberDetails: widget.memberDetails, boardCategory: "์ข‹์•„ํ•˜๋Š” ๊ฒŒ์‹œ๊ธ€",
context: context, board: widget.board, memberDetails: widget.screenArguments.memberDetails!, boardCategory: "์ข‹์•„ํ•˜๋Š” ๊ฒŒ์‹œ๊ธ€",
);
});
},
Expand Down Expand Up @@ -189,18 +192,54 @@ class _LikedArticleWidgetWidgetState extends State<LikedArticleWidget>{
),
),
onTap: () {
print(widget.board.category);
if (widget.board.category == "์ •๋ณด๊ฒŒ์‹œํŒ") {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) =>
InfoArticlePage(board: widget.board)),
);
} else {
}
else if(widget.board.category == "์žฅํ„ฐ๊ฒŒ์‹œํŒ"){
showDialog(
context: context,
builder: (_) => FutureBuilder(
future: APIs.getMarketArticle(widget.board.articleId!),
builder: (BuildContext context,
AsyncSnapshot snapshot) {
if (snapshot.connectionState == ConnectionState.waiting) {
//๋ฐ›์•„์˜ค๋Š” ๋™์•ˆ
return Container(
child: Image(
image: AssetImage(
"assets/illustration/loading_01.gif")));
} else{
MarketBoard data = snapshot.data;
//๋ฐ›์•„์˜จ ํ›„
WidgetsBinding.instance!.addPostFrameCallback((_) {
Navigator.pop(context);
Navigator.push(
context,
MaterialPageRoute(builder: (context) => MarketDetailPage(screenArguments: widget.screenArguments, marketBoard: data,
productStatus: getProductStatusText(data.productStatus),
StatusText: getStatusText(data.marketArticleStatus),
index: -1,)),
);
});
return Container(
child: Image(
image: AssetImage(
"assets/illustration/loading_01.gif")));
}

}));
}
else {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => ArticlePage(board: widget.board, memberDetails: widget.memberDetails, index: widget.index )),
builder: (context) => ArticlePage(board: widget.board, memberDetails: widget.screenArguments.memberDetails!, index: widget.index,)),
);
}
},
Expand Down
2 changes: 1 addition & 1 deletion lib/views/components/market_dialog_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class MarketBoardDialog extends StatelessWidget{
Navigator.pop(context);
showDialog(
context: context,
builder: (builder) => ReportDialog(partner: Partner(), context: context));
builder: (builder) => ReportDialog(memberId: marketBoard.member!.memberId!, context: context));
},
child: Container(
padding: EdgeInsets.all(13).r,
Expand Down
2 changes: 1 addition & 1 deletion lib/views/components/marketcomment_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ class MarketCommentDialog extends StatelessWidget{
Navigator.pop(context);
showDialog(
context: context,
builder: (builder) => ReportDialog(partner: Partner(), context: context));
builder: (builder) => ReportDialog(memberId: marketcomment.member!.memberId!, context: context));

},
child: Container(
Expand Down
8 changes: 4 additions & 4 deletions lib/views/components/report_dialog_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ import '../../apis/apis.dart';


class ReportDialog extends StatefulWidget {
final Partner partner;
final int memberId;
final BuildContext context;

const ReportDialog({
Key? key,
required this.partner,
required this.memberId,
required this.context
}) : super(key: key);
@override
Expand All @@ -41,7 +41,7 @@ class _ReportDialogState extends State<ReportDialog>{
["SCAM", 'chatting-report5'.tr()],
["ETC", 'chatting-report6'.tr()]
];
final TextEditingController _textEditingController = TextEditingController(text: ' ');
final TextEditingController _textEditingController = TextEditingController();

String? _reportReason = 'chatting-report2'.tr();
Widget androidReport(){
Expand Down Expand Up @@ -142,7 +142,7 @@ class _ReportDialogState extends State<ReportDialog>{
break;
}
}
if(await APIs.reportPartner(reportCategory, _textEditingController.text, widget.partner.memberId!)){
if(await APIs.reportPartner(reportCategory, _textEditingController.text, widget.memberId)){
Navigator.pop(context);
showDialog(context: context, builder: (context){
return AlertDialog(
Expand Down
3 changes: 2 additions & 1 deletion lib/views/components/total_article_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,8 @@ class _TotalArticleWidgetState extends State<TotalArticleWidget>{
productStatus: getProductStatusText(data.productStatus),
StatusText: getStatusText(data.marketArticleStatus),
index: -1,)),
);
).then((value) =>
boardProvider.getAllArticles());
});
return Container(
child: Image(
Expand Down
4 changes: 3 additions & 1 deletion lib/views/pages/board/article_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,8 @@ class _ArticlePageState extends State<ArticlePage> {
Container(
child: Column(
children: [
Padding(

Container(
padding: EdgeInsets.symmetric(vertical: 15, horizontal: 30).r,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
Expand Down Expand Up @@ -400,6 +401,7 @@ class _ArticlePageState extends State<ArticlePage> {
),
],
),
color: parentsCommentId == commentProvider.commentListData![index].articleCommentId ? Color(0xffF5F7FF) : Colors.white,
),

//๋Œ€๋Œ“๊ธ€
Expand Down
3 changes: 2 additions & 1 deletion lib/views/pages/board/market_detail_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ class _MarketDetailPageState extends State<MarketDetailPage> {
Container(
child: Column(
children: [
Padding(
Container(
padding: EdgeInsets.symmetric(vertical: 15, horizontal: 30).r,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
Expand Down Expand Up @@ -503,6 +503,7 @@ class _MarketDetailPageState extends State<MarketDetailPage> {
),
],
),
color: parentsCommentId == marketcommentProvider.commentListData![index].articleCommentId ? Color(0xffF5F7FF) : Colors.white,
),

//๋Œ€๋Œ“๊ธ€
Expand Down
2 changes: 1 addition & 1 deletion lib/views/pages/board/my_article_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ class _MyArticlePageState extends State<MyArticlePage> {
children: [
LikedArticleWidget(
board: boardProvider.articleList![index],
nationCode: nationCode, memberDetails: widget.screenArguments.memberDetails!,
nationCode: nationCode, screenArguments: widget.screenArguments!,
index: index
),
Divider(
Expand Down
6 changes: 3 additions & 3 deletions lib/views/pages/matching/matching_choose_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -433,8 +433,8 @@ class LanguageButton extends StatelessWidget {
children: [
Container(
child : SvgPicture.asset(puzzle,
width: 45.r,
height: 45.r,
width: 40.r,
height: 40.r,
)
),
Container(
Expand Down Expand Up @@ -479,7 +479,7 @@ class LanguageButton extends StatelessWidget {
language,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize:20.spMin,
fontSize:18.spMin,
color: selectedFirst || selectedSecond
? Colors.white
: Colors.black,
Expand Down