Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Receive UI: 2.0 #583

Merged
merged 23 commits into from
Feb 26, 2020
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 38 additions & 4 deletions Decred Wallet.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,16 @@
10341E0C23CBBB700055DFDE /* SeedBackup.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 10341E0523CBBB700055DFDE /* SeedBackup.storyboard */; };
10341E0D23CBBB700055DFDE /* SeedBackupReminderViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10341E0623CBBB700055DFDE /* SeedBackupReminderViewController.swift */; };
10341E0F23CBBB7E0055DFDE /* Label.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10341E0E23CBBB7E0055DFDE /* Label.swift */; };
105836B823EACD390030FDF2 /* ReceiveViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 105836B623EACD390030FDF2 /* ReceiveViewController.swift */; };
105836B923EACD390030FDF2 /* Receive.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 105836B723EACD390030FDF2 /* Receive.storyboard */; };
108A2E7423DE311900B13A22 /* SelfSizedTableView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 108A2E7323DE311900B13A22 /* SelfSizedTableView.swift */; };
10945CDA23F3DB0C00BBE242 /* TransactionOverviewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10945CD923F3DB0C00BBE242 /* TransactionOverviewCell.swift */; };
10B7818223F066DA00AD2709 /* TransactionInputDetailCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10B7818023F066DA00AD2709 /* TransactionInputDetailCell.swift */; };
10B7818523F0693C00AD2709 /* TransactionOutputDetailCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10B7818423F0693C00AD2709 /* TransactionOutputDetailCell.swift */; };
10BA77992390059F00B67446 /* TabMenuItemView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10BA77982390059F00B67446 /* TabMenuItemView.swift */; };
10C6610E23EC587B00754DED /* AccountSelectorDialog.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10C6610B23EC587B00754DED /* AccountSelectorDialog.swift */; };
10C6610F23EC587B00754DED /* AccountSelectorTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 10C6610C23EC587B00754DED /* AccountSelectorTableViewCell.xib */; };
10C6611023EC587B00754DED /* AccountSelectorTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10C6610D23EC587B00754DED /* AccountSelectorTableViewCell.swift */; };
10D9FB9323C3956300CBF216 /* FloatingPlaceholderTextField.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10D9FB8E23C3956200CBF216 /* FloatingPlaceholderTextField.swift */; };
10D9FB9623C3956300CBF216 /* FloatingPlaceholderLabel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10D9FB9123C3956300CBF216 /* FloatingPlaceholderLabel.swift */; };
10FABE4B23C72D6800BC201B /* FloatingPlaceholderInputProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10FABE4A23C72D6700BC201B /* FloatingPlaceholderInputProtocol.swift */; };
Expand Down Expand Up @@ -118,7 +123,6 @@
B3B46A9B228F0F7D00A68EDD /* PeerSetTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3B46A62228F0F7B00A68EDD /* PeerSetTableViewController.swift */; };
B3B46A9C228F0F7D00A68EDD /* ServerSetTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3B46A63228F0F7B00A68EDD /* ServerSetTableViewController.swift */; };
B3B46A9D228F0F7D00A68EDD /* HelpViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3B46A64228F0F7B00A68EDD /* HelpViewController.swift */; };
B3B46A9E228F0F7D00A68EDD /* ReceiveViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3B46A65228F0F7B00A68EDD /* ReceiveViewController.swift */; };
B3B46A9F228F0F7D00A68EDD /* WalletLogViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3B46A66228F0F7B00A68EDD /* WalletLogViewController.swift */; };
B3B46AA0228F0F7D00A68EDD /* SendCompletedViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3B46A68228F0F7B00A68EDD /* SendCompletedViewController.swift */; };
B3B46AA6228F0F7D00A68EDD /* NetworkModeTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3B46A6E228F0F7B00A68EDD /* NetworkModeTableViewController.swift */; };
Expand Down Expand Up @@ -174,11 +178,17 @@
10341E0523CBBB700055DFDE /* SeedBackup.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = SeedBackup.storyboard; sourceTree = "<group>"; };
10341E0623CBBB700055DFDE /* SeedBackupReminderViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SeedBackupReminderViewController.swift; sourceTree = "<group>"; };
10341E0E23CBBB7E0055DFDE /* Label.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Label.swift; sourceTree = "<group>"; };
105836B623EACD390030FDF2 /* ReceiveViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ReceiveViewController.swift; sourceTree = "<group>"; };
105836B723EACD390030FDF2 /* Receive.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Receive.storyboard; sourceTree = "<group>"; };
108A2E7323DE311900B13A22 /* SelfSizedTableView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SelfSizedTableView.swift; sourceTree = "<group>"; };
10945CD923F3DB0C00BBE242 /* TransactionOverviewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TransactionOverviewCell.swift; sourceTree = "<group>"; };
10B7818023F066DA00AD2709 /* TransactionInputDetailCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TransactionInputDetailCell.swift; sourceTree = "<group>"; };
10B7818423F0693C00AD2709 /* TransactionOutputDetailCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TransactionOutputDetailCell.swift; sourceTree = "<group>"; };
10B7818823F096F300AD2709 /* SelfSizedTableView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SelfSizedTableView.swift; sourceTree = "<group>"; };
10BA77982390059F00B67446 /* TabMenuItemView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TabMenuItemView.swift; sourceTree = "<group>"; };
10C6610B23EC587B00754DED /* AccountSelectorDialog.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AccountSelectorDialog.swift; sourceTree = "<group>"; };
10C6610C23EC587B00754DED /* AccountSelectorTableViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = AccountSelectorTableViewCell.xib; sourceTree = "<group>"; };
10C6610D23EC587B00754DED /* AccountSelectorTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AccountSelectorTableViewCell.swift; sourceTree = "<group>"; };
10D9FB8E23C3956200CBF216 /* FloatingPlaceholderTextField.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FloatingPlaceholderTextField.swift; sourceTree = "<group>"; };
10D9FB9123C3956300CBF216 /* FloatingPlaceholderLabel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FloatingPlaceholderLabel.swift; sourceTree = "<group>"; };
10FABE4A23C72D6700BC201B /* FloatingPlaceholderInputProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FloatingPlaceholderInputProtocol.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -275,7 +285,6 @@
B3B46A62228F0F7B00A68EDD /* PeerSetTableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PeerSetTableViewController.swift; sourceTree = "<group>"; };
B3B46A63228F0F7B00A68EDD /* ServerSetTableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ServerSetTableViewController.swift; sourceTree = "<group>"; };
B3B46A64228F0F7B00A68EDD /* HelpViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HelpViewController.swift; sourceTree = "<group>"; };
B3B46A65228F0F7B00A68EDD /* ReceiveViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ReceiveViewController.swift; sourceTree = "<group>"; };
B3B46A66228F0F7B00A68EDD /* WalletLogViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WalletLogViewController.swift; sourceTree = "<group>"; };
B3B46A68228F0F7B00A68EDD /* SendCompletedViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SendCompletedViewController.swift; sourceTree = "<group>"; };
B3B46A6E228F0F7B00A68EDD /* NetworkModeTableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NetworkModeTableViewController.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -359,6 +368,25 @@
path = "Seed Backup";
sourceTree = "<group>";
};
105836B523EACD390030FDF2 /* Receive */ = {
isa = PBXGroup;
children = (
105836B723EACD390030FDF2 /* Receive.storyboard */,
105836B623EACD390030FDF2 /* ReceiveViewController.swift */,
);
path = Receive;
sourceTree = "<group>";
};
10C6610A23EC587B00754DED /* AccountSelectorDialog */ = {
isa = PBXGroup;
children = (
10C6610B23EC587B00754DED /* AccountSelectorDialog.swift */,
10C6610C23EC587B00754DED /* AccountSelectorTableViewCell.xib */,
10C6610D23EC587B00754DED /* AccountSelectorTableViewCell.swift */,
);
path = AccountSelectorDialog;
sourceTree = "<group>";
};
10D9FB9723C3956600CBF216 /* FloatingPlaceholderInputs */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -505,6 +533,7 @@
B3635B81229FE5870052EB4D /* QRImageScanner.swift */,
102AFAC323AA2B4D007E2EBD /* ProgressView.swift */,
B3456D2423D91CF600B04860 /* RoundedView.swift */,
10B7818823F096F300AD2709 /* SelfSizedTableView.swift */,
);
path = "Custom Views";
sourceTree = "<group>";
Expand Down Expand Up @@ -584,6 +613,7 @@
B3B469E2228F0F2600A68EDD /* Wallet Setup */,
B3B469E9228F0F2600A68EDD /* Navigation Menu */,
B3B469EF228F0F2600A68EDD /* Overview */,
105836B523EACD390030FDF2 /* Receive */,
B3A3EF902295955100008A4E /* Send */,
100B122423E9EEAC005636A7 /* Transactions */,
B3B46A55228F0F7B00A68EDD /* TransactionDetails */,
Expand Down Expand Up @@ -692,7 +722,6 @@
isa = PBXGroup;
children = (
B3B46A64228F0F7B00A68EDD /* HelpViewController.swift */,
B3B46A65228F0F7B00A68EDD /* ReceiveViewController.swift */,
);
path = view_controller;
sourceTree = "<group>";
Expand Down Expand Up @@ -750,6 +779,7 @@
B3C0D4B123E0DB56002D984F /* CustomDialogs.storyboard */,
B3C0D4B323E0DBF6002D984F /* SimpleTextInputDialog.swift */,
B3C0D4B523E0FBA5002D984F /* SimpleOkCancelDialog.swift */,
10C6610A23EC587B00754DED /* AccountSelectorDialog */,
B3D474E023E56CD900B6E305 /* CheckableListDialog */,
);
path = "Custom Dialogs";
Expand Down Expand Up @@ -851,6 +881,7 @@
files = (
B3C0D4B223E0DB56002D984F /* CustomDialogs.storyboard in Resources */,
B3B46A41228F0F6700A68EDD /* dcr-logo.png in Resources */,
105836B923EACD390030FDF2 /* Receive.storyboard in Resources */,
B3B46A02228F0F2700A68EDD /* SourceSansPro-SemiBoldItalic.ttf in Resources */,
100B122B23E9EEAC005636A7 /* Transactions.storyboard in Resources */,
B3B46A0C228F0F2700A68EDD /* SourceSansPro-Italic.ttf in Resources */,
Expand All @@ -874,6 +905,7 @@
B3B46A03228F0F2700A68EDD /* SourceSansPro-Regular.ttf in Resources */,
B3B46A09228F0F2700A68EDD /* SourceSansPro-BoldItalic.ttf in Resources */,
B3C03B2323DD41EE00156D9F /* Wallets.storyboard in Resources */,
10C6610F23EC587B00754DED /* AccountSelectorTableViewCell.xib in Resources */,
B3B46A98228F0F7D00A68EDD /* TransactionDetails.storyboard in Resources */,
DDCF25A122B8A3D4005FCBB9 /* Settings.storyboard in Resources */,
B3B46A05228F0F2700A68EDD /* SourceSansPro-LightItalic.ttf in Resources */,
Expand Down Expand Up @@ -975,14 +1007,15 @@
DD3DF86622C3F0BD00E168AB /* UILabel.swift in Sources */,
B3B46A99228F0F7D00A68EDD /* CertificateViewController.swift in Sources */,
DDD65AD722A935460027CDA8 /* LicenseViewController.swift in Sources */,
B3B46A9E228F0F7D00A68EDD /* ReceiveViewController.swift in Sources */,
105836B823EACD390030FDF2 /* ReceiveViewController.swift in Sources */,
B3E727C823DD4AD7003B06B4 /* WalletInfoTableViewCell.swift in Sources */,
B32EB42E23EEA24000E43D4F /* AccountDetailsViewController.swift in Sources */,
DD17D9CC23CE243D0017E41D /* RestoreExistingWalletViewController.swift in Sources */,
B39BDC4D228F798300F3FB55 /* BuildConfig.swift in Sources */,
B3B46A9F228F0F7D00A68EDD /* WalletLogViewController.swift in Sources */,
2557E1892355C6FA00B6A1B7 /* NavigationMenuTabBarController.swift in Sources */,
102AFAC423AA2B4D007E2EBD /* ProgressView.swift in Sources */,
10C6611023EC587B00754DED /* AccountSelectorTableViewCell.swift in Sources */,
B3D474DF23E55B5D00B6E305 /* WalletSettings.swift in Sources */,
B3A3EF8B22937B8800008A4E /* Settings.swift in Sources */,
B3B46A1B228F0F2700A68EDD /* SecurityViewController.swift in Sources */,
Expand Down Expand Up @@ -1012,6 +1045,7 @@
B3635B82229FE5870052EB4D /* QRImageScanner.swift in Sources */,
B3B46A2E228F0F2700A68EDD /* MenuItem.swift in Sources */,
B3A3EF8622936BFE00008A4E /* Reachability.swift in Sources */,
10C6610E23EC587B00754DED /* AccountSelectorDialog.swift in Sources */,
B36EFD362298617C002753B2 /* UIButton.swift in Sources */,
B3456D2523D91CF600B04860 /* RoundedView.swift in Sources */,
B3B469FC228F0F2700A68EDD /* String.swift in Sources */,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"images" : [
{
"idiom" : "universal",
"filename" : "ic_checkmark_64px.pdf"
"filename" : "ic_checkmark.pdf"
}
],
"info" : {
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "ic_checkmark_round.pdf"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
},
"properties" : {
"preserves-vector-representation" : true
}
}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
bgptr marked this conversation as resolved.
Show resolved Hide resolved
{
"idiom" : "universal",
"filename" : "ic_dropdown01_24px.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "ic_dropdown01_24px@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "ic_dropdown01_24px@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
bgptr marked this conversation as resolved.
Show resolved Hide resolved
{
"idiom" : "universal",
"filename" : "ic_dropdown01_24px.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "ic_dropdown01_24px@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "ic_dropdown01_24px@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Binary file not shown.
Binary file not shown.
23 changes: 23 additions & 0 deletions Decred Wallet/Assets.xcassets/ic_info.imageset/Contents.json~init
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"idiom" : "universal",
bgptr marked this conversation as resolved.
Show resolved Hide resolved
"filename" : "ic_info_24px.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "ic_info_24px@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "ic_info_24px@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
bgptr marked this conversation as resolved.
Show resolved Hide resolved
{
"idiom" : "universal",
"filename" : "ic_info_24px.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "ic_info_24px@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "ic_info_24px@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
23 changes: 23 additions & 0 deletions Decred Wallet/Assets.xcassets/ic_share.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "ic_share_24px.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "ic_share_24px@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "ic_share_24px@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 7 additions & 1 deletion Decred Wallet/DcrlibwalletTypes/Wallet.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,19 @@ class Wallet: NSObject {
private(set) var isSeedBackedUp: Bool = false
private(set) var displayAccounts: Bool = false

init(_ wallet: DcrlibwalletWallet) {
init(_ wallet: DcrlibwalletWallet, accountsFilterFn: ((DcrlibwalletAccount) -> Bool)? = nil) {
self.id = wallet.id_
self.name = wallet.name
self.balance = "\((Decimal(wallet.totalWalletBalance()) as NSDecimalNumber).round(8)) DCR"
self.accounts = wallet.accounts(confirmations: 0)
self.isSeedBackedUp = wallet.seed.isEmpty
self.displayAccounts = false

if accountsFilterFn == nil {
self.accounts = wallet.accounts(confirmations: 0)
} else {
self.accounts = wallet.accounts(confirmations: 0).filter(accountsFilterFn!)
}
}

func toggleAccountsDisplay() {
Expand Down
Loading