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
f7c1e69c
Commit
f7c1e69c
authored
Nov 24, 2023
by
sugita mamoru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
利用規約作成、フォーカス作成
parent
460c8567
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
61 additions
and
1 deletion
+61
-1
View+Extensions.swift
Seilassist/Sailassist/Extensions/View+Extensions.swift
+4
-0
HttpRequestType.swift
Seilassist/Sailassist/Http/HttpRequestType.swift
+3
-0
MapRepresentable.swift
Seilassist/Sailassist/Map/MapRepresentable.swift
+11
-0
EcaListView.swift
Seilassist/Sailassist/Map/Task/View/EcaListView.swift
+3
-0
Preferences.swift
Seilassist/Sailassist/Preferences/Preferences.swift
+13
-0
PreferencesKey.swift
Seilassist/Sailassist/Preferences/PreferencesKey.swift
+2
-0
SailassistApp.swift
Seilassist/Sailassist/SailassistApp.swift
+24
-1
SharingData.swift
Seilassist/Sailassist/SharingData/SharingData.swift
+1
-0
No files found.
Seilassist/Sailassist/Extensions/View+Extensions.swift
View file @
f7c1e69c
...
...
@@ -13,4 +13,8 @@ extension View{
self
.
toolbar
(
.
hidden
,
for
:
.
tabBar
)
}
func
border
(
_
color
:
Color
,
width
:
CGFloat
,
cornerRadius
:
CGFloat
)
->
some
View
{
overlay
(
RoundedRectangle
(
cornerRadius
:
cornerRadius
)
.
stroke
(
color
,
lineWidth
:
width
))
}
}
Seilassist/Sailassist/Http/HttpRequestType.swift
View file @
f7c1e69c
...
...
@@ -10,6 +10,7 @@ import Foundation
// TODO: サイトのアドレスを変更
#if CANARY
enum
HttpRequestType
:
String
{
case
Terms
=
"https://tacmistorage.blob.core.windows.net/$web/terms/terms.mobile.html?sv=2021-10-04&st=2023-11-22T06%3A26%3A32Z&se=2023-11-23T06%3A26%3A32Z&sr=b&sp=r&sig=wS6kbbT5SvNVTkRsnRk%2BiDceZAsQ3Y56vrqTUO1X50E%3D"
case
RegisterLogin
=
"https://ssv-canary-web.azurewebsites.net/sailassistlogin"
case
SitePolicy
=
"https://ssv-canary-web.azurewebsites.net/sitepolicy"
case
CookiePolicy
=
"https://ssv-canary-web.azurewebsites.net/cookiepolicy"
...
...
@@ -26,6 +27,7 @@ enum HttpRequestType : String {
}
#elseif QC
enum
HttpRequestType
:
String
{
case
Terms
=
"https://tacmistorage.blob.core.windows.net/$web/terms/terms.mobile.html?sv=2021-10-04&st=2023-11-22T06%3A26%3A32Z&se=2023-11-23T06%3A26%3A32Z&sr=b&sp=r&sig=wS6kbbT5SvNVTkRsnRk%2BiDceZAsQ3Y56vrqTUO1X50E%3D"
case
RegisterLogin
=
"https://ssv-qc-web.azurewebsites.net/sailassistlogin"
case
SitePolicy
=
"https://ssv-qc-web.azurewebsites.net/sitepolicy"
case
CookiePolicy
=
"https://ssv-qc-web.azurewebsites.net/cookiepolicy"
...
...
@@ -43,6 +45,7 @@ enum HttpRequestType : String {
#else
//MARK: 運用サーバー用
enum
HttpRequestType
:
String
{
case
Terms
=
"https://tacmistorage.blob.core.windows.net/$web/terms/terms.mobile.html?sv=2021-10-04&st=2023-11-22T06%3A26%3A32Z&se=2023-11-23T06%3A26%3A32Z&sr=b&sp=r&sig=wS6kbbT5SvNVTkRsnRk%2BiDceZAsQ3Y56vrqTUO1X50E%3D"
case
RegisterLogin
=
"https://ssv.jmarinecloud.com/sailassistlogin"
case
SitePolicy
=
"https://ssv.jmarinecloud.com/sitepolicy"
case
CookiePolicy
=
"https://ssv.jmarinecloud.com/cookiepolicy"
...
...
Seilassist/Sailassist/Map/MapRepresentable.swift
View file @
f7c1e69c
...
...
@@ -25,6 +25,10 @@ struct MapRepresentable: UIViewControllerRepresentable{
mapVC
.
updateEcaLine
(
line
:
ecaArea
.
points
)
}
if
let
foucusEcaName
=
ecaData
.
foucusEca
,
let
foucusEca
=
ecaData
.
ecaArea
[
foucusEcaName
]{
mapVC
.
updateCamera
(
location
:
foucusEca
.
points
.
first
)
}
if
let
mylocation
=
my
.
location
{
mapVC
.
updateOwnShip
(
location
:
mylocation
,
bearing
:
my
.
heading
)
...
...
@@ -145,6 +149,7 @@ class MapViewController : UIViewController{
try
?
mapView
.
mapboxMap
.
style
.
addLayer
(
ecaSwLabelLayer
)
}
///自船
func
updateOwnShip
(
location
:
CLLocationCoordinate2D
,
bearing
:
Double
){
do
{
var
geoJSON
=
Feature
(
geometry
:
Point
(
location
))
...
...
@@ -154,6 +159,12 @@ class MapViewController : UIViewController{
}
catch
{}
}
///カメラ
func
updateCamera
(
location
:
CLLocationCoordinate2D
?){
self
.
mapView
.
camera
.
ease
(
to
:
CameraOptions
(
center
:
location
),
duration
:
1
)
SharingData
.
eca
.
foucusEca
=
nil
}
///Ecaの線3本
func
updateEcaSwitchingLine
(
center
:
CLLocationCoordinate2D
,
notice
:
Float
,
start
:
Float
,
finish
:
Float
){
do
{
var
switchingLines
:
[
Feature
]
=
[]
...
...
Seilassist/Sailassist/Map/Task/View/EcaListView.swift
View file @
f7c1e69c
...
...
@@ -16,6 +16,9 @@ struct EcaListView: View {
Text
(
eca
.
name
)
.
font
(
FontStyle
.
DefaultText
.
font
)
.
foregroundColor
(
ColorSet
.
Body
.
color
)
.
onTapGesture
{
ecaData
.
foucusEca
=
eca
.
name
}
Spacer
()
if
!
eca
.
isEnable
{
Button
(
action
:
{
...
...
Seilassist/Sailassist/Preferences/Preferences.swift
View file @
f7c1e69c
...
...
@@ -22,6 +22,19 @@ class Preferences{
lastLoginDate
=
DateTextLib
.
UnixTime2Date
(
newValue
??
0
)
}
}
@AppStorage(PreferencesKey.TypeInt.TermsAgreeDate.rawValue)
static
var
termsAgreeDate
:
Date
?
static
var
termsAgreeDate_Int64
:
Int64
?{
get
{
if
let
date
=
termsAgreeDate
{
DateTextLib
.
Date2UnixTime
(
date
:
date
)
}
else
{
nil
}
}
set
{
termsAgreeDate
=
DateTextLib
.
UnixTime2Date
(
newValue
??
0
)
}
}
@AppStorage(wrappedValue:"", PreferencesKey.TypeString.ShipId.rawValue)
static
var
ShipId
:
String
@AppStorage(wrappedValue:"", PreferencesKey.TypeString.ShipPassword.rawValue)
static
var
ShipPassword
:
String
...
...
Seilassist/Sailassist/Preferences/PreferencesKey.swift
View file @
f7c1e69c
...
...
@@ -22,6 +22,8 @@ class PreferencesKey{
case
LocationType
case
AppStartUsingDate
case
LastLoginDate
case
TermsAgreeDate
}
enum
TypeURL
:
String
{
...
...
Seilassist/Sailassist/SailassistApp.swift
View file @
f7c1e69c
...
...
@@ -13,9 +13,32 @@ import WindowsAzureMessaging
@main
struct
SailassistApp
:
App
{
@UIApplicationDelegateAdaptor(AppDelegate.self)
private
var
appDelegate
@State
var
isAgree
=
Preferences
.
termsAgreeDate
!=
nil
var
body
:
some
Scene
{
WindowGroup
{
ContentView
()
if
isAgree
{
ContentView
()
}
else
{
VStack
(
spacing
:
0
){
WebView
(
isLoading
:
.
constant
(
false
),
url
:
HttpRequestType
.
Terms
.
rawValue
)
Button
(
action
:
{
Preferences
.
termsAgreeDate_Int64
=
DateTextLib
.
Date2UnixTime
(
date
:
Date
())
isAgree
=
true
},
label
:
{
Text
(
"Accept"
)
.
frame
(
maxWidth
:
.
infinity
)
.
padding
(
.
vertical
,
10
)
.
border
(
ColorSet
.
LineColor04
.
color
,
width
:
1
,
cornerRadius
:
5
)
})
.
padding
()
.
background
(
ColorSet
.
BackgroundPrimary
.
color
)
}
.
preferredColorScheme
(
.
dark
)
}
}
}
}
...
...
Seilassist/Sailassist/SharingData/SharingData.swift
View file @
f7c1e69c
...
...
@@ -103,6 +103,7 @@ class SharingData{
static
var
eca
=
Eca
()
class
Eca
:
ObservableObject
{
@Published
var
ecaArea
:
Dictionary
<
String
,
RegisteredEca
>
=
[:]
@Published
var
foucusEca
:
String
?
=
nil
func
editEcaArea
(
key
:
String
,
value
:
RegisteredEca
){
ecaArea
.
updateValue
(
value
,
forKey
:
key
)
...
...
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