From 943994fdb10150726d2c3e332dfe59910a06d6e2 Mon Sep 17 00:00:00 2001 From: mltokky Date: Fri, 16 Aug 2024 23:11:42 +0900 Subject: [PATCH 1/2] Impl session message in list view --- .../ic_info_fill.imageset/Contents.json | 12 ++++++++++++ .../Media.xcassets/ic_info_fill.imageset/info.svg | 8 ++++++++ .../CommonComponents/Timetable/TimetableCard.swift | 11 +++++++++++ 3 files changed, 31 insertions(+) create mode 100644 app-ios/Sources/CommonComponents/Resources/Media.xcassets/ic_info_fill.imageset/Contents.json create mode 100644 app-ios/Sources/CommonComponents/Resources/Media.xcassets/ic_info_fill.imageset/info.svg diff --git a/app-ios/Sources/CommonComponents/Resources/Media.xcassets/ic_info_fill.imageset/Contents.json b/app-ios/Sources/CommonComponents/Resources/Media.xcassets/ic_info_fill.imageset/Contents.json new file mode 100644 index 000000000..adcd08a2b --- /dev/null +++ b/app-ios/Sources/CommonComponents/Resources/Media.xcassets/ic_info_fill.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "info.svg", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/app-ios/Sources/CommonComponents/Resources/Media.xcassets/ic_info_fill.imageset/info.svg b/app-ios/Sources/CommonComponents/Resources/Media.xcassets/ic_info_fill.imageset/info.svg new file mode 100644 index 000000000..f6a9757ff --- /dev/null +++ b/app-ios/Sources/CommonComponents/Resources/Media.xcassets/ic_info_fill.imageset/info.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/app-ios/Sources/CommonComponents/Timetable/TimetableCard.swift b/app-ios/Sources/CommonComponents/Timetable/TimetableCard.swift index a89cb95ec..3afe811a2 100644 --- a/app-ios/Sources/CommonComponents/Timetable/TimetableCard.swift +++ b/app-ios/Sources/CommonComponents/Timetable/TimetableCard.swift @@ -72,6 +72,17 @@ public struct TimetableCard: View { .lineLimit(1) } } + if let timetableItemSession = timetableItem as? TimetableItem.Session, + let sessionMessage = timetableItemSession.message?.currentLangTitle, + !sessionMessage.isEmpty { + HStack(spacing: 8) { + Image(.icInfoFill) + Text(sessionMessage) + .textStyle(.bodySmall) + .multilineTextAlignment(.leading) + .foregroundStyle(AssetColors.Error.error.swiftUIColor) + } + } } .frame(maxWidth: .infinity) .padding(12) From dfa29017940fffc3f0e9dbbb8be322838f5b28c7 Mon Sep 17 00:00:00 2001 From: mltokky Date: Sat, 17 Aug 2024 01:46:59 +0900 Subject: [PATCH 2/2] add property `preserves-vector-representation` --- .../Media.xcassets/ic_info_fill.imageset/Contents.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app-ios/Sources/CommonComponents/Resources/Media.xcassets/ic_info_fill.imageset/Contents.json b/app-ios/Sources/CommonComponents/Resources/Media.xcassets/ic_info_fill.imageset/Contents.json index adcd08a2b..329199522 100644 --- a/app-ios/Sources/CommonComponents/Resources/Media.xcassets/ic_info_fill.imageset/Contents.json +++ b/app-ios/Sources/CommonComponents/Resources/Media.xcassets/ic_info_fill.imageset/Contents.json @@ -8,5 +8,8 @@ "info" : { "author" : "xcode", "version" : 1 + }, + "properties" : { + "preserves-vector-representation" : true } }