mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-23 22:53:43 +00:00
Organic Maps sources as of 02.04.2025 (fad26bbf22ac3da75e01e62aa01e5c8e11861005)
To expand with full Organic Maps and Maps.ME commits history run: git remote add om-historic [om-historic.git repo url] git fetch --tags om-historic git replace squashed-history historic-commits
This commit is contained in:
71
iphone/Maps/UI/Help/AboutController/Models/AboutInfo.swift
Normal file
71
iphone/Maps/UI/Help/AboutController/Models/AboutInfo.swift
Normal file
@@ -0,0 +1,71 @@
|
||||
enum AboutInfo {
|
||||
case faq
|
||||
case reportABug
|
||||
case reportMapDataProblem
|
||||
case volunteer
|
||||
case news
|
||||
case rateTheApp
|
||||
case noTracking
|
||||
case noWifi
|
||||
case community
|
||||
|
||||
var title: String {
|
||||
switch self {
|
||||
|
||||
case .faq:
|
||||
return L("faq")
|
||||
case .reportABug:
|
||||
return L("report_a_bug")
|
||||
case .reportMapDataProblem:
|
||||
return L("report_incorrect_map_bug")
|
||||
case .volunteer:
|
||||
return L("volunteer")
|
||||
case .news:
|
||||
return L("news")
|
||||
case .rateTheApp:
|
||||
return L("rate_the_app")
|
||||
case .noTracking:
|
||||
return L("about_proposition_1")
|
||||
case .noWifi:
|
||||
return L("about_proposition_2")
|
||||
case .community:
|
||||
return L("about_proposition_3")
|
||||
}
|
||||
}
|
||||
|
||||
var image: UIImage? {
|
||||
switch self {
|
||||
case .faq:
|
||||
return UIImage(named: "ic_about_faq")!
|
||||
case .reportABug:
|
||||
return UIImage(named: "ic_about_report_bug")!
|
||||
case .reportMapDataProblem:
|
||||
return UIImage(named: "ic_about_report_osm")!
|
||||
case .volunteer:
|
||||
return UIImage(named: "ic_about_volunteer")!
|
||||
case .news:
|
||||
return UIImage(named: "ic_about_news")!
|
||||
case .rateTheApp:
|
||||
return UIImage(named: "ic_about_rate_app")!
|
||||
case .noTracking, .noWifi, .community:
|
||||
// Dots are used for these cases
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
var link: String? {
|
||||
switch self {
|
||||
case .faq, .rateTheApp, .noTracking, .noWifi, .community:
|
||||
// These cases don't provide redirection to the web
|
||||
return nil
|
||||
case .reportABug:
|
||||
return "ios@organicmaps.app"
|
||||
case .reportMapDataProblem:
|
||||
return "https://www.openstreetmap.org/fixthemap"
|
||||
case .volunteer:
|
||||
return L("translated_om_site_url") + "support-us/"
|
||||
case .news:
|
||||
return L("translated_om_site_url") + "news/"
|
||||
}
|
||||
}
|
||||
}
|
||||
62
iphone/Maps/UI/Help/AboutController/Models/SocialMedia.swift
Normal file
62
iphone/Maps/UI/Help/AboutController/Models/SocialMedia.swift
Normal file
@@ -0,0 +1,62 @@
|
||||
enum SocialMedia {
|
||||
case telegram
|
||||
case twitter
|
||||
case instagram
|
||||
case facebook
|
||||
case reddit
|
||||
case matrix
|
||||
case fosstodon
|
||||
case linkedin
|
||||
case organicMapsEmail
|
||||
case github
|
||||
|
||||
var link: String {
|
||||
switch self {
|
||||
case .telegram:
|
||||
return L("telegram_url")
|
||||
case .github:
|
||||
return "https://github.com/organicmaps/organicmaps/"
|
||||
case .linkedin:
|
||||
return "https://www.linkedin.com/company/organic-maps/"
|
||||
case .organicMapsEmail:
|
||||
return "ios@organicmaps.app"
|
||||
case .matrix:
|
||||
return "https://matrix.to/#/#organicmaps:matrix.org"
|
||||
case .fosstodon:
|
||||
return "https://fosstodon.org/@organicmaps"
|
||||
case .facebook:
|
||||
return "https://facebook.com/OrganicMaps"
|
||||
case .twitter:
|
||||
return "https://twitter.com/OrganicMapsApp"
|
||||
case .instagram:
|
||||
return L("instagram_url")
|
||||
case .reddit:
|
||||
return "https://www.reddit.com/r/organicmaps/"
|
||||
}
|
||||
}
|
||||
|
||||
var image: UIImage {
|
||||
switch self {
|
||||
case .telegram:
|
||||
return UIImage(named: "ic_social_media_telegram")!
|
||||
case .github:
|
||||
return UIImage(named: "ic_social_media_github")!
|
||||
case .linkedin:
|
||||
return UIImage(named: "ic_social_media_linkedin")!
|
||||
case .organicMapsEmail:
|
||||
return UIImage(named: "ic_social_media_mail")!
|
||||
case .matrix:
|
||||
return UIImage(named: "ic_social_media_matrix")!
|
||||
case .fosstodon:
|
||||
return UIImage(named: "ic_social_media_fosstodon")!
|
||||
case .facebook:
|
||||
return UIImage(named: "ic_social_media_facebook")!
|
||||
case .twitter:
|
||||
return UIImage(named: "ic_social_media_x")!
|
||||
case .instagram:
|
||||
return UIImage(named: "ic_social_media_instagram")!
|
||||
case .reddit:
|
||||
return UIImage(named: "ic_social_media_reddit")!
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user