Skip to content

Commit

Permalink
feat: new library icon + a thank you
Browse files Browse the repository at this point in the history
  • Loading branch information
khcrysalis committed Oct 29, 2024
1 parent e1fb7ce commit b58af7e
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 8 deletions.
20 changes: 14 additions & 6 deletions iOS/Views/Settings/About/AboutViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class AboutViewController: UITableViewController {
var tableData = [
["Header"],
[],
[""],
["", "Thanks"], // Don't translate this
[]
]

Expand Down Expand Up @@ -168,11 +168,19 @@ extension AboutViewController {
}
return personCell
case 2:
let personCellIdentifier = "BatchPersonCell"
let personCell = tableView.dequeueReusableCell(withIdentifier: personCellIdentifier) as? BatchPersonCell ?? BatchPersonCell(style: .default, reuseIdentifier: personCellIdentifier)

personCell.configure(with: creditsSponsors)
return personCell
if cellText != "Thanks" {
let personCellIdentifier = "BatchPersonCell"
let personCell = tableView.dequeueReusableCell(withIdentifier: personCellIdentifier) as? BatchPersonCell ?? BatchPersonCell(style: .default, reuseIdentifier: personCellIdentifier)

personCell.configure(with: creditsSponsors)
return personCell
} else {
// Don't translate this
cell.textLabel?.text = "💙 This couldn't of been done without my sponsors!"
cell.textLabel?.textColor = .secondaryLabel
cell.textLabel?.numberOfLines = 0
return cell
}
case 3:
let cell = UITableViewCell(style: .default, reuseIdentifier: reuseIdentifier)
cell.textLabel?.text = cellText
Expand Down
6 changes: 5 additions & 1 deletion iOS/Views/Sources/SourcesViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,11 @@ extension SourcesViewController {
case 0:
cell.textLabel?.text = "All Repositories"
cell.detailTextLabel?.text = "See all apps from your sources"
SectionIcons.sectionIcon(to: cell, with: "books.vertical.fill", backgroundColor: Preferences.appTintColor.uiColor.withAlphaComponent(0.7))

var repoIcon = "books.vertical.fill"
if #available(iOS 16.0, *) { repoIcon = "globe.desk.fill" }

SectionIcons.sectionIcon(to: cell, with: repoIcon, backgroundColor: Preferences.appTintColor.uiColor.withAlphaComponent(0.7))
return cell
case 1:
cell.textLabel?.text = source.name ?? String.localized("UNKNOWN")
Expand Down
13 changes: 12 additions & 1 deletion iOS/Views/TabbarController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,18 @@ struct TabbarView: View {
case .sources:
NavigationViewController(SourcesViewController.self, title: String.localized("TAB_SOURCES"))
.edgesIgnoringSafeArea(.all)
.tabItem { Label(String.localized("TAB_SOURCES"), systemImage: "books.vertical.fill") }
.tabItem {
Label(
String.localized("TAB_SOURCES"),
systemImage: {
if #available(iOS 16.0, *) {
return "globe.desk.fill"
} else {
return "books.vertical.fill"
}
}()
)
}
.tag(Tab.sources)
case .library:
NavigationViewController(LibraryViewController.self, title: String.localized("TAB_LIBRARY"))
Expand Down

0 comments on commit b58af7e

Please sign in to comment.