Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit03706e8

Browse files
committed
TF-250 Complete Settings section
1 parent0be9214 commit03706e8

File tree

20 files changed

+609
-153
lines changed

20 files changed

+609
-153
lines changed

‎TwoFAS/Common/Sources/Models/PINType.swift‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
import Foundation
2121

22-
publicenumPINType:CaseIterable,Codable{
22+
publicenumPINType:CaseIterable,Codable,Hashable{
2323
case digits4
2424
case digits6
2525
}

‎TwoFAS/TwoFAS.xcodeproj/project.pbxproj‎

Lines changed: 65 additions & 9 deletions
Large diffs are not rendered by default.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"images" : [
3+
{
4+
"filename" :"LogoGrid.pdf",
5+
"idiom" :"universal"
6+
},
7+
{
8+
"appearances" : [
9+
{
10+
"appearance" :"luminosity",
11+
"value" :"dark"
12+
}
13+
],
14+
"filename" :"LogoGridDark.pdf",
15+
"idiom" :"universal"
16+
}
17+
],
18+
"info" : {
19+
"author" :"xcode",
20+
"version" :1
21+
}
22+
}
Binary file not shown.
Binary file not shown.

‎TwoFAS/TwoFASWatch Watch App/ContentView.swift‎

Lines changed: 0 additions & 135 deletions
This file was deleted.

‎TwoFAS/TwoFASWatch Watch App/InteractorFactory.swift‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,14 @@ final class InteractorFactory {
3838
service: service
3939
)
4040
}
41+
42+
func securityInteractor()->SecurityInteracting{
43+
SecurityInteractor(
44+
mainRepository:MainRepositoryImpl.shared
45+
)
46+
}
47+
48+
func pinInteractor(variant:PINKeyboardVariant)->PINKeyboardInteracting{
49+
PINKeyboardInteractor(mainRepository:MainRepositoryImpl.shared, variant: variant)
50+
}
4151
}

‎TwoFAS/TwoFASWatch Watch App/Main/MainView.swift‎

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,10 @@ import SwiftUI
2222
structMainView:View{
2323
@ObservedObjectvarpresenter:MainPresenter
2424
@StateprivatevarselectedService:Service?
25+
@Stateprivatevarpath=NavigationPath()
2526

2627
varbody:someView{
27-
NavigationStack{
28+
NavigationStack(path: $path){
2829
List{
2930
if !presenter.favoriteList.isEmpty{
3031
Section(header:
@@ -62,7 +63,7 @@ struct MainView: View {
6263
}
6364
}
6465

65-
NavigationLink(destination:SettingsView()){
66+
NavigationLink(value:MainPath.settings){
6667
HStack(alignment:.center){
6768
Image(systemName:"gear")
6869
Text("Settings")
@@ -73,6 +74,9 @@ struct MainView: View {
7374
}
7475
}
7576
}
77+
.navigationDestination(for:MainPath.self){ routein
78+
SettingsView(path: $path)
79+
}
7680
.onAppear{
7781
presenter.onAppear()
7882
}
@@ -85,3 +89,7 @@ struct MainView: View {
8589
}
8690
}
8791
}
92+
93+
enumMainPath:Hashable{
94+
case settings
95+
}

‎TwoFAS/TwoFASWatch Watch App/Models/AppPIN.swift‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import Foundation
2121
import CommonWatch
2222

23-
structAppPIN:Codable{
23+
structAppPIN:Codable,Hashable{
2424
lettype:PINType
2525
letvalue:String
2626
}

‎TwoFAS/TwoFASWatch Watch App/PIN/PINKeyboardPresenter.swift‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import Foundation
2121
import CommonWatch
2222
import WatchKit
2323

24-
enumPINKeyboardResult:Equatable{
24+
enumPINKeyboardResult:Equatable,Hashable{
2525
staticfunc==(lhs:PINKeyboardResult, rhs:PINKeyboardResult)->Bool{
2626
switch(lhs, rhs){
2727
case(.verified,.verified):true
@@ -32,6 +32,10 @@ enum PINKeyboardResult: Equatable {
3232
}
3333
}
3434

35+
func hash(into hasher:inoutHasher){
36+
hasher.combine(self)
37+
}
38+
3539
case verified
3640
case closed
3741
case entered(AppPIN)
@@ -45,7 +49,7 @@ final class PINKeyboardPresenter: ObservableObject {
4549
@PublishedvaranimateFailure=false
4650
@PublishedvarshowCloseButton=false
4751
@PublishedvarnavigationTitle=""
48-
52+
4953
privateletinteractor:PINKeyboardInteracting
5054
privateletcompletion:(PINKeyboardResult)->Void
5155

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp