Skip to content

Commit

Permalink
Documentation links in Settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Carlos Cabanero committed Jul 25, 2023
1 parent 0b2b301 commit 8d8ec63
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 58 deletions.
26 changes: 13 additions & 13 deletions Settings/SettingsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -153,25 +153,25 @@ struct SettingsView: View {

Section("Get in touch") {
Row {
Label("Feedback", systemImage: "bubble.left")
Label("Support", systemImage: "book")
} details: {
FeedbackView()
SupportView()
}
Row {
Label("Support", systemImage: "book")
Label("Feedback", systemImage: "bubble.left")
} details: {
SupportView()
FeedbackView()
}
HStack {
Button {
BKLinkActions.sendToAppStore()
} label: {
Label("Rate Blink", systemImage: "star")
}
// HStack {
// Button {
// BKLinkActions.sendToAppStore()
// } label: {
// Label("Rate Blink", systemImage: "star")
// }

Spacer()
Text("App Store").foregroundColor(.secondary)
}
// Spacer()
// Text("App Store").foregroundColor(.secondary)
// }
}

Section {
Expand Down
1 change: 1 addition & 0 deletions Settings/ViewControllers/GetInTouch/BKLinkActions.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,6 @@
+ (void)sendToReddit;
+ (void)sendToDiscordSupport;
+ (void)sendToGithubDiscussions;
+ (void)sendToDocumentation;

@end
4 changes: 4 additions & 0 deletions Settings/ViewControllers/GetInTouch/BKLinkActions.m
Original file line number Diff line number Diff line change
Expand Up @@ -91,5 +91,9 @@ + (void)sendToGithubDiscussions {
blink_openurl(url);
}

+ (void)sendToDocumentation {
NSURL *url = [NSURL URLWithString:@"https://docs.blink.sh"];
blink_openurl(url);
}

@end
103 changes: 58 additions & 45 deletions Settings/ViewControllers/GetInTouch/SupportView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,64 +34,77 @@ import SwiftUI
import RevenueCat

struct SupportView: View {
var body: some View {
List {
Section(header: Text("Tracker")) {
HStack {
Button {
BKLinkActions.send(toGitHub: "blink/issues")
} label: {
Label("Known Issues", systemImage: "magnifyingglass")
}

Spacer()
Text("").foregroundColor(.secondary)
@EnvironmentObject private var _nav: Nav

var body: some View {
List {
Section() {
HStack {
Button {
BKLinkActions.sendToDocumentation()
} label: {
Label("Documentation", systemImage: "book")
}
HStack {
Button {
BKLinkActions.send(toGitHub: "blink/issues/new")
} label: {
Label("Report a Problem", systemImage: "plus")
}

Spacer()
Text("").foregroundColor(.secondary)
Spacer()
Text("").foregroundColor(.secondary)
}
}
Section(header: Text("Tracker")) {
HStack {
Button {
BKLinkActions.send(toGitHub: "blink/issues")
} label: {
Label("Known Issues", systemImage: "magnifyingglass")
}

Spacer()
Text("").foregroundColor(.secondary)
}

Section(header:Text("Contact us")) {
HStack {
Button {
BKLinkActions.sendToDiscordSupport()
} label: {
Label("Discord", systemImage: "ellipsis.bubble")
}

Spacer()
Text("#support").foregroundColor(.secondary)
HStack {
Button {
BKLinkActions.send(toGitHub: "blink/issues/new")
} label: {
Label("Report a Problem", systemImage: "plus")
}

HStack {
Button {
BKLinkActions.sendToGithubDiscussions()
} label: {
Label("GitHub", systemImage: "exclamationmark.bubble")
}

Spacer()
Text("Discussions").foregroundColor(.secondary)
Spacer()
Text("").foregroundColor(.secondary)
}
}

Section(header:Text("Contact us")) {
HStack {
Button {
BKLinkActions.sendToDiscordSupport()
} label: {
Label("Discord", systemImage: "ellipsis.bubble")
}

Spacer()
Text("#support").foregroundColor(.secondary)
}

Section {
HStack {
Button {
UIPasteboard.general.string = Purchases.shared.appUserID
BKLinkActions.sendToGithubDiscussions()
} label: {
Label("Copy User ID", systemImage: "doc.on.clipboard")
Label("GitHub", systemImage: "exclamationmark.bubble")
}

Spacer()
Text("Discussions").foregroundColor(.secondary)
}
}

Section {
Button {
UIPasteboard.general.string = Purchases.shared.appUserID
} label: {
Label("Copy User ID", systemImage: "doc.on.clipboard")
}
}
}
.listStyle(.grouped)
.navigationTitle("Support")
}
}
}

0 comments on commit 8d8ec63

Please sign in to comment.