This repository has been archived by the owner. It is now read-only.
Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
with
540 additions
and 36 deletions.
- +4 −0 Client.xcodeproj/project.pbxproj
- +3 −1 Client/Frontend/Browser/BrowserViewController.swift
- +41 −0 Cliqz/Extensions/BrowserViewController/Privacy.swift
- +24 −10 Cliqz/Privacy/UI/ControlCenterViewController.swift
- +51 −10 Cliqz/Privacy/UI/OverviewViewController.swift
- +98 −14 Cliqz/Privacy/UI/TrackersController.swift
- +21 −0 Cliqz/Resources/Cliqz.xcassets/ControlCenter/Social.imageset/Contents.json
- BIN Cliqz/Resources/Cliqz.xcassets/ControlCenter/Social.imageset/Social.png
- BIN Cliqz/Resources/Cliqz.xcassets/ControlCenter/advertising.imageset/Advertising.png
- +21 −0 Cliqz/Resources/Cliqz.xcassets/ControlCenter/advertising.imageset/Contents.json
- BIN Cliqz/Resources/Cliqz.xcassets/ControlCenter/audio_video_player.imageset/Audio.png
- +21 −0 Cliqz/Resources/Cliqz.xcassets/ControlCenter/audio_video_player.imageset/Contents.json
- +21 −0 Cliqz/Resources/Cliqz.xcassets/ControlCenter/blockAction.imageset/Contents.json
- BIN Cliqz/Resources/Cliqz.xcassets/ControlCenter/blockAction.imageset/x (1).png
- +21 −0 Cliqz/Resources/Cliqz.xcassets/ControlCenter/blockTracker.imageset/Contents.json
- BIN Cliqz/Resources/Cliqz.xcassets/ControlCenter/blockTracker.imageset/x.png
- BIN Cliqz/Resources/Cliqz.xcassets/ControlCenter/comments.imageset/Comments.png
- +21 −0 Cliqz/Resources/Cliqz.xcassets/ControlCenter/comments.imageset/Contents.json
- +21 −0 Cliqz/Resources/Cliqz.xcassets/ControlCenter/customer_interaction.imageset/Contents.json
- BIN Cliqz/Resources/Cliqz.xcassets/ControlCenter/customer_interaction.imageset/Customer.png
- BIN Cliqz/Resources/Cliqz.xcassets/ControlCenter/pornvertising.imageset/Adult.png
- +21 −0 Cliqz/Resources/Cliqz.xcassets/ControlCenter/pornvertising.imageset/Contents.json
- +21 −0 Cliqz/Resources/Cliqz.xcassets/ControlCenter/restrict.imageset/Contents.json
- BIN Cliqz/Resources/Cliqz.xcassets/ControlCenter/restrict.imageset/Restrict_Site.png
- +21 −0 Cliqz/Resources/Cliqz.xcassets/ControlCenter/restrictAction.imageset/Contents.json
- BIN Cliqz/Resources/Cliqz.xcassets/ControlCenter/restrictAction.imageset/o1 (1).png
- +21 −0 Cliqz/Resources/Cliqz.xcassets/ControlCenter/restrictTracker.imageset/Contents.json
- BIN Cliqz/Resources/Cliqz.xcassets/ControlCenter/restrictTracker.imageset/o1.png
- BIN Cliqz/Resources/Cliqz.xcassets/ControlCenter/site_analytics.imageset/Analytics.png
- +21 −0 Cliqz/Resources/Cliqz.xcassets/ControlCenter/site_analytics.imageset/Contents.json
- +21 −0 Cliqz/Resources/Cliqz.xcassets/ControlCenter/trust.imageset/Contents.json
- BIN Cliqz/Resources/Cliqz.xcassets/ControlCenter/trust.imageset/Trust_Site.png
- +21 −0 Cliqz/Resources/Cliqz.xcassets/ControlCenter/trustAction.imageset/Contents.json
- BIN Cliqz/Resources/Cliqz.xcassets/ControlCenter/trustAction.imageset/o (1).png
- +21 −0 Cliqz/Resources/Cliqz.xcassets/ControlCenter/trustTracker.imageset/Contents.json
- BIN Cliqz/Resources/Cliqz.xcassets/ControlCenter/trustTracker.imageset/o.png
- +4 −1 Cliqz/URLBar/CliqzURLBar.swift
| @@ -0,0 +1,41 @@ | ||
| // | ||
| // Privacy.swift | ||
| // Client | ||
| // | ||
| // Created by Sahakyan on 4/19/18. | ||
| // Copyright © 2018 Cliqz. All rights reserved. | ||
| // | ||
| import Foundation | ||
|
|
||
| let ShowControlCenterNotification = NSNotification.Name(rawValue: "showControlCenter") | ||
| let HideControlCenterNotification = NSNotification.Name(rawValue: "hideControlCenter") | ||
|
|
||
| extension BrowserViewController { | ||
|
|
||
| func showControlCenter(notification: Notification) { | ||
| if let appDel = UIApplication.shared.delegate as? AppDelegate { | ||
| let controlCenter = ControlCenterViewController() //TrackersController() | ||
| if let pageUrl = notification.object as? String { | ||
| controlCenter.trackers = TrackerList.instance.detectedTrackersForPage(pageUrl) | ||
| controlCenter.pageURL = pageUrl | ||
| } | ||
| self.addChildViewController(controlCenter) | ||
| self.view.addSubview(controlCenter.view) | ||
| controlCenter.view.snp.makeConstraints({ (make) in | ||
| make.left.right.bottom.equalToSuperview() | ||
| make.top.equalToSuperview().offset(0) | ||
| // make.top.equalToSuperview().offset(70) | ||
| }) | ||
| // appDel.presentContollerOnTop(controller: controlCenter) | ||
| } | ||
| } | ||
|
|
||
| func hideControlCenter() { | ||
| if let cc = self.childViewControllers.last, | ||
| let c = cc as? ControlCenterViewController { | ||
| c.removeFromParentViewController() | ||
| c.view.removeFromSuperview() | ||
| } | ||
| } | ||
| } |
Oops, something went wrong.