Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
Sailassist
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
CpjJwWHV
Sailassist
Commits
4780c488
Commit
4780c488
authored
Nov 17, 2023
by
sugita mamoru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ログイン画面デザイン修正
parent
b6cef56f
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
105 additions
and
128 deletions
+105
-128
Contents.json
...Set/BackgroundColor/LoginbkColor01.colorset/Contents.json
+2
-2
Contents.json
...Set/BackgroundColor/LoginbkColor02.colorset/Contents.json
+2
-2
ContentView.swift
Seilassist/Sailassist/ContentView.swift
+1
-1
LoginView.swift
Seilassist/Sailassist/Login/LoginView.swift
+2
-1
InputIdPassWordView.swift
Seilassist/Sailassist/Login/View/InputIdPassWordView.swift
+27
-39
InputUserNameView.swift
Seilassist/Sailassist/Login/View/InputUserNameView.swift
+56
-69
LoginTypeSelectView.swift
Seilassist/Sailassist/Login/View/LoginTypeSelectView.swift
+15
-14
No files found.
Seilassist/Sailassist/Assets.xcassets/ColorSet/BackgroundColor/LoginbkColor01.colorset/Contents.json
View file @
4780c488
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
"color"
:
{
"color"
:
{
"color-space"
:
"srgb"
,
"color-space"
:
"srgb"
,
"components"
:
{
"components"
:
{
"alpha"
:
"
0.002
"
,
"alpha"
:
"
1.000
"
,
"blue"
:
"0xD1"
,
"blue"
:
"0xD1"
,
"green"
:
"0xBD"
,
"green"
:
"0xBD"
,
"red"
:
"0x21"
"red"
:
"0x21"
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
"color"
:
{
"color"
:
{
"color-space"
:
"srgb"
,
"color-space"
:
"srgb"
,
"components"
:
{
"components"
:
{
"alpha"
:
"
0.2
00"
,
"alpha"
:
"
1.0
00"
,
"blue"
:
"0xD1"
,
"blue"
:
"0xD1"
,
"green"
:
"0xBD"
,
"green"
:
"0xBD"
,
"red"
:
"0x21"
"red"
:
"0x21"
...
...
Seilassist/Sailassist/Assets.xcassets/ColorSet/BackgroundColor/LoginbkColor02.colorset/Contents.json
View file @
4780c488
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
"color"
:
{
"color"
:
{
"color-space"
:
"srgb"
,
"color-space"
:
"srgb"
,
"components"
:
{
"components"
:
{
"alpha"
:
"
0.002
"
,
"alpha"
:
"
1.000
"
,
"blue"
:
"0xFA"
,
"blue"
:
"0xFA"
,
"green"
:
"0xFA"
,
"green"
:
"0xFA"
,
"red"
:
"0xFA"
"red"
:
"0xFA"
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
"color"
:
{
"color"
:
{
"color-space"
:
"srgb"
,
"color-space"
:
"srgb"
,
"components"
:
{
"components"
:
{
"alpha"
:
"
0.2
00"
,
"alpha"
:
"
1.0
00"
,
"blue"
:
"0x3C"
,
"blue"
:
"0x3C"
,
"green"
:
"0x38"
,
"green"
:
"0x38"
,
"red"
:
"0x38"
"red"
:
"0x38"
...
...
Seilassist/Sailassist/ContentView.swift
View file @
4780c488
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
import
SwiftUI
import
SwiftUI
struct
ContentView
:
View
{
struct
ContentView
:
View
{
@State
var
isLogin
=
tru
e
//ContentView.LoginCheck()
@State
var
isLogin
=
fals
e
//ContentView.LoginCheck()
@EnvironmentObject
private
var
sceneDelegate
:
SceneDelegate
@EnvironmentObject
private
var
sceneDelegate
:
SceneDelegate
@StateObject
var
locationViewModel
=
LocationViewModel
()
@StateObject
var
locationViewModel
=
LocationViewModel
()
var
selectedTabModel
=
SelectedTabModel
()
var
selectedTabModel
=
SelectedTabModel
()
...
...
Seilassist/Sailassist/Login/LoginView.swift
View file @
4780c488
...
@@ -109,13 +109,14 @@ struct LoginView: View {
...
@@ -109,13 +109,14 @@ struct LoginView: View {
}
}
}
}
}
}
.
background
(
ColorSet
.
LoginBk01
.
color
)
.
background
(
ColorSet
.
BackgroundPrimary
.
color
)
.
fullScreenCover
(
isPresented
:
$
scannerViewModel
.
isShowing
,
onDismiss
:
{
LoginCheckQR
()},
content
:
{
.
fullScreenCover
(
isPresented
:
$
scannerViewModel
.
isShowing
,
onDismiss
:
{
LoginCheckQR
()},
content
:
{
QRReadView
(
viewMode
:
.
constant
(
.
SelectType
),
viewModel
:
scannerViewModel
)
QRReadView
(
viewMode
:
.
constant
(
.
SelectType
),
viewModel
:
scannerViewModel
)
})
})
.
onAppear
()
{
.
onAppear
()
{
LoginCheck
()
LoginCheck
()
}
}
.
preferredColorScheme
(
.
dark
)
}
}
func
LoginCheckQR
()
->
()
{
func
LoginCheckQR
()
->
()
{
...
...
Seilassist/Sailassist/Login/View/InputIdPassWordView.swift
View file @
4780c488
...
@@ -14,67 +14,53 @@ struct InputIdPassWordView: View {
...
@@ -14,67 +14,53 @@ struct InputIdPassWordView: View {
@State
private
var
isUserNmaeEmpty
=
false
@State
private
var
isUserNmaeEmpty
=
false
@State
private
var
isIdPassWordEmpty
=
false
@State
private
var
isIdPassWordEmpty
=
false
let
itemHPadding
:
Double
=
16
let
dialogBottomPadding
:
Double
=
32
let
textFieldHeight
:
Double
=
49
let
inputAreaHeight
:
Double
=
150
let
dialogHeight
:
CGFloat
=
250
var
body
:
some
View
{
var
body
:
some
View
{
VStack
{
VStack
{
VStack
{
VStack
(
alignment
:
.
leading
,
spacing
:
0
)
{
HStack
{
HStack
(
spacing
:
0
)
{
Image
(
"account"
)
Image
(
"account"
)
.
resizable
()
.
frame
(
width
:
22
,
height
:
22
)
.
frame
(
width
:
22
,
height
:
22
)
.
padding
(
.
horizontal
,
8
)
.
padding
(
EdgeInsets
(
top
:
14
,
leading
:
8
,
bottom
:
13
,
trailing
:
18
))
.
accentColor
(
.
white
)
.
foregroundColor
(
.
white
)
TextField
(
TextField
(
""
,
""
,
text
:
$
param
.
shipId
,
text
:
$
param
.
shipId
,
prompt
:
Text
(
"Ship ID"
)
prompt
:
Text
(
"Ship ID"
)
.
foregroundColor
(
.
white
)
.
font
(
FontStyle
.
DefaultText
.
font
)
)
.
foregroundColor
(
ColorSet
.
BodyDescriptiion
.
color
)
)
.
frame
(
height
:
textFieldHeight
)
.
frame
(
height
:
49
)
.
padding
(
.
trailing
)
.
padding
(
.
zero
)
.
foregroundColor
(
.
white
)
.
background
(
.
lineColor01
)
.
autocapitalization
(
.
none
)
.
autocapitalization
(
.
none
)
.
modifier
(
TextFieldModifier
(
text
:
$
param
.
shipId
,
inputType
:
.
UserId
))
}
}
Divider
()
Divider
()
.
frame
(
height
:
1
)
.
frame
(
height
:
1
)
.
background
(
Color
(
.
white
))
.
background
(
ColorSet
.
LineColor03
.
color
)
Spacer
()
HStack
(
spacing
:
0
){
.
frame
(
height
:
16
)
HStack
{
Image
(
"password"
)
Image
(
"password"
)
.
padding
(
.
horizontal
,
4
)
.
resizable
()
.
foregroundColor
(
.
white
)
.
frame
(
width
:
22
,
height
:
22
)
.
padding
(
EdgeInsets
(
top
:
14
,
leading
:
8
,
bottom
:
13
,
trailing
:
18
))
SecureField
(
SecureField
(
""
,
""
,
text
:
$
param
.
password
,
text
:
$
param
.
password
,
prompt
:
Text
(
"Password"
)
prompt
:
Text
(
"Password"
)
.
foregroundColor
(
.
white
)
.
font
(
FontStyle
.
DefaultText
.
font
)
.
foregroundColor
(
ColorSet
.
BodyDescriptiion
.
color
)
)
)
.
frame
(
height
:
textFieldHeight
)
.
frame
(
height
:
49
)
.
padding
(
.
trailing
)
.
padding
(
.
zero
)
.
foregroundColor
(
.
white
)
}
}
.
padding
(
.
top
,
16
)
Divider
()
Divider
()
.
frame
(
height
:
1
)
.
frame
(
height
:
1
)
.
background
(
Color
(
.
white
)
)
.
background
(
Color
Set
.
LineColor03
.
color
)
}
}
Spacer
()
.
frame
(
height
:
40
)
Button
(
action
:
{
Button
(
action
:
{
if
param
.
shipId
.
isEmpty
||
param
.
password
.
isEmpty
{
if
param
.
shipId
.
isEmpty
||
param
.
password
.
isEmpty
{
isIdPassWordEmpty
=
true
isIdPassWordEmpty
=
true
...
@@ -83,19 +69,21 @@ struct InputIdPassWordView: View {
...
@@ -83,19 +69,21 @@ struct InputIdPassWordView: View {
}
}
},
label
:
{
},
label
:
{
Text
(
"Sign In"
)
Text
(
"Sign In"
)
.
font
(
FontStyle
.
TitleS
.
font
)
.
frame
(
height
:
60
)
.
frame
(
height
:
60
)
.
frame
(
maxWidth
:
.
infinity
)
.
frame
(
maxWidth
:
.
infinity
)
.
foregroundColor
(
.
buttonText
)
.
foregroundColor
(
ColorSet
.
ButtonText
.
color
)
.
background
(
.
primaryActiveIcon
)
.
background
(
ColorSet
.
LoginBk01
.
color
)
})
})
.
alert
(
isPresented
:
$
isIdPassWordEmpty
,
content
:
{
.
alert
(
isPresented
:
$
isIdPassWordEmpty
,
content
:
{
Alert
(
title
:
Text
(
"error"
),
Alert
(
title
:
Text
(
"error"
),
message
:
Text
(
"Ship Id or Password not entered."
)
message
:
Text
(
"Ship Id or Password not entered."
)
)
)
})
})
.
padding
(
.
top
,
40
)
}
}
.
padding
(
EdgeInsets
(
top
:
26
,
leading
:
20
,
bottom
:
40
,
trailing
:
20
))
.
padding
(
EdgeInsets
(
top
:
26
,
leading
:
20
,
bottom
:
40
,
trailing
:
20
))
.
background
(
ColorSet
.
BackgroundSecondary
.
color
)
.
background
(
ColorSet
.
LoginBk02
.
color
)
.
padding
(
.
horizontal
,
30
)
.
padding
(
.
horizontal
,
30
)
}
}
}
}
...
...
Seilassist/Sailassist/Login/View/InputUserNameView.swift
View file @
4780c488
...
@@ -17,81 +17,68 @@ struct InputUserNameView: View {
...
@@ -17,81 +17,68 @@ struct InputUserNameView: View {
@Binding
var
alertType
:
AlertType
@Binding
var
alertType
:
AlertType
@State
private
var
isEmptyAlert
=
false
@State
private
var
isEmptyAlert
=
false
@State
var
timer
:
Timer
?
@State
var
timer
:
Timer
?
let
itemHPadding
:
Double
=
16
let
dialogBottomPadding
:
Double
=
32
let
textFieldHeight
:
Double
=
40
let
inputAreaHeight
:
Double
=
150
let
dialogHeight
:
CGFloat
=
250
let
dialogWidth
=
UIScreen
.
main
.
bounds
.
width
-
32
var
body
:
some
View
{
var
body
:
some
View
{
HStack
{
VStack
{
Spacer
()
VStack
(
alignment
:
.
leading
,
spacing
:
0
)
{
.
frame
(
width
:
itemHPadding
)
Text
(
"JRC Ship"
)
VStack
{
.
font
(
FontStyle
.
TitleSBold
.
font
)
Spacer
()
.
padding
(
.
leading
,
10
)
.
foregroundColor
(
.
white
)
VStack
(
alignment
:
.
leading
)
{
Text
(
"JRC Ship"
)
HStack
(
spacing
:
0
){
.
padding
(
.
leading
,
4
)
Image
(
"account"
)
.
bold
()
.
resizable
()
.
foregroundColor
(
.
white
)
.
frame
(
width
:
22
,
height
:
22
)
.
padding
(
EdgeInsets
(
top
:
14
,
leading
:
8
,
bottom
:
13
,
trailing
:
18
))
HStack
{
Image
(
"account"
)
TextField
(
.
padding
(
.
horizontal
,
4
)
""
,
.
foregroundColor
(
.
white
)
text
:
$
param
.
userName
,
TextField
(
prompt
:
Text
(
"Please set user name."
)
""
,
.
font
(
FontStyle
.
SupplementText
.
font
)
text
:
$
param
.
userName
,
.
foregroundColor
(
ColorSet
.
BodyDescriptiion
.
color
)
prompt
:
Text
(
"Please set user name"
)
.
foregroundColor
(
.
white
)
)
.
frame
(
height
:
textFieldHeight
)
.
padding
(
.
trailing
)
.
foregroundColor
(
.
white
)
}
Divider
()
.
frame
(
height
:
2
)
.
background
(
Color
(
.
white
))
}
.
frame
(
height
:
inputAreaHeight
)
Spacer
()
Button
(
action
:
{
if
param
.
userName
.
isEmpty
{
isEmptyAlert
=
true
}
else
{
print
(
debug
:
"signin: id(
\(
param
.
shipId
)
), pass(
\(
param
.
password
)
), name(
\(
param
.
userName
)
)"
)
isAlert
=
false
isProgressView
=
true
let
login
=
ReqLogin
(
Id
:
param
.
shipId
,
Password
:
param
.
password
)
sessionLogin
.
RequestLogin
(
login
,
completion
:
responseLogin
)
Preferences
.
UserName
=
param
.
userName
}
},
label
:
{
Text
(
"Sign In"
)
.
frame
(
height
:
50
)
.
frame
(
maxWidth
:
.
infinity
)
.
foregroundColor
(
ColorSet
.
ButtonText
.
color
)
.
background
(
ColorSet
.
PrimaryActiveIcon
.
color
)
})
.
alert
(
isPresented
:
$
isEmptyAlert
)
{
return
Alert
(
title
:
Text
(
"error"
),
message
:
Text
(
"User Nmae not entered."
)
)
)
.
frame
(
height
:
49
)
.
padding
(
.
zero
)
}
}
Spacer
()
.
frame
(
height
:
dialogBottomPadding
)
}
Spacer
()
Divider
()
.
frame
(
width
:
itemHPadding
)
.
frame
(
height
:
1
)
.
background
(
ColorSet
.
LineColor03
.
color
)
}
.
frame
(
height
:
88
)
Button
(
action
:
{
if
param
.
userName
.
isEmpty
{
isEmptyAlert
=
true
}
else
{
print
(
debug
:
"signin: id(
\(
param
.
shipId
)
), pass(
\(
param
.
password
)
), name(
\(
param
.
userName
)
)"
)
isAlert
=
false
isProgressView
=
true
let
login
=
ReqLogin
(
Id
:
param
.
shipId
,
Password
:
param
.
password
)
sessionLogin
.
RequestLogin
(
login
,
completion
:
responseLogin
)
Preferences
.
UserName
=
param
.
userName
}
},
label
:
{
Text
(
"Sign In"
)
.
font
(
FontStyle
.
TitleS
.
font
)
.
frame
(
height
:
60
)
.
frame
(
maxWidth
:
.
infinity
)
.
foregroundColor
(
ColorSet
.
ButtonText
.
color
)
.
background
(
ColorSet
.
LoginBk01
.
color
)
})
.
alert
(
isPresented
:
$
isEmptyAlert
)
{
return
Alert
(
title
:
Text
(
"error"
),
message
:
Text
(
"User Nmae not entered."
)
)
}
.
padding
(
.
top
,
40
)
}
}
.
frame
(
width
:
dialogWidth
,
height
:
dialogHeight
)
.
padding
(
EdgeInsets
(
top
:
21
,
leading
:
20
,
bottom
:
32
,
trailing
:
20
))
.
background
(
ColorSet
.
BackgroundSecondary
.
color
)
.
background
(
ColorSet
.
LoginBk02
.
color
)
.
padding
(
.
horizontal
,
30
)
}
}
func
responseLogin
(
result
:
Result
<
Data
,
APIError
>
)
{
func
responseLogin
(
result
:
Result
<
Data
,
APIError
>
)
{
...
...
Seilassist/Sailassist/Login/View/LoginTypeSelectView.swift
View file @
4780c488
...
@@ -12,19 +12,18 @@ struct LoginTypeSelectView: View{
...
@@ -12,19 +12,18 @@ struct LoginTypeSelectView: View{
@Binding
var
viewMode
:
LoginViewMode
@Binding
var
viewMode
:
LoginViewMode
var
body
:
some
View
{
var
body
:
some
View
{
VStack
{
VStack
(
spacing
:
20
)
{
HStack
{
Button
(
action
:
{
Button
(
action
:
{
isQrRead
=
true
isQrRead
=
true
},
label
:
{
},
label
:
{
Text
(
"Read the QR code"
)
Text
(
"Read the QR code"
)
.
font
(
FontStyle
.
TitleS
.
font
)
.
frame
(
maxWidth
:
.
infinity
)
.
frame
(
maxWidth
:
.
infinity
)
.
frame
(
height
:
50
)
.
frame
(
height
:
60
)
.
foregroundColor
(
ColorSet
.
ButtonText
.
color
)
.
foregroundColor
(
ColorSet
.
ButtonText
.
color
)
.
background
(
ColorSet
.
PrimaryActiveIcon
.
color
)
.
background
(
ColorSet
.
LoginBk01
.
color
)
})
})
}
.
padding
(
.
horizontal
,
32
)
Button
(
action
:
{
Button
(
action
:
{
print
(
"change mode"
)
print
(
"change mode"
)
viewMode
=
.
InputIdPassword
viewMode
=
.
InputIdPassword
...
@@ -32,9 +31,11 @@ struct LoginTypeSelectView: View{
...
@@ -32,9 +31,11 @@ struct LoginTypeSelectView: View{
Text
(
"Enter Ship ID / Password"
)
Text
(
"Enter Ship ID / Password"
)
.
underline
()
.
underline
()
.
font
(
FontStyle
.
SupplementText
.
font
)
.
font
(
FontStyle
.
SupplementText
.
font
)
.
foregroundColor
(
ColorSet
.
ToggleBackGround
.
color
)
.
foregroundColor
(
ColorSet
.
Body
.
color
)
})
})
}
}
.
padding
(
.
horizontal
,
50
)
}
}
}
}
#Preview {
#Preview {
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment