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
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
62 additions
and
85 deletions
+62
-85
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
+24
-36
InputUserNameView.swift
Seilassist/Sailassist/Login/View/InputUserNameView.swift
+23
-36
LoginTypeSelectView.swift
Seilassist/Sailassist/Login/View/LoginTypeSelectView.swift
+8
-7
No files found.
Seilassist/Sailassist/Assets.xcassets/ColorSet/BackgroundColor/LoginbkColor01.colorset/Contents.json
View file @
4780c488
...
...
@@ -4,7 +4,7 @@
"color"
:
{
"color-space"
:
"srgb"
,
"components"
:
{
"alpha"
:
"
0.002
"
,
"alpha"
:
"
1.000
"
,
"blue"
:
"0xD1"
,
"green"
:
"0xBD"
,
"red"
:
"0x21"
...
...
@@ -22,7 +22,7 @@
"color"
:
{
"color-space"
:
"srgb"
,
"components"
:
{
"alpha"
:
"
0.2
00"
,
"alpha"
:
"
1.0
00"
,
"blue"
:
"0xD1"
,
"green"
:
"0xBD"
,
"red"
:
"0x21"
...
...
Seilassist/Sailassist/Assets.xcassets/ColorSet/BackgroundColor/LoginbkColor02.colorset/Contents.json
View file @
4780c488
...
...
@@ -4,7 +4,7 @@
"color"
:
{
"color-space"
:
"srgb"
,
"components"
:
{
"alpha"
:
"
0.002
"
,
"alpha"
:
"
1.000
"
,
"blue"
:
"0xFA"
,
"green"
:
"0xFA"
,
"red"
:
"0xFA"
...
...
@@ -22,7 +22,7 @@
"color"
:
{
"color-space"
:
"srgb"
,
"components"
:
{
"alpha"
:
"
0.2
00"
,
"alpha"
:
"
1.0
00"
,
"blue"
:
"0x3C"
,
"green"
:
"0x38"
,
"red"
:
"0x38"
...
...
Seilassist/Sailassist/ContentView.swift
View file @
4780c488
...
...
@@ -8,7 +8,7 @@
import
SwiftUI
struct
ContentView
:
View
{
@State
var
isLogin
=
tru
e
//ContentView.LoginCheck()
@State
var
isLogin
=
fals
e
//ContentView.LoginCheck()
@EnvironmentObject
private
var
sceneDelegate
:
SceneDelegate
@StateObject
var
locationViewModel
=
LocationViewModel
()
var
selectedTabModel
=
SelectedTabModel
()
...
...
Seilassist/Sailassist/Login/LoginView.swift
View file @
4780c488
...
...
@@ -109,13 +109,14 @@ struct LoginView: View {
}
}
}
.
background
(
ColorSet
.
LoginBk01
.
color
)
.
background
(
ColorSet
.
BackgroundPrimary
.
color
)
.
fullScreenCover
(
isPresented
:
$
scannerViewModel
.
isShowing
,
onDismiss
:
{
LoginCheckQR
()},
content
:
{
QRReadView
(
viewMode
:
.
constant
(
.
SelectType
),
viewModel
:
scannerViewModel
)
})
.
onAppear
()
{
LoginCheck
()
}
.
preferredColorScheme
(
.
dark
)
}
func
LoginCheckQR
()
->
()
{
...
...
Seilassist/Sailassist/Login/View/InputIdPassWordView.swift
View file @
4780c488
...
...
@@ -14,67 +14,53 @@ struct InputIdPassWordView: View {
@State
private
var
isUserNmaeEmpty
=
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
{
VStack
{
VStack
{
HStack
{
VStack
(
alignment
:
.
leading
,
spacing
:
0
)
{
HStack
(
spacing
:
0
)
{
Image
(
"account"
)
.
resizable
()
.
frame
(
width
:
22
,
height
:
22
)
.
padding
(
.
horizontal
,
8
)
.
accentColor
(
.
white
)
.
foregroundColor
(
.
white
)
.
padding
(
EdgeInsets
(
top
:
14
,
leading
:
8
,
bottom
:
13
,
trailing
:
18
))
TextField
(
""
,
text
:
$
param
.
shipId
,
prompt
:
Text
(
"Ship ID"
)
.
foregroundColor
(
.
white
)
)
.
frame
(
height
:
textFieldHeight
)
.
padding
(
.
trailing
)
.
foregroundColor
(
.
white
)
.
background
(
.
lineColor01
)
.
font
(
FontStyle
.
DefaultText
.
font
)
.
foregroundColor
(
ColorSet
.
BodyDescriptiion
.
color
)
)
.
frame
(
height
:
49
)
.
padding
(
.
zero
)
.
autocapitalization
(
.
none
)
.
modifier
(
TextFieldModifier
(
text
:
$
param
.
shipId
,
inputType
:
.
UserId
))
}
Divider
()
.
frame
(
height
:
1
)
.
background
(
Color
(
.
white
))
Spacer
()
.
frame
(
height
:
16
)
.
background
(
ColorSet
.
LineColor03
.
color
)
HStack
{
HStack
(
spacing
:
0
)
{
Image
(
"password"
)
.
padding
(
.
horizontal
,
4
)
.
foregroundColor
(
.
white
)
.
resizable
()
.
frame
(
width
:
22
,
height
:
22
)
.
padding
(
EdgeInsets
(
top
:
14
,
leading
:
8
,
bottom
:
13
,
trailing
:
18
))
SecureField
(
""
,
text
:
$
param
.
password
,
prompt
:
Text
(
"Password"
)
.
foregroundColor
(
.
white
)
.
font
(
FontStyle
.
DefaultText
.
font
)
.
foregroundColor
(
ColorSet
.
BodyDescriptiion
.
color
)
)
.
frame
(
height
:
textFieldHeight
)
.
padding
(
.
trailing
)
.
foregroundColor
(
.
white
)
.
frame
(
height
:
49
)
.
padding
(
.
zero
)
}
.
padding
(
.
top
,
16
)
Divider
()
.
frame
(
height
:
1
)
.
background
(
Color
(
.
white
)
)
.
background
(
Color
Set
.
LineColor03
.
color
)
}
Spacer
()
.
frame
(
height
:
40
)
Button
(
action
:
{
if
param
.
shipId
.
isEmpty
||
param
.
password
.
isEmpty
{
isIdPassWordEmpty
=
true
...
...
@@ -83,19 +69,21 @@ struct InputIdPassWordView: View {
}
},
label
:
{
Text
(
"Sign In"
)
.
font
(
FontStyle
.
TitleS
.
font
)
.
frame
(
height
:
60
)
.
frame
(
maxWidth
:
.
infinity
)
.
foregroundColor
(
.
buttonText
)
.
background
(
.
primaryActiveIcon
)
.
foregroundColor
(
ColorSet
.
ButtonText
.
color
)
.
background
(
ColorSet
.
LoginBk01
.
color
)
})
.
alert
(
isPresented
:
$
isIdPassWordEmpty
,
content
:
{
Alert
(
title
:
Text
(
"error"
),
message
:
Text
(
"Ship Id or Password not entered."
)
)
})
.
padding
(
.
top
,
40
)
}
.
padding
(
EdgeInsets
(
top
:
26
,
leading
:
20
,
bottom
:
40
,
trailing
:
20
))
.
background
(
ColorSet
.
BackgroundSecondary
.
color
)
.
background
(
ColorSet
.
LoginBk02
.
color
)
.
padding
(
.
horizontal
,
30
)
}
}
...
...
Seilassist/Sailassist/Login/View/InputUserNameView.swift
View file @
4780c488
...
...
@@ -17,48 +17,37 @@ struct InputUserNameView: View {
@Binding
var
alertType
:
AlertType
@State
private
var
isEmptyAlert
=
false
@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
{
HStack
{
Spacer
()
.
frame
(
width
:
itemHPadding
)
VStack
{
Spacer
()
VStack
(
alignment
:
.
leading
)
{
VStack
(
alignment
:
.
leading
,
spacing
:
0
)
{
Text
(
"JRC Ship"
)
.
padding
(
.
leading
,
4
)
.
bold
(
)
.
font
(
FontStyle
.
TitleSBold
.
font
)
.
padding
(
.
leading
,
10
)
.
foregroundColor
(
.
white
)
HStack
{
HStack
(
spacing
:
0
)
{
Image
(
"account"
)
.
padding
(
.
horizontal
,
4
)
.
foregroundColor
(
.
white
)
.
resizable
()
.
frame
(
width
:
22
,
height
:
22
)
.
padding
(
EdgeInsets
(
top
:
14
,
leading
:
8
,
bottom
:
13
,
trailing
:
18
))
TextField
(
""
,
text
:
$
param
.
userName
,
prompt
:
Text
(
"Please set user name"
)
.
foregroundColor
(
.
white
)
prompt
:
Text
(
"Please set user name."
)
.
font
(
FontStyle
.
SupplementText
.
font
)
.
foregroundColor
(
ColorSet
.
BodyDescriptiion
.
color
)
)
.
frame
(
height
:
textFieldHeight
)
.
padding
(
.
trailing
)
.
foregroundColor
(
.
white
)
.
frame
(
height
:
49
)
.
padding
(
.
zero
)
}
Divider
()
.
frame
(
height
:
2
)
.
background
(
Color
(
.
white
)
)
.
frame
(
height
:
1
)
.
background
(
ColorSet
.
LineColor03
.
color
)
}
.
frame
(
height
:
inputAreaHeight
)
Spacer
()
.
frame
(
height
:
88
)
Button
(
action
:
{
if
param
.
userName
.
isEmpty
{
...
...
@@ -73,25 +62,23 @@ struct InputUserNameView: View {
}
},
label
:
{
Text
(
"Sign In"
)
.
frame
(
height
:
50
)
.
font
(
FontStyle
.
TitleS
.
font
)
.
frame
(
height
:
60
)
.
frame
(
maxWidth
:
.
infinity
)
.
foregroundColor
(
ColorSet
.
ButtonText
.
color
)
.
background
(
ColorSet
.
PrimaryActiveIcon
.
color
)
.
background
(
ColorSet
.
LoginBk01
.
color
)
})
.
alert
(
isPresented
:
$
isEmptyAlert
)
{
return
Alert
(
title
:
Text
(
"error"
),
message
:
Text
(
"User Nmae not entered."
)
)
}
Spacer
()
.
frame
(
height
:
dialogBottomPadding
)
.
padding
(
.
top
,
40
)
}
.
padding
(
EdgeInsets
(
top
:
21
,
leading
:
20
,
bottom
:
32
,
trailing
:
20
))
.
background
(
ColorSet
.
LoginBk02
.
color
)
.
padding
(
.
horizontal
,
30
)
Spacer
()
.
frame
(
width
:
itemHPadding
)
}
.
frame
(
width
:
dialogWidth
,
height
:
dialogHeight
)
.
background
(
ColorSet
.
BackgroundSecondary
.
color
)
}
func
responseLogin
(
result
:
Result
<
Data
,
APIError
>
)
{
...
...
Seilassist/Sailassist/Login/View/LoginTypeSelectView.swift
View file @
4780c488
...
...
@@ -12,19 +12,18 @@ struct LoginTypeSelectView: View{
@Binding
var
viewMode
:
LoginViewMode
var
body
:
some
View
{
VStack
{
HStack
{
VStack
(
spacing
:
20
)
{
Button
(
action
:
{
isQrRead
=
true
},
label
:
{
Text
(
"Read the QR code"
)
.
font
(
FontStyle
.
TitleS
.
font
)
.
frame
(
maxWidth
:
.
infinity
)
.
frame
(
height
:
5
0
)
.
frame
(
height
:
6
0
)
.
foregroundColor
(
ColorSet
.
ButtonText
.
color
)
.
background
(
ColorSet
.
PrimaryActiveIcon
.
color
)
.
background
(
ColorSet
.
LoginBk01
.
color
)
})
}
.
padding
(
.
horizontal
,
32
)
Button
(
action
:
{
print
(
"change mode"
)
viewMode
=
.
InputIdPassword
...
...
@@ -32,9 +31,11 @@ struct LoginTypeSelectView: View{
Text
(
"Enter Ship ID / Password"
)
.
underline
()
.
font
(
FontStyle
.
SupplementText
.
font
)
.
foregroundColor
(
ColorSet
.
ToggleBackGround
.
color
)
.
foregroundColor
(
ColorSet
.
Body
.
color
)
})
}
.
padding
(
.
horizontal
,
50
)
}
}
#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