Polish UI

This commit is contained in:
Niels Andriesse 2019-06-14 16:36:40 +10:00
parent 3567eec9e2
commit 621bf922ab
7 changed files with 27 additions and 23 deletions

View File

@ -15,7 +15,7 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "D221A088169C9E5E00537ABF"
BuildableName = "Signal.app"
BuildableName = "Loki Messenger.app"
BlueprintName = "Signal"
ReferencedContainer = "container:Signal.xcodeproj">
</BuildableReference>
@ -33,7 +33,7 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "D221A088169C9E5E00537ABF"
BuildableName = "Signal.app"
BuildableName = "Loki Messenger.app"
BlueprintName = "Signal"
ReferencedContainer = "container:Signal.xcodeproj">
</BuildableReference>
@ -56,7 +56,7 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "D221A088169C9E5E00537ABF"
BuildableName = "Signal.app"
BuildableName = "Loki Messenger.app"
BlueprintName = "Signal"
ReferencedContainer = "container:Signal.xcodeproj">
</BuildableReference>
@ -87,7 +87,7 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "D221A088169C9E5E00537ABF"
BuildableName = "Signal.app"
BuildableName = "Loki Messenger.app"
BlueprintName = "Signal"
ReferencedContainer = "container:Signal.xcodeproj">
</BuildableReference>

View File

@ -15,7 +15,7 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "D221A088169C9E5E00537ABF"
BuildableName = "Signal.app"
BuildableName = "Loki Messenger.app"
BlueprintName = "Signal"
ReferencedContainer = "container:Signal.xcodeproj">
</BuildableReference>
@ -28,7 +28,7 @@
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "2D8EA4E0F4AC2732133869D7CB377264"
BlueprintIdentifier = "E562E914157E3E5A003DAEF85CEA5CF9"
BuildableName = "SignalServiceKit.framework"
BlueprintName = "SignalServiceKit"
ReferencedContainer = "container:Pods/Pods.xcodeproj">
@ -56,7 +56,7 @@
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "F2DF3B1FC831DB848464A6B2F610EACB"
BlueprintIdentifier = "3FC719A0D2B2FA321E696D83720CAC6F"
BuildableName = "SignalServiceKit-Unit-Tests.xctest"
BlueprintName = "SignalServiceKit-Unit-Tests"
ReferencedContainer = "container:Pods/Pods.xcodeproj">
@ -117,7 +117,7 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "D221A088169C9E5E00537ABF"
BuildableName = "Signal.app"
BuildableName = "Loki Messenger.app"
BlueprintName = "Signal"
ReferencedContainer = "container:Signal.xcodeproj">
</BuildableReference>
@ -152,7 +152,7 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "D221A088169C9E5E00537ABF"
BuildableName = "Signal.app"
BuildableName = "Loki Messenger.app"
BlueprintName = "Signal"
ReferencedContainer = "container:Signal.xcodeproj">
</BuildableReference>
@ -193,7 +193,7 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "D221A088169C9E5E00537ABF"
BuildableName = "Signal.app"
BuildableName = "Loki Messenger.app"
BlueprintName = "Signal"
ReferencedContainer = "container:Signal.xcodeproj">
</BuildableReference>

View File

@ -30,7 +30,7 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "D221A088169C9E5E00537ABF"
BuildableName = "Signal.app"
BuildableName = "Loki Messenger.app"
BlueprintName = "Signal"
ReferencedContainer = "container:Signal.xcodeproj">
</BuildableReference>
@ -72,7 +72,7 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "D221A088169C9E5E00537ABF"
BuildableName = "Signal.app"
BuildableName = "Loki Messenger.app"
BlueprintName = "Signal"
ReferencedContainer = "container:Signal.xcodeproj">
</BuildableReference>
@ -92,7 +92,7 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "D221A088169C9E5E00537ABF"
BuildableName = "Signal.app"
BuildableName = "Loki Messenger.app"
BlueprintName = "Signal"
ReferencedContainer = "container:Signal.xcodeproj">
</BuildableReference>

View File

