mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-17 23:18:27 +02:00
Settings: Add a dedicated screen for Security
This commit is contained in:
@@ -78,6 +78,8 @@
|
||||
32891D712264DF7B00C82226 /* DeviceVerificationVerifiedViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 32891D6F2264DF7B00C82226 /* DeviceVerificationVerifiedViewController.swift */; };
|
||||
32891D75226728EE00C82226 /* DeviceVerificationDataLoadingViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 32891D73226728EE00C82226 /* DeviceVerificationDataLoadingViewController.swift */; };
|
||||
32891D76226728EF00C82226 /* DeviceVerificationDataLoadingViewController.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 32891D74226728EE00C82226 /* DeviceVerificationDataLoadingViewController.storyboard */; };
|
||||
3291DC8A23E0BE820009732F /* Security.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 3291DC8923E0BE820009732F /* Security.storyboard */; };
|
||||
3291DC8D23E0BFF10009732F /* SecurtiyViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3291DC8C23E0BFF10009732F /* SecurtiyViewController.m */; };
|
||||
329E746622CD02EA006F9797 /* BubbleReactionActionViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 329E746422CD02EA006F9797 /* BubbleReactionActionViewCell.xib */; };
|
||||
329E746722CD02EA006F9797 /* BubbleReactionActionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 329E746522CD02EA006F9797 /* BubbleReactionActionViewCell.swift */; };
|
||||
32A6001622C661100042C1D9 /* EditHistoryViewState.swift in Sources */ = {isa = PBXBuildFile; fileRef = 32A6000D22C661100042C1D9 /* EditHistoryViewState.swift */; };
|
||||
@@ -746,6 +748,9 @@
|
||||
32891D6F2264DF7B00C82226 /* DeviceVerificationVerifiedViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DeviceVerificationVerifiedViewController.swift; sourceTree = "<group>"; };
|
||||
32891D73226728EE00C82226 /* DeviceVerificationDataLoadingViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DeviceVerificationDataLoadingViewController.swift; sourceTree = "<group>"; };
|
||||
32891D74226728EE00C82226 /* DeviceVerificationDataLoadingViewController.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = DeviceVerificationDataLoadingViewController.storyboard; sourceTree = "<group>"; };
|
||||
3291DC8923E0BE820009732F /* Security.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = Security.storyboard; sourceTree = "<group>"; };
|
||||
3291DC8B23E0BFF10009732F /* SecurityViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SecurityViewController.h; sourceTree = "<group>"; };
|
||||
3291DC8C23E0BFF10009732F /* SecurtiyViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SecurtiyViewController.m; sourceTree = "<group>"; };
|
||||
329E746422CD02EA006F9797 /* BubbleReactionActionViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = BubbleReactionActionViewCell.xib; sourceTree = "<group>"; };
|
||||
329E746522CD02EA006F9797 /* BubbleReactionActionViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BubbleReactionActionViewCell.swift; sourceTree = "<group>"; };
|
||||
32A6000D22C661100042C1D9 /* EditHistoryViewState.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EditHistoryViewState.swift; sourceTree = "<group>"; };
|
||||
@@ -1803,6 +1808,16 @@
|
||||
path = Loading;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
3291DC8823E0BE380009732F /* Security */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
3291DC8B23E0BFF10009732F /* SecurityViewController.h */,
|
||||
3291DC8C23E0BFF10009732F /* SecurtiyViewController.m */,
|
||||
3291DC8923E0BE820009732F /* Security.storyboard */,
|
||||
);
|
||||
path = Security;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
32935CB21F628B98006888C8 /* js */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@@ -2527,6 +2542,7 @@
|
||||
B1B5567B20EE6C4C00210D55 /* Language */,
|
||||
B1B5567820EE6C4C00210D55 /* PhoneCountry */,
|
||||
B1B5568020EE6C4C00210D55 /* DeactivateAccount */,
|
||||
3291DC8823E0BE380009732F /* Security */,
|
||||
B1CE9EFB22148681000FAE6A /* SignOut */,
|
||||
);
|
||||
path = Settings;
|
||||
@@ -4194,6 +4210,7 @@
|
||||
B110872421F098F0003554A5 /* ActivityIndicatorView.xib in Resources */,
|
||||
B1B5573320EE6C4D00210D55 /* GroupHomeViewController.xib in Resources */,
|
||||
3232AB2122564D9100AD6A5C /* README.md in Resources */,
|
||||
3291DC8A23E0BE820009732F /* Security.storyboard in Resources */,
|
||||
B1B5593920EF7BAC00210D55 /* TableViewCellWithCheckBoxes.xib in Resources */,
|
||||
B1B557C120EF5B4500210D55 /* DisabledRoomInputToolbarView.xib in Resources */,
|
||||
B1DCC61722E5E17100625807 /* EmojiPickerViewController.storyboard in Resources */,
|
||||
@@ -4578,6 +4595,7 @@
|
||||
B1B558D420EF768F00210D55 /* RoomOutgoingEncryptedTextMsgWithoutSenderInfoBubbleCell.m in Sources */,
|
||||
B169331420F3CAFC00746532 /* PublicRoomTableViewCell.m in Sources */,
|
||||
32BF995721FB07A400698084 /* SettingsKeyBackupTableViewSection.swift in Sources */,
|
||||
3291DC8D23E0BFF10009732F /* SecurtiyViewController.m in Sources */,
|
||||
B1C45A88232A8C2600165425 /* SettingsIdentityServerViewState.swift in Sources */,
|
||||
B14F142F22144F6500FA0595 /* KeyBackupRecoverFromRecoveryKeyViewModelType.swift in Sources */,
|
||||
32DB557822FDADE50016329E /* ServiceTermsModalScreenViewState.swift in Sources */,
|
||||
|
||||
41
Riot/Modules/Settings/Security/Security.storyboard
Normal file
41
Riot/Modules/Settings/Security/Security.storyboard
Normal file
@@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="QHp-lE-M7m">
|
||||
<device id="retina6_1" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14490.49"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--Security View Controller-->
|
||||
<scene sceneID="KQ6-RY-1vS">
|
||||
<objects>
|
||||
<tableViewController id="QHp-lE-M7m" customClass="SecurityViewController" sceneMemberID="viewController">
|
||||
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" id="Fpr-At-4Wb">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<prototypes>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" id="JHA-Ac-OAZ">
|
||||
<rect key="frame" x="0.0" y="28" width="414" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="JHA-Ac-OAZ" id="Soh-58-aeC">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="43.5"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
</prototypes>
|
||||
<connections>
|
||||
<outlet property="dataSource" destination="QHp-lE-M7m" id="F5e-nl-xhe"/>
|
||||
<outlet property="delegate" destination="QHp-lE-M7m" id="TJn-MA-abi"/>
|
||||
</connections>
|
||||
</tableView>
|
||||
</tableViewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="Zo3-gk-o9e" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="65" y="68"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
</document>
|
||||
28
Riot/Modules/Settings/Security/SecurityViewController.h
Normal file
28
Riot/Modules/Settings/Security/SecurityViewController.h
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
Copyright 2019 New Vector Ltd
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
#import <MatrixKit/MatrixKit.h>
|
||||
|
||||
#import "DeviceView.h"
|
||||
|
||||
#import "MediaPickerViewController.h"
|
||||
|
||||
@interface SecurityViewController : MXKTableViewController<UITextFieldDelegate, MXKDeviceViewDelegate, UIDocumentInteractionControllerDelegate, MXKCountryPickerViewControllerDelegate, MXKLanguagePickerViewControllerDelegate, MXKDataSourceDelegate>
|
||||
|
||||
+ (SecurityViewController*)instantiateWithMatrixSession:(MXSession*)matrixSession;
|
||||
|
||||
@end
|
||||
|
||||
4825
Riot/Modules/Settings/Security/SecurtiyViewController.m
Normal file
4825
Riot/Modules/Settings/Security/SecurtiyViewController.m
Normal file
File diff suppressed because it is too large
Load Diff
@@ -32,6 +32,7 @@
|
||||
#import "CountryPickerViewController.h"
|
||||
#import "LanguagePickerViewController.h"
|
||||
#import "DeactivateAccountViewController.h"
|
||||
#import "SecurityViewController.h"
|
||||
|
||||
#import "NBPhoneNumberUtil.h"
|
||||
#import "RageShakeManager.h"
|
||||
@@ -51,6 +52,7 @@ enum
|
||||
{
|
||||
SETTINGS_SECTION_SIGN_OUT_INDEX = 0,
|
||||
SETTINGS_SECTION_USER_SETTINGS_INDEX,
|
||||
SETTINGS_SECTION_SECURITY_INDEX,
|
||||
SETTINGS_SECTION_NOTIFICATIONS_SETTINGS_INDEX,
|
||||
SETTINGS_SECTION_CALLS_INDEX,
|
||||
SETTINGS_SECTION_DISCOVERY_INDEX,
|
||||
@@ -152,6 +154,12 @@ enum
|
||||
DEVICES_DESCRIPTION_INDEX = 0
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
SECURITY_BUTTON_INDEX = 0,
|
||||
SECURITY_COUNT
|
||||
};
|
||||
|
||||
#define SECTION_TITLE_PADDING_WHEN_HIDDEN 0.01f
|
||||
|
||||
typedef void (^blockSettingsViewController_onReadyToDestroy)(void);
|
||||
@@ -1483,6 +1491,11 @@ SettingsIdentityServerCoordinatorBridgePresenterDelegate>
|
||||
{
|
||||
count = 1;
|
||||
}
|
||||
else if (section == SETTINGS_SECTION_SECURITY_INDEX)
|
||||
{
|
||||
count = SECURITY_COUNT;
|
||||
}
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
@@ -2555,6 +2568,17 @@ SettingsIdentityServerCoordinatorBridgePresenterDelegate>
|
||||
{
|
||||
cell = [keyBackupSection cellForRowAtRow:row];
|
||||
}
|
||||
else if (section == SETTINGS_SECTION_SECURITY_INDEX)
|
||||
{
|
||||
switch (row)
|
||||
{
|
||||
case SECURITY_BUTTON_INDEX:
|
||||
cell = [self getDefaultTableViewCell:tableView];
|
||||
cell.textLabel.text = NSLocalizedStringFromTable(@"Security", @"Vector", nil);
|
||||
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (section == SETTINGS_SECTION_DEACTIVATE_ACCOUNT_INDEX)
|
||||
{
|
||||
MXKTableViewCellWithButton *deactivateAccountBtnCell = [tableView dequeueReusableCellWithIdentifier:[MXKTableViewCellWithButton defaultReuseIdentifier]];
|
||||
@@ -2675,11 +2699,15 @@ SettingsIdentityServerCoordinatorBridgePresenterDelegate>
|
||||
return NSLocalizedStringFromTable(@"settings_key_backup", @"Vector", nil);
|
||||
}
|
||||
}
|
||||
else if (section == SETTINGS_SECTION_SECURITY_INDEX)
|
||||
{
|
||||
return NSLocalizedStringFromTable(@"SECURITY", @"Vector", nil);
|
||||
}
|
||||
else if (section == SETTINGS_SECTION_DEACTIVATE_ACCOUNT_INDEX)
|
||||
{
|
||||
return NSLocalizedStringFromTable(@"settings_deactivate_my_account", @"Vector", nil);
|
||||
}
|
||||
|
||||
|
||||
return nil;
|
||||
}
|
||||
|
||||
@@ -3021,6 +3049,19 @@ SettingsIdentityServerCoordinatorBridgePresenterDelegate>
|
||||
[self pushViewController:countryPicker];
|
||||
}
|
||||
}
|
||||
else if (section == SETTINGS_SECTION_SECURITY_INDEX)
|
||||
{
|
||||
switch (row)
|
||||
{
|
||||
case SECURITY_BUTTON_INDEX:
|
||||
{
|
||||
SecurityViewController *securityViewController = [SecurityViewController instantiateWithMatrixSession:self.mainSession];
|
||||
|
||||
[self pushViewController:securityViewController];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[tableView deselectRowAtIndexPath:indexPath animated:YES];
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ ib:
|
||||
- inputs:
|
||||
- ../Tools/Templates/buildable/
|
||||
- Modules/
|
||||
filter: ^((?!DeactivateAccountViewController).)*\.(storyboard)
|
||||
filter: ^((?!(DeactivateAccountViewController|Security)).)*\.(storyboard)
|
||||
outputs:
|
||||
- templateName: scenes-swift4
|
||||
output: Storyboards.swift
|
||||
@@ -28,4 +28,4 @@ plist:
|
||||
templateName: runtime-swift4
|
||||
output: RiotDefaults.swift
|
||||
params:
|
||||
enumName: RiotDefaults
|
||||
enumName: RiotDefaults
|
||||
|
||||
Reference in New Issue
Block a user