mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-22 01:22:46 +02:00
Privacy: IS Settings: Finish theming
This commit is contained in:
+24
-11
@@ -28,31 +28,40 @@
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="500"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="0W7-LW-UNr">
|
||||
<rect key="frame" x="0.0" y="40" width="375" height="50"/>
|
||||
<rect key="frame" x="0.0" y="40" width="375" height="51"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="https://vector.im" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="EJ4-Ey-0lE">
|
||||
<rect key="frame" x="20" y="16" width="335" height="18"/>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Identity Server" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="g0a-45-iRa">
|
||||
<rect key="frame" x="20" y="16" width="100" height="19"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="15"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" text="https://vector.im" textAlignment="right" minimumFontSize="15" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="Zwv-XP-gEA">
|
||||
<rect key="frame" x="140" y="16" width="215" height="19"/>
|
||||
<nil key="textColor"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="15"/>
|
||||
<textInputTraits key="textInputTraits"/>
|
||||
</textField>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="bottom" secondItem="EJ4-Ey-0lE" secondAttribute="bottom" constant="16" id="EFG-gk-cg3"/>
|
||||
<constraint firstItem="EJ4-Ey-0lE" firstAttribute="leading" secondItem="0W7-LW-UNr" secondAttribute="leading" constant="20" id="Fkv-iZ-9g5"/>
|
||||
<constraint firstItem="EJ4-Ey-0lE" firstAttribute="top" secondItem="0W7-LW-UNr" secondAttribute="top" constant="16" id="VB9-Re-HYW"/>
|
||||
<constraint firstAttribute="trailing" secondItem="EJ4-Ey-0lE" secondAttribute="trailing" constant="20" id="nDU-dW-ZZQ"/>
|
||||
<constraint firstAttribute="bottom" secondItem="Zwv-XP-gEA" secondAttribute="bottom" constant="16" id="9Um-wU-TXG"/>
|
||||
<constraint firstItem="Zwv-XP-gEA" firstAttribute="top" secondItem="0W7-LW-UNr" secondAttribute="top" constant="16" id="IAN-Cz-6Rk"/>
|
||||
<constraint firstItem="Zwv-XP-gEA" firstAttribute="leading" secondItem="g0a-45-iRa" secondAttribute="trailing" constant="20" id="Lga-2A-0Wm"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Zwv-XP-gEA" secondAttribute="trailing" constant="20" id="WXH-tD-HJA"/>
|
||||
<constraint firstItem="g0a-45-iRa" firstAttribute="bottom" secondItem="Zwv-XP-gEA" secondAttribute="bottom" id="ccy-C5-fDL"/>
|
||||
<constraint firstItem="g0a-45-iRa" firstAttribute="top" secondItem="Zwv-XP-gEA" secondAttribute="top" id="eXy-mB-ywA"/>
|
||||
<constraint firstItem="g0a-45-iRa" firstAttribute="leading" secondItem="0W7-LW-UNr" secondAttribute="leading" constant="20" id="vXp-nX-Q6y"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="You are currently using vector.im to discover and be discoverable by existing contacts you know." textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="HLL-Fw-u3V">
|
||||
<rect key="frame" x="20" y="110" width="335" height="36"/>
|
||||
<rect key="frame" x="20" y="111" width="335" height="36"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="15"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="h8a-2s-H3K">
|
||||
<rect key="frame" x="0.0" y="166" width="375" height="50"/>
|
||||
<rect key="frame" x="0.0" y="167" width="375" height="50"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="kPC-YQ-MGL">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="50"/>
|
||||
@@ -81,7 +90,7 @@
|
||||
</constraints>
|
||||
</view>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="2Jk-ak-Oxh">
|
||||
<rect key="frame" x="20" y="266" width="335" height="80"/>
|
||||
<rect key="frame" x="20" y="267" width="335" height="80"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="80" id="L1f-yR-1t3"/>
|
||||
</constraints>
|
||||
@@ -91,7 +100,7 @@
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="O79-u4-Mig">
|
||||
<rect key="frame" x="0.0" y="366" width="375" height="50"/>
|
||||
<rect key="frame" x="0.0" y="367" width="375" height="50"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="1Tg-0G-cBC">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="50"/>
|
||||
@@ -172,9 +181,13 @@
|
||||
</view>
|
||||
<connections>
|
||||
<outlet property="addOrChangeButton" destination="kPC-YQ-MGL" id="Ebk-ko-ay1"/>
|
||||
<outlet property="addOrChangeButtonContainer" destination="h8a-2s-H3K" id="eEG-rP-zym"/>
|
||||
<outlet property="disconnectButton" destination="1Tg-0G-cBC" id="iTS-4I-0tT"/>
|
||||
<outlet property="disconnectButtonContainer" destination="O79-u4-Mig" id="KKh-kb-kKX"/>
|
||||
<outlet property="disconnectMessageLabel" destination="2Jk-ak-Oxh" id="ktM-yq-jWv"/>
|
||||
<outlet property="identityServerContainer" destination="0W7-LW-UNr" id="wTi-zd-vJH"/>
|
||||
<outlet property="identityServerLabel" destination="g0a-45-iRa" id="3n9-g9-uYC"/>
|
||||
<outlet property="identityServerTextField" destination="Zwv-XP-gEA" id="5ci-zn-EQ6"/>
|
||||
<outlet property="messageLabel" destination="HLL-Fw-u3V" id="apO-wG-hi7"/>
|
||||
<outlet property="scrollView" destination="8Oz-k6-Zyh" id="e5g-xe-zBj"/>
|
||||
</connections>
|
||||
|
||||
@@ -26,7 +26,13 @@ final class SettingsIdentityServerViewController: UIViewController {
|
||||
|
||||
@IBOutlet private weak var scrollView: UIScrollView!
|
||||
|
||||
@IBOutlet weak var identityServerContainer: UIView!
|
||||
@IBOutlet weak var identityServerLabel: UILabel!
|
||||
@IBOutlet weak var identityServerTextField: UITextField!
|
||||
|
||||
@IBOutlet private weak var messageLabel: UILabel!
|
||||
|
||||
@IBOutlet weak var addOrChangeButtonContainer: UIView!
|
||||
@IBOutlet private weak var addOrChangeButton: UIButton!
|
||||
|
||||
@IBOutlet weak var disconnectMessageLabel: UILabel!
|
||||
@@ -102,7 +108,19 @@ final class SettingsIdentityServerViewController: UIViewController {
|
||||
theme.applyStyle(onNavigationBar: navigationBar)
|
||||
}
|
||||
|
||||
// TODO:
|
||||
self.identityServerContainer.backgroundColor = theme.backgroundColor
|
||||
self.identityServerLabel.textColor = theme.textPrimaryColor
|
||||
theme.applyStyle(onTextField: self.identityServerTextField)
|
||||
self.identityServerTextField.textColor = theme.textSecondaryColor
|
||||
self.messageLabel.textColor = theme.textPrimaryColor
|
||||
|
||||
self.addOrChangeButtonContainer.backgroundColor = theme.backgroundColor
|
||||
theme.applyStyle(onButton: self.addOrChangeButton)
|
||||
|
||||
self.disconnectMessageLabel.textColor = theme.textPrimaryColor
|
||||
self.disconnectButtonContainer.backgroundColor = theme.backgroundColor
|
||||
theme.applyStyle(onButton: self.disconnectButton)
|
||||
self.disconnectButton.setTitleColor(self.theme.warningColor, for: .normal)
|
||||
}
|
||||
|
||||
private func registerThemeServiceDidChangeThemeNotification() {
|
||||
@@ -116,7 +134,7 @@ final class SettingsIdentityServerViewController: UIViewController {
|
||||
private func setupViews() {
|
||||
self.scrollView.keyboardDismissMode = .interactive
|
||||
|
||||
self.messageLabel.text = VectorL10n.serviceTermsModalMessage
|
||||
self.identityServerLabel.text = VectorL10n.identityServerSettingsTitle
|
||||
|
||||
self.disconnectMessageLabel.text = VectorL10n.identityServerSettingsDisconnectInfo
|
||||
self.disconnectButton.setTitle(VectorL10n.identityServerSettingsDisconnect, for: .normal)
|
||||
@@ -151,6 +169,7 @@ final class SettingsIdentityServerViewController: UIViewController {
|
||||
|
||||
private func renderNoIdentityServer() {
|
||||
self.messageLabel.text = VectorL10n.identityServerSettingsNoIsDescription
|
||||
|
||||
self.addOrChangeButton.setTitle(VectorL10n.identityServerSettingsAdd, for: .normal)
|
||||
self.addOrChangeButton.setTitle(VectorL10n.identityServerSettingsAdd, for: .highlighted)
|
||||
|
||||
@@ -159,10 +178,17 @@ final class SettingsIdentityServerViewController: UIViewController {
|
||||
}
|
||||
|
||||
private func renderIdentityServer(host: String) {
|
||||
//self.iden
|
||||
self.messageLabel.text = VectorL10n.identityServerSettingsDescription(host)
|
||||
|
||||
let hostname = URL(string: host)?.host ?? host
|
||||
|
||||
self.identityServerTextField.text = host
|
||||
self.identityServerTextField.placeholder = RiotDefaults.identityserverurl
|
||||
|
||||
self.messageLabel.text = VectorL10n.identityServerSettingsDescription(hostname)
|
||||
|
||||
self.addOrChangeButton.setTitle(VectorL10n.identityServerSettingsChange, for: .normal)
|
||||
self.addOrChangeButton.setTitle(VectorL10n.identityServerSettingsChange, for: .highlighted)
|
||||
self.addOrChangeButton.isUserInteractionEnabled = false
|
||||
|
||||
self.disconnectMessageLabel.isHidden = false
|
||||
self.disconnectButtonContainer.isHidden = false
|
||||
@@ -193,8 +219,6 @@ final class SettingsIdentityServerViewController: UIViewController {
|
||||
viewAction = .add(identityServer: identityServer)
|
||||
case .identityServer:
|
||||
viewAction = .change(identityServer: identityServer)
|
||||
default:
|
||||
viewAction = nil
|
||||
}
|
||||
|
||||
if let viewAction = viewAction {
|
||||
|
||||
Reference in New Issue
Block a user