Skip to content

Commit 1274096

Browse files
committed
Merge branch 'develop' into issue/5428-print
2 parents 66ae262 + c46b107 commit 1274096

File tree

9 files changed

+70
-4
lines changed

9 files changed

+70
-4
lines changed

Hardware/Hardware/CardReader/CardReaderConfigProvider.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public protocol ReaderLocationProvider {
1010
func fetchDefaultLocationID(completion: @escaping(String?, Error?) -> Void)
1111
}
1212

13-
public protocol CardReaderConfigProvider: ReaderLocationProvider {
13+
public protocol CardReaderConfigProvider: ReaderLocationProvider, ReaderTokenProvider {
1414
func fetchToken(completion: @escaping(String?, Error?) -> Void)
1515
func fetchDefaultLocationID(completion: @escaping(String?, Error?) -> Void)
1616
}

Hardware/Hardware/CardReader/StripeCardReader/DefaultConnectionTokenProvider.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ import StripeTerminal
44
/// uses the networking adapter provided by clients of Hardware
55
/// to fetch a connection token
66
final class DefaultConnectionTokenProvider: ConnectionTokenProvider {
7-
private let provider: CardReaderConfigProvider
7+
private let provider: ReaderTokenProvider
88

9-
init(provider: CardReaderConfigProvider) {
9+
init(provider: ReaderTokenProvider) {
1010
self.provider = provider
1111
}
1212

RELEASE-NOTES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
8.1
44
-----
5+
- [*] Login: Password AutoFill will suggest wordpress.com accounts. [https://github.com/woocommerce/woocommerce-ios/pull/5399]
56
- [internal] Migrated Settings screen to MVVM [https://github.com/woocommerce/woocommerce-ios/pull/5393]
67

78

WooCommerce/Classes/ViewRelated/Dashboard/Settings/Settings/SettingsViewModel.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ final class SettingsViewModel: SettingsViewModelOutput, SettingsViewModelActions
7272
/// Main Site's URL
7373
///
7474
var siteUrl: String? {
75-
stores.sessionManager.defaultSite?.url as String?
75+
let urlString = stores.sessionManager.defaultSite?.url as String?
76+
return urlString?.removingPrefix("https://").removingPrefix("http://")
7677
}
7778

7879
/// Sites pulled from the results controlelr
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
import SwiftUI
2+
3+
/// View to create a new manual order
4+
///
5+
struct NewOrder: View {
6+
var body: some View {
7+
ScrollView {
8+
EmptyView()
9+
}
10+
.background(Color(.listBackground))
11+
.ignoresSafeArea(.container, edges: [.horizontal, .bottom])
12+
.navigationTitle(Localization.title)
13+
.navigationBarTitleDisplayMode(.inline)
14+
.toolbar {
15+
ToolbarItem(placement: .confirmationAction) {
16+
Button(action: {
17+
// TODO-5405 - Add create order action
18+
}, label: {
19+
Text(Localization.createButton)
20+
})
21+
}
22+
}
23+
}
24+
}
25+
26+
// MARK: Constants
27+
private extension NewOrder {
28+
enum Localization {
29+
static let title = NSLocalizedString("New Order", comment: "Title for the order creation screen")
30+
static let createButton = NSLocalizedString("Create", comment: "Button to create an order on the New Order screen")
31+
}
32+
}
33+
34+
struct NewOrder_Previews: PreviewProvider {
35+
static var previews: some View {
36+
NavigationView {
37+
NewOrder()
38+
}
39+
}
40+
}

WooCommerce/Resources/Woo-Alpha.entitlements

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
<dict>
55
<key>aps-environment</key>
66
<string>production</string>
7+
<key>com.apple.developer.associated-domains</key>
8+
<array>
9+
<string>webcredentials:wordpress.com</string>
10+
</array>
711
<key>com.apple.developer.icloud-container-identifiers</key>
812
<array>
913
<string>iCloud.$(CFBundleIdentifier)</string>

WooCommerce/Resources/Woo-Debug.entitlements

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
<array>
1111
<string>Default</string>
1212
</array>
13+
<key>com.apple.developer.associated-domains</key>
14+
<array>
15+
<string>webcredentials:wordpress.com</string>
16+
</array>
1317
<key>com.apple.developer.icloud-container-identifiers</key>
1418
<array>
1519
<string>iCloud.$(CFBundleIdentifier)</string>

WooCommerce/Resources/Woo-Release.entitlements

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
<array>
1111
<string>Default</string>
1212
</array>
13+
<key>com.apple.developer.associated-domains</key>
14+
<array>
15+
<string>webcredentials:wordpress.com</string>
16+
</array>
1317
<key>com.apple.developer.icloud-container-identifiers</key>
1418
<array>
1519
<string>iCloud.$(CFBundleIdentifier)</string>

WooCommerce/WooCommerce.xcodeproj/project.pbxproj

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1098,6 +1098,7 @@
10981098
CCFC010C23E9BD5500157A78 /* stats_orders-year.json in Resources */ = {isa = PBXBuildFile; fileRef = CCFC00E623E9BD5500157A78 /* stats_orders-year.json */; };
10991099
CCFC010D23E9BD5500157A78 /* stats_top_earners-month.json in Resources */ = {isa = PBXBuildFile; fileRef = CCFC00E723E9BD5500157A78 /* stats_top_earners-month.json */; };
11001100
CCFC010E23E9BD5500157A78 /* stats_visits-day.json in Resources */ = {isa = PBXBuildFile; fileRef = CCFC00E823E9BD5500157A78 /* stats_visits-day.json */; };
1101+
CCFC50552743BC0D001E505F /* NewOrder.swift in Sources */ = {isa = PBXBuildFile; fileRef = CCFC50542743BC0D001E505F /* NewOrder.swift */; };
11011102
CE0F17CF22A8105800964A63 /* ReadMoreTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE0F17CD22A8105800964A63 /* ReadMoreTableViewCell.swift */; };
11021103
CE0F17D022A8105800964A63 /* ReadMoreTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = CE0F17CE22A8105800964A63 /* ReadMoreTableViewCell.xib */; };
11031104
CE0F17D222A8308900964A63 /* FancyAlertController+PurchaseNote.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE0F17D122A8308900964A63 /* FancyAlertController+PurchaseNote.swift */; };
@@ -2572,6 +2573,7 @@
25722573
CCFC00E823E9BD5500157A78 /* stats_visits-day.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "stats_visits-day.json"; sourceTree = "<group>"; };
25732574
CCFC011023E9E3F400157A78 /* start.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = start.sh; sourceTree = "<group>"; };
25742575
CCFC011123E9E40B00157A78 /* stop.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = stop.sh; sourceTree = "<group>"; };
2576+
CCFC50542743BC0D001E505F /* NewOrder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NewOrder.swift; sourceTree = "<group>"; };
25752577
CE0F17CD22A8105800964A63 /* ReadMoreTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReadMoreTableViewCell.swift; sourceTree = "<group>"; };
25762578
CE0F17CE22A8105800964A63 /* ReadMoreTableViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ReadMoreTableViewCell.xib; sourceTree = "<group>"; };
25772579
CE0F17D122A8308900964A63 /* FancyAlertController+PurchaseNote.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "FancyAlertController+PurchaseNote.swift"; sourceTree = "<group>"; };
@@ -5898,6 +5900,14 @@
58985900
path = stats;
58995901
sourceTree = "<group>";
59005902
};
5903+
CCFC50532743BBBF001E505F /* Order Creation */ = {
5904+
isa = PBXGroup;
5905+
children = (
5906+
CCFC50542743BC0D001E505F /* NewOrder.swift */,
5907+
);
5908+
path = "Order Creation";
5909+
sourceTree = "<group>";
5910+
};
59015911
CE14452C2188C0EC00A991D8 /* Zendesk */ = {
59025912
isa = PBXGroup;
59035913
children = (
@@ -5925,6 +5935,7 @@
59255935
CEE006022077D0F80079161F /* Cells */,
59265936
CE35F1092343E482007B2A6B /* Order Details */,
59275937
2678897A270E6E3C00BD249E /* Simple Payments */,
5938+
CCFC50532743BBBF001E505F /* Order Creation */,
59285939
CEE005F52076C4040079161F /* Orders.storyboard */,
59295940
57C503DB23E8C70C00EC0790 /* OrdersTabbedViewController.swift */,
59305941
57C503DD23E8CE0D00EC0790 /* OrdersTabbedViewController.xib */,
@@ -8042,6 +8053,7 @@
80428053
DE68B81F26F86B1700C86CFB /* OfflineBannerView.swift in Sources */,
80438054
02D4564C231D05E2008CF0A9 /* BetaFeaturesViewController.swift in Sources */,
80448055
D8610BCC256F284700A5DF27 /* ULErrorViewModel.swift in Sources */,
8056+
CCFC50552743BC0D001E505F /* NewOrder.swift in Sources */,
80458057
4590CEE4249BA46700949F05 /* AddProductCategoryViewController.swift in Sources */,
80468058
CE37C04422984E81008DCB39 /* PickListTableViewCell.swift in Sources */,
80478059
020DD48D2322A617005822B1 /* ProductsTabProductViewModel.swift in Sources */,

0 commit comments

Comments
 (0)