Skip to content

Commit

Permalink
Improve iOS design on feed list
Browse files Browse the repository at this point in the history
  • Loading branch information
prof18 committed Oct 24, 2023
1 parent 41cc6f5 commit 39cfba7
Show file tree
Hide file tree
Showing 9 changed files with 49 additions and 46 deletions.
2 changes: 1 addition & 1 deletion iosApp/Source/App/CompactView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// FeedFlow
//
// Created by Marco Gomiero on 21/10/23.
// Copyright © 2023 orgName. All rights reserved.
// Copyright © 2023 FeedFlow. All rights reserved.
//

import Foundation
Expand Down
2 changes: 1 addition & 1 deletion iosApp/Source/App/Drawer/SidebarDrawer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// FeedFlow
//
// Created by Marco Gomiero on 21/10/23.
// Copyright © 2023 orgName. All rights reserved.
// Copyright © 2023 FeedFlow. All rights reserved.
//

import SwiftUI
Expand Down
2 changes: 1 addition & 1 deletion iosApp/Source/App/RegularView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// FeedFlow
//
// Created by Marco Gomiero on 21/10/23.
// Copyright © 2023 orgName. All rights reserved.
// Copyright © 2023 FeedFlow. All rights reserved.
//

import Foundation
Expand Down
2 changes: 1 addition & 1 deletion iosApp/Source/Settings/About/AboutScreen.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// FeedFlow
//
// Created by Marco Gomiero on 22/07/23.
// Copyright © 2023 orgName. All rights reserved.
// Copyright © 2023 FeedFlow. All rights reserved.
//

import Foundation
Expand Down
2 changes: 1 addition & 1 deletion iosApp/Source/Settings/About/LicensesScreen.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// FeedFlow
//
// Created by Marco Gomiero on 22/07/23.
// Copyright © 2023 orgName. All rights reserved.
// Copyright © 2023 FeedFlow. All rights reserved.
//

import SwiftUI
Expand Down
79 changes: 41 additions & 38 deletions iosApp/Source/Settings/Feeds/FeedSourceListScreen.swift
Original file line number Diff line number Diff line change
Expand Up @@ -51,54 +51,57 @@ private struct FeedSourceListContent: View {
VStack {
if feedState.isEmpty {
VStack {
Spacer()

Text(localizer.no_feeds_found_message.localized)
.font(.body)

NavigationLink(value: SheetPage.addFeed) {
Text(localizer.add_feed.localized)
}

Spacer()
}
} else {
List {
ForEach(feedState, id: \.self.categoryId) { feedSourceState in
DisclosureGroup(
content: {
ForEach(feedSourceState.feedSources, id: \.self.id) { feedSource in
VStack(alignment: .leading) {
Text(feedSource.title)
.font(.system(size: 16))
.padding(.top, Spacing.regular)
.padding(.bottom, 2)

Text(feedSource.url)
.font(.system(size: 12))
.padding(.top, 0)
.padding(.bottom, Spacing.regular)

Section {
ForEach(feedSourceState.feedSources, id: \.self.id) { feedSource in
VStack(alignment: .leading) {
Text(feedSource.title)
.font(.system(size: 16))
.padding(.top, Spacing.regular)
.padding(.bottom, 2)

Text(feedSource.url)
.font(.system(size: 12))
.padding(.top, 0)
.padding(.bottom, Spacing.regular)

}
.padding(.horizontal, Spacing.small)
.id(feedSource.id)
.contextMenu {
Button {
deleteFeedSource(feedSource)
} label: {
Label(
localizer.delete_feed.localized,
systemImage: "trash"
)
}
.padding(.horizontal, Spacing.small)
.id(feedSource.id)
.contextMenu {
Button {
deleteFeedSource(feedSource)
} label: {
Label(
localizer.delete_feed.localized,
systemImage: "trash"
)
}
}
}
},
label: {
Text(feedSourceState.categoryName ?? localizer.no_category.localized)
.font(.system(size: 16))
.foregroundStyle(Color(UIColor.label))
.bold()
.padding(Spacing.regular)
}

} header: {
Text(feedSourceState.categoryName ?? localizer.no_category.localized)
.font(.system(size: 16))
.foregroundStyle(Color(UIColor.label))
.bold()
.padding(.horizontal, Spacing.small)

}
.textCase(nil)
)
.listRowInsets(
EdgeInsets(
top: .zero,
Expand All @@ -108,15 +111,15 @@ private struct FeedSourceListContent: View {
)
}
}

.listStyle(.sidebar)
.scrollContentBackground(.hidden)

.padding(.top, -Spacing.medium)
.sheet(isPresented: $showAddFeed) {
AddFeedScreen()
}
}

Spacer()
}
.scrollContentBackground(.hidden)
.toolbar {
ToolbarItem(placement: .navigationBarLeading) {
Button(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// FeedFlow
//
// Created by Marco Gomiero on 01/09/23.
// Copyright © 2023 orgName. All rights reserved.
// Copyright © 2023 FeedFlow. All rights reserved.
//

import SwiftUI
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// FeedFlow
//
// Created by Marco Gomiero on 01/09/23.
// Copyright © 2023 orgName. All rights reserved.
// Copyright © 2023 FeedFlow. All rights reserved.
//

import Foundation
Expand Down
2 changes: 1 addition & 1 deletion iosApp/Source/UI/Components/HtmlView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// FeedFlow
//
// Created by Marco Gomiero on 22/07/23.
// Copyright © 2023 orgName. All rights reserved.
// Copyright © 2023 FeedFlow. All rights reserved.
//

import WebKit
Expand Down

0 comments on commit 39cfba7

Please sign in to comment.