mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2024-12-12 17:36:19 +01:00
50 lines
1.3 KiB
Swift
50 lines
1.3 KiB
Swift
//
|
|
// SettingsModel.swift
|
|
// Multiplatform iOS
|
|
//
|
|
// Created by Maurice Parker on 7/4/20.
|
|
// Copyright © 2020 Ranchero Software. All rights reserved.
|
|
//
|
|
|
|
import Foundation
|
|
|
|
class SettingsModel: ObservableObject {
|
|
|
|
enum HelpSites {
|
|
case netNewsWireHelp, netNewsWire, supportNetNewsWire, github, bugTracker, technotes, netNewsWireSlack, none
|
|
|
|
var url: URL? {
|
|
switch self {
|
|
case .netNewsWireHelp:
|
|
return URL(string: "https://ranchero.com/netnewswire/help/ios/5.0/en/")!
|
|
case .netNewsWire:
|
|
return URL(string: "https://ranchero.com/netnewswire/")!
|
|
case .supportNetNewsWire:
|
|
return URL(string: "https://github.com/brentsimmons/NetNewsWire/blob/master/Technotes/HowToSupportNetNewsWire.markdown")!
|
|
case .github:
|
|
return URL(string: "https://github.com/brentsimmons/NetNewsWire")!
|
|
case .bugTracker:
|
|
return URL(string: "https://github.com/brentsimmons/NetNewsWire/issues")!
|
|
case .technotes:
|
|
return URL(string: "https://github.com/brentsimmons/NetNewsWire/tree/master/Technotes")!
|
|
case .netNewsWireSlack:
|
|
return URL(string: "https://ranchero.com/netnewswire/slack")!
|
|
case .none:
|
|
return nil
|
|
}
|
|
}
|
|
}
|
|
|
|
@Published var presentSheet: Bool = false
|
|
var selectedWebsite: HelpSites = .none {
|
|
didSet {
|
|
if selectedWebsite == .none {
|
|
presentSheet = false
|
|
} else {
|
|
presentSheet = true
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|