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
4292324a
Commit
4292324a
authored
Jul 04, 2024
by
shigemi miura
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tabイメージ変更
チャット名称レイアウト変更 チャットインプット時にカメラ等を開き、閉じた場合にレイヤウトが崩れる不具合を修正 チャット参照カウントの表示を変更
parent
f37540a2
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
224 additions
and
37 deletions
+224
-37
NotificationView.swift
Seilassist/Sailassist/Alert/NotificationView.swift
+1
-1
Contents.json
...assets/IconImage/Chat/chat_company.imageset/Contents.json
+21
-0
icon_company.svg
...ets/IconImage/Chat/chat_company.imageset/icon_company.svg
+4
-0
Contents.json
....xcassets/IconImage/Chat/chat_ship.imageset/Contents.json
+21
-0
icon_ship.svg
....xcassets/IconImage/Chat/chat_ship.imageset/icon_ship.svg
+6
-0
Contents.json
...xcassets/IconImage/TabItem/tab_map.imageset/Contents.json
+52
-0
map_dark.svg
....xcassets/IconImage/TabItem/tab_map.imageset/map_dark.svg
+2
-0
map_light.svg
...xcassets/IconImage/TabItem/tab_map.imageset/map_light.svg
+2
-0
Contents.json
...IconImage/TabItem/tab_map_selected.imageset/Contents.json
+21
-0
map.svg
...ssets/IconImage/TabItem/tab_map_selected.imageset/map.svg
+2
-0
ChatInputView.swift
Seilassist/Sailassist/Chat/View/ChatInputView.swift
+3
-2
ChatMemberView.swift
Seilassist/Sailassist/Chat/View/ChatMemberView.swift
+17
-3
ChatTitleView.swift
Seilassist/Sailassist/Chat/View/ChatTitleView.swift
+26
-16
MyChatContentView.swift
Seilassist/Sailassist/Chat/View/MyChatContentView.swift
+26
-3
ContentView.swift
Seilassist/Sailassist/ContentView.swift
+2
-2
HttpRequestType.swift
Seilassist/Sailassist/Http/HttpRequestType.swift
+1
-1
MonitoringRoute.swift
Seilassist/Sailassist/Map/MonitoringRoute.swift
+1
-0
ServerSession.swift
Seilassist/Sailassist/ServerSession/ServerSession.swift
+9
-2
MainTabView.swift
Seilassist/Sailassist/Tab/MainTabView.swift
+6
-6
SelectedTabModel.swift
Seilassist/Sailassist/Tab/ViewModel/SelectedTabModel.swift
+1
-1
No files found.
Seilassist/Sailassist/Alert/NotificationView.swift
View file @
4292324a
...
@@ -20,7 +20,7 @@ struct NotificationView: View {
...
@@ -20,7 +20,7 @@ struct NotificationView: View {
.
onTapGesture
{
.
onTapGesture
{
if
let
position
=
data
.
position
{
if
let
position
=
data
.
position
{
if
position
.
lat
!=
nil
&&
position
.
lon
!=
nil
{
if
position
.
lat
!=
nil
&&
position
.
lon
!=
nil
{
selectedTabModel
.
activeTab
=
.
task
selectedTabModel
.
activeTab
=
.
map
pushHist
.
focusPushHistory
=
data
.
id
pushHist
.
focusPushHistory
=
data
.
id
}
}
}
}
...
...
Seilassist/Sailassist/Assets.xcassets/IconImage/Chat/chat_company.imageset/Contents.json
0 → 100644
View file @
4292324a
{
"images"
:
[
{
"filename"
:
"icon_company.svg"
,
"idiom"
:
"universal"
,
"scale"
:
"1x"
},
{
"idiom"
:
"universal"
,
"scale"
:
"2x"
},
{
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"author"
:
"xcode"
,
"version"
:
1
}
}
Seilassist/Sailassist/Assets.xcassets/IconImage/Chat/chat_company.imageset/icon_company.svg
0 → 100644
View file @
4292324a
<svg
viewBox=
"0 0 30 30"
fill=
"none"
xmlns=
"http://www.w3.org/2000/svg"
>
<path
d=
"M22.1438 7.87501V2.13751H7.85626V7.85626H2.13751V27.8625H13.575V22.1438H16.425V27.8625H27.8625V7.87501H22.1438ZM7.85626 25.0125H5.00626V22.1625H7.85626V25.0125ZM7.85626 19.2938H5.00626V16.4438H7.85626V19.2938ZM7.85626 13.575H5.00626V10.725H7.85626V13.575ZM13.575 19.2938H10.725V16.4438H13.575V19.2938ZM13.575 13.575H10.725V10.725H13.575V13.575ZM13.575 7.85626H10.725V5.00626H13.575V7.85626ZM19.2938 19.2938H16.4438V16.4438H19.2938V19.2938ZM19.2938 13.575H16.4438V10.725H19.2938V13.575ZM24.9938 13.575H22.1438V10.725H24.9938V13.575ZM19.2938 7.85626H16.4438V5.00626H19.2938V7.85626ZM25.0125 24.9938H22.1625V22.1438H25.0125V24.9938ZM25.0125 19.275H22.1625V16.425H25.0125V19.275Z"
fill=
"black"
/>
</svg>
Seilassist/Sailassist/Assets.xcassets/IconImage/Chat/chat_ship.imageset/Contents.json
0 → 100644
View file @
4292324a
{
"images"
:
[
{
"filename"
:
"icon_ship.svg"
,
"idiom"
:
"universal"
,
"scale"
:
"1x"
},
{
"idiom"
:
"universal"
,
"scale"
:
"2x"
},
{
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"author"
:
"xcode"
,
"version"
:
1
}
}
Seilassist/Sailassist/Assets.xcassets/IconImage/Chat/chat_ship.imageset/icon_ship.svg
0 → 100644
View file @
4292324a
<svg
viewBox=
"0 0 30 30"
fill=
"none"
xmlns=
"http://www.w3.org/2000/svg"
>
<path
d=
"M26.9812 16.2375L25.8937 8.36251C25.8562 8.06251 25.6125 7.85626 25.3125 7.85626H23.2687V5.23126H19.4625L18.45 7.85626H12.3375C11.8875 7.85626 11.475 8.11876 11.2687 8.53126L9.05622 13.1813L1.55622 11.7188C1.06872 11.625 0.562472 11.8313 0.262471 12.2438C-0.0375285 12.6563 -0.0187785 13.05 0.112471 13.65C0.487471 15.3375 1.12497 17.6625 2.69997 20.0438C3.71247 21.5813 5.71872 24.75 8.32497 24.7875H27.45C28.4437 24.7875 29.2875 24.0375 29.4 23.025L30.0375 16.7813L27.0187 16.2375H26.9812ZM10.575 13.425L12.075 9.82501C12.2625 9.39376 12.6937 9.09376 13.1625 9.09376H23.9437C24.2437 9.09376 24.4875 9.31876 24.525 9.60001L25.3875 15.8813L10.575 13.4063V13.425Z"
fill=
"black"
/>
<path
d=
"M16.2375 13.05C16.8484 13.05 17.3437 12.5547 17.3437 11.9437C17.3437 11.3328 16.8484 10.8375 16.2375 10.8375C15.6265 10.8375 15.1312 11.3328 15.1312 11.9437C15.1312 12.5547 15.6265 13.05 16.2375 13.05Z"
fill=
"black"
/>
<path
d=
"M20.5125 13.05C21.1235 13.05 21.6187 12.5547 21.6187 11.9437C21.6187 11.3328 21.1235 10.8375 20.5125 10.8375C19.9015 10.8375 19.4062 11.3328 19.4062 11.9437C19.4062 12.5547 19.9015 13.05 20.5125 13.05Z"
fill=
"black"
/>
</svg>
Seilassist/Sailassist/Assets.xcassets/IconImage/TabItem/tab_map.imageset/Contents.json
0 → 100644
View file @
4292324a
{
"images"
:
[
{
"filename"
:
"map_light.svg"
,
"idiom"
:
"universal"
,
"scale"
:
"1x"
},
{
"appearances"
:
[
{
"appearance"
:
"luminosity"
,
"value"
:
"dark"
}
],
"filename"
:
"map_dark.svg"
,
"idiom"
:
"universal"
,
"scale"
:
"1x"
},
{
"idiom"
:
"universal"
,
"scale"
:
"2x"
},
{
"appearances"
:
[
{
"appearance"
:
"luminosity"
,
"value"
:
"dark"
}
],
"idiom"
:
"universal"
,
"scale"
:
"2x"
},
{
"idiom"
:
"universal"
,
"scale"
:
"3x"
},
{
"appearances"
:
[
{
"appearance"
:
"luminosity"
,
"value"
:
"dark"
}
],
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"author"
:
"xcode"
,
"version"
:
1
}
}
Seilassist/Sailassist/Assets.xcassets/IconImage/TabItem/tab_map.imageset/map_dark.svg
0 → 100644
View file @
4292324a
<svg
viewBox=
"0 0 100 90"
fill=
"none"
xmlns=
"http://www.w3.org/2000/svg"
height=
"23"
width=
"26"
><g
clip-path=
"url(#clip0_1572_27813)"
><path
d=
"M37.5099 22.39L37.5699 56.57V58.75C37.5699 58.75 37.5699 58.78 37.5699 58.79C37.5699 59.61 36.8999 60.28 36.0799 60.28C35.2599 60.28 34.5899 59.61 34.5899 58.79C34.5899 58.78 34.5899 58.77 34.5899 58.75L34.5299 22.39C34.5299 22.39 34.5599 20.9 36.0499 20.9C37.4199 20.9 37.4999 22.39 37.4999 22.39H37.5099ZM36.0599 16.36C33.9399 17.17 9.53992 26.69 9.53992 26.69C8.40992 27.17 7.66992 28.28 7.66992 29.51V71.62C7.66992 73.07 9.14992 74.06 10.4899 73.5L36.0399 63.57L63.9299 73.33C64.4299 73.54 64.9999 73.54 65.4999 73.33L90.2999 63.33C91.4299 62.85 92.1699 61.74 92.1699 60.51V18.39C92.1699 16.94 90.6899 15.95 89.3499 16.51L64.7199 26.44C64.7199 26.44 39.0199 17.36 36.0599 16.35V16.36ZM66.2399 68.47C66.2399 69.3 65.5599 69.97 64.7099 69.97C63.8599 69.97 63.1799 69.3 63.1799 68.47V68.45L63.2699 31.63C63.2699 30.83 63.9299 30.18 64.7499 30.18C65.5699 30.18 66.2199 30.82 66.2299 31.61V31.63V68.45L66.2399 68.47Z"
fill=
"white"
/></g><defs><clipPath
id=
"clip0_1572_27813"
><rect
width=
"100"
height=
"90"
fill=
"white"
/></clipPath></defs></svg>
\ No newline at end of file
Seilassist/Sailassist/Assets.xcassets/IconImage/TabItem/tab_map.imageset/map_light.svg
0 → 100644
View file @
4292324a
<svg
viewBox=
"0 0 100 90"
fill=
"none"
xmlns=
"http://www.w3.org/2000/svg"
height=
"23"
width=
"26"
><g
clip-path=
"url(#clip0_1572_27816)"
><path
d=
"M37.5099 22.39L37.5699 56.57V58.75C37.5699 58.75 37.5699 58.78 37.5699 58.79C37.5699 59.61 36.8999 60.28 36.0799 60.28C35.2599 60.28 34.5899 59.61 34.5899 58.79C34.5899 58.78 34.5899 58.77 34.5899 58.75L34.5299 22.39C34.5299 22.39 34.5599 20.9 36.0499 20.9C37.4199 20.9 37.4999 22.39 37.4999 22.39H37.5099ZM36.0599 16.36C33.9399 17.17 9.53992 26.69 9.53992 26.69C8.40992 27.17 7.66992 28.28 7.66992 29.51V71.62C7.66992 73.07 9.14992 74.06 10.4899 73.5L36.0399 63.57L63.9299 73.33C64.4299 73.54 64.9999 73.54 65.4999 73.33L90.2999 63.33C91.4299 62.85 92.1699 61.74 92.1699 60.51V18.39C92.1699 16.94 90.6899 15.95 89.3499 16.51L64.7199 26.44C64.7199 26.44 39.0199 17.36 36.0599 16.35V16.36ZM66.2399 68.47C66.2399 69.3 65.5599 69.97 64.7099 69.97C63.8599 69.97 63.1799 69.3 63.1799 68.47V68.45L63.2699 31.63C63.2699 30.83 63.9299 30.18 64.7499 30.18C65.5699 30.18 66.2199 30.82 66.2299 31.61V31.63V68.45L66.2399 68.47Z"
fill=
"#7E7E84"
/></g><defs><clipPath
id=
"clip0_1572_27816"
><rect
width=
"100"
height=
"90"
fill=
"white"
/></clipPath></defs></svg>
\ No newline at end of file
Seilassist/Sailassist/Assets.xcassets/IconImage/TabItem/tab_map_selected.imageset/Contents.json
0 → 100644
View file @
4292324a
{
"images"
:
[
{
"filename"
:
"map.svg"
,
"idiom"
:
"universal"
,
"scale"
:
"1x"
},
{
"idiom"
:
"universal"
,
"scale"
:
"2x"
},
{
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"author"
:
"xcode"
,
"version"
:
1
}
}
Seilassist/Sailassist/Assets.xcassets/IconImage/TabItem/tab_map_selected.imageset/map.svg
0 → 100644
View file @
4292324a
<svg
viewBox=
"0 0 100 90"
fill=
"none"
xmlns=
"http://www.w3.org/2000/svg"
height=
"23"
width=
"26"
><g
clip-path=
"url(#clip0_1572_27809)"
><path
d=
"M37.5099 22.39L37.5699 56.57V58.75C37.5699 58.75 37.5699 58.78 37.5699 58.79C37.5699 59.61 36.8999 60.28 36.0799 60.28C35.2599 60.28 34.5899 59.61 34.5899 58.79C34.5899 58.78 34.5899 58.77 34.5899 58.75L34.5299 22.39C34.5299 22.39 34.5599 20.9 36.0499 20.9C37.4199 20.9 37.4999 22.39 37.4999 22.39H37.5099ZM36.0599 16.36C33.9399 17.17 9.53992 26.69 9.53992 26.69C8.40992 27.17 7.66992 28.28 7.66992 29.51V71.62C7.66992 73.07 9.14992 74.06 10.4899 73.5L36.0399 63.57L63.9299 73.33C64.4299 73.54 64.9999 73.54 65.4999 73.33L90.2999 63.33C91.4299 62.85 92.1699 61.74 92.1699 60.51V18.39C92.1699 16.94 90.6899 15.95 89.3499 16.51L64.7199 26.44C64.7199 26.44 39.0199 17.36 36.0599 16.35V16.36ZM66.2399 68.47C66.2399 69.3 65.5599 69.97 64.7099 69.97C63.8599 69.97 63.1799 69.3 63.1799 68.47V68.45L63.2699 31.63C63.2699 30.83 63.9299 30.18 64.7499 30.18C65.5699 30.18 66.2199 30.82 66.2299 31.61V31.63V68.45L66.2399 68.47Z"
fill=
"#21BDD1"
/></g><defs><clipPath
id=
"clip0_1572_27809"
><rect
width=
"100"
height=
"90"
fill=
"white"
/></clipPath></defs></svg>
\ No newline at end of file
Seilassist/Sailassist/Chat/View/ChatInputView.swift
View file @
4292324a
...
@@ -19,7 +19,7 @@ struct ChatInputView: View {
...
@@ -19,7 +19,7 @@ struct ChatInputView: View {
@State
var
source
:
UIImagePickerController
.
SourceType
=
.
photoLibrary
@State
var
source
:
UIImagePickerController
.
SourceType
=
.
photoLibrary
@State
var
isActionSheet
=
false
@State
var
isActionSheet
=
false
@State
var
isImagePicker
=
false
@State
var
isImagePicker
=
false
@FocusState
var
isKeyboard
:
Bool
@FocusState
var
isKeyboard
:
Bool
var
body
:
some
View
{
var
body
:
some
View
{
VStack
(
spacing
:
0
){
VStack
(
spacing
:
0
){
...
@@ -102,6 +102,7 @@ struct ChatInputView: View {
...
@@ -102,6 +102,7 @@ struct ChatInputView: View {
.
fullScreenCover
(
isPresented
:
.
constant
(
isImagePicker
),
onDismiss
:
{
.
fullScreenCover
(
isPresented
:
.
constant
(
isImagePicker
),
onDismiss
:
{
//シートを閉じる時に実行する処理
//シートを閉じる時に実行する処理
sceneDelegate
.
tabWindow
?
.
isHidden
=
false
sceneDelegate
.
tabWindow
?
.
isHidden
=
false
isKeyboard
=
false
if
imageData
.
count
!=
0
{
if
imageData
.
count
!=
0
{
let
jpegData
=
UIImage
(
data
:
imageData
)
!.
jpegData
(
compressionQuality
:
1.0
)
let
jpegData
=
UIImage
(
data
:
imageData
)
!.
jpegData
(
compressionQuality
:
1.0
)
...
@@ -134,7 +135,7 @@ struct ChatInputView: View {
...
@@ -134,7 +135,7 @@ struct ChatInputView: View {
switch
result
{
switch
result
{
case
.
success
(
let
resultData
):
case
.
success
(
let
resultData
):
let
serverSession
=
ServerSession
()
let
serverSession
=
ServerSession
()
let
resjson
=
serverSession
.
fromJSON
(
resultData
:
resultData
,
resltType
:
ResLogin
.
self
)
let
_
=
serverSession
.
fromJSON
(
resultData
:
resultData
,
resltType
:
ResLogin
.
self
)
case
.
failure
(
let
errorCode
):
case
.
failure
(
let
errorCode
):
print
(
debug
:
errorCode
)
print
(
debug
:
errorCode
)
...
...
Seilassist/Sailassist/Chat/View/ChatMemberView.swift
View file @
4292324a
...
@@ -14,9 +14,23 @@ struct ChatMemberView: View {
...
@@ -14,9 +14,23 @@ struct ChatMemberView: View {
VStack
{
VStack
{
List
{
List
{
ForEach
(
message
.
users
,
id
:
\
.
id
)
{
user
in
ForEach
(
message
.
users
,
id
:
\
.
id
)
{
user
in
Text
(
user
.
name
)
HStack
{
.
foregroundColor
(
ColorSet
.
BodyChat
.
color
)
if
user
.
location
==
1
{
.
font
(
FontStyle
.
SupplementText
.
font
)
Image
(
"chat_company"
)
.
resizable
()
.
scaledToFill
()
.
frame
(
width
:
12
,
height
:
12
)
}
else
{
Image
(
"chat_ship"
)
.
resizable
()
.
scaledToFill
()
.
frame
(
width
:
10
,
height
:
10
)
}
Text
(
user
.
name
)
.
foregroundColor
(
ColorSet
.
BodyChat
.
color
)
.
font
(
FontStyle
.
SupplementText
.
font
)
}
}
}
.
listRowBackground
(
ColorSet
.
ModalWindowFront
.
color
)
.
listRowBackground
(
ColorSet
.
ModalWindowFront
.
color
)
.
listRowSeparatorTint
(
ColorSet
.
LineModal
.
color
)
.
listRowSeparatorTint
(
ColorSet
.
LineModal
.
color
)
...
...
Seilassist/Sailassist/Chat/View/ChatTitleView.swift
View file @
4292324a
...
@@ -28,28 +28,26 @@ struct ChatTitleView: View {
...
@@ -28,28 +28,26 @@ struct ChatTitleView: View {
Text
(
SharingData
.
my
.
shipName
)
Text
(
SharingData
.
my
.
shipName
)
.
font
(
FontStyle
.
TitleL
.
font
)
.
font
(
FontStyle
.
TitleL
.
font
)
let
usersName
=
userName
()
HStack
{
HStack
{
ForEach
(
message
.
users
,
id
:
\
.
id
)
{
user
in
Text
(
usersName
)
Text
(
user
.
name
+
","
)
.
font
(
FontStyle
.
RadioButtonText
.
font
)
.
font
(
FontStyle
.
TitleS
.
font
)
Button
{
isShowMember
.
toggle
()
}
label
:
{
Image
(
systemName
:
isShowMember
?
"chevron.down"
:
"chevron.up"
)
.
resizable
()
.
scaledToFit
()
.
frame
(
width
:
22.63
,
height
:
12.73
)
.
foregroundColor
(
ColorSet
.
Body
.
color
)
}
}
.
frame
(
width
:
30
,
height
:
30
)
}
}
}
}
.
foregroundColor
(
ColorSet
.
Body
.
color
)
.
foregroundColor
(
ColorSet
.
Body
.
color
)
.
frame
(
width
:
162
,
height
:
44
)
.
frame
(
width
:
162
,
height
:
44
)
Button
{
isShowMember
.
toggle
()
}
label
:
{
Image
(
systemName
:
isShowMember
?
"chevron.down"
:
"chevron.up"
)
.
resizable
()
.
scaledToFit
()
.
frame
(
width
:
22.63
,
height
:
12.73
)
.
foregroundColor
(
ColorSet
.
Body
.
color
)
}
.
frame
(
width
:
30
,
height
:
30
)
}
}
Spacer
()
Spacer
()
...
@@ -70,6 +68,18 @@ struct ChatTitleView: View {
...
@@ -70,6 +68,18 @@ struct ChatTitleView: View {
.
background
(
ColorSet
.
LineColor04
.
color
)
.
background
(
ColorSet
.
LineColor04
.
color
)
}
}
}
}
/**
* チャット名称をまとめる
*/
func
userName
()
->
String
{
var
usersName
=
""
for
user
in
message
.
users
{
usersName
+=
user
.
name
usersName
+=
","
}
return
usersName
}
}
}
#Preview {
#Preview {
...
...
Seilassist/Sailassist/Chat/View/MyChatContentView.swift
View file @
4292324a
...
@@ -41,18 +41,28 @@ struct MyChatContentView: View {
...
@@ -41,18 +41,28 @@ struct MyChatContentView: View {
}
}
}
}
HStack
(
spacing
:
0
){
HStack
(
spacing
:
5
){
//既読マーク
//既読マーク
Text
(
DateTextLib
.
ISO86012FormatText
(
message
.
time
,
format
:
"yyyy/MM/dd hh:mm"
,
errFormat
:
""
))
Text
(
DateTextLib
.
ISO86012FormatText
(
message
.
time
,
format
:
"yyyy/MM/dd hh:mm"
,
errFormat
:
""
))
.
padding
(
.
trailing
,
8
)
.
padding
(
.
trailing
,
8
)
Image
(
systemName
:
"eye.fill"
)
let
viewerCnt
=
viewerCnt
()
Image
(
"chat_company"
)
.
resizable
()
.
resizable
()
.
scaledToFit
()
.
scaledToFit
()
.
frame
(
width
:
17
,
height
:
17
)
.
frame
(
width
:
17
,
height
:
17
)
.
padding
(
.
trailing
,
4
)
.
padding
(
.
trailing
,
4
)
Text
(
String
(
message
.
viewer
.
count
))
Text
(
String
(
viewerCnt
.
0
))
Image
(
"chat_ship"
)
.
resizable
()
.
scaledToFit
()
.
frame
(
width
:
17
,
height
:
17
)
.
padding
(
.
trailing
,
4
)
Text
(
String
(
viewerCnt
.
1
))
}
}
.
font
(
FontStyle
.
DateText
.
font
)
.
font
(
FontStyle
.
DateText
.
font
)
.
foregroundColor
(
ColorSet
.
BodyDescriptiion
.
color
)
.
foregroundColor
(
ColorSet
.
BodyDescriptiion
.
color
)
...
@@ -61,6 +71,19 @@ struct MyChatContentView: View {
...
@@ -61,6 +71,19 @@ struct MyChatContentView: View {
}
}
.
padding
(
.
leading
,
80
)
.
padding
(
.
leading
,
80
)
}
}
func
viewerCnt
()
->
(
Int
,
Int
)
{
var
shipViewer
=
0
var
companyViewr
=
0
for
viewer
in
message
.
viewer
{
if
viewer
.
location
==
1
{
companyViewr
+=
1
}
else
{
shipViewer
+=
1
}
}
return
(
shipViewer
,
companyViewr
)
}
}
}
#Preview {
#Preview {
...
...
Seilassist/Sailassist/ContentView.swift
View file @
4292324a
...
@@ -25,7 +25,7 @@ struct ContentView: View {
...
@@ -25,7 +25,7 @@ struct ContentView: View {
if
loginViewModel
.
isLogin
{
if
loginViewModel
.
isLogin
{
guard
sceneDelegate
.
tabWindow
==
nil
else
{
return
}
guard
sceneDelegate
.
tabWindow
==
nil
else
{
return
}
sceneDelegate
.
addTabBar
(
selectedTabModel
)
sceneDelegate
.
addTabBar
(
selectedTabModel
)
selectedTabModel
.
activeTab
=
.
task
selectedTabModel
.
activeTab
=
.
map
}
}
}
}
.
fullScreenCover
(
isPresented
:
.
constant
(
!
loginViewModel
.
isLogin
),
onDismiss
:
{
.
fullScreenCover
(
isPresented
:
.
constant
(
!
loginViewModel
.
isLogin
),
onDismiss
:
{
...
@@ -34,7 +34,7 @@ struct ContentView: View {
...
@@ -34,7 +34,7 @@ struct ContentView: View {
return
return
}
}
sceneDelegate
.
addTabBar
(
selectedTabModel
)
sceneDelegate
.
addTabBar
(
selectedTabModel
)
selectedTabModel
.
activeTab
=
.
task
selectedTabModel
.
activeTab
=
.
map
},
content
:
{
},
content
:
{
LoginView
(
isLogin
:
$
loginViewModel
.
isLogin
)
LoginView
(
isLogin
:
$
loginViewModel
.
isLogin
)
.
environmentObject
(
selectedTabModel
)
.
environmentObject
(
selectedTabModel
)
...
...
Seilassist/Sailassist/Http/HttpRequestType.swift
View file @
4292324a
...
@@ -50,7 +50,7 @@ enum HttpRequestType : String {
...
@@ -50,7 +50,7 @@ enum HttpRequestType : String {
case
GetMessage
=
"https://ssv-qc-web.azurewebsites.net/api/chatdata/getmessages?shipId=XXXXX"
case
GetMessage
=
"https://ssv-qc-web.azurewebsites.net/api/chatdata/getmessages?shipId=XXXXX"
case
SignalR
=
"https://ssv-qc-web.azurewebsites.net/signalr/shore"
case
SignalR
=
"https://ssv-qc-web.azurewebsites.net/signalr/shore"
case
PushHistory
=
"https://ssv-qc-web.azurewebsites.net/api/sailassist/pushhistory/XXXXX"
case
PushHistory
=
"https://ssv-qc-web.azurewebsites.net/api/sailassist/pushhistory/XXXXX"
case
UploadImage
=
"https://ssv-qc-web.azur.net/api/chatdata/uploadimage"
case
UploadImage
=
"https://ssv-qc-web.azur
ewebsites
.net/api/chatdata/uploadimage"
case
ConnectionString
=
"Endpoint=sb://ssv-qc-notification.servicebus.windows.net/;SharedAccessKeyName=DefaultListenSharedAccessSignature;SharedAccessKey=qjI5K38IyGfh2arFherVgp5tNUBE2U4eVClgTEQip54="
case
ConnectionString
=
"Endpoint=sb://ssv-qc-notification.servicebus.windows.net/;SharedAccessKeyName=DefaultListenSharedAccessSignature;SharedAccessKey=qjI5K38IyGfh2arFherVgp5tNUBE2U4eVClgTEQip54="
case
HubName
=
"ssv-qc-sailassist-notification"
case
HubName
=
"ssv-qc-sailassist-notification"
case
storage
=
"https://tacmiquaritycheckstorage.z31.web.core.windows.net/"
case
storage
=
"https://tacmiquaritycheckstorage.z31.web.core.windows.net/"
...
...
Seilassist/Sailassist/Map/MonitoringRoute.swift
View file @
4292324a
...
@@ -67,6 +67,7 @@ class MonitoringRoute {
...
@@ -67,6 +67,7 @@ class MonitoringRoute {
}
}
}
}
case
.
failure
(
let
errorCode
):
case
.
failure
(
let
errorCode
):
print
(
debug
:
"serverError:
\(
errorCode
)
"
)
print
(
debug
:
errorCode
)
print
(
debug
:
errorCode
)
break
break
}
}
...
...
Seilassist/Sailassist/ServerSession/ServerSession.swift
View file @
4292324a
...
@@ -51,12 +51,15 @@ class ServerSession{
...
@@ -51,12 +51,15 @@ class ServerSession{
do
{
do
{
if
error
!=
nil
{
if
error
!=
nil
{
// print(debug: "clientError: \(error)")
throw
APIError
.
clientError
throw
APIError
.
clientError
}
}
guard
let
indata
=
data
,
let
inresponse
=
response
as?
HTTPURLResponse
else
{
guard
let
indata
=
data
,
let
inresponse
=
response
as?
HTTPURLResponse
else
{
throw
APIError
.
responseError
throw
APIError
.
responseError
}
}
if
inresponse
.
statusCode
!=
200
{
if
inresponse
.
statusCode
!=
200
{
// let statusCode = inresponse.statusCode
// print(debug: "serverError: \(statusCode)")
throw
APIError
.
serverError
throw
APIError
.
serverError
}
}
//Cookieを保存
//Cookieを保存
...
@@ -102,14 +105,15 @@ class ServerSession{
...
@@ -102,14 +105,15 @@ class ServerSession{
do
{
do
{
if
error
!=
nil
{
if
error
!=
nil
{
// print(debug: "clientError: \(error)")
throw
APIError
.
clientError
throw
APIError
.
clientError
}
}
guard
let
indata
=
data
,
let
inresponse
=
response
as?
HTTPURLResponse
else
{
guard
let
indata
=
data
,
let
inresponse
=
response
as?
HTTPURLResponse
else
{
throw
APIError
.
responseError
throw
APIError
.
responseError
}
}
if
inresponse
.
statusCode
!=
200
{
if
inresponse
.
statusCode
!=
200
{
let
statusCode
=
inresponse
.
statusCode
//
let statusCode = inresponse.statusCode
print
(
debug
:
"serverError:
\(
statusCode
)
"
)
//
print(debug: "serverError: \(statusCode)")
throw
APIError
.
serverError
throw
APIError
.
serverError
}
}
//Cookieを保存
//Cookieを保存
...
@@ -146,12 +150,15 @@ class ServerSession{
...
@@ -146,12 +150,15 @@ class ServerSession{
do
{
do
{
if
error
!=
nil
{
if
error
!=
nil
{
// print(debug: "clientError: \(error)")
throw
APIError
.
clientError
throw
APIError
.
clientError
}
}
guard
let
indata
=
data
,
let
inresponse
=
response
as?
HTTPURLResponse
else
{
guard
let
indata
=
data
,
let
inresponse
=
response
as?
HTTPURLResponse
else
{
throw
APIError
.
responseError
throw
APIError
.
responseError
}
}
if
inresponse
.
statusCode
!=
200
{
if
inresponse
.
statusCode
!=
200
{
// let statusCode = inresponse.statusCode
// print(debug: "serverError: \(statusCode)")
throw
APIError
.
serverError
throw
APIError
.
serverError
}
}
DispatchQueue
.
main
.
async
{
DispatchQueue
.
main
.
async
{
...
...
Seilassist/Sailassist/Tab/MainTabView.swift
View file @
4292324a
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
import
SwiftUI
import
SwiftUI
enum
Tab
:
String
,
CaseIterable
{
enum
Tab
:
String
,
CaseIterable
{
case
task
=
"tab_task
"
case
map
=
"tab_map
"
case
chat
=
"tab_chat"
case
chat
=
"tab_chat"
case
alert
=
"tab_notification"
case
alert
=
"tab_notification"
case
menu
=
"tab_menu"
case
menu
=
"tab_menu"
...
@@ -35,7 +35,7 @@ struct MainTabView: View {
...
@@ -35,7 +35,7 @@ struct MainTabView: View {
var
body
:
some
View
{
var
body
:
some
View
{
if
UIDevice
.
current
.
userInterfaceIdiom
==
.
phone
{
if
UIDevice
.
current
.
userInterfaceIdiom
==
.
phone
{
@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
==
.
map
TabView
(
selection
:
$
selectedTabModel
.
activeTab
){
TabView
(
selection
:
$
selectedTabModel
.
activeTab
){
ChatView
()
ChatView
()
...
@@ -46,7 +46,7 @@ struct MainTabView: View {
...
@@ -46,7 +46,7 @@ struct MainTabView: View {
MapInformation
()
MapInformation
()
}
}
.
ignoresSafeArea
()
.
ignoresSafeArea
()
.
tag
(
Tab
.
task
)
.
tag
(
Tab
.
map
)
NotificationView
()
NotificationView
()
.
tag
(
Tab
.
alert
)
.
tag
(
Tab
.
alert
)
...
@@ -77,7 +77,7 @@ struct MainTabView: View {
...
@@ -77,7 +77,7 @@ struct MainTabView: View {
MapInformation
()
MapInformation
()
}
}
.
ignoresSafeArea
()
.
ignoresSafeArea
()
.
tag
(
Tab
.
task
)
.
tag
(
Tab
.
map
)
NotificationView
()
NotificationView
()
.
tag
(
Tab
.
alert
)
.
tag
(
Tab
.
alert
)
...
@@ -118,7 +118,7 @@ struct CustomTabBar: View {
...
@@ -118,7 +118,7 @@ struct CustomTabBar: View {
ForEach
(
Tab
.
allCases
,
id
:
\
.
rawValue
)
{
tab
in
ForEach
(
Tab
.
allCases
,
id
:
\
.
rawValue
)
{
tab
in
Button
(
action
:
{
Button
(
action
:
{
selectedTabModel
.
activeTab
=
tab
selectedTabModel
.
activeTab
=
tab
if
tab
==
.
task
{
if
tab
==
.
map
{
selectedTabModel
.
isPoppver
.
toggle
()
selectedTabModel
.
isPoppver
.
toggle
()
location
.
focusOwnShip
=
true
location
.
focusOwnShip
=
true
}
else
if
tab
==
.
chat
{
}
else
if
tab
==
.
chat
{
...
@@ -147,7 +147,7 @@ struct CustomTabBar: View {
...
@@ -147,7 +147,7 @@ struct CustomTabBar: View {
}
}
//チャットTab上の既読マーク
//チャットTab上の既読マーク
if
tab
==
Tab
.
task
{
if
tab
==
Tab
.
map
{
if
pushHistory
.
viewCnt
!=
0
{
if
pushHistory
.
viewCnt
!=
0
{
Rectangle
()
Rectangle
()
.
foregroundColor
(
.
red
)
.
foregroundColor
(
.
red
)
...
...
Seilassist/Sailassist/Tab/ViewModel/SelectedTabModel.swift
View file @
4292324a
...
@@ -9,7 +9,7 @@ import SwiftUI
...
@@ -9,7 +9,7 @@ import SwiftUI
//@Observable
//@Observable
class
SelectedTabModel
:
ObservableObject
{
class
SelectedTabModel
:
ObservableObject
{
@Published
var
activeTab
:
Tab
=
.
task
@Published
var
activeTab
:
Tab
=
.
map
@Published
var
isShowChangeEmrMode
:
Bool
=
false
@Published
var
isShowChangeEmrMode
:
Bool
=
false
@Published
var
isLocationAlert
:
Bool
=
false
@Published
var
isLocationAlert
:
Bool
=
false
@Published
var
isPoppver
:
Bool
=
false
@Published
var
isPoppver
:
Bool
=
false
...
...
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