diff --git a/app-ios/Modules/Package.swift b/app-ios/Modules/Package.swift index 7ebfd3a65..119616f9c 100644 --- a/app-ios/Modules/Package.swift +++ b/app-ios/Modules/Package.swift @@ -9,6 +9,7 @@ var package = Package( .iOS(.v16), ], products: [ + .library(name: "Component", targets: ["Component"]), .library(name: "FloorMap", targets: ["FloorMap"]), .library(name: "Session", targets: ["Session"]), .library(name: "Timetable", targets: ["Timetable"]), @@ -25,7 +26,11 @@ var package = Package( .target( name: "About", dependencies: [ + "Assets", + "Component", "shared", + "Model", + "Theme", ] ), .testTarget( @@ -46,6 +51,13 @@ var package = Package( ] ), + .target( + name: "Component", + dependencies: [ + "Theme", + ] + ), + .target( name: "FloorMap", dependencies: [ @@ -65,6 +77,7 @@ var package = Package( name: "Session", dependencies: [ "Assets", + "Component", "Model", "shared", "Theme", @@ -77,6 +90,17 @@ var package = Package( ] ), + .target( + name: "Contributor", + dependencies: [ + "Assets", + "Component", + "Model", + "shared", + "Theme", + ] + ), + .target( name: "Stamps", dependencies: [ @@ -114,6 +138,7 @@ var package = Package( "FloorMap", "Session", "Stamps", + "Contributor", "Theme", "Timetable", ] diff --git a/app-ios/Modules/Sources/About/AboutView.swift b/app-ios/Modules/Sources/About/AboutView.swift index 523aaff43..312b46e58 100644 --- a/app-ios/Modules/Sources/About/AboutView.swift +++ b/app-ios/Modules/Sources/About/AboutView.swift @@ -1,12 +1,126 @@ +import Assets +import Component +import Model import SwiftUI +import Theme + +enum AboutRouting: Hashable { + case contributors +} + +public struct AboutView: View { + private let contributorViewProvider: ViewProvider + + public init(contributorViewProvider: @escaping ViewProvider) { + self.contributorViewProvider = contributorViewProvider + } -public struct AboutView: View { - public init() {} public var body: some View { - Text("About View") + NavigationStack { + ScrollView { + VStack(spacing: 0) { + Assets.Images.aboutKeyVisual.swiftUIImage + Spacer().frame(height: 16) + Text("DroidKaigiはAndroid技術情報の共有とコミュニケーションを目的に開催されるエンジニアが主役のAndroidカンファレンスです。") + .font(Font.system(size: 16)) + Spacer().frame(height: 12) + VStack(alignment: .leading, spacing: 12) { + InformationRow( + icon: Assets.Icons.info.swiftUIImage, + title: "日時", + content: "2023.09.14(木) 〜 16(土) 3日間" + ) + InformationRow( + icon: Assets.Icons.info.swiftUIImage, + title: "場所", + content: "ベルサール渋谷ガーデン", + action: .init( + label: "地図を見る", + action: { + // TODO: Open map + } + ) + ) + } + .padding(.vertical, 20) + .padding(.horizontal, 16) + .background(AssetColors.Surface.surfaceContainerLow.swiftUIColor) + .clipShape(RoundedRectangle(cornerRadius: 12)) + Spacer().frame(height: 32) + SectionTitle(title: "Credits") + ListTile( + icon: Assets.Icons.sentimentVerySatisfied.swiftUIImage, + title: "スタッフ" + ) + Divider() + NavigationLink(value: AboutRouting.contributors) { + ListTile( + icon: Assets.Icons.diversity.swiftUIImage, + title: "コントリビューター" + ) + } + Divider() + ListTile( + icon: Assets.Icons.apartment.swiftUIImage, + title: "スポンサー" + ) + Divider() + SectionTitle(title: "Others") + ListTile( + icon: Assets.Icons.gavel.swiftUIImage, + title: "行動規範" + ) + Divider() + ListTile( + icon: Assets.Icons.fileCopy.swiftUIImage, + title: "ライセンス" + ) + Divider() + ListTile( + icon: Assets.Icons.privacyTip.swiftUIImage, + title: "プライバシーポリシー" + ) + Divider() + HStack(spacing: 12) { + Button { + // TODO: open youtube + } label: { + Assets.Icons.youtube.swiftUIImage + } + Button { + // TODO: open Twitter + } label: { + Assets.Icons.twitter.swiftUIImage + } + Button { + // TODO: open medium + } label: { + Assets.Icons.medium.swiftUIImage + } + } + .padding(.vertical, 24) + + Text("アプリバージョン") + .font(Font.system(size: 14, weight: .medium)) + Spacer().frame(height: 8) + Text("1.2") + .font(Font.system(size: 14, weight: .medium)) + } + .padding(.horizontal, 16) + } + .navigationTitle("About") + .navigationDestination(for: AboutRouting.self) { routing in + switch routing { + case .contributors: + contributorViewProvider(()) + } + } + } } } -// #Preview { -// AboutView() -// } + #Preview { + AboutView( + contributorViewProvider: {_ in EmptyView()} + ) + } diff --git a/app-ios/Modules/Sources/About/ListTile.swift b/app-ios/Modules/Sources/About/ListTile.swift new file mode 100644 index 000000000..2a7af93a6 --- /dev/null +++ b/app-ios/Modules/Sources/About/ListTile.swift @@ -0,0 +1,28 @@ +import SwiftUI +import Theme + +struct ListTile: View { + let icon: Image + let title: String + + var body: some View { + HStack(spacing: 12) { + icon + .renderingMode(.template) + .foregroundStyle(AssetColors.Surface.onSurfaceVariant.swiftUIColor) + Text(title) + .font(Font.system(size: 14, weight: .medium)) + .foregroundStyle(AssetColors.Surface.onSurface.swiftUIColor) + } + .padding(.horizontal, 12) + .padding(.vertical, 24) + .frame(maxWidth: .infinity, alignment: .leading) + } +} + +#Preview { + ListTile( + icon: Image(systemName: "calendar"), + title: "カレンダー" + ) +} diff --git a/app-ios/Modules/Sources/About/SectionTitle.swift b/app-ios/Modules/Sources/About/SectionTitle.swift new file mode 100644 index 000000000..80ea3a167 --- /dev/null +++ b/app-ios/Modules/Sources/About/SectionTitle.swift @@ -0,0 +1,16 @@ +import SwiftUI + +struct SectionTitle: View { + let title: String + + var body: some View { + Text(title) + .font(Font.system(size: 16, weight: .medium)) + .frame(maxWidth: .infinity, alignment: .leading) + .padding(.top, 16) + } +} + +#Preview { + SectionTitle(title: "SectionTitle") +} diff --git a/app-ios/Modules/Sources/Assets/Resources/Icons.xcassets/apartment.imageset/Contents.json b/app-ios/Modules/Sources/Assets/Resources/Icons.xcassets/apartment.imageset/Contents.json new file mode 100644 index 000000000..6eec2c2ac --- /dev/null +++ b/app-ios/Modules/Sources/Assets/Resources/Icons.xcassets/apartment.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "ic_apartment.pdf", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/app-ios/Modules/Sources/Assets/Resources/Icons.xcassets/apartment.imageset/ic_apartment.pdf b/app-ios/Modules/Sources/Assets/Resources/Icons.xcassets/apartment.imageset/ic_apartment.pdf new file mode 100644 index 000000000..dc941266f Binary files /dev/null and b/app-ios/Modules/Sources/Assets/Resources/Icons.xcassets/apartment.imageset/ic_apartment.pdf differ diff --git a/app-ios/Modules/Sources/Assets/Resources/Icons.xcassets/diversity.imageset/Contents.json b/app-ios/Modules/Sources/Assets/Resources/Icons.xcassets/diversity.imageset/Contents.json new file mode 100644 index 000000000..55665c9aa --- /dev/null +++ b/app-ios/Modules/Sources/Assets/Resources/Icons.xcassets/diversity.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "ic_diversity_1.pdf", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/app-ios/Modules/Sources/Assets/Resources/Icons.xcassets/diversity.imageset/ic_diversity_1.pdf b/app-ios/Modules/Sources/Assets/Resources/Icons.xcassets/diversity.imageset/ic_diversity_1.pdf new file mode 100644 index 000000000..4dd72f301 Binary files /dev/null and b/app-ios/Modules/Sources/Assets/Resources/Icons.xcassets/diversity.imageset/ic_diversity_1.pdf differ diff --git a/app-ios/Modules/Sources/Assets/Resources/Icons.xcassets/file_copy.imageset/Contents.json b/app-ios/Modules/Sources/Assets/Resources/Icons.xcassets/file_copy.imageset/Contents.json new file mode 100644 index 000000000..f85d9a914 --- /dev/null +++ b/app-ios/Modules/Sources/Assets/Resources/Icons.xcassets/file_copy.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "ic_file_copy.pdf", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/app-ios/Modules/Sources/Assets/Resources/Icons.xcassets/file_copy.imageset/ic_file_copy.pdf b/app-ios/Modules/Sources/Assets/Resources/Icons.xcassets/file_copy.imageset/ic_file_copy.pdf new file mode 100644 index 000000000..9e010e23f Binary files /dev/null and b/app-ios/Modules/Sources/Assets/Resources/Icons.xcassets/file_copy.imageset/ic_file_copy.pdf differ diff --git a/app-ios/Modules/Sources/Assets/Resources/Icons.xcassets/gavel.imageset/Contents.json b/app-ios/Modules/Sources/Assets/Resources/Icons.xcassets/gavel.imageset/Contents.json new file mode 100644 index 000000000..05c9864e1 --- /dev/null +++ b/app-ios/Modules/Sources/Assets/Resources/Icons.xcassets/gavel.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "ic_gavel.pdf", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/app-ios/Modules/Sources/Assets/Resources/Icons.xcassets/gavel.imageset/ic_gavel.pdf b/app-ios/Modules/Sources/Assets/Resources/Icons.xcassets/gavel.imageset/ic_gavel.pdf new file mode 100644 index 000000000..b5a862700 Binary files /dev/null and b/app-ios/Modules/Sources/Assets/Resources/Icons.xcassets/gavel.imageset/ic_gavel.pdf differ diff --git a/app-ios/Modules/Sources/Assets/Resources/Icons.xcassets/medium.imageset/Contents.json b/app-ios/Modules/Sources/Assets/Resources/Icons.xcassets/medium.imageset/Contents.json new file mode 100644 index 000000000..27aa06da3 --- /dev/null +++ b/app-ios/Modules/Sources/Assets/Resources/Icons.xcassets/medium.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "medium.pdf", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/app-ios/Modules/Sources/Assets/Resources/Icons.xcassets/medium.imageset/medium.pdf b/app-ios/Modules/Sources/Assets/Resources/Icons.xcassets/medium.imageset/medium.pdf new file mode 100644 index 000000000..ca6ff6fac Binary files /dev/null and b/app-ios/Modules/Sources/Assets/Resources/Icons.xcassets/medium.imageset/medium.pdf differ diff --git a/app-ios/Modules/Sources/Assets/Resources/Icons.xcassets/privacy_tip.imageset/Contents.json b/app-ios/Modules/Sources/Assets/Resources/Icons.xcassets/privacy_tip.imageset/Contents.json new file mode 100644 index 000000000..ce99bca75 --- /dev/null +++ b/app-ios/Modules/Sources/Assets/Resources/Icons.xcassets/privacy_tip.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "ic_privacy_tip.pdf", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/app-ios/Modules/Sources/Assets/Resources/Icons.xcassets/privacy_tip.imageset/ic_privacy_tip.pdf b/app-ios/Modules/Sources/Assets/Resources/Icons.xcassets/privacy_tip.imageset/ic_privacy_tip.pdf new file mode 100644 index 000000000..1f8c61e37 Binary files /dev/null and b/app-ios/Modules/Sources/Assets/Resources/Icons.xcassets/privacy_tip.imageset/ic_privacy_tip.pdf differ diff --git a/app-ios/Modules/Sources/Assets/Resources/Icons.xcassets/sentiment_very_satisfied.imageset/Contents.json b/app-ios/Modules/Sources/Assets/Resources/Icons.xcassets/sentiment_very_satisfied.imageset/Contents.json new file mode 100644 index 000000000..fb1d97797 --- /dev/null +++ b/app-ios/Modules/Sources/Assets/Resources/Icons.xcassets/sentiment_very_satisfied.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "ic_sentiment_very_satisfied.pdf", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/app-ios/Modules/Sources/Assets/Resources/Icons.xcassets/sentiment_very_satisfied.imageset/ic_sentiment_very_satisfied.pdf b/app-ios/Modules/Sources/Assets/Resources/Icons.xcassets/sentiment_very_satisfied.imageset/ic_sentiment_very_satisfied.pdf new file mode 100644 index 000000000..90b7b9147 Binary files /dev/null and b/app-ios/Modules/Sources/Assets/Resources/Icons.xcassets/sentiment_very_satisfied.imageset/ic_sentiment_very_satisfied.pdf differ diff --git a/app-ios/Modules/Sources/Assets/Resources/Icons.xcassets/twitter.imageset/Contents.json b/app-ios/Modules/Sources/Assets/Resources/Icons.xcassets/twitter.imageset/Contents.json new file mode 100644 index 000000000..2700ccf13 --- /dev/null +++ b/app-ios/Modules/Sources/Assets/Resources/Icons.xcassets/twitter.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "twitter.pdf", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/app-ios/Modules/Sources/Assets/Resources/Icons.xcassets/twitter.imageset/twitter.pdf b/app-ios/Modules/Sources/Assets/Resources/Icons.xcassets/twitter.imageset/twitter.pdf new file mode 100644 index 000000000..7354ee67a Binary files /dev/null and b/app-ios/Modules/Sources/Assets/Resources/Icons.xcassets/twitter.imageset/twitter.pdf differ diff --git a/app-ios/Modules/Sources/Assets/Resources/Icons.xcassets/youtube.imageset/Contents.json b/app-ios/Modules/Sources/Assets/Resources/Icons.xcassets/youtube.imageset/Contents.json new file mode 100644 index 000000000..e82b105fa --- /dev/null +++ b/app-ios/Modules/Sources/Assets/Resources/Icons.xcassets/youtube.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "youtube.pdf", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/app-ios/Modules/Sources/Assets/Resources/Icons.xcassets/youtube.imageset/youtube.pdf b/app-ios/Modules/Sources/Assets/Resources/Icons.xcassets/youtube.imageset/youtube.pdf new file mode 100644 index 000000000..35b1e222c Binary files /dev/null and b/app-ios/Modules/Sources/Assets/Resources/Icons.xcassets/youtube.imageset/youtube.pdf differ diff --git a/app-ios/Modules/Sources/Assets/Resources/Images.xcassets/AboutKeyVisual.imageset/Contents.json b/app-ios/Modules/Sources/Assets/Resources/Images.xcassets/AboutKeyVisual.imageset/Contents.json new file mode 100644 index 000000000..a3b324552 --- /dev/null +++ b/app-ios/Modules/Sources/Assets/Resources/Images.xcassets/AboutKeyVisual.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "img_AboutKeyVisual.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "img_AboutKeyVisual@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "img_AboutKeyVisual@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/app-ios/Modules/Sources/Assets/Resources/Images.xcassets/AboutKeyVisual.imageset/img_AboutKeyVisual.png b/app-ios/Modules/Sources/Assets/Resources/Images.xcassets/AboutKeyVisual.imageset/img_AboutKeyVisual.png new file mode 100644 index 000000000..0939050a3 Binary files /dev/null and b/app-ios/Modules/Sources/Assets/Resources/Images.xcassets/AboutKeyVisual.imageset/img_AboutKeyVisual.png differ diff --git a/app-ios/Modules/Sources/Assets/Resources/Images.xcassets/AboutKeyVisual.imageset/img_AboutKeyVisual@2x.png b/app-ios/Modules/Sources/Assets/Resources/Images.xcassets/AboutKeyVisual.imageset/img_AboutKeyVisual@2x.png new file mode 100644 index 000000000..555ad405d Binary files /dev/null and b/app-ios/Modules/Sources/Assets/Resources/Images.xcassets/AboutKeyVisual.imageset/img_AboutKeyVisual@2x.png differ diff --git a/app-ios/Modules/Sources/Assets/Resources/Images.xcassets/AboutKeyVisual.imageset/img_AboutKeyVisual@3x.png b/app-ios/Modules/Sources/Assets/Resources/Images.xcassets/AboutKeyVisual.imageset/img_AboutKeyVisual@3x.png new file mode 100644 index 000000000..98ca040a5 Binary files /dev/null and b/app-ios/Modules/Sources/Assets/Resources/Images.xcassets/AboutKeyVisual.imageset/img_AboutKeyVisual@3x.png differ diff --git a/app-ios/Modules/Sources/Component/InformationRow.swift b/app-ios/Modules/Sources/Component/InformationRow.swift new file mode 100644 index 000000000..111aaa0cd --- /dev/null +++ b/app-ios/Modules/Sources/Component/InformationRow.swift @@ -0,0 +1,74 @@ +import SwiftUI +import Theme + +public struct InformationRow: View { + private let icon: Image + private let title: String + private let content: String + private let action: Action? + + public struct Action { + let label: String + let action: () -> Void + + public init(label: String, action: @escaping () -> Void) { + self.label = label + self.action = action + } + } + + public init( + icon: Image, + title: String, + content: String, + action: Action? = nil + ) { + self.icon = icon + self.title = title + self.content = content + self.action = action + } + + public var body: some View { + HStack { + icon + HStack(spacing: 12) { + Text(title) + .font(Font.system(size: 14, weight: .semibold)) + HStack { + Text(content) + .font(Font.system(size: 14, weight: .semibold)) + if let action = action { + Button { + action.action() + } label: { + Text(action.label) + .font(Font.system(size: 14, weight: .semibold)) + .underline() + .foregroundStyle( + AssetColors.Primary.primary.swiftUIColor + ) + } + } + } + + } + } + .frame(maxWidth: .infinity, alignment: .leading) + .foregroundStyle( + AssetColors.Surface.onSurfaceVariant.swiftUIColor + ) + } +} + +#Preview { + InformationRow( + icon: Image(systemName: "clock"), + title: "日付", + content: "2023.09.14 / 11:20 ~ 12:00 (40分)", + action: .init( + label: "地図を見る", + action: {} + ) + ) +} diff --git a/app-ios/Modules/Sources/Component/PersonLabel.swift b/app-ios/Modules/Sources/Component/PersonLabel.swift new file mode 100644 index 000000000..399429156 --- /dev/null +++ b/app-ios/Modules/Sources/Component/PersonLabel.swift @@ -0,0 +1,50 @@ +import SwiftUI +import Theme + +public struct PersonLabel: View { + let name: String + let iconUrlString: String + let notes: String? + + public init(name: String, iconUrlString: String, notes: String? = nil) { + self.name = name + self.iconUrlString = iconUrlString + self.notes = notes + } + + public var body: some View { + HStack(alignment: .center, spacing: 24) { + HStack(spacing: -8) { + AsyncImage(url: URL(string: iconUrlString)) { image in + image.resizable() + } placeholder: { + Color.gray + } + .frame(width: 60, height: 60) + .scaledToFill() + .clipShape(RoundedRectangle(cornerRadius: 12)) + .overlay( + RoundedRectangle(cornerRadius: 12) + .stroke(AssetColors.outline.swiftUIColor, lineWidth: 1) + ) + } + + VStack(alignment: .leading) { + Text(name) + .foregroundStyle(AssetColors.Surface.onSurface.swiftUIColor) + .font(Font.system(size: 16, weight: .medium)) + .lineLimit(2) + if let notes = notes { + Text(notes) + .foregroundStyle(AssetColors.Surface.onSurfaceVariant.swiftUIColor) + .font(Font.system(size: 12)) + } + } + } + .frame(maxWidth: .infinity, alignment: .leading) + } +} + +#Preview { + PersonLabel(name: "ry-itto", iconUrlString: "https://github.com/ry-itto.png", notes: "iOS lead") +} diff --git a/app-ios/Modules/Sources/Contributor/ContributorView.swift b/app-ios/Modules/Sources/Contributor/ContributorView.swift new file mode 100644 index 000000000..3b3d94c4d --- /dev/null +++ b/app-ios/Modules/Sources/Contributor/ContributorView.swift @@ -0,0 +1,39 @@ +import Component +import SwiftUI + +public struct ContributorView: View { + @ObservedObject var viewModel: ContributorViewModel = .init() + + public init() {} + + public var body: some View { + Group { + switch viewModel.state.contributors { + case .initial, .loading: + ProgressView() + .task { + await viewModel.load() + } + case .failed: + EmptyView() + case .loaded(let contributors): + ScrollView { + LazyVStack(spacing: 20) { + ForEach(contributors, id: \.id) { contributor in + PersonLabel( + name: contributor.username, + iconUrlString: contributor.iconUrl + ) + } + } + .padding(16) + } + } + } + .navigationTitle("Contributor") + } +} + +#Preview { + ContributorView() +} diff --git a/app-ios/Modules/Sources/Contributor/ContributorViewModel.swift b/app-ios/Modules/Sources/Contributor/ContributorViewModel.swift new file mode 100644 index 000000000..c0e7fe26f --- /dev/null +++ b/app-ios/Modules/Sources/Contributor/ContributorViewModel.swift @@ -0,0 +1,23 @@ +import Combine +import Model +import shared + +struct ContributorViewState: ViewModelState { + var contributors: LoadingState<[Contributor]> = .initial +} + +@MainActor +final class ContributorViewModel: ObservableObject { + @Published var state: ContributorViewState = .init() + + func load() async { + state.contributors = .loading + + do { + let contributors = try await FakeContributorsApiClient().contributors() + state.contributors = .loaded(contributors) + } catch let error { + state.contributors = .failed(error) + } + } +} diff --git a/app-ios/Modules/Sources/Navigation/RootView.swift b/app-ios/Modules/Sources/Navigation/RootView.swift index 58f4670b5..50178b94a 100644 --- a/app-ios/Modules/Sources/Navigation/RootView.swift +++ b/app-ios/Modules/Sources/Navigation/RootView.swift @@ -1,5 +1,6 @@ import About import Assets +import Contributor import FloorMap import Session import Stamps @@ -55,7 +56,11 @@ public struct RootView: View { .renderingMode(.template) } } - AboutView() + AboutView( + contributorViewProvider: { _ in + ContributorView() + } + ) .tag(Tab.about) .tabItem { Label { diff --git a/app-ios/Modules/Sources/Session/SessionInformationRow.swift b/app-ios/Modules/Sources/Session/SessionInformationRow.swift deleted file mode 100644 index d3f3b756c..000000000 --- a/app-ios/Modules/Sources/Session/SessionInformationRow.swift +++ /dev/null @@ -1,32 +0,0 @@ -import SwiftUI -import Theme - -struct SessionInformationRow: View { - let icon: Image - let title: String - let content: String - - var body: some View { - HStack { - icon - HStack(spacing: 12) { - Text(title) - .font(Font.system(size: 14, weight: .semibold)) - Text(content) - .font(Font.system(size: 14, weight: .semibold)) - } - } - .frame(maxWidth: .infinity, alignment: .leading) - .foregroundStyle( - AssetColors.Surface.onSurfaceVariant.swiftUIColor - ) - } -} - -#Preview { - SessionInformationRow( - icon: Image(systemName: "clock"), - title: "日付", - content: "2023.09.14 / 11:20 ~ 12:00 (40分)" - ) -} diff --git a/app-ios/Modules/Sources/Session/SessionView.swift b/app-ios/Modules/Sources/Session/SessionView.swift index 1c2b7586e..df72f4374 100644 --- a/app-ios/Modules/Sources/Session/SessionView.swift +++ b/app-ios/Modules/Sources/Session/SessionView.swift @@ -1,4 +1,5 @@ import Assets +import Component import Model import shared import SwiftUI @@ -40,22 +41,22 @@ public struct SessionView: View { .frame(maxWidth: .infinity, alignment: .leading) .background(AssetColors.Surface.surfaceVariant.swiftUIColor) VStack(alignment: .leading) { - SessionInformationRow( + InformationRow( icon: Assets.Icons.schedule.swiftUIImage, title: "日付", content: dateString ) - SessionInformationRow( + InformationRow( icon: Assets.Icons.locationOn.swiftUIImage, title: "場所", content: viewModel.timetableItem.room.name.currentLangTitle ) - SessionInformationRow( + InformationRow( icon: Assets.Icons.language.swiftUIImage, title: "対応言語", content: viewModel.timetableItem.language.langOfSpeaker ) - SessionInformationRow( + InformationRow( icon: Assets.Icons.category.swiftUIImage, title: "カテゴリ", content: viewModel.timetableItem.category.title.currentLangTitle