Skip to content

Commit

Permalink
Merge pull request #634 from dashpay/release/8.0.0
Browse files Browse the repository at this point in the history
chore: Release 8.0.0
  • Loading branch information
pankcuf committed Dec 9, 2023
2 parents 81694ed + c87d590 commit 7656d69
Show file tree
Hide file tree
Showing 875 changed files with 67,575 additions and 4,109 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/semantic-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,5 @@ jobs:
testnet
dashpay
wallet
coinjoin
voting
6 changes: 6 additions & 0 deletions DashPay/Assets/DPAssets.xcassets/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"images" : [
{
"filename" : "tabbar_pay_button.png",
"filename" : "icon_info.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "tabbar_pay_button@2x.png",
"filename" : "icon_info@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "tabbar_pay_button@3x.png",
"filename" : "icon_info@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
Expand Down
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.
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"images" : [
{
"filename" : "tabbar_discover_icon.png",
"filename" : "pay_user_accessory.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "tabbar_discover_icon@2x.png",
"filename" : "pay_user_accessory@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "tabbar_discover_icon@3x.png",
"filename" : "pay_user_accessory@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
Expand Down
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.
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
//
// Created by Andrew Podkovyrin
// Copyright © 2021 Dash Core Group. All rights reserved.
//
// Licensed under the MIT License (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://opensource.org/licenses/MIT
//
// 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 <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@class DWFullScreenModalControllerViewController;

@protocol DWFullScreenModalControllerViewControllerDelegate <NSObject>

- (void)fullScreenModalControllerViewControllerDidCancel:(DWFullScreenModalControllerViewController *)controller;

@end

@interface DWFullScreenModalControllerViewController : UIViewController

@property (nullable, nonatomic, weak) id<DWFullScreenModalControllerViewControllerDelegate> delegate;

- (instancetype)initWithController:(UIViewController *)controller;

- (instancetype)init NS_UNAVAILABLE;
- (instancetype)initWithNibName:(nullable NSString *)nibNameOrNil
bundle:(nullable NSBundle *)nibBundleOrNil NS_UNAVAILABLE;
- (instancetype)initWithCoder:(nullable NSCoder *)coder NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;

@end

NS_ASSUME_NONNULL_END
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
//
// Created by Andrew Podkovyrin
// Copyright © 2021 Dash Core Group. All rights reserved.
//
// Licensed under the MIT License (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://opensource.org/licenses/MIT
//
// 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 "DWFullScreenModalControllerViewController.h"

#import "DWUIKit.h"

NS_ASSUME_NONNULL_BEGIN

@interface DWFullScreenModalControllerViewController ()

@property (readonly, nonatomic, strong) UIViewController *contentController;

@end

NS_ASSUME_NONNULL_END

@implementation DWFullScreenModalControllerViewController

- (instancetype)initWithController:(UIViewController *)controller {
self = [super initWithNibName:nil bundle:nil];
if (self) {
_contentController = controller;
}
return self;
}

- (void)viewDidLoad {
[super viewDidLoad];

self.view.backgroundColor = [UIColor dw_secondaryBackgroundColor];

UIView *header = [[UIView alloc] init];
header.translatesAutoresizingMaskIntoConstraints = NO;
[self.view addSubview:header];

UILabel *label = [[UILabel alloc] init];
label.translatesAutoresizingMaskIntoConstraints = NO;
label.textColor = [UIColor dw_darkTitleColor];
label.textAlignment = NSTextAlignmentCenter;
label.font = [UIFont dw_fontForTextStyle:UIFontTextStyleHeadline];
label.text = self.title;
label.adjustsFontForContentSizeCategory = YES;
[header addSubview:label];

UIButton *cancelButton = [UIButton buttonWithType:UIButtonTypeSystem];
cancelButton.translatesAutoresizingMaskIntoConstraints = NO;
[cancelButton setImage:[[UIImage imageNamed:@"payments_nav_cross"] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate]
forState:UIControlStateNormal];
cancelButton.tintColor = [UIColor dw_darkTitleColor];
[cancelButton addTarget:self action:@selector(cancelButtonAction) forControlEvents:UIControlEventTouchUpInside];
[header addSubview:cancelButton];

UIView *contentView = [[UIView alloc] init];
contentView.translatesAutoresizingMaskIntoConstraints = NO;
[self.view addSubview:contentView];

[NSLayoutConstraint activateConstraints:@[
[header.topAnchor constraintEqualToAnchor:self.view.safeAreaLayoutGuide.topAnchor],
[header.leadingAnchor constraintEqualToAnchor:self.view.leadingAnchor
constant:8],
[self.view.trailingAnchor constraintEqualToAnchor:header.trailingAnchor
constant:8],
[header.heightAnchor constraintEqualToConstant:44],

[contentView.topAnchor constraintEqualToAnchor:header.bottomAnchor],
[contentView.leadingAnchor constraintEqualToAnchor:self.view.leadingAnchor],
[self.view.trailingAnchor constraintEqualToAnchor:contentView.trailingAnchor],
[self.view.bottomAnchor constraintEqualToAnchor:contentView.bottomAnchor],

[label.topAnchor constraintEqualToAnchor:header.topAnchor],
[label.leadingAnchor constraintEqualToAnchor:header.leadingAnchor
constant:44],
[header.bottomAnchor constraintEqualToAnchor:label.bottomAnchor],

[cancelButton.topAnchor constraintEqualToAnchor:header.topAnchor],
[cancelButton.leadingAnchor constraintEqualToAnchor:label.trailingAnchor],
[cancelButton.trailingAnchor constraintEqualToAnchor:header.trailingAnchor],
[header.bottomAnchor constraintEqualToAnchor:cancelButton.bottomAnchor],
[cancelButton.widthAnchor constraintEqualToConstant:44],
]];

[self dw_embedChild:self.contentController inContainer:contentView];
}

- (void)cancelButtonAction {
[self.delegate fullScreenModalControllerViewControllerDidCancel:self];
}

@end
39 changes: 39 additions & 0 deletions DashPay/Presentation/Error/DWNetworkErrorViewController.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
//
// Created by Andrew Podkovyrin
// Copyright © 2020 Dash Core Group. All rights reserved.
//
// Licensed under the MIT License (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://opensource.org/licenses/MIT
//
// 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 <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

typedef NS_ENUM(NSUInteger, DWErrorDescriptionType) {
DWErrorDescriptionType_Profile,
DWErrorDescriptionType_AcceptContactRequest,
DWErrorDescriptionType_SendContactRequest,
};

@interface DWNetworkErrorViewController : UIViewController

- (instancetype)initWithType:(DWErrorDescriptionType)type;

- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;
- (instancetype)initWithNibName:(nullable NSString *)nibNameOrNil bundle:(nullable NSBundle *)nibBundleOrNil NS_UNAVAILABLE;
- (instancetype)initWithCoder:(NSCoder *)coder NS_UNAVAILABLE;

@end

NS_ASSUME_NONNULL_END
107 changes: 107 additions & 0 deletions DashPay/Presentation/Error/DWNetworkErrorViewController.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
//
// Created by Andrew Podkovyrin
// Copyright © 2020 Dash Core Group. All rights reserved.
//
// Licensed under the MIT License (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://opensource.org/licenses/MIT
//
// 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 "DWNetworkErrorViewController.h"

#import "DWModalPopupTransition.h"
#import "DWNetworkUnavailableView.h"
#import "DWUIKit.h"

NS_ASSUME_NONNULL_BEGIN

@interface DWNetworkErrorViewController ()

@property (nonatomic, strong) DWModalPopupTransition *modalTransition;
@property (nonatomic, assign) DWErrorDescriptionType type;

@end

NS_ASSUME_NONNULL_END

@implementation DWNetworkErrorViewController

- (instancetype)initWithType:(DWErrorDescriptionType)type {
self = [super initWithNibName:nil bundle:nil];
if (self) {
_type = type;

_modalTransition = [[DWModalPopupTransition alloc] initWithInteractiveTransitionAllowed:NO];

self.transitioningDelegate = self.modalTransition;
self.modalPresentationStyle = UIModalPresentationCustom;
}
return self;
}

- (void)viewDidLoad {
[super viewDidLoad];

self.view.backgroundColor = [UIColor clearColor];

UIView *contentView = [[UIView alloc] init];
contentView.translatesAutoresizingMaskIntoConstraints = NO;
contentView.backgroundColor = [UIColor dw_backgroundColor];
contentView.layer.cornerRadius = 8.0;
contentView.layer.masksToBounds = YES;
[self.view addSubview:contentView];

DWNetworkUnavailableView *errorView = [[DWNetworkUnavailableView alloc] initWithFrame:CGRectZero];
errorView.translatesAutoresizingMaskIntoConstraints = NO;
switch (self.type) {
case DWErrorDescriptionType_Profile:
errorView.error = NSLocalizedString(@"Unable to fetch contact details", nil);
break;
case DWErrorDescriptionType_AcceptContactRequest:
errorView.error = NSLocalizedString(@"Unable to accept contact request", nil);
break;
case DWErrorDescriptionType_SendContactRequest:
errorView.error = NSLocalizedString(@"Unable to send contact request", nil);
break;
}
[contentView addSubview:errorView];

UIButton *closeButton = [UIButton buttonWithType:UIButtonTypeSystem];
closeButton.translatesAutoresizingMaskIntoConstraints = NO;
[closeButton setTitle:NSLocalizedString(@"Close", nil) forState:UIControlStateNormal];
[closeButton addTarget:self action:@selector(closeButtonAction:) forControlEvents:UIControlEventTouchUpInside];
[contentView addSubview:closeButton];


[NSLayoutConstraint activateConstraints:@[
[contentView.leadingAnchor constraintEqualToAnchor:self.view.leadingAnchor],
[contentView.trailingAnchor constraintEqualToAnchor:self.view.trailingAnchor],
[contentView.centerYAnchor constraintEqualToAnchor:self.view.centerYAnchor],

[errorView.topAnchor constraintEqualToAnchor:contentView.topAnchor
constant:32.0],
[errorView.leadingAnchor constraintEqualToAnchor:contentView.leadingAnchor],
[errorView.trailingAnchor constraintEqualToAnchor:contentView.trailingAnchor],

[closeButton.topAnchor constraintEqualToAnchor:errorView.bottomAnchor
constant:32.0],
[closeButton.centerXAnchor constraintEqualToAnchor:contentView.centerXAnchor],
[contentView.bottomAnchor constraintEqualToAnchor:closeButton.bottomAnchor
constant:16.0],
[closeButton.heightAnchor constraintGreaterThanOrEqualToConstant:44.0],
]];
}

- (void)closeButtonAction:(UIButton *)sender {
[self dismissViewControllerAnimated:YES completion:nil];
}

@end
Loading

0 comments on commit 7656d69

Please sign in to comment.