@ -59,9 +59,11 @@
case .incoming:
mainStackView.addArrangedSubview(buttonStackView)
let acceptButton = OWSFlatButton.button(title: NSLocalizedString("Accept", comment: ""), font: buttonFont, titleColor: .ows_materialBlue, backgroundColor: .white, target: self, selector: #selector(accept))
acceptButton.setBackgroundColors(upColor: .clear, downColor: .clear)
acceptButton.autoSetDimension(.height, toSize: buttonHeight)
buttonStackView.addArrangedSubview(acceptButton)
let declineButton = OWSFlatButton.button(title: NSLocalizedString("Decline", comment: ""), font: buttonFont, titleColor: .ows_destructiveRed, backgroundColor: .white, target: self, selector: #selector(decline))
declineButton.setBackgroundColors(upColor: .clear, downColor: .clear)
declineButton.autoSetDimension(.height, toSize: buttonHeight)
buttonStackView.addArrangedSubview(declineButton)
case .outgoing: break
@ -100,7 +102,9 @@
default: preconditionFailure()
}
}()
label.text = String(format: format, message.authorId)
let contactID = message.authorId
let displayName = Environment.shared.contactsManager.profileName(forRecipientId: contactID) ?? contactID
label.text = String(format: format, displayName)
case .outgoing:
guard let message = message as? TSOutgoingMessage else { preconditionFailure() }
let format: String? = {
@ -115,7 +119,9 @@
}
}()
if let format = format {
label.text = String(format: format, message.thread.contactIdentifier()!)
let contactID = message.thread.contactIdentifier()!
let displayName = Environment.shared.contactsManager.profileName(forRecipientId: contactID) ?? contactID
label.text = String(format: format, displayName)
}
label.isHidden = (format == nil)
topSpacer.isHidden = (label.isHidden)

View File

@ -429,7 +429,7 @@ typedef NS_ENUM(NSInteger, HomeViewControllerSection) {
OWSLayerView *layerView = [OWSLayerView new];
layerView.layoutMargins = UIEdgeInsetsMake(11 + kTailHeight, 16, 11, 16);
CAShapeLayer *shapeLayer = [CAShapeLayer new];
shapeLayer.fillColor = UIColor.ows_signalBlueColor.CGColor;
shapeLayer.fillColor = UIColor.lokiGreen.CGColor;
[layerView.layer addSublayer:shapeLayer];
layerView.layoutCallback = ^(UIView *view) {
UIBezierPath *bezierPath = [UIBezierPath new];

View File

@ -23,14 +23,13 @@ public class OnboardingSplashViewController: OnboardingBaseViewController {
heroImageView.setContentHuggingVerticalLow()
heroImageView.accessibilityIdentifier = "onboarding.splash." + "heroImageView"
let titleLabel = self.createTitleLabel(text: NSLocalizedString("ONBOARDING_SPLASH_TITLE", comment: "Title of the 'onboarding splash' view."))
let titleLabel = self.createTitleLabel(text: NSLocalizedString("Loki Messenger", comment: ""))
view.addSubview(titleLabel)
titleLabel.autoPinEdges(toSuperviewMarginsExcludingEdge: .bottom)
titleLabel.accessibilityIdentifier = "onboarding.splash." + "titleLabel"
let explanationLabel = UILabel()
explanationLabel.text = NSLocalizedString("ONBOARDING_SPLASH_TERM_AND_PRIVACY_POLICY",
comment: "Link to the 'terms and privacy policy' in the 'onboarding splash' view.")
explanationLabel.text = NSLocalizedString("Privacy Policy", comment: "")
explanationLabel.textColor = .ows_materialBlue
explanationLabel.font = UIFont.ows_dynamicTypeSubheadlineClamped
explanationLabel.numberOfLines = 0
@ -47,14 +46,12 @@ public class OnboardingSplashViewController: OnboardingBaseViewController {
continueButton.accessibilityIdentifier = "onboarding.splash." + "continueButton"
let stackView = UIStackView(arrangedSubviews: [
heroImageView,
UIView.spacer(withHeight: 22),
titleLabel,
UIView.spacer(withHeight: 92),
UIView.vStretchingSpacer(),
explanationLabel,
UIView.spacer(withHeight: 24),
continueButton
])
])
stackView.axis = .vertical
stackView.alignment = .fill
stackView.layoutMargins = UIEdgeInsets(top: 32, left: 32, bottom: 32, right: 32)

View File

@ -2591,3 +2591,4 @@
"Prevent Loki Messenger previews from appearing in the app switcher." = "Prevent Loki Messenger previews from appearing in the app switcher.";
"Display Name" = "Display Name";
"Loki Messenger" = "Loki Messenger";
"Privacy Policy" = "Privacy Policy";