mirror of
https://github.com/bitwarden/mobile
synced 2025-12-20 18:23:51 +00:00
stubbed out password generator pass in ios extension
This commit is contained in:
@@ -40,7 +40,7 @@
|
|||||||
<objects>
|
<objects>
|
||||||
<navigationController definesPresentationContext="YES" id="64" sceneMemberID="viewController">
|
<navigationController definesPresentationContext="YES" id="64" sceneMemberID="viewController">
|
||||||
<navigationBar key="navigationBar" contentMode="scaleToFill" id="67" translucent="NO" hidden="YES">
|
<navigationBar key="navigationBar" contentMode="scaleToFill" id="67" translucent="NO" hidden="YES">
|
||||||
<rect key="frame" x="0.0" y="20" width="880" height="44"/>
|
<rect key="frame" x="0.0" y="20" width="600" height="44"/>
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
|
||||||
</navigationBar>
|
</navigationBar>
|
||||||
<connections>
|
<connections>
|
||||||
@@ -57,7 +57,7 @@
|
|||||||
<navigationController automaticallyAdjustsScrollViewInsets="NO" id="oCZ-GQ-aOK" sceneMemberID="viewController">
|
<navigationController automaticallyAdjustsScrollViewInsets="NO" id="oCZ-GQ-aOK" sceneMemberID="viewController">
|
||||||
<toolbarItems/>
|
<toolbarItems/>
|
||||||
<navigationBar key="navigationBar" contentMode="scaleToFill" id="8A5-AR-QHS" translucent="NO">
|
<navigationBar key="navigationBar" contentMode="scaleToFill" id="8A5-AR-QHS" translucent="NO">
|
||||||
<rect key="frame" x="0.0" y="20" width="880" height="44"/>
|
<rect key="frame" x="0.0" y="20" width="600" height="44"/>
|
||||||
<autoresizingMask key="autoresizingMask"/>
|
<autoresizingMask key="autoresizingMask"/>
|
||||||
<textAttributes key="titleTextAttributes">
|
<textAttributes key="titleTextAttributes">
|
||||||
<color key="textColor" colorSpace="calibratedWhite" white="1" alpha="1"/>
|
<color key="textColor" colorSpace="calibratedWhite" white="1" alpha="1"/>
|
||||||
@@ -78,7 +78,7 @@
|
|||||||
<navigationController definesPresentationContext="YES" id="1845" sceneMemberID="viewController">
|
<navigationController definesPresentationContext="YES" id="1845" sceneMemberID="viewController">
|
||||||
<navigationBar key="navigationBar" contentMode="scaleToFill" id="1848" translucent="NO">
|
<navigationBar key="navigationBar" contentMode="scaleToFill" id="1848" translucent="NO">
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
|
||||||
<rect key="frame" x="0.0" y="20" width="880" height="44"/>
|
<rect key="frame" x="0.0" y="20" width="600" height="44"/>
|
||||||
<textAttributes key="titleTextAttributes">
|
<textAttributes key="titleTextAttributes">
|
||||||
<color key="textColor" colorSpace="calibratedWhite" white="1" alpha="1"/>
|
<color key="textColor" colorSpace="calibratedWhite" white="1" alpha="1"/>
|
||||||
</textAttributes>
|
</textAttributes>
|
||||||
@@ -124,6 +124,7 @@
|
|||||||
<outlet property="TableView" destination="2088" id="name-outlet-2088"/>
|
<outlet property="TableView" destination="2088" id="name-outlet-2088"/>
|
||||||
<outlet property="SaveBarButton" destination="3748" id="name-outlet-3748"/>
|
<outlet property="SaveBarButton" destination="3748" id="name-outlet-3748"/>
|
||||||
<outlet property="CancelBarButton" destination="3747" id="name-outlet-3747"/>
|
<outlet property="CancelBarButton" destination="3747" id="name-outlet-3747"/>
|
||||||
|
<segue id="4805" destination="4574" kind="show" identifier="passwordGeneratorSegue"/>
|
||||||
</connections>
|
</connections>
|
||||||
</tableViewController>
|
</tableViewController>
|
||||||
<placeholder placeholderIdentifier="IBFirstResponder" id="2093" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
<placeholder placeholderIdentifier="IBFirstResponder" id="2093" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||||
@@ -196,6 +197,86 @@
|
|||||||
</objects>
|
</objects>
|
||||||
<point key="canvasLocation" x="1157" y="566"/>
|
<point key="canvasLocation" x="1157" y="566"/>
|
||||||
</scene>
|
</scene>
|
||||||
|
<scene sceneID="4573">
|
||||||
|
<objects>
|
||||||
|
<navigationController definesPresentationContext="YES" id="4574" sceneMemberID="viewController">
|
||||||
|
<navigationBar key="navigationBar" contentMode="scaleToFill" id="4577" translucent="NO">
|
||||||
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
|
||||||
|
<rect key="frame" x="0.0" y="20" width="600" height="44"/>
|
||||||
|
<color key="barTintColor" colorSpace="calibratedRGB" red="0.23529411764705882" green="0.55294117647058827" blue="0.73725490196078436" alpha="1"/>
|
||||||
|
<textAttributes key="titleTextAttributes">
|
||||||
|
<color key="textColor" colorSpace="calibratedWhite" white="1" alpha="1"/>
|
||||||
|
</textAttributes>
|
||||||
|
</navigationBar>
|
||||||
|
<connections>
|
||||||
|
<segue destination="4576" kind="relationship" relationship="rootViewController" id="4575"/>
|
||||||
|
</connections>
|
||||||
|
</navigationController>
|
||||||
|
<placeholder placeholderIdentifier="IBFirstResponder" id="4578" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||||
|
</objects>
|
||||||
|
<point key="canvasLocation" x="3357" y="556"/>
|
||||||
|
</scene>
|
||||||
|
<scene sceneID="4579">
|
||||||
|
<objects>
|
||||||
|
<viewController id="4576" sceneMemberID="viewController" customClass="PasswordGeneratorViewController">
|
||||||
|
<layoutGuides>
|
||||||
|
<viewControllerLayoutGuide type="top" id="4571"/>
|
||||||
|
<viewControllerLayoutGuide type="bottom" id="4572"/>
|
||||||
|
</layoutGuides>
|
||||||
|
<view key="view" contentMode="scaleToFill" id="4581">
|
||||||
|
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
||||||
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||||
|
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
|
||||||
|
<subviews>
|
||||||
|
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Label" lineBreakMode="tailTruncation" minimumFontSize="10" id="4811" translatesAutoresizingMaskIntoConstraints="NO">
|
||||||
|
<rect key="frame" x="15" y="79" width="570" height="20.5"/>
|
||||||
|
<color key="backgroundColor" colorSpace="calibratedRGB" red="0" green="0" blue="0" alpha="0"/>
|
||||||
|
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||||
|
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||||
|
<nil key="highlightedColor"/>
|
||||||
|
</label>
|
||||||
|
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="static" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" id="4822" translatesAutoresizingMaskIntoConstraints="NO">
|
||||||
|
<rect key="frame" x="0.0" y="109.5" width="600" height="490.5"/>
|
||||||
|
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||||
|
<sections/>
|
||||||
|
</tableView>
|
||||||
|
</subviews>
|
||||||
|
<constraints>
|
||||||
|
<constraint id="4850" firstItem="4822" firstAttribute="leading" secondItem="4581" secondAttribute="leading"/>
|
||||||
|
<constraint id="4851" firstItem="4581" firstAttribute="trailing" secondItem="4822" secondAttribute="trailing"/>
|
||||||
|
<constraint id="4852" firstItem="4572" firstAttribute="top" secondItem="4822" secondAttribute="bottom"/>
|
||||||
|
<constraint id="4853" firstItem="4811" firstAttribute="leading" secondItem="4581" secondAttribute="leading" constant="15"/>
|
||||||
|
<constraint id="4864" firstItem="4581" firstAttribute="trailing" secondItem="4811" secondAttribute="trailing" constant="15"/>
|
||||||
|
<constraint id="4875" firstItem="4811" firstAttribute="top" secondItem="4571" secondAttribute="bottom" constant="15"/>
|
||||||
|
<constraint id="4876" firstItem="4822" firstAttribute="top" secondItem="4811" secondAttribute="bottom" constant="10"/>
|
||||||
|
</constraints>
|
||||||
|
</view>
|
||||||
|
<navigationItem key="navigationItem" title="Generate Password" id="4580">
|
||||||
|
<barButtonItem key="leftBarButtonItem" title="Cancel" id="4807">
|
||||||
|
<color key="tintColor" colorSpace="calibratedWhite" white="1" alpha="1"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="CancelBarButton_Activated:" destination="4576" id="4887"/>
|
||||||
|
</connections>
|
||||||
|
</barButtonItem>
|
||||||
|
<barButtonItem key="rightBarButtonItem" title="Select" id="4808">
|
||||||
|
<color key="tintColor" colorSpace="calibratedWhite" white="1" alpha="1"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="SelectBarButton_Activated:" destination="4576" id="4810"/>
|
||||||
|
</connections>
|
||||||
|
</barButtonItem>
|
||||||
|
</navigationItem>
|
||||||
|
<connections>
|
||||||
|
<outlet property="CancelBarButton" destination="4807" id="name-outlet-4807"/>
|
||||||
|
<outlet property="SelectBarButton" destination="4808" id="name-outlet-4808"/>
|
||||||
|
<outlet property="BaseView" destination="4581" id="name-outlet-4581"/>
|
||||||
|
<outlet property="Table" destination="4822" id="name-outlet-4822"/>
|
||||||
|
<outlet property="PasswordLabel" destination="4811" id="name-outlet-4811"/>
|
||||||
|
</connections>
|
||||||
|
</viewController>
|
||||||
|
<placeholder placeholderIdentifier="IBFirstResponder" id="4582" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||||
|
</objects>
|
||||||
|
<point key="canvasLocation" x="4045" y="558"/>
|
||||||
|
</scene>
|
||||||
</scenes>
|
</scenes>
|
||||||
<resources>
|
<resources>
|
||||||
<image name="logo.png" width="282" height="44"/>
|
<image name="logo.png" width="282" height="44"/>
|
||||||
|
|||||||
108
src/iOS.Extension/PasswordGeneratorViewController.cs
Normal file
108
src/iOS.Extension/PasswordGeneratorViewController.cs
Normal file
@@ -0,0 +1,108 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.Linq;
|
||||||
|
using Bit.App.Abstractions;
|
||||||
|
using Bit.App.Models;
|
||||||
|
using Bit.App.Resources;
|
||||||
|
using Bit.iOS.Core.Views;
|
||||||
|
using Bit.iOS.Extension.Models;
|
||||||
|
using Foundation;
|
||||||
|
using UIKit;
|
||||||
|
using XLabs.Ioc;
|
||||||
|
using Bit.App;
|
||||||
|
using Plugin.Connectivity.Abstractions;
|
||||||
|
using Bit.iOS.Core.Utilities;
|
||||||
|
|
||||||
|
namespace Bit.iOS.Extension
|
||||||
|
{
|
||||||
|
public partial class PasswordGeneratorViewController : UIViewController
|
||||||
|
{
|
||||||
|
public PasswordGeneratorViewController(IntPtr handle) : base(handle)
|
||||||
|
{ }
|
||||||
|
|
||||||
|
public Context Context { get; set; }
|
||||||
|
public SiteAddViewController Parent { get; set; }
|
||||||
|
|
||||||
|
public override void ViewWillAppear(bool animated)
|
||||||
|
{
|
||||||
|
UINavigationBar.Appearance.ShadowImage = new UIImage();
|
||||||
|
UINavigationBar.Appearance.SetBackgroundImage(new UIImage(), UIBarMetrics.Default);
|
||||||
|
base.ViewWillAppear(animated);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void ViewDidLoad()
|
||||||
|
{
|
||||||
|
View.BackgroundColor = new UIColor(red: 0.94f, green: 0.94f, blue: 0.96f, alpha: 1.0f);
|
||||||
|
|
||||||
|
base.ViewDidLoad();
|
||||||
|
}
|
||||||
|
|
||||||
|
partial void SelectBarButton_Activated(UIBarButtonItem sender)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
partial void CancelBarButton_Activated(UIBarButtonItem sender)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
public class TableSource : UITableViewSource
|
||||||
|
{
|
||||||
|
private PasswordGeneratorViewController _controller;
|
||||||
|
|
||||||
|
public TableSource(PasswordGeneratorViewController controller)
|
||||||
|
{
|
||||||
|
_controller = controller;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath)
|
||||||
|
{
|
||||||
|
return new UITableViewCell();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override nfloat GetHeightForRow(UITableView tableView, NSIndexPath indexPath)
|
||||||
|
{
|
||||||
|
return UITableView.AutomaticDimension;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override nint NumberOfSections(UITableView tableView)
|
||||||
|
{
|
||||||
|
return 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override nint RowsInSection(UITableView tableview, nint section)
|
||||||
|
{
|
||||||
|
if(section == 0)
|
||||||
|
{
|
||||||
|
return 5;
|
||||||
|
}
|
||||||
|
else if(section == 1)
|
||||||
|
{
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public override nfloat GetHeightForHeader(UITableView tableView, nint section)
|
||||||
|
{
|
||||||
|
return UITableView.AutomaticDimension;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override string TitleForHeader(UITableView tableView, nint section)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void RowSelected(UITableView tableView, NSIndexPath indexPath)
|
||||||
|
{
|
||||||
|
tableView.DeselectRow(indexPath, true);
|
||||||
|
tableView.EndEditing(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
73
src/iOS.Extension/PasswordGeneratorViewController.designer.cs
generated
Normal file
73
src/iOS.Extension/PasswordGeneratorViewController.designer.cs
generated
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
// WARNING
|
||||||
|
//
|
||||||
|
// This file has been generated automatically by Xamarin Studio from the outlets and
|
||||||
|
// actions declared in your storyboard file.
|
||||||
|
// Manual changes to this file will not be maintained.
|
||||||
|
//
|
||||||
|
using Foundation;
|
||||||
|
using System;
|
||||||
|
using System.CodeDom.Compiler;
|
||||||
|
using UIKit;
|
||||||
|
|
||||||
|
namespace Bit.iOS.Extension
|
||||||
|
{
|
||||||
|
[Register ("PasswordGeneratorViewController")]
|
||||||
|
partial class PasswordGeneratorViewController
|
||||||
|
{
|
||||||
|
[Outlet]
|
||||||
|
[GeneratedCode ("iOS Designer", "1.0")]
|
||||||
|
UIKit.UIView BaseView { get; set; }
|
||||||
|
|
||||||
|
[Outlet]
|
||||||
|
[GeneratedCode ("iOS Designer", "1.0")]
|
||||||
|
UIKit.UIBarButtonItem CancelBarButton { get; set; }
|
||||||
|
|
||||||
|
[Outlet]
|
||||||
|
[GeneratedCode ("iOS Designer", "1.0")]
|
||||||
|
UIKit.UILabel PasswordLabel { get; set; }
|
||||||
|
|
||||||
|
[Outlet]
|
||||||
|
[GeneratedCode ("iOS Designer", "1.0")]
|
||||||
|
UIKit.UIBarButtonItem SelectBarButton { get; set; }
|
||||||
|
|
||||||
|
[Outlet]
|
||||||
|
[GeneratedCode ("iOS Designer", "1.0")]
|
||||||
|
UIKit.UITableView Table { get; set; }
|
||||||
|
|
||||||
|
[Action ("CancelBarButton_Activated:")]
|
||||||
|
[GeneratedCode ("iOS Designer", "1.0")]
|
||||||
|
partial void CancelBarButton_Activated (UIKit.UIBarButtonItem sender);
|
||||||
|
|
||||||
|
[Action ("SelectBarButton_Activated:")]
|
||||||
|
[GeneratedCode ("iOS Designer", "1.0")]
|
||||||
|
partial void SelectBarButton_Activated (UIKit.UIBarButtonItem sender);
|
||||||
|
|
||||||
|
void ReleaseDesignerOutlets ()
|
||||||
|
{
|
||||||
|
if (BaseView != null) {
|
||||||
|
BaseView.Dispose ();
|
||||||
|
BaseView = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (CancelBarButton != null) {
|
||||||
|
CancelBarButton.Dispose ();
|
||||||
|
CancelBarButton = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (PasswordLabel != null) {
|
||||||
|
PasswordLabel.Dispose ();
|
||||||
|
PasswordLabel = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (SelectBarButton != null) {
|
||||||
|
SelectBarButton.Dispose ();
|
||||||
|
SelectBarButton = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Table != null) {
|
||||||
|
Table.Dispose ();
|
||||||
|
Table = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -95,6 +95,10 @@
|
|||||||
<CodesignKey>iPhone Distribution</CodesignKey>
|
<CodesignKey>iPhone Distribution</CodesignKey>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<Compile Include="PasswordGeneratorViewController.cs" />
|
||||||
|
<Compile Include="PasswordGeneratorViewController.designer.cs">
|
||||||
|
<DependentUpon>PasswordGeneratorViewController.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="SiteAddViewController.cs" />
|
<Compile Include="SiteAddViewController.cs" />
|
||||||
<Compile Include="SiteAddViewController.designer.cs">
|
<Compile Include="SiteAddViewController.designer.cs">
|
||||||
<DependentUpon>SiteAddViewController.cs</DependentUpon>
|
<DependentUpon>SiteAddViewController.cs</DependentUpon>
|
||||||
|
|||||||
Reference in New Issue
Block a user