mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2026-11-28 00:04:25 +00:00
Move Help and Troubleshooting screen contents back to main settings screen.
This commit is contained in:
1 parent
aa9677c667
commit
c05caca971
5 files changed
+266
-274
No files matched your search
@@ -74,9 +74,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"About NetNewsWire" : {
|
||||
"comment" : "About NetNewsWire"
|
||||
},
|
||||
"Account" : {
|
||||
"comment" : "Account"
|
||||
},
|
||||
@@ -272,9 +269,6 @@
|
||||
"Automatic" : {
|
||||
"comment" : "Automatic"
|
||||
},
|
||||
"Bug Tracker" : {
|
||||
"comment" : "Bug Tracker"
|
||||
},
|
||||
"Can’t add a feed because no feed was found." : {
|
||||
"comment" : "Feed finder"
|
||||
},
|
||||
@@ -511,9 +505,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"Dinosaurs" : {
|
||||
"comment" : "Dinosaurs"
|
||||
},
|
||||
"Dinosaurs Help" : {
|
||||
"comment" : "Help link"
|
||||
},
|
||||
@@ -966,12 +957,6 @@
|
||||
"comment" : "A dedication to those working to save democracy.",
|
||||
"isCommentAutoGenerated" : true
|
||||
},
|
||||
"NetNewsWire Forum" : {
|
||||
"comment" : "NetNewsWire Forum"
|
||||
},
|
||||
"NetNewsWire Help" : {
|
||||
"comment" : "NetNewsWire Help"
|
||||
},
|
||||
"NetNewsWire News" : {
|
||||
"comment" : "NetNewsWire News"
|
||||
},
|
||||
@@ -1160,9 +1145,6 @@
|
||||
"Refresh to Clear Read Articles" : {
|
||||
"comment" : "Refresh to Clear Read Articles"
|
||||
},
|
||||
"Release Notes" : {
|
||||
"comment" : "Release Notes"
|
||||
},
|
||||
"Remove" : {
|
||||
"comment" : "Remove"
|
||||
},
|
||||
@@ -1629,9 +1611,6 @@
|
||||
"Totals" : {
|
||||
"comment" : "Totals section"
|
||||
},
|
||||
"Troubleshooting" : {
|
||||
"comment" : "Troubleshooting"
|
||||
},
|
||||
"Type:" : {
|
||||
"localizations" : {
|
||||
"es" : {
|
||||
|
||||
@@ -1,118 +0,0 @@
|
||||
//
|
||||
// HelpSettingsViewController.swift
|
||||
// NetNewsWire-iOS
|
||||
//
|
||||
// Created by Brent Simmons on 11/12/26.
|
||||
// Copyright © 2026 Ranchero Software. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
import SafariServices
|
||||
import SwiftUI
|
||||
|
||||
final class HelpSettingsViewController: UITableViewController {
|
||||
|
||||
private enum Row: Int, CaseIterable {
|
||||
case help
|
||||
case forum
|
||||
case releaseNotes
|
||||
case bugTracker
|
||||
case about
|
||||
|
||||
var title: String {
|
||||
switch self {
|
||||
case .help:
|
||||
return NSLocalizedString("NetNewsWire Help", comment: "NetNewsWire Help")
|
||||
case .forum:
|
||||
return NSLocalizedString("NetNewsWire Forum", comment: "NetNewsWire Forum")
|
||||
case .releaseNotes:
|
||||
return NSLocalizedString("Release Notes", comment: "Release Notes")
|
||||
case .bugTracker:
|
||||
return NSLocalizedString("Bug Tracker", comment: "Bug Tracker")
|
||||
case .about:
|
||||
return NSLocalizedString("About NetNewsWire", comment: "About NetNewsWire")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static let cellIdentifier = "Cell"
|
||||
|
||||
init() {
|
||||
super.init(style: .insetGrouped)
|
||||
}
|
||||
|
||||
required init?(coder: NSCoder) {
|
||||
fatalError("init(coder:) has not been implemented")
|
||||
}
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
title = NSLocalizedString("Help", comment: "Help")
|
||||
tableView.register(VibrantTableViewCell.self, forCellReuseIdentifier: Self.cellIdentifier)
|
||||
}
|
||||
|
||||
// MARK: - UITableViewDataSource
|
||||
|
||||
override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
|
||||
return Row.allCases.count
|
||||
}
|
||||
|
||||
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
|
||||
let cell = tableView.dequeueReusableCell(withIdentifier: Self.cellIdentifier, for: indexPath)
|
||||
let row = Row.allCases[indexPath.row]
|
||||
cell.textLabel?.text = row.title
|
||||
cell.textLabel?.adjustsFontForContentSizeCategory = true
|
||||
cell.accessoryType = row == .about ? .disclosureIndicator : .none
|
||||
return cell
|
||||
}
|
||||
|
||||
// MARK: - UITableViewDelegate
|
||||
|
||||
override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
|
||||
switch Row.allCases[indexPath.row] {
|
||||
case .help:
|
||||
openURL(HelpURL.helpHome.rawValue)
|
||||
tableView.selectRow(at: nil, animated: true, scrollPosition: .none)
|
||||
case .forum:
|
||||
openURL(HelpURL.discourse.rawValue)
|
||||
tableView.selectRow(at: nil, animated: true, scrollPosition: .none)
|
||||
case .releaseNotes:
|
||||
openURL(HelpURL.releaseNotes.rawValue)
|
||||
tableView.selectRow(at: nil, animated: true, scrollPosition: .none)
|
||||
case .bugTracker:
|
||||
openURL(HelpURL.bugTracker.rawValue)
|
||||
tableView.selectRow(at: nil, animated: true, scrollPosition: .none)
|
||||
case .about:
|
||||
navigationController?.pushViewController(UIHostingController(rootView: AboutView()), animated: true)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Private
|
||||
|
||||
private extension HelpSettingsViewController {
|
||||
|
||||
func openURL(_ urlString: String) {
|
||||
guard let url = URL(string: urlString) else {
|
||||
return
|
||||
}
|
||||
|
||||
// Open GitHub links in the GitHub app when installed.
|
||||
if let host = url.host, host == "github.com" || host.hasSuffix(".github.com") {
|
||||
UIApplication.shared.open(url, options: [.universalLinksOnly: true]) { [weak self] openedInApp in
|
||||
if !openedInApp {
|
||||
self?.presentSafariViewController(for: url)
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
presentSafariViewController(for: url)
|
||||
}
|
||||
|
||||
func presentSafariViewController(for url: URL) {
|
||||
let vc = SFSafariViewController(url: url)
|
||||
vc.modalPresentationStyle = .pageSheet
|
||||
present(vc, animated: true)
|
||||
}
|
||||
}
|
||||
@@ -117,6 +117,23 @@
|
||||
</tableViewSection>
|
||||
<tableViewSection id="Trb-eL-9xZ">
|
||||
<cells>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" textLabel="Apr-lb-4bR" style="IBUITableViewCellStyleDefault" id="Apr-Cel-7rY" customClass="VibrantTableViewCell" customModule="NetNewsWire" customModuleProvider="target">
|
||||
<rect key="frame" x="20" y="1208" width="374" height="51"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="Apr-Cel-7rY" id="Apr-Cnt-2mN">
|
||||
<rect key="frame" x="0.0" y="0.0" width="343.5" height="51"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" insetsLayoutMarginsFromSafeArea="NO" text="Appearance" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" id="Apr-lb-4bR">
|
||||
<rect key="frame" x="20" y="0.0" width="315.5" height="51"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" textLabel="Sdb-lb-4bR" style="IBUITableViewCellStyleDefault" id="Sdb-Cel-7rY" customClass="VibrantTableViewCell" customModule="NetNewsWire" customModuleProvider="target">
|
||||
<rect key="frame" x="20" y="1157" width="374" height="51"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
@@ -168,23 +185,10 @@
|
||||
</subviews>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" textLabel="Apr-lb-4bR" style="IBUITableViewCellStyleDefault" id="Apr-Cel-7rY" customClass="VibrantTableViewCell" customModule="NetNewsWire" customModuleProvider="target">
|
||||
<rect key="frame" x="20" y="1208" width="374" height="51"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="Apr-Cel-7rY" id="Apr-Cnt-2mN">
|
||||
<rect key="frame" x="0.0" y="0.0" width="343.5" height="51"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" insetsLayoutMarginsFromSafeArea="NO" text="Appearance" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" id="Apr-lb-4bR">
|
||||
<rect key="frame" x="20" y="0.0" width="315.5" height="51"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
</cells>
|
||||
</tableViewSection>
|
||||
<tableViewSection headerTitle="Troubleshooting" id="Trb-eL-9xY">
|
||||
<cells>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" textLabel="eRl-vQ-3kP" style="IBUITableViewCellStyleDefault" id="qLw-mN-7rY" customClass="VibrantTableViewCell" customModule="NetNewsWire" customModuleProvider="target">
|
||||
<rect key="frame" x="20" y="1259" width="374" height="51"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
@@ -192,7 +196,7 @@
|
||||
<rect key="frame" x="0.0" y="0.0" width="343.5" height="51"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" insetsLayoutMarginsFromSafeArea="NO" text="Troubleshooting" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" id="eRl-vQ-3kP">
|
||||
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" insetsLayoutMarginsFromSafeArea="NO" text="Error Log" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" id="eRl-vQ-3kP">
|
||||
<rect key="frame" x="20" y="0.0" width="315.5" height="51"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
|
||||
@@ -202,14 +206,154 @@
|
||||
</subviews>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" textLabel="uGk-2d-oFc" style="IBUITableViewCellStyleDefault" id="Tle-IV-D40" customClass="VibrantTableViewCell" customModule="NetNewsWire" customModuleProvider="target">
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" textLabel="aLg-lb-4bR" style="IBUITableViewCellStyleDefault" id="aLg-mN-7rY" customClass="VibrantTableViewCell" customModule="NetNewsWire" customModuleProvider="target">
|
||||
<rect key="frame" x="20" y="1310" width="374" height="51"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="Tle-IV-D40" id="IJD-ZB-8Wm">
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="aLg-mN-7rY" id="aLg-cV-2mN">
|
||||
<rect key="frame" x="0.0" y="0.0" width="343.5" height="51"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" insetsLayoutMarginsFromSafeArea="NO" text="Help" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" id="uGk-2d-oFc">
|
||||
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" insetsLayoutMarginsFromSafeArea="NO" text="Activity Log" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" id="aLg-lb-4bR">
|
||||
<rect key="frame" x="20" y="0.0" width="315.5" height="51"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" textLabel="aSt-vQ-3kP" style="IBUITableViewCellStyleDefault" id="aSt-mN-7rY" customClass="VibrantTableViewCell" customModule="NetNewsWire" customModuleProvider="target">
|
||||
<rect key="frame" x="20" y="1310" width="374" height="51"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="aSt-mN-7rY" id="aSt-dR-5tH">
|
||||
<rect key="frame" x="0.0" y="0.0" width="343.5" height="51"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" insetsLayoutMarginsFromSafeArea="NO" text="Account Stats" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" id="aSt-vQ-3kP">
|
||||
<rect key="frame" x="20" y="0.0" width="315.5" height="51"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" textLabel="QyH-Rs-uKE" style="IBUITableViewCellStyleDefault" id="E2w-tD-4YJ" customClass="VibrantTableViewCell" customModule="NetNewsWire" customModuleProvider="target">
|
||||
<rect key="frame" x="20" y="1361" width="374" height="51"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="E2w-tD-4YJ" id="aD2-yG-5df">
|
||||
<rect key="frame" x="0.0" y="0.0" width="343.5" height="51"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" insetsLayoutMarginsFromSafeArea="NO" text="Dinosaurs" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" id="QyH-Rs-uKE">
|
||||
<rect key="frame" x="20" y="0.0" width="315.5" height="51"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" textLabel="cKz-sT-4bR" style="IBUITableViewCellStyleDefault" id="zSt-kQ-9wL" customClass="VibrantTableViewCell" customModule="NetNewsWire" customModuleProvider="target">
|
||||
<rect key="frame" x="20" y="1412" width="374" height="51"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="zSt-kQ-9wL" id="hRw-fJ-2mN">
|
||||
<rect key="frame" x="0.0" y="0.0" width="343.5" height="51"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" insetsLayoutMarginsFromSafeArea="NO" text="iCloud Storage Stats" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" id="cKz-sT-4bR">
|
||||
<rect key="frame" x="20" y="0.0" width="315.5" height="51"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
</cells>
|
||||
</tableViewSection>
|
||||
<tableViewSection headerTitle="Help" id="CS8-fJ-ghn">
|
||||
<cells>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" textLabel="uGk-2d-oFc" style="IBUITableViewCellStyleDefault" id="Tle-IV-D40" customClass="VibrantTableViewCell" customModule="NetNewsWire" customModuleProvider="target">
|
||||
<rect key="frame" x="20" y="1519" width="374" height="51"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="Tle-IV-D40" id="IJD-ZB-8Wm">
|
||||
<rect key="frame" x="0.0" y="0.0" width="374" height="51"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" ambiguous="YES" insetsLayoutMarginsFromSafeArea="NO" text="NetNewsWire Help" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" id="uGk-2d-oFc">
|
||||
<rect key="frame" x="20" y="0.0" width="334" height="51"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" textLabel="MLJ-rt-2zt" style="IBUITableViewCellStyleDefault" id="rFJ-wv-qYV" customClass="VibrantTableViewCell" customModule="NetNewsWire" customModuleProvider="target">
|
||||
<rect key="frame" x="20" y="1570" width="374" height="51"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="rFJ-wv-qYV" id="gGO-fQ-60i">
|
||||
<rect key="frame" x="0.0" y="0.0" width="374" height="51"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" ambiguous="YES" insetsLayoutMarginsFromSafeArea="NO" text="NetNewsWire Forum" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" id="MLJ-rt-2zt">
|
||||
<rect key="frame" x="20" y="0.0" width="334" height="51"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" textLabel="NeD-y8-KrM" style="IBUITableViewCellStyleDefault" id="TIX-yK-rC6" customClass="VibrantTableViewCell" customModule="NetNewsWire" customModuleProvider="target">
|
||||
<rect key="frame" x="20" y="1621" width="374" height="51"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="TIX-yK-rC6" id="qr8-EN-Ofg">
|
||||
<rect key="frame" x="0.0" y="0.0" width="374" height="51"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" ambiguous="YES" insetsLayoutMarginsFromSafeArea="NO" text="Release Notes" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" id="NeD-y8-KrM">
|
||||
<rect key="frame" x="20" y="0.0" width="334" height="51"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" textLabel="DsV-Qv-X4K" style="IBUITableViewCellStyleDefault" id="taJ-sg-wnU" customClass="VibrantTableViewCell" customModule="NetNewsWire" customModuleProvider="target">
|
||||
<rect key="frame" x="20" y="1672" width="374" height="51"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="taJ-sg-wnU" id="axB-si-1KM">
|
||||
<rect key="frame" x="0.0" y="0.0" width="374" height="51"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" ambiguous="YES" insetsLayoutMarginsFromSafeArea="NO" text="Bug Tracker" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" id="DsV-Qv-X4K">
|
||||
<rect key="frame" x="20" y="0.0" width="334" height="51"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" textLabel="76A-Ng-kfs" style="IBUITableViewCellStyleDefault" id="jK8-tv-hBD" customClass="VibrantTableViewCell" customModule="NetNewsWire" customModuleProvider="target">
|
||||
<rect key="frame" x="20" y="1723" width="374" height="51"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="jK8-tv-hBD" id="I7Q-GQ-u8Y">
|
||||
<rect key="frame" x="0.0" y="0.0" width="343.5" height="51"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" ambiguous="YES" insetsLayoutMarginsFromSafeArea="NO" text="About NetNewsWire" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" id="76A-Ng-kfs">
|
||||
<rect key="frame" x="20" y="0.0" width="315.5" height="51"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
|
||||
import UIKit
|
||||
import CoreServices
|
||||
import SafariServices
|
||||
import SwiftUI
|
||||
import UniformTypeIdentifiers
|
||||
import RSCore
|
||||
@@ -21,15 +22,31 @@ final class SettingsViewController: UITableViewController {
|
||||
case accounts = 1
|
||||
case feeds = 2
|
||||
case moreScreens = 3
|
||||
case troubleshooting = 4
|
||||
case help = 5
|
||||
}
|
||||
|
||||
private enum MoreScreensRow: Int {
|
||||
case sidebar = 0
|
||||
case timeline = 1
|
||||
case articles = 2
|
||||
case appearance = 3
|
||||
case troubleshooting = 4
|
||||
case help = 5
|
||||
case appearance = 0
|
||||
case sidebar = 1
|
||||
case timeline = 2
|
||||
case articles = 3
|
||||
}
|
||||
|
||||
private enum TroubleshootingRow: Int {
|
||||
case errorLog = 0
|
||||
case activityLog = 1
|
||||
case accountStats = 2
|
||||
case dinosaurs = 3
|
||||
case cloudKitZoneStats = 4
|
||||
}
|
||||
|
||||
private enum HelpRow: Int {
|
||||
case help = 0
|
||||
case forum = 1
|
||||
case releaseNotes = 2
|
||||
case bugTracker = 3
|
||||
case about = 4
|
||||
}
|
||||
|
||||
private enum FeedsRow: Int {
|
||||
@@ -97,6 +114,12 @@ final class SettingsViewController: UITableViewController {
|
||||
return defaultNumberOfRows - 1
|
||||
}
|
||||
return defaultNumberOfRows
|
||||
case .troubleshooting:
|
||||
let defaultNumberOfRows = super.tableView(tableView, numberOfRowsInSection: section)
|
||||
if !AccountManager.shared.hasiCloudAccount {
|
||||
return defaultNumberOfRows - 1
|
||||
}
|
||||
return defaultNumberOfRows
|
||||
default:
|
||||
return super.tableView(tableView, numberOfRowsInSection: section)
|
||||
}
|
||||
@@ -176,12 +199,55 @@ final class SettingsViewController: UITableViewController {
|
||||
self.navigationController?.pushViewController(ArticlesSettingsViewController(), animated: true)
|
||||
case .appearance:
|
||||
self.navigationController?.pushViewController(AppearanceSettingsViewController(), animated: true)
|
||||
case .troubleshooting:
|
||||
let troubleshooting = TroubleshootingSettingsViewController()
|
||||
troubleshooting.presentingParentController = presentingParentController
|
||||
self.navigationController?.pushViewController(troubleshooting, animated: true)
|
||||
default:
|
||||
break
|
||||
}
|
||||
case .troubleshooting:
|
||||
let viewController: UIViewController? = {
|
||||
switch TroubleshootingRow(rawValue: indexPath.row) {
|
||||
case .errorLog:
|
||||
return UIHostingController(rootView: ErrorLogView())
|
||||
case .accountStats:
|
||||
return UIHostingController(rootView: AccountStatsView())
|
||||
case .cloudKitZoneStats:
|
||||
return UIHostingController(rootView: CloudKitStatsView())
|
||||
case .activityLog:
|
||||
return UIHostingController(rootView: ActivityLogView())
|
||||
case .dinosaurs:
|
||||
return UIHostingController(rootView: DinosaursView(dismissAndPresent: { [weak self] dinosaur in
|
||||
guard let self else {
|
||||
return
|
||||
}
|
||||
self.dismiss(animated: true) {
|
||||
if let rootSplit = self.presentingParentController as? RootSplitViewController {
|
||||
rootSplit.coordinator.discloseFeed(dinosaur.feed, animations: [.scroll, .navigation])
|
||||
}
|
||||
}
|
||||
}))
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}()
|
||||
if let viewController {
|
||||
self.navigationController?.pushViewController(viewController, animated: true)
|
||||
}
|
||||
case .help:
|
||||
switch HelpRow(rawValue: indexPath.row) {
|
||||
case .help:
|
||||
self.navigationController?.pushViewController(HelpSettingsViewController(), animated: true)
|
||||
openURL(HelpURL.helpHome.rawValue)
|
||||
tableView.selectRow(at: nil, animated: true, scrollPosition: .none)
|
||||
case .forum:
|
||||
openURL(HelpURL.discourse.rawValue)
|
||||
tableView.selectRow(at: nil, animated: true, scrollPosition: .none)
|
||||
case .releaseNotes:
|
||||
openURL(HelpURL.releaseNotes.rawValue)
|
||||
tableView.selectRow(at: nil, animated: true, scrollPosition: .none)
|
||||
case .bugTracker:
|
||||
openURL(HelpURL.bugTracker.rawValue)
|
||||
tableView.selectRow(at: nil, animated: true, scrollPosition: .none)
|
||||
case .about:
|
||||
let hosting = UIHostingController(rootView: AboutView())
|
||||
self.navigationController?.pushViewController(hosting, animated: true)
|
||||
default:
|
||||
break
|
||||
}
|
||||
@@ -382,4 +448,28 @@ private extension SettingsViewController {
|
||||
docPicker.modalPresentationStyle = .formSheet
|
||||
self.present(docPicker, animated: true)
|
||||
}
|
||||
|
||||
func openURL(_ urlString: String) {
|
||||
guard let url = URL(string: urlString) else {
|
||||
return
|
||||
}
|
||||
|
||||
// Open GitHub links in the GitHub app when installed.
|
||||
if let host = url.host, host == "github.com" || host.hasSuffix(".github.com") {
|
||||
UIApplication.shared.open(url, options: [.universalLinksOnly: true]) { [weak self] openedInApp in
|
||||
if !openedInApp {
|
||||
self?.presentSafariViewController(for: url)
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
presentSafariViewController(for: url)
|
||||
}
|
||||
|
||||
private func presentSafariViewController(for url: URL) {
|
||||
let vc = SFSafariViewController(url: url)
|
||||
vc.modalPresentationStyle = .pageSheet
|
||||
present(vc, animated: true)
|
||||
}
|
||||
}
|
||||
@@ -1,103 +0,0 @@
|
||||
//
|
||||
// TroubleshootingSettingsViewController.swift
|
||||
// NetNewsWire-iOS
|
||||
//
|
||||
// Created by Brent Simmons on 11/12/26.
|
||||
// Copyright © 2026 Ranchero Software. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
import SwiftUI
|
||||
import Account
|
||||
|
||||
final class TroubleshootingSettingsViewController: UITableViewController {
|
||||
|
||||
private enum Row: CaseIterable {
|
||||
case errorLog
|
||||
case activityLog
|
||||
case accountStats
|
||||
case dinosaurs
|
||||
case cloudKitZoneStats
|
||||
|
||||
var title: String {
|
||||
switch self {
|
||||
case .errorLog:
|
||||
return NSLocalizedString("Error Log", comment: "Error Log window title")
|
||||
case .activityLog:
|
||||
return NSLocalizedString("Activity Log", comment: "Activity Log screen title")
|
||||
case .accountStats:
|
||||
return NSLocalizedString("Account Stats", comment: "Account Stats screen title")
|
||||
case .dinosaurs:
|
||||
return NSLocalizedString("Dinosaurs", comment: "Dinosaurs")
|
||||
case .cloudKitZoneStats:
|
||||
return NSLocalizedString("iCloud Storage Stats", comment: "iCloud Storage Stats window title")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static let cellIdentifier = "Cell"
|
||||
|
||||
weak var presentingParentController: UIViewController?
|
||||
|
||||
private var rows = [Row]()
|
||||
|
||||
init() {
|
||||
super.init(style: .insetGrouped)
|
||||
}
|
||||
|
||||
required init?(coder: NSCoder) {
|
||||
fatalError("init(coder:) has not been implemented")
|
||||
}
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
title = NSLocalizedString("Troubleshooting", comment: "Troubleshooting")
|
||||
tableView.register(VibrantTableViewCell.self, forCellReuseIdentifier: Self.cellIdentifier)
|
||||
|
||||
// iCloud Storage Stats is shown only when there’s an iCloud account.
|
||||
rows = Row.allCases.filter { $0 != .cloudKitZoneStats || AccountManager.shared.hasiCloudAccount }
|
||||
}
|
||||
|
||||
// MARK: - UITableViewDataSource
|
||||
|
||||
override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
|
||||
return rows.count
|
||||
}
|
||||
|
||||
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
|
||||
let cell = tableView.dequeueReusableCell(withIdentifier: Self.cellIdentifier, for: indexPath)
|
||||
cell.textLabel?.text = rows[indexPath.row].title
|
||||
cell.textLabel?.adjustsFontForContentSizeCategory = true
|
||||
cell.accessoryType = .disclosureIndicator
|
||||
return cell
|
||||
}
|
||||
|
||||
// MARK: - UITableViewDelegate
|
||||
|
||||
override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
|
||||
let viewController: UIViewController = {
|
||||
switch rows[indexPath.row] {
|
||||
case .errorLog:
|
||||
return UIHostingController(rootView: ErrorLogView())
|
||||
case .activityLog:
|
||||
return UIHostingController(rootView: ActivityLogView())
|
||||
case .accountStats:
|
||||
return UIHostingController(rootView: AccountStatsView())
|
||||
case .cloudKitZoneStats:
|
||||
return UIHostingController(rootView: CloudKitStatsView())
|
||||
case .dinosaurs:
|
||||
return UIHostingController(rootView: DinosaursView(dismissAndPresent: { [weak self] dinosaur in
|
||||
guard let self else {
|
||||
return
|
||||
}
|
||||
self.dismiss(animated: true) {
|
||||
if let rootSplit = self.presentingParentController as? RootSplitViewController {
|
||||
rootSplit.coordinator.discloseFeed(dinosaur.feed, animations: [.scroll, .navigation])
|
||||
}
|
||||
}
|
||||
}))
|
||||
}
|
||||
}()
|
||||
navigationController?.pushViewController(viewController, animated: true)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user