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
54
Merge Requests
54
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
gr-ssv
Sailassist
Commits
9ef77c06
Commit
9ef77c06
authored
Jul 16, 2024
by
shigemi miura
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ライセンス情報対応
不具合 No.108/106対応
parent
aa9c5dbc
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
51 additions
and
18 deletions
+51
-18
ChatTitleView.swift
Seilassist/Sailassist/Chat/View/ChatTitleView.swift
+0
-1
ResLogin.swift
Seilassist/Sailassist/Json/ResLogin.swift
+3
-0
LocationViewModel.swift
Seilassist/Sailassist/LocationViewModel.swift
+3
-2
LoginView.swift
Seilassist/Sailassist/Login/LoginView.swift
+3
-0
InputUserNameView.swift
Seilassist/Sailassist/Login/View/InputUserNameView.swift
+3
-0
MenuTaskView.swift
Seilassist/Sailassist/Map/Task/View/MenuTaskView.swift
+4
-2
NgaSettingView.swift
Seilassist/Sailassist/Map/Task/View/NgaSettingView.swift
+1
-1
MenuView.swift
Seilassist/Sailassist/Menu/MenuView.swift
+3
-3
MenuContentView.swift
Seilassist/Sailassist/Menu/View/MenuContentView.swift
+15
-2
SharingData.swift
Seilassist/Sailassist/SharingData/SharingData.swift
+3
-0
MainTabView.swift
Seilassist/Sailassist/Tab/MainTabView.swift
+13
-7
No files found.
Seilassist/Sailassist/Chat/View/ChatTitleView.swift
View file @
9ef77c06
...
@@ -42,7 +42,6 @@ struct ChatTitleView: View {
...
@@ -42,7 +42,6 @@ struct ChatTitleView: View {
.
scaledToFit
()
.
scaledToFit
()
.
frame
(
width
:
12
,
height
:
7
)
.
frame
(
width
:
12
,
height
:
7
)
.
foregroundColor
(
ColorSet
.
Body
.
color
)
.
foregroundColor
(
ColorSet
.
Body
.
color
)
}
}
.
frame
(
width
:
30
,
height
:
30
)
.
frame
(
width
:
30
,
height
:
30
)
}
}
...
...
Seilassist/Sailassist/Json/ResLogin.swift
View file @
9ef77c06
...
@@ -14,4 +14,7 @@ struct ResLogin : Codable {
...
@@ -14,4 +14,7 @@ struct ResLogin : Codable {
var
imo
:
Int
=
0
var
imo
:
Int
=
0
var
mmsi
:
Int
=
0
var
mmsi
:
Int
=
0
var
enableFuelSwitchTask
:
Bool
=
false
var
enableFuelSwitchTask
:
Bool
=
false
var
enableNga
:
Bool
=
false
var
enableCommunication
:
Bool
=
false
var
enableManual
:
Bool
=
false
}
}
Seilassist/Sailassist/LocationViewModel.swift
View file @
9ef77c06
...
@@ -15,7 +15,6 @@ class LocationViewModel: NSObject, ObservableObject, CLLocationManagerDelegate {
...
@@ -15,7 +15,6 @@ class LocationViewModel: NSObject, ObservableObject, CLLocationManagerDelegate {
private
let
locationManager
:
CLLocationManager
private
let
locationManager
:
CLLocationManager
let
ecaTask
=
EcaTask
()
let
ecaTask
=
EcaTask
()
let
ngaTask
=
NgaTask
()
let
ngaTask
=
NgaTask
()
let
message
=
GetMessage
()
override
init
()
{
override
init
()
{
let
ecaArea
=
EcaArea
()
let
ecaArea
=
EcaArea
()
...
@@ -89,6 +88,7 @@ class LocationViewModel: NSObject, ObservableObject, CLLocationManagerDelegate {
...
@@ -89,6 +88,7 @@ class LocationViewModel: NSObject, ObservableObject, CLLocationManagerDelegate {
ngaTask
.
checkNga
()
ngaTask
.
checkNga
()
if
SharingData
.
message
.
mode
{
if
SharingData
.
message
.
mode
{
let
message
=
GetMessage
()
message
.
start
()
message
.
start
()
}
}
}
}
...
@@ -102,7 +102,8 @@ class LocationViewModel: NSObject, ObservableObject, CLLocationManagerDelegate {
...
@@ -102,7 +102,8 @@ class LocationViewModel: NSObject, ObservableObject, CLLocationManagerDelegate {
self
.
ngaTask
.
checkNga
()
self
.
ngaTask
.
checkNga
()
if
SharingData
.
message
.
mode
{
if
SharingData
.
message
.
mode
{
self
.
message
.
start
()
let
message
=
GetMessage
()
message
.
start
()
}
}
serverLocationInterval
=
DateTextLib
.
Date2UnixTime
(
date
:
Date
())
+
Int64
(
TimerInterval
)
serverLocationInterval
=
DateTextLib
.
Date2UnixTime
(
date
:
Date
())
+
Int64
(
TimerInterval
)
...
...
Seilassist/Sailassist/Login/LoginView.swift
View file @
9ef77c06
...
@@ -197,6 +197,9 @@ struct LoginView: View {
...
@@ -197,6 +197,9 @@ struct LoginView: View {
SharingData
.
my
.
imo
=
res
.
imo
SharingData
.
my
.
imo
=
res
.
imo
SharingData
.
my
.
mmsi
=
res
.
mmsi
SharingData
.
my
.
mmsi
=
res
.
mmsi
SharingData
.
my
.
isFuelSwitchTask
=
res
.
enableFuelSwitchTask
SharingData
.
my
.
isFuelSwitchTask
=
res
.
enableFuelSwitchTask
SharingData
.
my
.
isNga
=
res
.
enableNga
SharingData
.
my
.
isCommunication
=
res
.
enableCommunication
SharingData
.
my
.
isManual
=
res
.
enableManual
Preferences
.
shipId
=
res
.
shipId
Preferences
.
shipId
=
res
.
shipId
...
...
Seilassist/Sailassist/Login/View/InputUserNameView.swift
View file @
9ef77c06
...
@@ -102,6 +102,9 @@ struct InputUserNameView: View {
...
@@ -102,6 +102,9 @@ struct InputUserNameView: View {
SharingData
.
my
.
imo
=
res
.
imo
SharingData
.
my
.
imo
=
res
.
imo
SharingData
.
my
.
mmsi
=
res
.
mmsi
SharingData
.
my
.
mmsi
=
res
.
mmsi
SharingData
.
my
.
isFuelSwitchTask
=
res
.
enableFuelSwitchTask
SharingData
.
my
.
isFuelSwitchTask
=
res
.
enableFuelSwitchTask
SharingData
.
my
.
isNga
=
res
.
enableNga
SharingData
.
my
.
isCommunication
=
res
.
enableCommunication
SharingData
.
my
.
isManual
=
res
.
enableManual
Preferences
.
shipId
=
res
.
shipId
Preferences
.
shipId
=
res
.
shipId
...
...
Seilassist/Sailassist/Map/Task/View/MenuTaskView.swift
View file @
9ef77c06
...
@@ -164,8 +164,9 @@ struct MenuMain: View {
...
@@ -164,8 +164,9 @@ struct MenuMain: View {
})
})
.
frame
(
width
:
153
,
height
:
42
)
.
frame
(
width
:
153
,
height
:
42
)
.
foregroundColor
(
ColorSet
.
ButtonText
.
color
)
.
foregroundColor
(
ColorSet
.
ButtonText
.
color
)
.
background
(
ColorSet
.
PrimaryActiveIcon
.
color
)
.
background
(
!
SharingData
.
my
.
isFuelSwitchTask
?
ColorSet
.
SecondaryDisable
.
color
:
ColorSet
.
PrimaryActiveIcon
.
color
)
.
cornerRadius
(
30
)
.
cornerRadius
(
30
)
.
disabled
(
!
SharingData
.
my
.
isFuelSwitchTask
)
Button
(
action
:
{
Button
(
action
:
{
taskViewModel
.
viewMode
=
.
NgaNotification
taskViewModel
.
viewMode
=
.
NgaNotification
...
@@ -176,8 +177,9 @@ struct MenuMain: View {
...
@@ -176,8 +177,9 @@ struct MenuMain: View {
})
})
.
frame
(
width
:
153
,
height
:
42
)
.
frame
(
width
:
153
,
height
:
42
)
.
foregroundColor
(
ColorSet
.
ButtonText
.
color
)
.
foregroundColor
(
ColorSet
.
ButtonText
.
color
)
.
background
(
ColorSet
.
PrimaryActiveIcon
.
color
)
.
background
(
!
SharingData
.
my
.
isNga
?
ColorSet
.
SecondaryDisable
.
color
:
ColorSet
.
PrimaryActiveIcon
.
color
)
.
cornerRadius
(
30
)
.
cornerRadius
(
30
)
.
disabled
(
!
SharingData
.
my
.
isNga
)
}
}
.
onChange
(
of
:
taskViewModel
.
viewMode
){
newViewMode
in
.
onChange
(
of
:
taskViewModel
.
viewMode
){
newViewMode
in
proxy
.
scrollTo
(
0
,
anchor
:
.
top
)
proxy
.
scrollTo
(
0
,
anchor
:
.
top
)
...
...
Seilassist/Sailassist/Map/Task/View/NgaSettingView.swift
View file @
9ef77c06
...
@@ -135,7 +135,7 @@ struct NgaSetting: View {
...
@@ -135,7 +135,7 @@ struct NgaSetting: View {
.
padding
(
.
vertical
,
20
)
.
padding
(
.
vertical
,
20
)
.
disabled
(
stateEdit
)
.
disabled
(
stateEdit
)
let
stateRegister
=
nga
.
editNga
!.
points
.
count
<
3
||
nga
.
editNga
!.
n
ame
.
isEmpty
let
stateRegister
=
nga
.
editNga
!.
points
.
count
<
3
||
taskViewModel
.
ngaN
ame
.
isEmpty
Button
(
action
:
{
Button
(
action
:
{
if
var
ngaData
=
nga
.
editNga
{
if
var
ngaData
=
nga
.
editNga
{
ngaData
.
name
=
taskViewModel
.
ngaName
ngaData
.
name
=
taskViewModel
.
ngaName
...
...
Seilassist/Sailassist/Menu/MenuView.swift
View file @
9ef77c06
...
@@ -139,15 +139,15 @@ struct MenuView: View {
...
@@ -139,15 +139,15 @@ struct MenuView: View {
.
padding
(
.
vertical
,
17
)
.
padding
(
.
vertical
,
17
)
Spacer
()
Spacer
()
}
}
Divider
()
Divider
()
.
background
(
ColorSet
.
LineColor04
.
color
)
.
background
(
ColorSet
.
LineColor04
.
color
)
Button
{
Button
{
path
.
append
(
.
Manual
)
path
.
append
(
.
Manual
)
}
label
:
{
}
label
:
{
MenuContentView
(
content
:
.
Manual
)
MenuContentView
(
content
:
.
Manual
)
}
}
.
disabled
(
!
SharingData
.
my
.
isManual
)
Button
{
Button
{
path
.
append
(
.
Information
)
path
.
append
(
.
Information
)
}
label
:
{
}
label
:
{
...
...
Seilassist/Sailassist/Menu/View/MenuContentView.swift
View file @
9ef77c06
...
@@ -14,8 +14,8 @@ struct MenuContentView: View {
...
@@ -14,8 +14,8 @@ struct MenuContentView: View {
HStack
{
HStack
{
Text
(
content
.
title
)
Text
(
content
.
title
)
.
font
(
FontStyle
.
EmphasisText
.
font
)
.
font
(
FontStyle
.
EmphasisText
.
font
)
.
foregroundColor
(
ColorSet
.
Body
.
color
)
.
foregroundColor
(
getFontColor
()
)
Spacer
()
Spacer
()
if
content
.
title
!=
"Sign Out"
{
if
content
.
title
!=
"Sign Out"
{
...
@@ -31,6 +31,19 @@ struct MenuContentView: View {
...
@@ -31,6 +31,19 @@ struct MenuContentView: View {
.
background
(
ColorSet
.
LineColor04
.
color
)
.
background
(
ColorSet
.
LineColor04
.
color
)
}
}
}
}
/**
* Manual
*/
func
getFontColor
()
->
Color
{
var
fontColor
=
ColorSet
.
Body
.
color
if
content
==
.
Manual
{
if
!
SharingData
.
my
.
isManual
{
fontColor
=
ColorSet
.
BodyDescriptiion
.
color
}
}
return
fontColor
}
}
}
#Preview {
#Preview {
...
...
Seilassist/Sailassist/SharingData/SharingData.swift
View file @
9ef77c06
...
@@ -18,6 +18,9 @@ class SharingData{
...
@@ -18,6 +18,9 @@ class SharingData{
@Published
var
mmsi
:
Int
=
0
@Published
var
mmsi
:
Int
=
0
@Published
var
isUpDate
:
Bool
=
false
@Published
var
isUpDate
:
Bool
=
false
@Published
var
isFuelSwitchTask
:
Bool
=
false
@Published
var
isFuelSwitchTask
:
Bool
=
false
@Published
var
isNga
:
Bool
=
false
@Published
var
isCommunication
:
Bool
=
false
@Published
var
isManual
:
Bool
=
false
@Published
var
ecaStatus
:
EcaState
?
@Published
var
ecaStatus
:
EcaState
?
...
...
Seilassist/Sailassist/Tab/MainTabView.swift
View file @
9ef77c06
...
@@ -38,8 +38,10 @@ struct MainTabView: View {
...
@@ -38,8 +38,10 @@ struct MainTabView: View {
@State
var
isTaskSel
:
Bool
=
selectedTabModel
.
activeTab
==
.
map
@State
var
isTaskSel
:
Bool
=
selectedTabModel
.
activeTab
==
.
map
TabView
(
selection
:
$
selectedTabModel
.
activeTab
){
TabView
(
selection
:
$
selectedTabModel
.
activeTab
){
ChatView
()
if
SharingData
.
my
.
isCommunication
{
.
tag
(
Tab
.
chat
)
ChatView
()
.
tag
(
Tab
.
chat
)
}
ZStack
{
ZStack
{
MapRepresentable
()
MapRepresentable
()
...
@@ -55,7 +57,8 @@ struct MainTabView: View {
...
@@ -55,7 +57,8 @@ struct MainTabView: View {
.
tag
(
Tab
.
menu
)
.
tag
(
Tab
.
menu
)
}
}
.
hideNativeTabBar
()
.
hideNativeTabBar
()
.
sheet
(
isPresented
:
.
constant
(
isTaskSel
&&
isTabShow
&&
SharingData
.
my
.
isFuelSwitchTask
),
content
:
{
// .sheet(isPresented: .constant(isTaskSel && isTabShow && SharingData.my.isFuelSwitchTask), content: {
.
sheet
(
isPresented
:
.
constant
(
isTaskSel
&&
isTabShow
),
content
:
{
MenuTaskView
()
MenuTaskView
()
.
zIndex
(
0
)
.
zIndex
(
0
)
.
presentationDragIndicator
(
.
hidden
)
.
presentationDragIndicator
(
.
hidden
)
...
@@ -69,8 +72,10 @@ struct MainTabView: View {
...
@@ -69,8 +72,10 @@ struct MainTabView: View {
@State
var
isPopover
:
Bool
=
selectedTabModel
.
isPoppver
@State
var
isPopover
:
Bool
=
selectedTabModel
.
isPoppver
TabView
(
selection
:
$
selectedTabModel
.
activeTab
){
TabView
(
selection
:
$
selectedTabModel
.
activeTab
){
ChatView
()
if
SharingData
.
my
.
isCommunication
{
.
tag
(
Tab
.
chat
)
ChatView
()
.
tag
(
Tab
.
chat
)
}
ZStack
{
ZStack
{
MapRepresentable
()
MapRepresentable
()
...
@@ -86,7 +91,8 @@ struct MainTabView: View {
...
@@ -86,7 +91,8 @@ struct MainTabView: View {
.
tag
(
Tab
.
menu
)
.
tag
(
Tab
.
menu
)
}
}
.
hideNativeTabBar
()
.
hideNativeTabBar
()
.
popover
(
isPresented
:
.
constant
(
isPopover
&&
SharingData
.
my
.
isFuelSwitchTask
),
attachmentAnchor
:
.
point
(
.
bottom
))
{
// .popover(isPresented: .constant(isPopover && SharingData.my.isFuelSwitchTask), attachmentAnchor: .point(.bottom)) {
.
popover
(
isPresented
:
.
constant
(
isPopover
),
attachmentAnchor
:
.
point
(
.
bottom
))
{
MenuTaskView
()
MenuTaskView
()
.
presentationCompactAdaptation
(
.
popover
)
.
presentationCompactAdaptation
(
.
popover
)
.
zIndex
(
0
)
.
zIndex
(
0
)
...
@@ -179,7 +185,7 @@ struct CustomTabBar: View {
...
@@ -179,7 +185,7 @@ struct CustomTabBar: View {
}
}
}
message
:
{
}
message
:
{
Text
(
"Do you change an
emargency
mode?"
)
Text
(
"Do you change an
warning
mode?"
)
}
}
.
alert
(
"Location"
,
isPresented
:
$
selectedTabModel
.
isLocationAlert
)
{
.
alert
(
"Location"
,
isPresented
:
$
selectedTabModel
.
isLocationAlert
)
{
Button
(
"Cancel"
)
{}
Button
(
"Cancel"
)
{}
...
...
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