Skip to content

Commit

Permalink
feat: finish acknowledgments, closes #104
Browse files Browse the repository at this point in the history
  • Loading branch information
voltangle committed Jul 15, 2022
1 parent 2348d54 commit 9a8ef19
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 2 deletions.
16 changes: 16 additions & 0 deletions Moc.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@
43A0AF872865197400C0A8EF /* AsyncTdFile.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43A0AF862865197400C0A8EF /* AsyncTdFile.swift */; };
43A9637B2868C8AD0076F5FD /* SkeletonUI in Frameworks */ = {isa = PBXBuildFile; productRef = 43A9637A2868C8AD0076F5FD /* SkeletonUI */; };
43ABC05D28500648009F529E /* ChatFolder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43ABC05C28500648009F529E /* ChatFolder.swift */; };
43B102952882087C009FCF53 /* Acknowledgments.plist in Resources */ = {isa = PBXBuildFile; fileRef = 43B102942882087C009FCF53 /* Acknowledgments.plist */; };
43B1029928820A82009FCF53 /* Acknowledgment.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43B1029828820A82009FCF53 /* Acknowledgment.swift */; };
43BFD915285CC2B000D8980A /* MultilineTextField.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43BFD914285CC2B000D8980A /* MultilineTextField.swift */; platformFilter = ios; };
43BFD917285CC30B00D8980A /* MultilineTextField.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43BFD916285CC30B00D8980A /* MultilineTextField.swift */; platformFilters = (macos, ); };
43BFD91C285D148100D8980A /* NWPathMonitor+Combine.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43BFD91B285D148100D8980A /* NWPathMonitor+Combine.swift */; };
Expand Down Expand Up @@ -244,6 +246,8 @@
43A0AF84286518F900C0A8EF /* MessageView+Album.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "MessageView+Album.swift"; sourceTree = "<group>"; };
43A0AF862865197400C0A8EF /* AsyncTdFile.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AsyncTdFile.swift; sourceTree = "<group>"; };
43ABC05C28500648009F529E /* ChatFolder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatFolder.swift; sourceTree = "<group>"; };
43B102942882087C009FCF53 /* Acknowledgments.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Acknowledgments.plist; sourceTree = "<group>"; };
43B1029828820A82009FCF53 /* Acknowledgment.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Acknowledgment.swift; sourceTree = "<group>"; };
43BFD914285CC2B000D8980A /* MultilineTextField.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MultilineTextField.swift; sourceTree = "<group>"; };
43BFD916285CC30B00D8980A /* MultilineTextField.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MultilineTextField.swift; sourceTree = "<group>"; };
43BFD91B285D148100D8980A /* NWPathMonitor+Combine.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NWPathMonitor+Combine.swift"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -395,6 +399,7 @@
43807D5027E213350056A3D3 /* MocApp+Injection.swift */,
43807D5127E213350056A3D3 /* Assets.xcassets */,
43807D5227E213350056A3D3 /* Preview Assets.xcassets */,
43B102942882087C009FCF53 /* Acknowledgments.plist */,
43807D5427E213350056A3D3 /* Info.plist */,
43807D5327E213350056A3D3 /* Moc.entitlements */,
);
Expand All @@ -412,6 +417,7 @@
43807D4A27E213350056A3D3 /* Models */ = {
isa = PBXGroup;
children = (
43B1029728820A6B009FCF53 /* Serialization */,
438B2286285E55B3000D65C8 /* PlaceholderStyle.swift */,
43807D4B27E213350056A3D3 /* MessageSender.swift */,
43807D4D27E213350056A3D3 /* Message.swift */,
Expand Down Expand Up @@ -585,6 +591,14 @@
path = About;
sourceTree = "<group>";
};
43B1029728820A6B009FCF53 /* Serialization */ = {
isa = PBXGroup;
children = (
43B1029828820A82009FCF53 /* Acknowledgment.swift */,
);
path = Serialization;
sourceTree = "<group>";
};
43C0F49E285A6997009F2419 /* Settings */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -739,6 +753,7 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
43B102952882087C009FCF53 /* Acknowledgments.plist in Resources */,
43807D8527E213350056A3D3 /* Preview Assets.xcassets in Resources */,
43807D8427E213350056A3D3 /* Assets.xcassets in Resources */,
);
Expand Down Expand Up @@ -822,6 +837,7 @@
43807D8327E213350056A3D3 /* MocApp+Injection.swift in Sources */,
43807D8C27E213350056A3D3 /* FoldersPrefView.swift in Sources */,
43807D9127E213350056A3D3 /* SettingsContent.swift in Sources */,
43B1029928820A82009FCF53 /* Acknowledgment.swift in Sources */,
43807D9027E213350056A3D3 /* NotificationsAndSoundsPrefView.swift in Sources */,
438B2281285E3077000D65C8 /* LighterDarker.swift in Sources */,
43008544283B59D500ED5961 /* Image+File.swift in Sources */,
Expand Down
28 changes: 28 additions & 0 deletions Moc/Acknowledgments.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>TDLibKit</key>
<string>https://github.com/mock-foundation/tdlibkit.git</string>
<key>GRDB</key>
<string>https://github.com/groue/GRDB.swift</string>
<key>Resolver</key>
<string>https://github.com/hmlongco/Resolver.git</string>
<key>Lottie</key>
<string>https://github.com/airbnb/lottie-ios.git</string>
<key>AlertToast</key>
<string>https://github.com/elai950/AlertToast</string>
<key>Introspect</key>
<string>https://github.com/siteline/SwiftUI-Introspect.git</string>
<key>Swift Algorhitms</key>
<string>https://github.com/apple/swift-algorithms.git</string>
<key>Swift Collections</key>
<string>https://github.com/apple/swift-collections.git</string>
<key>Swift Numerics</key>
<string>https://github.com/apple/swift-numerics.git</string>
<key>Defaults</key>
<string>https://github.com/sindresorhus/Defaults</string>
<key>SkeletonUI</key>
<string>https://github.com/CSolanaM/SkeletonUI.git</string>
</dict>
</plist>
13 changes: 13 additions & 0 deletions Moc/Models/Serialization/Acknowledgment.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//
// Acknowledgment.swift
// Moc
//
// Created by Егор Яковенко on 15.07.2022.
//

