WIP
This commit is contained in:
parent
b931ec9394
commit
bb044828ee
|
@ -618,6 +618,7 @@
|
|||
B9EB5ABD1884C002007CBB57 /* MessageUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B9EB5ABC1884C002007CBB57 /* MessageUI.framework */; };
|
||||
BFF3FB9730634F37D25903F4 /* Pods_Signal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D17BB5C25D615AB49813100C /* Pods_Signal.framework */; };
|
||||
C34C8F7423A7830B00D82669 /* SpaceMono-Bold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = C34C8F7323A7830A00D82669 /* SpaceMono-Bold.ttf */; };
|
||||
C354E75A23FE2A7600CE22E3 /* BaseVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = C354E75923FE2A7600CE22E3 /* BaseVC.swift */; };
|
||||
C3DFFAC623E96F0D0058DAF8 /* Sheet.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3DFFAC523E96F0D0058DAF8 /* Sheet.swift */; };
|
||||
C3DFFAC823E970080058DAF8 /* OpenGroupSuggestionSheet.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3DFFAC723E970080058DAF8 /* OpenGroupSuggestionSheet.swift */; };
|
||||
CC875800737563D6891B741D /* Pods_SignalTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 748A5CAEDD7C919FC64C6807 /* Pods_SignalTests.framework */; };
|
||||
|
@ -1466,6 +1467,7 @@
|
|||
B97940261832BD2400BD66CB /* UIUtil.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UIUtil.m; sourceTree = "<group>"; };
|
||||
B9EB5ABC1884C002007CBB57 /* MessageUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MessageUI.framework; path = System/Library/Frameworks/MessageUI.framework; sourceTree = SDKROOT; };
|
||||
C34C8F7323A7830A00D82669 /* SpaceMono-Bold.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "SpaceMono-Bold.ttf"; sourceTree = "<group>"; };
|
||||
C354E75923FE2A7600CE22E3 /* BaseVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseVC.swift; sourceTree = "<group>"; };
|
||||
C3DFFAC523E96F0D0058DAF8 /* Sheet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Sheet.swift; sourceTree = "<group>"; };
|
||||
C3DFFAC723E970080058DAF8 /* OpenGroupSuggestionSheet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OpenGroupSuggestionSheet.swift; sourceTree = "<group>"; };
|
||||
D17BB5C25D615AB49813100C /* Pods_Signal.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Signal.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
|
@ -2841,6 +2843,7 @@
|
|||
B8CCF63D2397580E0091D419 /* View Controllers */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
C354E75923FE2A7600CE22E3 /* BaseVC.swift */,
|
||||
B885D5F3233491AB00EE0D8E /* DeviceLinkingModal.swift */,
|
||||
B894D0702339D6F300B4D94D /* DeviceLinkingModalDelegate.swift */,
|
||||
B80C6B562384A56D00FDBC8B /* DeviceLinksVC.swift */,
|
||||
|
@ -4026,6 +4029,7 @@
|
|||
45B5360E206DD8BB00D61655 /* UIResponder+OWS.swift in Sources */,
|
||||
4CFE6B6C21F92BA700006701 /* LegacyNotificationsAdaptee.swift in Sources */,
|
||||
B8CCF6432397711F0091D419 /* SettingsVC.swift in Sources */,
|
||||
C354E75A23FE2A7600CE22E3 /* BaseVC.swift in Sources */,
|
||||
3441FD9F21A3604F00BB9542 /* BackupRestoreViewController.swift in Sources */,
|
||||
45F659821E1BE77000444429 /* NonCallKitCallUIAdaptee.swift in Sources */,
|
||||
4C5250D221E7BD7D00CE3D95 /* PhoneNumberValidator.swift in Sources */,
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<key>BuildDetails</key>
|
||||
<dict>
|
||||
<key>CarthageVersion</key>
|
||||
<string>0.34.0</string>
|
||||
<string>0.33.0</string>
|
||||
<key>OSXVersion</key>
|
||||
<string>10.15.3</string>
|
||||
<key>WebRTCCommit</key>
|
||||
|
@ -157,6 +157,6 @@
|
|||
<string>UIInterfaceOrientationPortrait</string>
|
||||
</array>
|
||||
<key>UIViewControllerBasedStatusBarAppearance</key>
|
||||
<false/>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
|
||||
class BaseVC : UIViewController {
|
||||
|
||||
override var preferredStatusBarStyle: UIStatusBarStyle { return isLightMode ? .default : .lightContent }
|
||||
|
||||
override func viewDidLoad() {
|
||||
setNeedsStatusBarAppearanceUpdate()
|
||||
}
|
||||
}
|
|
@ -2,7 +2,7 @@
|
|||
// MARK: - Device Links View Controller
|
||||
|
||||
@objc(LKDeviceLinksVC)
|
||||
final class DeviceLinksVC : UIViewController, UITableViewDataSource, UITableViewDelegate, DeviceLinkingModalDelegate, DeviceNameModalDelegate {
|
||||
final class DeviceLinksVC : BaseVC, UITableViewDataSource, UITableViewDelegate, DeviceLinkingModalDelegate, DeviceNameModalDelegate {
|
||||
private var deviceLinks: [DeviceLink] = [] { didSet { updateUI() } }
|
||||
|
||||
// MARK: Components
|
||||
|
@ -24,10 +24,10 @@ final class DeviceLinksVC : UIViewController, UITableViewDataSource, UITableView
|
|||
explanationLabel.lineBreakMode = .byWordWrapping
|
||||
explanationLabel.textAlignment = .center
|
||||
explanationLabel.text = NSLocalizedString("You haven't linked any devices yet", comment: "")
|
||||
let linkNewDeviceButton = Button(style: .prominentOutline, size: .medium)
|
||||
let linkNewDeviceButton = Button(style: .prominentOutline, size: .large)
|
||||
linkNewDeviceButton.setTitle(NSLocalizedString("Link a Device", comment: ""), for: UIControl.State.normal)
|
||||
linkNewDeviceButton.addTarget(self, action: #selector(linkNewDevice), for: UIControl.Event.touchUpInside)
|
||||
linkNewDeviceButton.set(.width, to: 160)
|
||||
linkNewDeviceButton.set(.width, to: 180)
|
||||
let result = UIStackView(arrangedSubviews: [ explanationLabel, linkNewDeviceButton ])
|
||||
result.axis = .vertical
|
||||
result.spacing = Values.mediumSpacing
|
||||
|
@ -37,6 +37,7 @@ final class DeviceLinksVC : UIViewController, UITableViewDataSource, UITableView
|
|||
|
||||
// MARK: Lifecycle
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
// Set gradient background
|
||||
view.backgroundColor = .clear
|
||||
let gradient = Gradients.defaultLokiBackground
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
final class DisplayNameVC : UIViewController {
|
||||
final class DisplayNameVC : BaseVC {
|
||||
private var spacer1HeightConstraint: NSLayoutConstraint!
|
||||
private var spacer2HeightConstraint: NSLayoutConstraint!
|
||||
private var registerButtonBottomOffsetConstraint: NSLayoutConstraint!
|
||||
|
@ -12,11 +12,9 @@ final class DisplayNameVC : UIViewController {
|
|||
return result
|
||||
}()
|
||||
|
||||
// MARK: Settings
|
||||
override var preferredStatusBarStyle: UIStatusBarStyle { return isLightMode ? .default : .lightContent }
|
||||
|
||||
// MARK: Lifecycle
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
// Set gradient background
|
||||
view.backgroundColor = .clear
|
||||
let gradient = Gradients.defaultLokiBackground
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
@objc(LKGroupMembersVC)
|
||||
final class GroupMembersVC : UIViewController, UITableViewDataSource {
|
||||
final class GroupMembersVC : BaseVC, UITableViewDataSource {
|
||||
private let thread: TSGroupThread
|
||||
|
||||
private lazy var members: [String] = {
|
||||
|
@ -32,6 +32,7 @@ final class GroupMembersVC : UIViewController, UITableViewDataSource {
|
|||
override init(nibName: String?, bundle: Bundle?) { fatalError("Using GroupMembersVC.init(nibName:bundle:) isn't allowed. Use GroupMembersVC.init(thread:) instead.") }
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
// Set gradient background
|
||||
view.backgroundColor = .clear
|
||||
let gradient = Gradients.defaultLokiBackground
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
final class HomeVC : UIViewController, UITableViewDataSource, UITableViewDelegate, UIScrollViewDelegate, UIViewControllerPreviewingDelegate, SeedReminderViewDelegate {
|
||||
final class HomeVC : BaseVC, UITableViewDataSource, UITableViewDelegate, UIScrollViewDelegate, UIViewControllerPreviewingDelegate, SeedReminderViewDelegate {
|
||||
private var threadViewModelCache: [String:ThreadViewModel] = [:]
|
||||
private var isObservingDatabase = true
|
||||
private var isViewVisible = false { didSet { updateIsObservingDatabase() } }
|
||||
|
@ -19,9 +19,6 @@ final class HomeVC : UIViewController, UITableViewDataSource, UITableViewDelegat
|
|||
|
||||
private let editingDatabaseConnection = OWSPrimaryStorage.shared().newDatabaseConnection()
|
||||
|
||||
// MARK: Settings
|
||||
override var preferredStatusBarStyle: UIStatusBarStyle { return isLightMode ? .default : .lightContent }
|
||||
|
||||
// MARK: Components
|
||||
private lazy var seedReminderView: SeedReminderView = {
|
||||
let result = SeedReminderView(hasContinueButton: true)
|
||||
|
@ -68,6 +65,7 @@ final class HomeVC : UIViewController, UITableViewDataSource, UITableViewDelegat
|
|||
|
||||
// MARK: Lifecycle
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
SignalApp.shared().homeViewController = self
|
||||
// Set gradient background
|
||||
view.backgroundColor = .clear
|
||||
|
@ -263,11 +261,13 @@ final class HomeVC : UIViewController, UITableViewDataSource, UITableViewDelegat
|
|||
profilePictureView.addGestureRecognizer(tapGestureRecognizer)
|
||||
navigationItem.leftBarButtonItem = UIBarButtonItem(customView: profilePictureView)
|
||||
let newClosedGroupButton = UIButton(type: .custom)
|
||||
newClosedGroupButton.setImage(#imageLiteral(resourceName: "btnGroup--white"), for: UIControl.State.normal)
|
||||
let newClosedGroupIcon = #imageLiteral(resourceName: "btnGroup--white").asTintedImage(color: Colors.text)!
|
||||
newClosedGroupButton.setImage(newClosedGroupIcon, for: UIControl.State.normal)
|
||||
newClosedGroupButton.addTarget(self, action: #selector(createClosedGroup), for: UIControl.Event.touchUpInside)
|
||||
newClosedGroupButton.tintColor = Colors.text
|
||||
let joinPublicChatButton = UIButton(type: .custom)
|
||||
joinPublicChatButton.setImage(#imageLiteral(resourceName: "Globe"), for: UIControl.State.normal)
|
||||
let joinPublicChatIcon = #imageLiteral(resourceName: "Globe").asTintedImage(color: Colors.text)!
|
||||
joinPublicChatButton.setImage(joinPublicChatIcon, for: UIControl.State.normal)
|
||||
joinPublicChatButton.addTarget(self, action: #selector(joinPublicChat), for: UIControl.Event.touchUpInside)
|
||||
joinPublicChatButton.tintColor = Colors.text
|
||||
let buttonStackView = UIStackView(arrangedSubviews: [ newClosedGroupButton, joinPublicChatButton ])
|
||||
|
|
|
@ -1,13 +1,10 @@
|
|||
|
||||
final class JoinPublicChatVC : UIViewController, UIPageViewControllerDataSource, UIPageViewControllerDelegate, OWSQRScannerDelegate {
|
||||
final class JoinPublicChatVC : BaseVC, UIPageViewControllerDataSource, UIPageViewControllerDelegate, OWSQRScannerDelegate {
|
||||
private let pageVC = UIPageViewController(transitionStyle: .scroll, navigationOrientation: .horizontal, options: nil)
|
||||
private var pages: [UIViewController] = []
|
||||
private var isJoining = false
|
||||
private var targetVCIndex: Int?
|
||||
|
||||
// MARK: Settings
|
||||
override var preferredStatusBarStyle: UIStatusBarStyle { return isLightMode ? .default : .lightContent }
|
||||
|
||||
// MARK: Components
|
||||
private lazy var tabBar: TabBar = {
|
||||
let tabs = [
|
||||
|
@ -44,6 +41,7 @@ final class JoinPublicChatVC : UIViewController, UIPageViewControllerDataSource,
|
|||
|
||||
// MARK: Lifecycle
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
// Set gradient background
|
||||
view.backgroundColor = .clear
|
||||
let gradient = Gradients.defaultLokiBackground
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
final class LandingVC : UIViewController, LinkDeviceVCDelegate, DeviceLinkingModalDelegate {
|
||||
final class LandingVC : BaseVC, LinkDeviceVCDelegate, DeviceLinkingModalDelegate {
|
||||
private var fakeChatViewContentOffset: CGPoint!
|
||||
|
||||
// MARK: Components
|
||||
|
@ -33,11 +33,9 @@ final class LandingVC : UIViewController, LinkDeviceVCDelegate, DeviceLinkingMod
|
|||
return result
|
||||
}()
|
||||
|
||||
// MARK: Settings
|
||||
override var preferredStatusBarStyle: UIStatusBarStyle { return isLightMode ? .default : .lightContent }
|
||||
|
||||
// MARK: Lifecycle
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
// Set gradient background
|
||||
view.backgroundColor = .clear
|
||||
let gradient = Gradients.defaultLokiBackground
|
||||
|
|
|
@ -1,13 +1,10 @@
|
|||
|
||||
final class LinkDeviceVC : UIViewController, UIPageViewControllerDataSource, UIPageViewControllerDelegate, OWSQRScannerDelegate {
|
||||
final class LinkDeviceVC : BaseVC, UIPageViewControllerDataSource, UIPageViewControllerDelegate, OWSQRScannerDelegate {
|
||||
private let pageVC = UIPageViewController(transitionStyle: .scroll, navigationOrientation: .horizontal, options: nil)
|
||||
private var pages: [UIViewController] = []
|
||||
private var targetVCIndex: Int?
|
||||
var delegate: LinkDeviceVCDelegate?
|
||||
|
||||
// MARK: Settings
|
||||
override var preferredStatusBarStyle: UIStatusBarStyle { return isLightMode ? .default : .lightContent }
|
||||
|
||||
// MARK: Components
|
||||
private lazy var tabBar: TabBar = {
|
||||
let tabs = [
|
||||
|
@ -44,6 +41,7 @@ final class LinkDeviceVC : UIViewController, UIPageViewControllerDataSource, UIP
|
|||
|
||||
// MARK: Lifecycle
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
// Set gradient background
|
||||
view.backgroundColor = .clear
|
||||
let gradient = Gradients.defaultLokiBackground
|
||||
|
@ -174,6 +172,7 @@ private final class EnterPublicKeyVC : UIViewController {
|
|||
// Link button
|
||||
let linkButton = Button(style: .prominentOutline, size: .large)
|
||||
linkButton.setTitle(NSLocalizedString("Continue", comment: ""), for: UIControl.State.normal)
|
||||
linkButton.titleLabel!.font = .boldSystemFont(ofSize: Values.mediumFontSize)
|
||||
linkButton.addTarget(self, action: #selector(requestDeviceLink), for: UIControl.Event.touchUpInside)
|
||||
let linkButtonContainer = UIView()
|
||||
linkButtonContainer.addSubview(linkButton)
|
||||
|
|
|
@ -1,11 +1,8 @@
|
|||
|
||||
@objc(LKModal)
|
||||
class Modal : UIViewController {
|
||||
class Modal : BaseVC {
|
||||
private(set) var verticalCenteringConstraint: NSLayoutConstraint!
|
||||
|
||||
// MARK: Settings
|
||||
override var preferredStatusBarStyle: UIStatusBarStyle { return isLightMode ? .default : .lightContent }
|
||||
|
||||
// MARK: Components
|
||||
lazy var contentView: UIView = {
|
||||
let result = UIView()
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
final class NewClosedGroupVC : UIViewController, UITableViewDataSource, UITableViewDelegate {
|
||||
final class NewClosedGroupVC : BaseVC, UITableViewDataSource, UITableViewDelegate {
|
||||
private var selectedContacts: Set<String> = []
|
||||
|
||||
private lazy var contacts: [String] = {
|
||||
|
@ -44,6 +44,7 @@ final class NewClosedGroupVC : UIViewController, UITableViewDataSource, UITableV
|
|||
|
||||
// MARK: Lifecycle
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
// Set gradient background
|
||||
view.backgroundColor = .clear
|
||||
let gradient = Gradients.defaultLokiBackground
|
||||
|
@ -104,10 +105,10 @@ final class NewClosedGroupVC : UIViewController, UITableViewDataSource, UITableV
|
|||
explanationLabel.lineBreakMode = .byWordWrapping
|
||||
explanationLabel.textAlignment = .center
|
||||
explanationLabel.text = NSLocalizedString("You don't have any contacts yet", comment: "")
|
||||
let createNewPrivateChatButton = Button(style: .prominentOutline, size: .medium)
|
||||
let createNewPrivateChatButton = Button(style: .prominentOutline, size: .large)
|
||||
createNewPrivateChatButton.setTitle(NSLocalizedString("Start a Session", comment: ""), for: UIControl.State.normal)
|
||||
createNewPrivateChatButton.addTarget(self, action: #selector(createPrivateChat), for: UIControl.Event.touchUpInside)
|
||||
createNewPrivateChatButton.set(.width, to: 160)
|
||||
createNewPrivateChatButton.set(.width, to: 180)
|
||||
let stackView = UIStackView(arrangedSubviews: [ explanationLabel, createNewPrivateChatButton ])
|
||||
stackView.axis = .vertical
|
||||
stackView.spacing = Values.mediumSpacing
|
||||
|
|
|
@ -1,12 +1,9 @@
|
|||
|
||||
final class NewPrivateChatVC : UIViewController, UIPageViewControllerDataSource, UIPageViewControllerDelegate, OWSQRScannerDelegate {
|
||||
final class NewPrivateChatVC : BaseVC, UIPageViewControllerDataSource, UIPageViewControllerDelegate, OWSQRScannerDelegate {
|
||||
private let pageVC = UIPageViewController(transitionStyle: .scroll, navigationOrientation: .horizontal, options: nil)
|
||||
private var pages: [UIViewController] = []
|
||||
private var targetVCIndex: Int?
|
||||
|
||||
// MARK: Settings
|
||||
override var preferredStatusBarStyle: UIStatusBarStyle { return isLightMode ? .default : .lightContent }
|
||||
|
||||
// MARK: Components
|
||||
private lazy var tabBar: TabBar = {
|
||||
let tabs = [
|
||||
|
@ -43,6 +40,7 @@ final class NewPrivateChatVC : UIViewController, UIPageViewControllerDataSource,
|
|||
|
||||
// MARK: Lifecycle
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
// Set gradient background
|
||||
view.backgroundColor = .clear
|
||||
let gradient = Gradients.defaultLokiBackground
|
||||
|
|
|
@ -1,13 +1,10 @@
|
|||
|
||||
final class QRCodeVC : UIViewController, UIPageViewControllerDataSource, UIPageViewControllerDelegate, OWSQRScannerDelegate {
|
||||
final class QRCodeVC : BaseVC, UIPageViewControllerDataSource, UIPageViewControllerDelegate, OWSQRScannerDelegate {
|
||||
private let pageVC = UIPageViewController(transitionStyle: .scroll, navigationOrientation: .horizontal, options: nil)
|
||||
private var pages: [UIViewController] = []
|
||||
private var targetVCIndex: Int?
|
||||
private var tabBarTopConstraint: NSLayoutConstraint!
|
||||
|
||||
// MARK: Settings
|
||||
override var preferredStatusBarStyle: UIStatusBarStyle { return isLightMode ? .default : .lightContent }
|
||||
|
||||
// MARK: Components
|
||||
private lazy var tabBar: TabBar = {
|
||||
let tabs = [
|
||||
|
@ -44,6 +41,7 @@ final class QRCodeVC : UIViewController, UIPageViewControllerDataSource, UIPageV
|
|||
|
||||
// MARK: Lifecycle
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
// Set gradient background
|
||||
view.backgroundColor = .clear
|
||||
let gradient = Gradients.defaultLokiBackground
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
final class RegisterVC : UIViewController {
|
||||
final class RegisterVC : BaseVC {
|
||||
private var seed: Data! { didSet { updateKeyPair() } }
|
||||
private var keyPair: ECKeyPair! { didSet { updatePublicKeyLabel() } }
|
||||
|
||||
|
@ -37,11 +37,9 @@ final class RegisterVC : UIViewController {
|
|||
return result
|
||||
}()
|
||||
|
||||
// MARK: Settings
|
||||
override var preferredStatusBarStyle: UIStatusBarStyle { return isLightMode ? .default : .lightContent }
|
||||
|
||||
// MARK: Lifecycle
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
// Set gradient background
|
||||
view.backgroundColor = .clear
|
||||
let gradient = Gradients.defaultLokiBackground
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
final class RestoreVC : UIViewController {
|
||||
final class RestoreVC : BaseVC {
|
||||
private var spacer1HeightConstraint: NSLayoutConstraint!
|
||||
private var spacer2HeightConstraint: NSLayoutConstraint!
|
||||
private var spacer3HeightConstraint: NSLayoutConstraint!
|
||||
|
@ -29,11 +29,9 @@ final class RestoreVC : UIViewController {
|
|||
return result
|
||||
}()
|
||||
|
||||
// MARK: Settings
|
||||
override var preferredStatusBarStyle: UIStatusBarStyle { return isLightMode ? .default : .lightContent }
|
||||
|
||||
// MARK: Lifecycle
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
// Set gradient background
|
||||
view.backgroundColor = .clear
|
||||
let gradient = Gradients.defaultLokiBackground
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
final class ScanQRCodeWrapperVC : UIViewController {
|
||||
final class ScanQRCodeWrapperVC : BaseVC {
|
||||
var delegate: (UIViewController & OWSQRScannerDelegate)? = nil
|
||||
var isPresentedModally = false
|
||||
private let message: String
|
||||
|
@ -23,6 +23,7 @@ final class ScanQRCodeWrapperVC : UIViewController {
|
|||
}
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
// Set up navigation bar if needed
|
||||
if isPresentedModally {
|
||||
navigationItem.leftBarButtonItem = UIBarButtonItem(barButtonSystemItem: .stop, target: self, action: #selector(close))
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
final class SeedVC : UIViewController {
|
||||
final class SeedVC : BaseVC {
|
||||
|
||||
private let mnemonic: String = {
|
||||
let identityManager = OWSIdentityManager.shared()
|
||||
|
@ -52,11 +52,9 @@ final class SeedVC : UIViewController {
|
|||
return result
|
||||
}()
|
||||
|
||||
// MARK: Settings
|
||||
override var preferredStatusBarStyle: UIStatusBarStyle { return isLightMode ? .default : .lightContent }
|
||||
|
||||
// MARK: Lifecycle
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
// Set gradient background
|
||||
view.backgroundColor = .clear
|
||||
let gradient = Gradients.defaultLokiBackground
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
final class SettingsVC : UIViewController, AvatarViewHelperDelegate {
|
||||
final class SettingsVC : BaseVC, AvatarViewHelperDelegate {
|
||||
private var profilePictureToBeUploaded: UIImage?
|
||||
private var displayNameToBeUploaded: String?
|
||||
private var isEditingDisplayName = false { didSet { handleIsEditingDisplayNameChanged() } }
|
||||
|
@ -12,9 +12,6 @@ final class SettingsVC : UIViewController, AvatarViewHelperDelegate {
|
|||
}
|
||||
}()
|
||||
|
||||
// MARK: Settings
|
||||
override var preferredStatusBarStyle: UIStatusBarStyle { return isLightMode ? .default : .lightContent }
|
||||
|
||||
// MARK: Components
|
||||
private lazy var profilePictureView: ProfilePictureView = {
|
||||
let result = ProfilePictureView()
|
||||
|
@ -55,6 +52,7 @@ final class SettingsVC : UIViewController, AvatarViewHelperDelegate {
|
|||
|
||||
// MARK: Lifecycle
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
// Set gradient background
|
||||
view.backgroundColor = .clear
|
||||
let gradient = Gradients.defaultLokiBackground
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
|
||||
class Sheet : UIViewController {
|
||||
class Sheet : BaseVC {
|
||||
private(set) var bottomConstraint: NSLayoutConstraint!
|
||||
|
||||
// MARK: Settings
|
||||
let overshoot: CGFloat = 40
|
||||
override var preferredStatusBarStyle: UIStatusBarStyle { return isLightMode ? .default : .lightContent }
|
||||
|
||||
// MARK: Components
|
||||
lazy var contentView: UIView = {
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="15505" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="15705" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
|
||||
<device id="retina6_1" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15510"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15706"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
|
|
|
@ -25,8 +25,8 @@ public final class Colors : NSObject {
|
|||
@objc public static var newConversationButtonShadow = UIColor(hex: 0x077C44)
|
||||
@objc public static var separator = UIColor(hex: 0x36383C)
|
||||
@objc public static var unimportantButtonBackground = UIColor(hex: 0x323232)
|
||||
@objc public static var buttonBackground = UIColor(hex: 0x1B1B1B)
|
||||
@objc public static var settingButtonSelected = UIColor(hex: 0x0C0C0C)
|
||||
@objc public static var buttonBackground = isLightMode ? UIColor(hex: 0xFCFCFC) : UIColor(hex: 0x1B1B1B)
|
||||
@objc public static var settingButtonSelected = isLightMode ? UIColor(hex: 0xDFDFDF) : UIColor(hex: 0x0C0C0C)
|
||||
@objc public static var modalBackground = UIColor(hex: 0x101011)
|
||||
@objc public static var modalBorder = UIColor(hex: 0x212121)
|
||||
@objc public static var fakeChatBubbleBackground = isLightMode ? UIColor(hex: 0xFAFAFA) : UIColor(hex: 0x3F4146)
|
||||
|
|
|
@ -81,8 +81,8 @@
|
|||
SUBQUERY (
|
||||
$extensionItem.attachments,
|
||||
$attachment,
|
||||
ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.data"
|
||||
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.url"
|
||||
ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.data"
|
||||
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.url"
|
||||
).@count >= 1
|
||||
).@count == 1
|
||||
</string>
|
||||
|
@ -105,6 +105,6 @@
|
|||
<string>UIInterfaceOrientationPortrait</string>
|
||||
</array>
|
||||
<key>UIViewControllerBasedStatusBarAppearance</key>
|
||||
<false/>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
Loading…
Reference in New Issue