add credits + socials links

This commit is contained in:
leminlimez committed 2025-06-03 15:26:47 -04:00
1 parent 23966fcf80
commit 97b50da7c0
20 files changed
+950 -1

No files matched your search

@@ -0,0 +1,59 @@
//
// LinkCell.swift
// Pocket Poster
//
// Created by lemin on 6/3/25.
//
import SwiftUI
struct LinkCell: View {
var imageName: String
var url: String
var title: String
var contribution: String
var systemImage: Bool = false
var circle: Bool = false
var body: some View {
HStack(alignment: .center) {
Group {
if systemImage {
Image(systemName: imageName)
.resizable()
.aspectRatio(contentMode: .fit)
} else {
if imageName != "" {
Image(imageName)
.resizable()
.aspectRatio(contentMode: .fit)
}
}
}
.cornerRadius(circle ? .infinity : 0)
.frame(width: 24, height: 24)
VStack {
HStack {
Button(action: {
if url != "" {
UIApplication.shared.open(URL(string: url)!)
}
}) {
Text(title)
.fontWeight(.bold)
}
.padding(.horizontal, 6)
Spacer()
}
HStack {
Text(contribution)
.padding(.horizontal, 6)
.font(.footnote)
Spacer()
}
}
}
.foregroundColor(.blue)
}
}
+24 -1
View File
@@ -100,7 +100,30 @@ struct SettingsView: View {
Label("Links", systemImage: "link")
}
// TODO: Credits
// MARK: Socials
Section {
Link(destination: URL(string: "https://github.com/leminlimez/Pocket-Poster")!) {
Label("View on GitHub", image: "github.fill")
}
Link(destination: URL(string: "https://discord.gg/MN8JgqSAqT")!) {
Label("Join the Discord", image: "discord.fill")
}
Link(destination: URL(string: "https://ko-fi.com/leminlimez")!) {
Label("Support on Ko-Fi", image: "ko-fi")
}
} header: {
Label("Socials", systemImage: "globe")
}
// MARK: Credits
Section {
LinkCell(imageName: "leminlimez", url: "https://github.com/leminlimez", title: "LeminLimez", contribution: NSLocalizedString("Main Developer", comment: "leminlimez's contribution"), circle: true)
LinkCell(imageName: "sky", url: "https://bsky.app/profile/did:plc:xykfeb7ieeo335g3aly6vev4", title: "dootskyre", contribution: "Shortcut Creator", circle: true)
LinkCell(imageName: "Nathan", url: "https://github.com/verygenericname", title: "Nathan", contribution: "Exploit", circle: true)
LinkCell(imageName: "duy", url: "https://github.com/khanhduytran0", title: "DuyKhanhTran", contribution: "Exploit", circle: true)
} header: {
Label("Credits", systemImage: "wrench.and.screwdriver")
}
}
.padding()
.alert(errorAlertTitle ?? "Error", isPresented: $showErrorAlert) {