diff --git a/ios/HackerNews/AppViewModel.swift b/ios/HackerNews/AppViewModel.swift index 2993b9ab..6b7c32b4 100644 --- a/ios/HackerNews/AppViewModel.swift +++ b/ios/HackerNews/AppViewModel.swift @@ -233,6 +233,12 @@ final class AppViewModel { func openLink(url: URL) { navigationPath.append(AppNavigation.webLink(url: url, title: "")) } + + func openSafariLink(url: URL) { + // X.com disables WKWebview, so lets open in safari + // Safari Services doesn't play well with SwiftUI + UIApplication.shared.open(url) + } func toggleBookmark(_ item: StoryContent) { let currentStories = feedState.storiesForFeed(feedState.selectedFeed) diff --git a/ios/HackerNews/Assets.xcassets/Colors/Sentry.colorset/Contents.json b/ios/HackerNews/Assets.xcassets/Colors/Sentry.colorset/Contents.json new file mode 100644 index 00000000..89b5d889 --- /dev/null +++ b/ios/HackerNews/Assets.xcassets/Colors/Sentry.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x59", + "green" : "0x2D", + "red" : "0x36" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "1.000", + "green" : "1.000", + "red" : "1.000" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ios/HackerNews/Assets.xcassets/Sentry.symbolset/Contents.json b/ios/HackerNews/Assets.xcassets/Sentry.symbolset/Contents.json new file mode 100644 index 00000000..99ded371 --- /dev/null +++ b/ios/HackerNews/Assets.xcassets/Sentry.symbolset/Contents.json @@ -0,0 +1,12 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + }, + "symbols" : [ + { + "filename" : "Sentry.symbols.svg", + "idiom" : "universal" + } + ] +} diff --git a/ios/HackerNews/Assets.xcassets/Sentry.symbolset/Sentry.symbols.svg b/ios/HackerNews/Assets.xcassets/Sentry.symbolset/Sentry.symbols.svg new file mode 100644 index 00000000..8033f86a --- /dev/null +++ b/ios/HackerNews/Assets.xcassets/Sentry.symbolset/Sentry.symbols.svg @@ -0,0 +1,103 @@ + + + + + + + + + + Weight/Scale Variations + Ultralight + Thin + Light + Regular + Medium + Semibold + Bold + Heavy + Black + + + + + + + + + + + Design Variations + Symbols are supported in up to nine weights and three scales. + For optimal layout with text and other symbols, vertically align + symbols with the adjacent text. + + + + + + Margins + Leading and trailing margins on the left and right side of each symbol + can be adjusted by modifying the x-location of the margin guidelines. + Modifications are automatically applied proportionally to all + scales and weights. + + + + Exporting + Symbols should be outlined when exporting to ensure the + design is preserved when submitting to Xcode. + Template v.6.0 + Requires Xcode 16 or greater + Generated from Sentry.symbols + Typeset at 100.0 points + Small + Medium + Large + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ios/HackerNews/Localizable.xcstrings b/ios/HackerNews/Localizable.xcstrings index 8b137df1..922ba063 100644 --- a/ios/HackerNews/Localizable.xcstrings +++ b/ios/HackerNews/Localizable.xcstrings @@ -385,6 +385,17 @@ } } }, + "settings.row.followSentry" : { + "extractionState" : "manual", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Follow Sentry" + } + } + } + }, "settings.row.followSupergooey" : { "extractionState" : "manual", "localizations" : { diff --git a/ios/HackerNews/Settings/SettingsScreen.swift b/ios/HackerNews/Settings/SettingsScreen.swift index ed053887..0f5adfb5 100644 --- a/ios/HackerNews/Settings/SettingsScreen.swift +++ b/ios/HackerNews/Settings/SettingsScreen.swift @@ -43,9 +43,27 @@ struct SettingsScreen: View { }, action: { - model.openLink( - url: URL(string: "https://www.twitter.com/emergetools")!) + model.openSafariLink( + url: URL(string: "https://www.x.com/emergetools")!) + } + ) + + SettingsRow( + text: "Fake text dont land", + leadingIcon: { + Image("Sentry") + .font(.system(size: 12)) + .foregroundStyle(HNColors.sentry) + }, + trailingIcon: { + Image(systemName: "arrow.up.right") + .font(.system(size: 12)) + .foregroundStyle(.onBackground) + }, + action: { + model.openSafariLink( + url: URL(string: "https://www.x.com/sentry")!) } ) @@ -63,8 +81,8 @@ struct SettingsScreen: View { }, action: { - model.openLink( - url: URL(string: "https://www.twitter.com/heyrikin")!) + model.openSafariLink( + url: URL(string: "https://www.x.com/heyrikin")!) } ) diff --git a/ios/Packages/Common/Sources/Common/Utils/Colors.swift b/ios/Packages/Common/Sources/Common/Utils/Colors.swift index 3fb8cb4d..750c21ce 100644 --- a/ios/Packages/Common/Sources/Common/Utils/Colors.swift +++ b/ios/Packages/Common/Sources/Common/Utils/Colors.swift @@ -13,4 +13,5 @@ public struct HNColors { public static let background = Color("Background") public static let commentBackground = Color("CommentBackground") public static let red = Color("HNRed") + public static let sentry = Color("Sentry") }