import Foundation

struct Acknowledgment: Codable, Hashable {
let name: String
let url: URL
}
19 changes: 17 additions & 2 deletions Moc/Views/Commands/About/AboutView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,19 @@ struct AboutView: View {
SystemUtils.info(key: "AboutAppString") as String
}

var acknowledgmentList: [Acknowledgment] {
let url = Bundle.main.url(forResource: "Acknowledgments", withExtension: "plist")!
do {
let data = try Data(contentsOf: url)
let result = try PropertyListDecoder().decode([String: String].self, from: data)
return result.map { value in
Acknowledgment(name: value.key, url: URL(string: value.value)!)
}
} catch {
return []
}
}

var body: some View {
HStack {
VStack {
Expand Down Expand Up @@ -51,9 +64,11 @@ struct AboutView: View {
VStack {
Text("Acknowledgments")
.font(.system(size: 40, weight: .medium, design: .default))
Link("**Technoblade never dies**", destination: URL(string: "https://www.curesarcoma.org/technoblade-tribute/")!)
Divider()
Link("AlertToast", destination: URL(string: "https://github.com/elai950/AlertToast")!)
Link("Defaults", destination: URL(string: "https://github.com/sindresorhus/Defaults")!)
ForEach(acknowledgmentList, id: \.self) { list in
Link(list.name, destination: list.url)
}
}.padding()
}
.overlay(alignment: .topTrailing) {
Expand Down

0 comments on commit 9a8ef19

Please sign in to comment.