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
86fc559a
Commit
86fc559a
authored
Nov 14, 2023
by
sugita mamoru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
メニュー画面作成、デザイン調整
parent
e591465a
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
369 additions
and
52 deletions
+369
-52
project.pbxproj
Seilassist/Sailassist.xcodeproj/project.pbxproj
+16
-0
Contents.json
...rSet/ButtonColor/SliderActiveColor.colorset/Contents.json
+20
-0
ChatTitleView.swift
Seilassist/Sailassist/Chat/View/ChatTitleView.swift
+1
-0
ColorSet.swift
Seilassist/Sailassist/Constants/ColorSet.swift
+4
-0
ContentView.swift
Seilassist/Sailassist/ContentView.swift
+1
-2
EcaSettingView.swift
Seilassist/Sailassist/Map/Task/View/EcaSettingView.swift
+39
-7
TaskSwitchingMenuView.swift
...sist/Sailassist/Map/Task/View/TaskSwitchingMenuView.swift
+1
-1
MenuView.swift
Seilassist/Sailassist/Menu/MenuView.swift
+98
-22
MenuContentView.swift
Seilassist/Sailassist/Menu/View/MenuContentView.swift
+13
-9
MenuManualView.swift
Seilassist/Sailassist/Menu/View/MenuManualView.swift
+63
-0
MenuTitleView.swift
Seilassist/Sailassist/Menu/View/MenuTitleView.swift
+54
-0
PDFViewer.swift
Seilassist/Sailassist/Menu/View/PDFViewer.swift
+24
-0
Preferences.swift
Seilassist/Sailassist/Preferences/Preferences.swift
+2
-0
PreferencesKey.swift
Seilassist/Sailassist/Preferences/PreferencesKey.swift
+7
-0
PDFDownloadManager.swift
Seilassist/Sailassist/ServerSession/PDFDownloadManager.swift
+26
-0
MainTabView.swift
Seilassist/Sailassist/Tab/MainTabView.swift
+0
-11
No files found.
Seilassist/Sailassist.xcodeproj/project.pbxproj
View file @
86fc559a
...
@@ -44,6 +44,10 @@
...
@@ -44,6 +44,10 @@
022789092AE1FE4C00A87787
/* Turf.xcframework in Embed Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
022788F72AE1FE3C00A87787
/* Turf.xcframework */
;
settings
=
{
ATTRIBUTES
=
(
CodeSignOnCopy
,
RemoveHeadersOnCopy
,
);
};
};
022789092AE1FE4C00A87787
/* Turf.xcframework in Embed Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
022788F72AE1FE3C00A87787
/* Turf.xcframework */
;
settings
=
{
ATTRIBUTES
=
(
CodeSignOnCopy
,
RemoveHeadersOnCopy
,
);
};
};
0227890C2AE22E0B00A87787
/* SharingData.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0227890B2AE22E0B00A87787
/* SharingData.swift */
;
};
0227890C2AE22E0B00A87787
/* SharingData.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0227890B2AE22E0B00A87787
/* SharingData.swift */
;
};
022A98202AF8B8960079C55A
/* LocationCalculation.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
022A981F2AF8B8960079C55A
/* LocationCalculation.swift */
;
};
022A98202AF8B8960079C55A
/* LocationCalculation.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
022A981F2AF8B8960079C55A
/* LocationCalculation.swift */
;
};
025C27FA2AFE119D00BADC49
/* MenuTitleView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
025C27F92AFE119D00BADC49
/* MenuTitleView.swift */
;
};
025C27FC2AFE191A00BADC49
/* MenuManualView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
025C27FB2AFE191A00BADC49
/* MenuManualView.swift */
;
};
025C27FE2B0206D700BADC49
/* PDFDownloadManager.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
025C27FD2B0206D700BADC49
/* PDFDownloadManager.swift */
;
};
025C28002B034A1900BADC49
/* PDFViewer.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
025C27FF2B034A1900BADC49
/* PDFViewer.swift */
;
};
02A1DE2F2AFB4AA0005BCF55
/* ChatInputView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
02A1DE2E2AFB4AA0005BCF55
/* ChatInputView.swift */
;
};
02A1DE2F2AFB4AA0005BCF55
/* ChatInputView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
02A1DE2E2AFB4AA0005BCF55
/* ChatInputView.swift */
;
};
02A1DE312AFB61D8005BCF55
/* MyChatContentView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
02A1DE302AFB61D8005BCF55
/* MyChatContentView.swift */
;
};
02A1DE312AFB61D8005BCF55
/* MyChatContentView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
02A1DE302AFB61D8005BCF55
/* MyChatContentView.swift */
;
};
02A1DE332AFB654A005BCF55
/* CustomCornerRadius.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
02A1DE322AFB654A005BCF55
/* CustomCornerRadius.swift */
;
};
02A1DE332AFB654A005BCF55
/* CustomCornerRadius.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
02A1DE322AFB654A005BCF55
/* CustomCornerRadius.swift */
;
};
...
@@ -141,6 +145,10 @@
...
@@ -141,6 +145,10 @@
022788FA2AE1FE3D00A87787
/* MapboxMaps.xcframework */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
wrapper.xcframework
;
path
=
MapboxMaps.xcframework
;
sourceTree
=
"<group>"
;
};
022788FA2AE1FE3D00A87787
/* MapboxMaps.xcframework */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
wrapper.xcframework
;
path
=
MapboxMaps.xcframework
;
sourceTree
=
"<group>"
;
};
0227890B2AE22E0B00A87787
/* SharingData.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
SharingData.swift
;
sourceTree
=
"<group>"
;
};
0227890B2AE22E0B00A87787
/* SharingData.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
SharingData.swift
;
sourceTree
=
"<group>"
;
};
022A981F2AF8B8960079C55A
/* LocationCalculation.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
name
=
LocationCalculation.swift
;
path
=
Sailassist/Location/LocationCalculation.swift
;
sourceTree
=
SOURCE_ROOT
;
};
022A981F2AF8B8960079C55A
/* LocationCalculation.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
name
=
LocationCalculation.swift
;
path
=
Sailassist/Location/LocationCalculation.swift
;
sourceTree
=
SOURCE_ROOT
;
};
025C27F92AFE119D00BADC49
/* MenuTitleView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
name
=
MenuTitleView.swift
;
path
=
Sailassist/Menu/View/MenuTitleView.swift
;
sourceTree
=
SOURCE_ROOT
;
};
025C27FB2AFE191A00BADC49
/* MenuManualView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
name
=
MenuManualView.swift
;
path
=
Sailassist/Menu/View/MenuManualView.swift
;
sourceTree
=
SOURCE_ROOT
;
};
025C27FD2B0206D700BADC49
/* PDFDownloadManager.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
name
=
PDFDownloadManager.swift
;
path
=
Sailassist/ServerSession/PDFDownloadManager.swift
;
sourceTree
=
SOURCE_ROOT
;
};
025C27FF2B034A1900BADC49
/* PDFViewer.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
name
=
PDFViewer.swift
;
path
=
Sailassist/Menu/View/PDFViewer.swift
;
sourceTree
=
SOURCE_ROOT
;
};
02A1DE2E2AFB4AA0005BCF55
/* ChatInputView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
name
=
ChatInputView.swift
;
path
=
Sailassist/Chat/View/ChatInputView.swift
;
sourceTree
=
SOURCE_ROOT
;
};
02A1DE2E2AFB4AA0005BCF55
/* ChatInputView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
name
=
ChatInputView.swift
;
path
=
Sailassist/Chat/View/ChatInputView.swift
;
sourceTree
=
SOURCE_ROOT
;
};
02A1DE302AFB61D8005BCF55
/* MyChatContentView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
name
=
MyChatContentView.swift
;
path
=
Sailassist/Chat/View/MyChatContentView.swift
;
sourceTree
=
SOURCE_ROOT
;
};
02A1DE302AFB61D8005BCF55
/* MyChatContentView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
name
=
MyChatContentView.swift
;
path
=
Sailassist/Chat/View/MyChatContentView.swift
;
sourceTree
=
SOURCE_ROOT
;
};
02A1DE322AFB654A005BCF55
/* CustomCornerRadius.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
name
=
CustomCornerRadius.swift
;
path
=
Sailassist/Chat/View/CustomCornerRadius.swift
;
sourceTree
=
SOURCE_ROOT
;
};
02A1DE322AFB654A005BCF55
/* CustomCornerRadius.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
name
=
CustomCornerRadius.swift
;
path
=
Sailassist/Chat/View/CustomCornerRadius.swift
;
sourceTree
=
SOURCE_ROOT
;
};
...
@@ -418,6 +426,7 @@
...
@@ -418,6 +426,7 @@
D5AE351C2AEBA6FC00059889
/* SessionLogin.swift */
,
D5AE351C2AEBA6FC00059889
/* SessionLogin.swift */
,
02CD06922AE88970005F8D8F
/* ServerSession.swift */
,
02CD06922AE88970005F8D8F
/* ServerSession.swift */
,
02CD06942AE895F5005F8D8F
/* APIError.swift */
,
02CD06942AE895F5005F8D8F
/* APIError.swift */
,
025C27FD2B0206D700BADC49
/* PDFDownloadManager.swift */
,
);
);
path
=
ServerSession
;
path
=
ServerSession
;
sourceTree
=
"<group>"
;
sourceTree
=
"<group>"
;
...
@@ -446,6 +455,9 @@
...
@@ -446,6 +455,9 @@
isa
=
PBXGroup
;
isa
=
PBXGroup
;
children
=
(
children
=
(
02CE4D7E2ADE42A9002E79BC
/* MenuContentView.swift */
,
02CE4D7E2ADE42A9002E79BC
/* MenuContentView.swift */
,
025C27F92AFE119D00BADC49
/* MenuTitleView.swift */
,
025C27FB2AFE191A00BADC49
/* MenuManualView.swift */
,
025C27FF2B034A1900BADC49
/* PDFViewer.swift */
,
);
);
path
=
View
;
path
=
View
;
sourceTree
=
"<group>"
;
sourceTree
=
"<group>"
;
...
@@ -651,6 +663,7 @@
...
@@ -651,6 +663,7 @@
02CD06952AE895F5005F8D8F
/* APIError.swift in Sources */
,
02CD06952AE895F5005F8D8F
/* APIError.swift in Sources */
,
022A98202AF8B8960079C55A
/* LocationCalculation.swift in Sources */
,
022A98202AF8B8960079C55A
/* LocationCalculation.swift in Sources */
,
02CE4DC82ADF97E8002E79BC
/* View+Extensions.swift in Sources */
,
02CE4DC82ADF97E8002E79BC
/* View+Extensions.swift in Sources */
,
025C28002B034A1900BADC49
/* PDFViewer.swift in Sources */
,
02C3E6092AFDF30000AF7837
/* ChatMemberView.swift in Sources */
,
02C3E6092AFDF30000AF7837
/* ChatMemberView.swift in Sources */
,
020B98412AD8C3810029DE4C
/* LoginView.swift in Sources */
,
020B98412AD8C3810029DE4C
/* LoginView.swift in Sources */
,
D5AE351D2AEBA6FC00059889
/* SessionLogin.swift in Sources */
,
D5AE351D2AEBA6FC00059889
/* SessionLogin.swift in Sources */
,
...
@@ -672,6 +685,8 @@
...
@@ -672,6 +685,8 @@
020B98692ADD221E0029DE4C
/* Preferences.swift in Sources */
,
020B98692ADD221E0029DE4C
/* Preferences.swift in Sources */
,
02CD06932AE88970005F8D8F
/* ServerSession.swift in Sources */
,
02CD06932AE88970005F8D8F
/* ServerSession.swift in Sources */
,
02A1DE312AFB61D8005BCF55
/* MyChatContentView.swift in Sources */
,
02A1DE312AFB61D8005BCF55
/* MyChatContentView.swift in Sources */
,
025C27FE2B0206D700BADC49
/* PDFDownloadManager.swift in Sources */
,
025C27FC2AFE191A00BADC49
/* MenuManualView.swift in Sources */
,
020B98592AD92A4C0029DE4C
/* MainTabView.swift in Sources */
,
020B98592AD92A4C0029DE4C
/* MainTabView.swift in Sources */
,
020B984F2AD9182D0029DE4C
/* InputUserNameView.swift in Sources */
,
020B984F2AD9182D0029DE4C
/* InputUserNameView.swift in Sources */
,
D5AE351A2AEBA66A00059889
/* ReqLogin.swift in Sources */
,
D5AE351A2AEBA66A00059889
/* ReqLogin.swift in Sources */
,
...
@@ -683,6 +698,7 @@
...
@@ -683,6 +698,7 @@
02CD068F2AE6535F005F8D8F
/* MapSource.swift in Sources */
,
02CD068F2AE6535F005F8D8F
/* MapSource.swift in Sources */
,
02C3E5CE2AFCA04700AF7837
/* OtherChatContentView.swift in Sources */
,
02C3E5CE2AFCA04700AF7837
/* OtherChatContentView.swift in Sources */
,
020B98442AD8E4910029DE4C
/* FontStyle.swift in Sources */
,
020B98442AD8E4910029DE4C
/* FontStyle.swift in Sources */
,
025C27FA2AFE119D00BADC49
/* MenuTitleView.swift in Sources */
,
02CE4D892ADF62E1002E79BC
/* EcaSettingView.swift in Sources */
,
02CE4D892ADF62E1002E79BC
/* EcaSettingView.swift in Sources */
,
02CE4D872ADF62A7002E79BC
/* EcaListView.swift in Sources */
,
02CE4D872ADF62A7002E79BC
/* EcaListView.swift in Sources */
,
020B986C2ADD3E810029DE4C
/* InTextLib.swift in Sources */
,
020B986C2ADD3E810029DE4C
/* InTextLib.swift in Sources */
,
...
...
Seilassist/Sailassist/Assets.xcassets/ColorSet/ButtonColor/SliderActiveColor.colorset/Contents.json
0 → 100644
View file @
86fc559a
{
"colors"
:
[
{
"color"
:
{
"color-space"
:
"srgb"
,
"components"
:
{
"alpha"
:
"1.000"
,
"blue"
:
"0xD1"
,
"green"
:
"0xBD"
,
"red"
:
"0x21"
}
},
"idiom"
:
"universal"
}
],
"info"
:
{
"author"
:
"xcode"
,
"version"
:
1
}
}
Seilassist/Sailassist/Chat/View/ChatTitleView.swift
View file @
86fc559a
...
@@ -60,6 +60,7 @@ struct ChatTitleView: View {
...
@@ -60,6 +60,7 @@ struct ChatTitleView: View {
}
}
.
frame
(
width
:
48
,
height
:
48
)
.
frame
(
width
:
48
,
height
:
48
)
}
}
.
frame
(
height
:
60
)
Divider
()
Divider
()
.
background
(
ColorSet
.
LineColor04
.
color
)
.
background
(
ColorSet
.
LineColor04
.
color
)
...
...
Seilassist/Sailassist/Constants/ColorSet.swift
View file @
86fc559a
...
@@ -97,6 +97,8 @@ enum ColorSet: String, CaseIterable{
...
@@ -97,6 +97,8 @@ enum ColorSet: String, CaseIterable{
case
ToggleOn
case
ToggleOn
/// Button - Slidebar
/// Button - Slidebar
case
Slidebar
case
Slidebar
/// Button - Slidebar Active
case
SlidebarActive
/// Button - Coning active
/// Button - Coning active
case
ConingActive
case
ConingActive
...
@@ -237,6 +239,8 @@ extension ColorSet{
...
@@ -237,6 +239,8 @@ extension ColorSet{
"ToggleOnColor"
"ToggleOnColor"
case
.
Slidebar
:
case
.
Slidebar
:
"SliderColor"
"SliderColor"
case
.
SlidebarActive
:
"SliderActiveColor"
case
.
ConingActive
:
case
.
ConingActive
:
"ConingActiveColor"
"ConingActiveColor"
case
.
PrimaryActiveIcon
:
case
.
PrimaryActiveIcon
:
...
...
Seilassist/Sailassist/ContentView.swift
View file @
86fc559a
...
@@ -13,7 +13,7 @@ struct ContentView: View {
...
@@ -13,7 +13,7 @@ struct ContentView: View {
var
selectedTabModel
=
SelectedTabModel
()
var
selectedTabModel
=
SelectedTabModel
()
var
body
:
some
View
{
var
body
:
some
View
{
NavigationStack
{
MainTabView
()
MainTabView
()
.
environmentObject
(
selectedTabModel
)
.
environmentObject
(
selectedTabModel
)
.
onAppear
(){
.
onAppear
(){
...
@@ -23,7 +23,6 @@ struct ContentView: View {
...
@@ -23,7 +23,6 @@ struct ContentView: View {
selectedTabModel
.
activeTab
=
.
task
selectedTabModel
.
activeTab
=
.
task
}
}
}
}
}
.
fullScreenCover
(
isPresented
:
.
constant
(
!
isLogin
),
onDismiss
:
{
.
fullScreenCover
(
isPresented
:
.
constant
(
!
isLogin
),
onDismiss
:
{
guard
sceneDelegate
.
tabWindow
==
nil
else
{
return
}
guard
sceneDelegate
.
tabWindow
==
nil
else
{
return
}
sceneDelegate
.
addTabBar
(
selectedTabModel
)
sceneDelegate
.
addTabBar
(
selectedTabModel
)
...
...
Seilassist/Sailassist/Map/Task/View/EcaSettingView.swift
View file @
86fc559a
...
@@ -6,18 +6,25 @@
...
@@ -6,18 +6,25 @@
//
//
import
SwiftUI
import
SwiftUI
import
UIKit
struct
EcaSettingView
:
View
{
struct
EcaSettingView
:
View
{
@Binding
var
isShowSettingEca
:
Bool
@Binding
var
isShowSettingEca
:
Bool
@State
var
edittingEca
:
RegisteredEca
@State
var
edittingEca
:
RegisteredEca
var
body
:
some
View
{
var
body
:
some
View
{
VStack
{
VStack
(
spacing
:
0
)
{
SliderView
(
param
:
$
edittingEca
.
swFinish
,
title
:
"Switching Finish - ECA"
)
SliderView
(
param
:
$
edittingEca
.
swFinish
,
title
:
"Switching Finish - ECA"
)
.
padding
(
.
horizontal
,
30
)
.
padding
(
.
vertical
,
17
)
Divider
()
Divider
()
SliderView
(
param
:
$
edittingEca
.
swStart
,
title
:
"Switching Start - ECA"
)
SliderView
(
param
:
$
edittingEca
.
swStart
,
title
:
"Switching Start - ECA"
)
.
padding
(
.
horizontal
,
30
)
.
padding
(
.
vertical
,
17
)
Divider
()
Divider
()
SliderView
(
param
:
$
edittingEca
.
swNotice
,
title
:
"Switching Notice - ECA"
)
SliderView
(
param
:
$
edittingEca
.
swNotice
,
title
:
"Switching Notice - ECA"
)
.
padding
(
.
horizontal
,
30
)
.
padding
(
.
vertical
,
17
)
Button
(
action
:
{
Button
(
action
:
{
...
@@ -25,17 +32,28 @@ struct EcaSettingView: View {
...
@@ -25,17 +32,28 @@ struct EcaSettingView: View {
isShowSettingEca
=
false
isShowSettingEca
=
false
},
label
:
{
},
label
:
{
Text
(
"Register"
)
Text
(
"Register"
)
.
font
(
FontStyle
.
DefaultText
.
font
)
.
padding
()
.
padding
()
})
})
.
frame
(
width
:
153
,
height
:
42
)
.
foregroundColor
(
ColorSet
.
ButtonText
.
color
)
.
background
(
ColorSet
.
PrimaryActiveIcon
.
color
)
.
background
(
ColorSet
.
PrimaryActiveIcon
.
color
)
.
cornerRadius
(
30
)
.
cornerRadius
(
30
)
.
padding
(
.
vertical
,
20
)
}
}
.
padding
(
.
horizontal
)
}
}
}
}
fileprivate
struct
SliderView
:
View
{
fileprivate
struct
SliderView
:
View
{
init
(
param
:
Binding
<
Float
>
,
title
:
String
,
min
:
Float
=
1
,
max
:
Float
=
10
)
{
var
thumb
=
UIImage
(
systemName
:
"circle.fill"
)
UISlider
.
appearance
()
.
setThumbImage
(
thumb
,
for
:
.
normal
)
UISlider
.
appearance
()
.
maximumTrackTintColor
=
UIColor
(
ColorSet
.
Slidebar
.
color
)
self
.
_param
=
param
self
.
title
=
title
self
.
min
=
min
self
.
max
=
max
}
@Binding
var
param
:
Float
@Binding
var
param
:
Float
let
title
:
String
let
title
:
String
var
min
:
Float
=
1
var
min
:
Float
=
1
...
@@ -43,20 +61,27 @@ fileprivate struct SliderView: View {
...
@@ -43,20 +61,27 @@ fileprivate struct SliderView: View {
var
body
:
some
View
{
var
body
:
some
View
{
VStack
(
alignment
:
.
leading
){
VStack
(
alignment
:
.
leading
){
Text
(
title
)
Text
(
title
)
.
fo
regroundColor
(
ColorSet
.
Body
.
color
)
.
fo
nt
(
FontStyle
.
EmphasisText
.
font
)
HStack
{
HStack
(
alignment
:
.
bottom
)
{
Text
(
String
(
format
:
"%d"
,
Int
(
param
)))
Text
(
String
(
format
:
"%d"
,
Int
(
param
)))
.
font
(
.
system
(
size
:
20
))
Text
(
"NM"
)
Text
(
"NM"
)
.
font
(
FontStyle
.
SupplementText2
.
font
)
.
foregroundColor
(
ColorSet
.
BodyDescriptiion
.
color
)
}
}
.
foregroundColor
(
ColorSet
.
Body
.
color
)
HStack
{
HStack
(
spacing
:
9
)
{
Button
(
action
:
{
Button
(
action
:
{
param
-=
1
param
-=
1
},
label
:
{
},
label
:
{
Image
(
systemName
:
"minus.circle"
)
Image
(
systemName
:
"minus.circle"
)
.
resizable
()
.
frame
(
width
:
28
,
height
:
28
)
})
})
.
disabled
(
param
<=
min
)
.
disabled
(
param
<=
min
)
Slider
(
value
:
$
param
,
in
:
min
...
max
,
step
:
1
)
Slider
(
value
:
$
param
,
in
:
min
...
max
,
step
:
1
)
Button
(
action
:
{
Button
(
action
:
{
...
@@ -64,10 +89,17 @@ fileprivate struct SliderView: View {
...
@@ -64,10 +89,17 @@ fileprivate struct SliderView: View {
param
+=
1
param
+=
1
},
label
:
{
},
label
:
{
Image
(
systemName
:
"plus.circle"
)
Image
(
systemName
:
"plus.circle"
)
.
resizable
()
.
frame
(
width
:
28
,
height
:
28
)
})
})
.
disabled
(
param
>=
max
)
.
disabled
(
param
>=
max
)
Spacer
()
}
}
.
tint
(
ColorSet
.
SlidebarActive
.
color
)
.
foregroundColor
(
ColorSet
.
SlidebarActive
.
color
)
}
}
.
foregroundColor
(
ColorSet
.
Body
.
color
)
}
}
}
}
...
...
Seilassist/Sailassist/Map/Task/View/TaskSwitchingMenuView.swift
View file @
86fc559a
...
@@ -65,7 +65,7 @@ struct TaskSwitchingMenuView: View {
...
@@ -65,7 +65,7 @@ struct TaskSwitchingMenuView: View {
}
label
:
{
}
label
:
{
Image
(
systemName
:
"ellipsis"
)
Image
(
systemName
:
"ellipsis"
)
.
frame
(
width
:
22
,
height
:
22
)
.
frame
(
width
:
22
,
height
:
22
)
// .padding(
)
.
foregroundColor
(
ColorSet
.
Slidebar
.
color
)
}
}
.
disabled
(
eca
.
isRunning
)
.
disabled
(
eca
.
isRunning
)
.
alert
(
"delete"
,
isPresented
:
$
isDeleteAlert
)
{
.
alert
(
"delete"
,
isPresented
:
$
isDeleteAlert
)
{
...
...
Seilassist/Sailassist/Menu/MenuView.swift
View file @
86fc559a
...
@@ -6,45 +6,121 @@
...
@@ -6,45 +6,121 @@
//
//
import
SwiftUI
import
SwiftUI
import
PDFKit
enum
MenuPath
:
String
,
Hashable
{
case
Manual
case
ManualECDIS
case
ManualRADAR
case
ManualJmarineNeCST
case
Information
case
Help
case
AboutApp
case
ContactUs
var
title
:
String
{
switch
self
{
case
.
Manual
:
"Equipment manual"
case
.
ManualECDIS
:
"ECDIS"
case
.
ManualRADAR
:
"RADAR"
case
.
ManualJmarineNeCST
:
"J-marine NeCST"
case
.
Information
:
"Information"
case
.
Help
:
"Help"
case
.
AboutApp
:
"About this App"
case
.
ContactUs
:
"Contact Us"
}
}
}
struct
MenuView
:
View
{
struct
MenuView
:
View
{
let
contentTitles
=
[
"content1"
,
"content2"
]
@State
var
path
:
[
MenuPath
]
=
[
]
let
dividerColor
=
ColorSet
.
LineColor03
.
color
var
body
:
some
View
{
var
body
:
some
View
{
NavigationStack
{
NavigationStack
(
path
:
$
path
)
{
VStack
(
spacing
:
0
)
{
VStack
(
spacing
:
0
)
{
Divider
(
)
MenuTitleView
(
path
:
$
path
)
MenuContentView
(
contentTitle
:
.
constant
(
"title1"
))
HStack
{
VStack
(
alignment
:
.
leading
,
spacing
:
10
){
Text
(
"Japan Radio Co.,Ltd."
)
.
font
(
FontStyle
.
TitleL
.
font
)
.
foregroundColor
(
ColorSet
.
Body
.
color
)
Text
(
"会社名一般"
)
.
font
(
FontStyle
.
EmphasisText
.
font
)
.
foregroundColor
(
ColorSet
.
BodyDescriptiion
.
color
)
}
.
padding
(
.
horizontal
,
30
)
.
padding
(
.
vertical
,
17
)
Spacer
()
}
Divider
()
Divider
()
.
background
(
ColorSet
.
LineColor04
.
color
)
.
background
(
dividerColor
)
Button
{
path
.
append
(
.
Manual
)
}
label
:
{
MenuContentView
(
content
:
.
Manual
)
MenuContentView
(
contentTitle
:
.
constant
(
"title2"
))
}
Spacer
()
Button
{
path
.
append
(
.
Information
)
}
label
:
{
MenuContentView
(
content
:
.
Information
)
}
}
// .toolbar{
// ToolbarItem(placement: .principal) {
// Text("aaaaa")
// }
// }
.
navigationTitle
(
"JMB-Demo"
)
.
navigationBarTitleDisplayMode
(
.
inline
)
.
background
(
ColorSet
.
BackgroundPrimary
.
color
)
Button
{
path
.
append
(
.
Help
)
}
label
:
{
MenuContentView
(
content
:
.
Help
)
}
Button
{
path
.
append
(
.
AboutApp
)
}
label
:
{
MenuContentView
(
content
:
.
AboutApp
)
}
}
// List{
Button
{
// ForEach(contentTitles, id: \.self) { title in
path
.
append
(
.
ContactUs
)
// MenuContentView(contentTitle: .constant(title))
}
label
:
{
// }
MenuContentView
(
content
:
.
ContactUs
)
}
// }
Spacer
()
// .listStyle(.plain)
}
.
background
(
ColorSet
.
BackgroundPrimary
.
color
)
.
navigationTitle
(
""
)
.
navigationBarHidden
(
true
)
.
navigationDestination
(
for
:
MenuPath
.
self
)
{
goto
in
if
goto
==
.
Manual
{
MenuManualView
(
path
:
$
path
)
.
navigationBarHidden
(
true
)
}
else
{
VStack
(
spacing
:
0
)
{
MenuTitleView
(
path
:
$
path
,
title
:
goto
.
title
)
if
let
url
=
Preferences
.
ECDISUrl
{
PDFViewer
(
url
:
url
)
}
else
{
Spacer
()
}
}
.
navigationBarHidden
(
true
)
.
background
(
ColorSet
.
BackgroundPrimary
.
color
)
}
}
}
}
}
}
}
...
...
Seilassist/Sailassist/Menu/View/MenuContentView.swift
View file @
86fc559a
...
@@ -8,25 +8,29 @@
...
@@ -8,25 +8,29 @@
import
SwiftUI
import
SwiftUI
struct
MenuContentView
:
View
{
struct
MenuContentView
:
View
{
@Binding
var
contentTitle
:
String
var
content
:
MenuPath
var
body
:
some
View
{
var
body
:
some
View
{
VStack
(
spacing
:
0
){
HStack
{
HStack
{
Text
(
contentT
itle
)
Text
(
content
.
t
itle
)
.
font
(
FontStyle
.
TitleM
.
font
)
.
font
(
FontStyle
.
EmphasisText
.
font
)
.
foregroundColor
(
ColorSet
.
Body
.
color
)
.
foregroundColor
(
ColorSet
.
Body
.
color
)
.
padding
()
Spacer
()
Spacer
()
Image
(
"ink_01"
)
Image
(
"ink_01"
)
.
padding
()
.
resizable
()
.
frame
(
width
:
22
,
height
:
22
)
}
.
padding
(
.
vertical
,
17
)
.
padding
(
.
horizontal
,
30
)
Divider
()
.
background
(
ColorSet
.
LineColor04
.
color
)
}
}
.
background
(
ColorSet
.
BackgroundPrimary
.
color
)
}
}
}
}
#Preview {
#Preview {
MenuContentView
(
content
Title
:
.
constant
(
"Title"
)
)
MenuContentView
(
content
:
.
Manual
)
}
}
Seilassist/Sailassist/Menu/View/MenuManualView.swift
0 → 100644
View file @
86fc559a
//
// MenuManualView.swift
// Sailassist
//
// Created by Mamoru Sugita on 2023/11/10.
//
import
SwiftUI
import
PDFKit
struct
MenuManualView
:
View
{
@State
var
isAlert
:
Bool
=
false
@Binding
var
path
:
[
MenuPath
]
var
body
:
some
View
{
VStack
{
MenuTitleView
(
path
:
$
path
,
title
:
MenuPath
.
Manual
.
title
)
Button
{
if
Preferences
.
ECDISUrl
!=
nil
{
path
.
append
(
.
ManualECDIS
)
}
else
{
if
let
url
=
PDFDownloadManager
.
main
.
downloadFile
(
urlString
:
"https://samsdbg.jmarinesafety.jp/gps_editor/gps_help.pdf"
,
fileName
:
"ECDIS.pdf"
){
Preferences
.
ECDISUrl
=
url
path
.
append
(
.
ManualECDIS
)
}
else
{
isAlert
=
true
}
}
}
label
:
{
MenuContentView
(
content
:
.
ManualECDIS
)
}
Button
{
path
.
append
(
.
ManualRADAR
)
}
label
:
{
MenuContentView
(
content
:
.
ManualRADAR
)
}
Button
{
path
.
append
(
.
ManualJmarineNeCST
)
}
label
:
{
MenuContentView
(
content
:
.
ManualJmarineNeCST
)
}
Spacer
()
}
.
background
(
ColorSet
.
BackgroundPrimary
.
color
)
.
alert
(
"delete"
,
isPresented
:
$
isAlert
)
{
Button
(
role
:
.
destructive
)
{
}
label
:
{
Text
(
"delete"
)
}
}
message
:
{
Text
(
"eca delete"
)
}
}
}
#Preview {
MenuManualView
(
path
:
.
constant
([
.
Manual
]))
}
Seilassist/Sailassist/Menu/View/MenuTitleView.swift
0 → 100644
View file @
86fc559a
//
// MenuTitleView.swift
// Sailassist
//
// Created by Mamoru Sugita on 2023/11/10.
//
import
SwiftUI
struct
MenuTitleView
:
View
{
@Binding
var
path
:
[
MenuPath
]
var
title
=
"Menu"
var
body
:
some
View
{
VStack
{
HStack
{
Button
{
path
.
removeLast
()
}
label
:
{
if
!
path
.
isEmpty
{
Image
(
"ink_02"
)
}
}
.
disabled
(
path
.
isEmpty
)
.
frame
(
width
:
48
,
height
:
48
)
Spacer
()
Text
(
title
)
.
font
(
FontStyle
.
TitleL
.
font
)
.
foregroundColor
(
ColorSet
.
Body
.
color
)
Spacer
()
Button
{
}
label
:
{
// Image("ink_02")
}
.
disabled
(
true
)
.
frame
(
width
:
48
,
height
:
48
)
}
.
frame
(
height
:
60
)
Divider
()
.
background
(
ColorSet
.
LineColor04
.
color
)
}
}
}
#Preview {
MenuTitleView
(
path
:
.
constant
([]))
}
Seilassist/Sailassist/Menu/View/PDFViewer.swift
0 → 100644
View file @
86fc559a
//
// PDFViewer.swift
// Sailassist
//
// Created by Mamoru Sugita on 2023/11/14.
//
import
Foundation
import
SwiftUI
import
PDFKit
struct
PDFViewer
:
UIViewRepresentable
{
let
url
:
URL
func
makeUIView
(
context
:
Context
)
->
some
PDFView
{
let
pdfView
=
PDFView
()
pdfView
.
document
=
PDFDocument
(
url
:
self
.
url
)
return
pdfView
}
func
updateUIView
(
_
uiView
:
UIViewType
,
context
:
Context
)
{
}
}
Seilassist/Sailassist/Preferences/Preferences.swift
View file @
86fc559a
...
@@ -30,6 +30,8 @@ class Preferences{
...
@@ -30,6 +30,8 @@ class Preferences{
@AppStorage(wrappedValue:"", PreferencesKey.TypeString.GroupName.rawValue)
static
var
GroupName
:
String
@AppStorage(wrappedValue:"", PreferencesKey.TypeString.GroupName.rawValue)
static
var
GroupName
:
String
@AppStorage(wrappedValue:"", PreferencesKey.TypeString.UserName.rawValue)
static
var
UserName
:
String
@AppStorage(wrappedValue:"", PreferencesKey.TypeString.UserName.rawValue)
static
var
UserName
:
String
// func getPreferences(key)
// func getPreferences(key)
@AppStorage(PreferencesKey.TypeURL.ECDIS.rawValue)
static
var
ECDISUrl
:
URL
?
}
}
...
...
Seilassist/Sailassist/Preferences/PreferencesKey.swift
View file @
86fc559a
...
@@ -24,6 +24,13 @@ class PreferencesKey{
...
@@ -24,6 +24,13 @@ class PreferencesKey{
enum
TypeInt
:
String
{
enum
TypeInt
:
String
{
case
AppStartUsingDate
case
AppStartUsingDate
case
LastLoginDate
case
LastLoginDate
}
enum
TypeURL
:
String
{
case
ECDIS
case
RADAR
case
NeCST
}
}
...
...
Seilassist/Sailassist/ServerSession/PDFDownloadManager.swift
0 → 100644
View file @
86fc559a
//
// PDFDownloadManager.swift
// Sailassist
//
// Created by Mamoru Sugita on 2023/11/13.
//
import
Foundation
class
PDFDownloadManager
{
static
let
main
=
PDFDownloadManager
()
func
downloadFile
(
urlString
:
String
,
fileName
:
String
)
->
URL
?{
let
semaphore
=
DispatchSemaphore
(
value
:
0
)
guard
let
url
=
URL
(
string
:
urlString
)
else
{
return
nil
}
guard
let
resDocPath
=
FileManager
.
default
.
urls
(
for
:
.
documentDirectory
,
in
:
.
userDomainMask
)
.
last
else
{
return
nil
}
var
filePath
:
URL
?
=
resDocPath
.
appendingPathComponent
(
fileName
)
do
{
let
pdfData
=
try
Data
.
init
(
contentsOf
:
url
)
try
pdfData
.
write
(
to
:
filePath
!
,
options
:
.
atomic
)
}
catch
{
filePath
=
nil
}
return
filePath
}
}
Seilassist/Sailassist/Tab/MainTabView.swift
View file @
86fc559a
...
@@ -34,33 +34,22 @@ struct MainTabView: View {
...
@@ -34,33 +34,22 @@ struct MainTabView: View {
@State
var
isTabShow
:
Bool
=
sceneDelegate
.
tabWindow
!=
nil
@State
var
isTabShow
:
Bool
=
sceneDelegate
.
tabWindow
!=
nil
@State
var
isTaskSel
:
Bool
=
selectedTabModel
.
activeTab
==
.
task
@State
var
isTaskSel
:
Bool
=
selectedTabModel
.
activeTab
==
.
task
TabView
(
selection
:
$
selectedTabModel
.
activeTab
){
TabView
(
selection
:
$
selectedTabModel
.
activeTab
){
NavigationStack
{
ChatView
()
ChatView
()
}
.
tag
(
Tab
.
chat
)
.
tag
(
Tab
.
chat
)
NavigationStack
{
MapRepresentable
()
MapRepresentable
()
.
ignoresSafeArea
()
.
ignoresSafeArea
()
}
.
tag
(
Tab
.
task
)
.
tag
(
Tab
.
task
)
NavigationStack
{
NotificationView
()
NotificationView
()
}
.
tag
(
Tab
.
alert
)
.
tag
(
Tab
.
alert
)
NavigationStack
{
MenuView
()
MenuView
()
}
.
tag
(
Tab
.
menu
)
.
tag
(
Tab
.
menu
)
}
}
.
hideNativeTabBar
()
.
hideNativeTabBar
()
.
sheet
(
isPresented
:
.
constant
(
isTaskSel
&&
isTabShow
),
content
:
{
.
sheet
(
isPresented
:
.
constant
(
isTaskSel
&&
isTabShow
),
content
:
{
NavigationStack
{
MapTaskView
()
MapTaskView
()
}
.
zIndex
(
0
)
.
zIndex
(
0
)
.
presentationDragIndicator
(
.
hidden
)
.
presentationDragIndicator
(
.
hidden
)
.
presentationDetents
([
.
height
(
150
),
.
medium
,
.
fraction
(
0.99
)])
.
presentationDetents
([
.
height
(
150
),
.
medium
,
.
fraction
(
0.99
)])
...
...
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