diff --git a/Cartfile b/Cartfile index a96d1ab..fdc304e 100644 --- a/Cartfile +++ b/Cartfile @@ -5,4 +5,5 @@ github "macteo/Marklight" github "Alamofire/Alamofire" "5.0.0-beta.5" github "52inc/Pulley" github "HeroTransitions/Hero" -github "ReactiveCocoa/ReactiveCocoa" ~> 9.0 \ No newline at end of file +github "ReactiveCocoa/ReactiveCocoa" ~> 9.0 +github "ZaidSA/TaggerKit" "bb826a7" \ No newline at end of file diff --git a/GDproject.xcodeproj/project.pbxproj b/GDproject.xcodeproj/project.pbxproj index 6181036..ea07cbc 100644 --- a/GDproject.xcodeproj/project.pbxproj +++ b/GDproject.xcodeproj/project.pbxproj @@ -17,6 +17,7 @@ 125BD5812217314A008A3575 /* NewsVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 125BD5802217314A008A3575 /* NewsVC.swift */; }; 1261BB93227B364C003898CF /* ChannelViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1261BB92227B364C003898CF /* ChannelViewController.swift */; }; 1261BB95227B3991003898CF /* AddToChannelVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1261BB94227B3991003898CF /* AddToChannelVC.swift */; }; + 1261BB9E227B793D003898CF /* ChatInfoViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1261BB9D227B793D003898CF /* ChatInfoViewController.swift */; }; 1288B5CE221F1158002BE6B1 /* DataStorage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1288B5CD221F1158002BE6B1 /* DataStorage.swift */; }; 1291BE2D2221312D009D3F23 /* ChannelsCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1291BE2C2221312C009D3F23 /* ChannelsCoordinator.swift */; }; 1291BE342221569B009D3F23 /* TabbarCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1291BE332221569B009D3F23 /* TabbarCoordinator.swift */; }; @@ -29,6 +30,8 @@ 12BA4B9B224101A400DF93D7 /* ApplicationCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12BA4B9A224101A400DF93D7 /* ApplicationCoordinator.swift */; }; 12BA4B9D224101E700DF93D7 /* BaseCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12BA4B9C224101E700DF93D7 /* BaseCoordinator.swift */; }; 12BA4B9F224102B700DF93D7 /* LogInCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12BA4B9E224102B700DF93D7 /* LogInCoordinator.swift */; }; + 12CE7D6F227B94B10024B6E8 /* TaggerKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 12CE7D6E227B94B00024B6E8 /* TaggerKit.framework */; }; + 12CE7D71227B94B50024B6E8 /* TaggerKit.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 12CE7D6E227B94B00024B6E8 /* TaggerKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 12D7D133221C321600B35452 /* ChannelListController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12D7D132221C321600B35452 /* ChannelListController.swift */; }; 12D7D135221C42B700B35452 /* ChannelController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12D7D134221C42B700B35452 /* ChannelController.swift */; }; 12D7D137221D78E800B35452 /* Channel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12D7D136221D78E800B35452 /* Channel.swift */; }; @@ -88,6 +91,7 @@ 12FDAC92226B5E5400995B4E /* Pulley.framework in Embed Frameworks */, 12FDAC8C226B5E4E00995B4E /* Hero.framework in Embed Frameworks */, 12FDAC90226B5E5200995B4E /* Marklight.framework in Embed Frameworks */, + 12CE7D71227B94B50024B6E8 /* TaggerKit.framework in Embed Frameworks */, 12FDACA0226B9E7C00995B4E /* ReactiveCocoa.framework in Embed Frameworks */, ); name = "Embed Frameworks"; @@ -106,6 +110,7 @@ 125BD5802217314A008A3575 /* NewsVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NewsVC.swift; sourceTree = ""; }; 1261BB92227B364C003898CF /* ChannelViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChannelViewController.swift; sourceTree = ""; }; 1261BB94227B3991003898CF /* AddToChannelVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddToChannelVC.swift; sourceTree = ""; }; + 1261BB9D227B793D003898CF /* ChatInfoViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatInfoViewController.swift; sourceTree = ""; }; 1288B5CD221F1158002BE6B1 /* DataStorage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DataStorage.swift; sourceTree = ""; }; 1291BE2C2221312C009D3F23 /* ChannelsCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChannelsCoordinator.swift; sourceTree = ""; }; 1291BE332221569B009D3F23 /* TabbarCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TabbarCoordinator.swift; sourceTree = ""; }; @@ -118,6 +123,7 @@ 12BA4B9A224101A400DF93D7 /* ApplicationCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ApplicationCoordinator.swift; sourceTree = ""; }; 12BA4B9C224101E700DF93D7 /* BaseCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseCoordinator.swift; sourceTree = ""; }; 12BA4B9E224102B700DF93D7 /* LogInCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LogInCoordinator.swift; sourceTree = ""; }; + 12CE7D6E227B94B00024B6E8 /* TaggerKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = TaggerKit.framework; path = Carthage/Build/iOS/TaggerKit.framework; sourceTree = ""; }; 12D7D132221C321600B35452 /* ChannelListController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChannelListController.swift; sourceTree = ""; }; 12D7D134221C42B700B35452 /* ChannelController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChannelController.swift; sourceTree = ""; }; 12D7D136221D78E800B35452 /* Channel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Channel.swift; sourceTree = ""; }; @@ -167,6 +173,7 @@ 12FDAC7D226B5E2900995B4E /* Result.framework in Frameworks */, 12FDAC9B226B652C00995B4E /* ReactiveSwift.framework in Frameworks */, 12FDAC7E226B5E2900995B4E /* Cartography.framework in Frameworks */, + 12CE7D6F227B94B10024B6E8 /* TaggerKit.framework in Frameworks */, 12FDAC8B226B5E4E00995B4E /* Hero.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; @@ -214,6 +221,7 @@ 129320052279B4300035C7B3 /* Messages */ = { isa = PBXGroup; children = ( + 1261BB9D227B793D003898CF /* ChatInfoViewController.swift */, 129320082279C3B50035C7B3 /* PeopleToWriteViewController.swift */, 1293200A2279D02D0035C7B3 /* DialogViewController.swift */, 129320032279B4270035C7B3 /* MessagesViewController.swift */, @@ -224,6 +232,7 @@ 12E36D8F221424EA006FCDD7 = { isa = PBXGroup; children = ( + 12CE7D6E227B94B00024B6E8 /* TaggerKit.framework */, 12FDAC9D226B9E7600995B4E /* ReactiveCocoa.framework */, 12FDAC99226B652400995B4E /* ReactiveSwift.framework */, 12FDAC95226B61C400995B4E /* TinyConstraints.framework */, @@ -414,6 +423,7 @@ 1293200D2279D7310035C7B3 /* CompletionTree.swift in Sources */, 1293200B2279D02D0035C7B3 /* DialogViewController.swift in Sources */, 12E36DCA22144635006FCDD7 /* NewPostViewController.swift in Sources */, + 1261BB9E227B793D003898CF /* ChatInfoViewController.swift in Sources */, 12E36D9E221424EA006FCDD7 /* NewsController.swift in Sources */, 12E36DCC22144725006FCDD7 /* PostViewCell.swift in Sources */, 123E37A5221F1B3200F6E42A /* LogInViewController.swift in Sources */, diff --git a/GDproject/Base.lproj/Main.storyboard b/GDproject/Base.lproj/Main.storyboard index 90133d6..e8348ef 100644 --- a/GDproject/Base.lproj/Main.storyboard +++ b/GDproject/Base.lproj/Main.storyboard @@ -11,11 +11,11 @@ - + - + @@ -546,6 +546,97 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -593,7 +684,7 @@ - + @@ -621,7 +712,7 @@ - + @@ -709,5 +800,6 @@ + diff --git a/GDproject/Controller/ News and channels/ChannelViewController.swift b/GDproject/Controller/ News and channels/ChannelViewController.swift index ee5ec3e..ad5079f 100644 --- a/GDproject/Controller/ News and channels/ChannelViewController.swift +++ b/GDproject/Controller/ News and channels/ChannelViewController.swift @@ -129,7 +129,7 @@ class ChannelViewController: UITableViewController, UpdatableName, UpdatableChan let cell = tableView.dequeueReusableCell(withIdentifier: "cell", for: indexPath) if section == 1 { - cell.textLabel?.text = Model.Channels.fullPeopleDict[channel?.people[row-1] ?? 0]?.fullName() + cell.textLabel?.text = "👤 \(Model.Channels.fullPeopleDict[channel?.people[row-1] ?? 0]!.fullName())" } else { cell.textLabel?.text = "# \(channel!.tags[row-1])" } diff --git a/GDproject/Controller/Messages/ChatInfoViewController.swift b/GDproject/Controller/Messages/ChatInfoViewController.swift new file mode 100644 index 0000000..d7a9c4f --- /dev/null +++ b/GDproject/Controller/Messages/ChatInfoViewController.swift @@ -0,0 +1,94 @@ +// +// ChatInfoViewController.swift +// GDproject +// +// Created by cstore on 02/05/2019. +// Copyright © 2019 drHSE. All rights reserved. +// + +import UIKit + + +/// Class for displaying chat info +/// +class ChatInfoViewController: UITableViewController { + + + override func viewDidLoad() { + super.viewDidLoad() + + // Uncomment the following line to preserve selection between presentations + // self.clearsSelectionOnViewWillAppear = false + + // Uncomment the following line to display an Edit button in the navigation bar for this view controller. + // self.navigationItem.rightBarButtonItem = self.editButtonItem + } + + // MARK: - Table view data source + + override func numberOfSections(in tableView: UITableView) -> Int { + // #warning Incomplete implementation, return the number of sections + return 0 + } + + override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + // #warning Incomplete implementation, return the number of rows + return 0 + } + + /* + override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + let cell = tableView.dequeueReusableCell(withIdentifier: "reuseIdentifier", for: indexPath) + + // Configure the cell... + + return cell + } + */ + + /* + // Override to support conditional editing of the table view. + override func tableView(_ tableView: UITableView, canEditRowAt indexPath: IndexPath) -> Bool { + // Return false if you do not want the specified item to be editable. + return true + } + */ + + /* + // Override to support editing the table view. + override func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCell.EditingStyle, forRowAt indexPath: IndexPath) { + if editingStyle == .delete { + // Delete the row from the data source + tableView.deleteRows(at: [indexPath], with: .fade) + } else if editingStyle == .insert { + // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view + } + } + */ + + /* + // Override to support rearranging the table view. + override func tableView(_ tableView: UITableView, moveRowAt fromIndexPath: IndexPath, to: IndexPath) { + + } + */ + + /* + // Override to support conditional rearranging of the table view. + override func tableView(_ tableView: UITableView, canMoveRowAt indexPath: IndexPath) -> Bool { + // Return false if you do not want the item to be re-orderable. + return true + } + */ + + /* + // MARK: - Navigation + + // In a storyboard-based application, you will often want to do a little preparation before navigation + override func prepare(for segue: UIStoryboardSegue, sender: Any?) { + // Get the new view controller using segue.destination. + // Pass the selected object to the new view controller. + } + */ + +} diff --git a/GDproject/Controller/Messages/DialogViewController.swift b/GDproject/Controller/Messages/DialogViewController.swift index 635a219..2c9e462 100644 --- a/GDproject/Controller/Messages/DialogViewController.swift +++ b/GDproject/Controller/Messages/DialogViewController.swift @@ -9,6 +9,8 @@ import UIKit class DialogViewController: UITableViewController { + + var onInfoShow: (()->())? var currentDialog: (id: Int, name: String)? diff --git a/GDproject/Controller/Messages/PeopleToWriteViewController.swift b/GDproject/Controller/Messages/PeopleToWriteViewController.swift index 4e0bea8..0f075fc 100644 --- a/GDproject/Controller/Messages/PeopleToWriteViewController.swift +++ b/GDproject/Controller/Messages/PeopleToWriteViewController.swift @@ -10,6 +10,8 @@ import UIKit class PeopleToWriteViewController: UITableViewController { + // TODO: - edit button when it's used for selection + let searchC = UISearchController(searchResultsController: nil) let users = [(id: 9,name: "Anna Mikhaleva")] diff --git a/GDproject/Supporting files/Assets.xcassets/chat.imageset/Contents.json b/GDproject/Supporting files/Assets.xcassets/chat.imageset/Contents.json new file mode 100644 index 0000000..98484a4 --- /dev/null +++ b/GDproject/Supporting files/Assets.xcassets/chat.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "chat.pdf", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/GDproject/Supporting files/Assets.xcassets/chat.imageset/chat.pdf b/GDproject/Supporting files/Assets.xcassets/chat.imageset/chat.pdf new file mode 100644 index 0000000..285bf16 Binary files /dev/null and b/GDproject/Supporting files/Assets.xcassets/chat.imageset/chat.pdf differ