|
@@ -147,7 +147,7 @@ struct JournalFinderView: View {
|
|
|
) -> some View {
|
|
) -> some View {
|
|
|
VStack(alignment: .leading, spacing: 0) {
|
|
VStack(alignment: .leading, spacing: 0) {
|
|
|
resultsHeader(result: result)
|
|
resultsHeader(result: result)
|
|
|
- .padding(.bottom, 24)
|
|
|
|
|
|
|
+ .padding(.bottom, 12)
|
|
|
|
|
|
|
|
ScrollView(.vertical, showsIndicators: false) {
|
|
ScrollView(.vertical, showsIndicators: false) {
|
|
|
LazyVStack(spacing: 16) {
|
|
LazyVStack(spacing: 16) {
|
|
@@ -169,59 +169,46 @@ struct JournalFinderView: View {
|
|
|
// MARK: - Header
|
|
// MARK: - Header
|
|
|
|
|
|
|
|
private var header: some View {
|
|
private var header: some View {
|
|
|
- HStack(alignment: .top) {
|
|
|
|
|
- VStack(alignment: .leading, spacing: 8) {
|
|
|
|
|
- Text("Journal Finder")
|
|
|
|
|
- .font(.system(size: 30, weight: .bold))
|
|
|
|
|
- .foregroundStyle(AppTheme.textPrimary)
|
|
|
|
|
-
|
|
|
|
|
- HStack(spacing: 0) {
|
|
|
|
|
- Text("Find the ")
|
|
|
|
|
- .foregroundStyle(AppTheme.textSecondary)
|
|
|
|
|
- Text("right journal")
|
|
|
|
|
- .fontWeight(.semibold)
|
|
|
|
|
- .foregroundStyle(AppTheme.teal)
|
|
|
|
|
- Text(" for your ")
|
|
|
|
|
- .foregroundStyle(AppTheme.textSecondary)
|
|
|
|
|
- Text("research")
|
|
|
|
|
- .fontWeight(.semibold)
|
|
|
|
|
- .foregroundStyle(AppTheme.teal)
|
|
|
|
|
- Text(".")
|
|
|
|
|
- .foregroundStyle(AppTheme.textSecondary)
|
|
|
|
|
- }
|
|
|
|
|
- .font(.system(size: 15))
|
|
|
|
|
|
|
+ ToolPageHeader(
|
|
|
|
|
+ title: "Journal Finder",
|
|
|
|
|
+ showsBackButton: false,
|
|
|
|
|
+ onBack: {}
|
|
|
|
|
+ ) {
|
|
|
|
|
+ HStack(spacing: 0) {
|
|
|
|
|
+ Text("Find the ")
|
|
|
|
|
+ .foregroundStyle(AppTheme.textSecondary)
|
|
|
|
|
+ Text("right journal")
|
|
|
|
|
+ .fontWeight(.semibold)
|
|
|
|
|
+ .foregroundStyle(AppTheme.teal)
|
|
|
|
|
+ Text(" for your ")
|
|
|
|
|
+ .foregroundStyle(AppTheme.textSecondary)
|
|
|
|
|
+ Text("research")
|
|
|
|
|
+ .fontWeight(.semibold)
|
|
|
|
|
+ .foregroundStyle(AppTheme.teal)
|
|
|
|
|
+ Text(".")
|
|
|
|
|
+ .foregroundStyle(AppTheme.textSecondary)
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
- Spacer()
|
|
|
|
|
-
|
|
|
|
|
|
|
+ .font(.system(size: 15))
|
|
|
|
|
+ } trailing: {
|
|
|
IconButton(icon: { SettingsGearIcon() }, action: onSettingsTapped)
|
|
IconButton(icon: { SettingsGearIcon() }, action: onSettingsTapped)
|
|
|
- .accessibilityLabel("Settings")
|
|
|
|
|
|
|
+ .accessibilityLabel("Settings")
|
|
|
|
|
+ .padding(.top, 8)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
private func resultsHeader(result: JournalFinderResult) -> some View {
|
|
private func resultsHeader(result: JournalFinderResult) -> some View {
|
|
|
- VStack(alignment: .leading, spacing: 16) {
|
|
|
|
|
- IconButton(iconName: "arrow.left") {
|
|
|
|
|
- viewModel.resetResults()
|
|
|
|
|
- }
|
|
|
|
|
- .accessibilityLabel("Go back")
|
|
|
|
|
-
|
|
|
|
|
- HStack(alignment: .top) {
|
|
|
|
|
- VStack(alignment: .leading, spacing: 8) {
|
|
|
|
|
- Text("Recommended Journals")
|
|
|
|
|
- .font(.system(size: 30, weight: .bold))
|
|
|
|
|
- .foregroundStyle(AppTheme.textPrimary)
|
|
|
|
|
-
|
|
|
|
|
- Text(result.summary)
|
|
|
|
|
- .font(.system(size: 15))
|
|
|
|
|
- .foregroundStyle(AppTheme.textSecondary)
|
|
|
|
|
- .fixedSize(horizontal: false, vertical: true)
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- Spacer()
|
|
|
|
|
-
|
|
|
|
|
- resultCountBadge(count: result.recommendations.count)
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ ToolPageHeader(
|
|
|
|
|
+ title: "Recommended Journals",
|
|
|
|
|
+ showsBackButton: true,
|
|
|
|
|
+ onBack: { viewModel.resetResults() }
|
|
|
|
|
+ ) {
|
|
|
|
|
+ Text(result.summary)
|
|
|
|
|
+ .font(.system(size: 15))
|
|
|
|
|
+ .foregroundStyle(AppTheme.textSecondary)
|
|
|
|
|
+ .fixedSize(horizontal: false, vertical: true)
|
|
|
|
|
+ } trailing: {
|
|
|
|
|
+ resultCountBadge(count: result.recommendations.count)
|
|
|
|
|
+ .padding(.top, 8)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|