Commit cc4862e7 authored by sugita mamoru's avatar sugita mamoru

チャット関連一部実装、バックグラウンドモード追加

parent ae88259c
...@@ -44,6 +44,9 @@ ...@@ -44,6 +44,9 @@
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 */; };
02A1DE2F2AFB4AA0005BCF55 /* ChatInputView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02A1DE2E2AFB4AA0005BCF55 /* ChatInputView.swift */; };
02A1DE312AFB61D8005BCF55 /* MyChatContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02A1DE302AFB61D8005BCF55 /* MyChatContentView.swift */; };
02A1DE332AFB654A005BCF55 /* CustomCornerRadius.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02A1DE322AFB654A005BCF55 /* CustomCornerRadius.swift */; };
02CD068F2AE6535F005F8D8F /* MapSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02CD068E2AE6535F005F8D8F /* MapSource.swift */; }; 02CD068F2AE6535F005F8D8F /* MapSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02CD068E2AE6535F005F8D8F /* MapSource.swift */; };
02CD06912AE6536B005F8D8F /* LayerEnum.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02CD06902AE6536B005F8D8F /* LayerEnum.swift */; }; 02CD06912AE6536B005F8D8F /* LayerEnum.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02CD06902AE6536B005F8D8F /* LayerEnum.swift */; };
02CD06932AE88970005F8D8F /* ServerSession.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02CD06922AE88970005F8D8F /* ServerSession.swift */; }; 02CD06932AE88970005F8D8F /* ServerSession.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02CD06922AE88970005F8D8F /* ServerSession.swift */; };
...@@ -135,6 +138,9 @@ ...@@ -135,6 +138,9 @@
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; };
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; };
02A1DE322AFB654A005BCF55 /* CustomCornerRadius.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = CustomCornerRadius.swift; path = Sailassist/Chat/View/CustomCornerRadius.swift; sourceTree = SOURCE_ROOT; };
02CD068E2AE6535F005F8D8F /* MapSource.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MapSource.swift; sourceTree = "<group>"; }; 02CD068E2AE6535F005F8D8F /* MapSource.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MapSource.swift; sourceTree = "<group>"; };
02CD06902AE6536B005F8D8F /* LayerEnum.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LayerEnum.swift; sourceTree = "<group>"; }; 02CD06902AE6536B005F8D8F /* LayerEnum.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LayerEnum.swift; sourceTree = "<group>"; };
02CD06922AE88970005F8D8F /* ServerSession.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ServerSession.swift; sourceTree = "<group>"; }; 02CD06922AE88970005F8D8F /* ServerSession.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ServerSession.swift; sourceTree = "<group>"; };
...@@ -333,6 +339,7 @@ ...@@ -333,6 +339,7 @@
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
020B98622ADD14E40029DE4C /* ChatView.swift */, 020B98622ADD14E40029DE4C /* ChatView.swift */,
02A1DE2D2AFB497B005BCF55 /* View */,
); );
path = Chat; path = Chat;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -408,6 +415,16 @@ ...@@ -408,6 +415,16 @@
path = ServerSession; path = ServerSession;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
02A1DE2D2AFB497B005BCF55 /* View */ = {
isa = PBXGroup;
children = (
02A1DE2E2AFB4AA0005BCF55 /* ChatInputView.swift */,
02A1DE302AFB61D8005BCF55 /* MyChatContentView.swift */,
02A1DE322AFB654A005BCF55 /* CustomCornerRadius.swift */,
);
path = View;
sourceTree = "<group>";
};
02CE4D7D2ADE4297002E79BC /* View */ = { 02CE4D7D2ADE4297002E79BC /* View */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
...@@ -610,6 +627,7 @@ ...@@ -610,6 +627,7 @@
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
D52D21412AEDE18F00324D58 /* EcaCoordinatesTable.swift in Sources */, D52D21412AEDE18F00324D58 /* EcaCoordinatesTable.swift in Sources */,
02A1DE2F2AFB4AA0005BCF55 /* ChatInputView.swift in Sources */,
02CD06912AE6536B005F8D8F /* LayerEnum.swift in Sources */, 02CD06912AE6536B005F8D8F /* LayerEnum.swift in Sources */,
020B98532AD919180029DE4C /* LoginTypeSelectView.swift in Sources */, 020B98532AD919180029DE4C /* LoginTypeSelectView.swift in Sources */,
D52D213F2AEBB7D700324D58 /* RegisteredEca.swift in Sources */, D52D213F2AEBB7D700324D58 /* RegisteredEca.swift in Sources */,
...@@ -632,8 +650,10 @@ ...@@ -632,8 +650,10 @@
020B98142AD8C3140029DE4C /* SailassistApp.swift in Sources */, 020B98142AD8C3140029DE4C /* SailassistApp.swift in Sources */,
02CE4D852ADF6295002E79BC /* TaskSwitchingMenuView.swift in Sources */, 02CE4D852ADF6295002E79BC /* TaskSwitchingMenuView.swift in Sources */,
020B984B2AD915810029DE4C /* QRReadView.swift in Sources */, 020B984B2AD915810029DE4C /* QRReadView.swift in Sources */,
02A1DE332AFB654A005BCF55 /* CustomCornerRadius.swift in Sources */,
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 */,
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 */,
......
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"filename" : "send.svg",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
<?xml version="1.0" encoding="UTF-8"?>
<svg id="_レイヤー_2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#21BDD1">
<defs>
<style>.cls-1,.cls-2{stroke-width:0px;}.cls-2{fill:none;opacity:.1;}</style>
</defs>
<g id="_レイヤー_1-2">
<path class="cls-1"
d="m.65,23.97l22.96-11.67c.26-.12.26-.48,0-.59L.65.03C.4-.08.13.15.21.42l2.67,9.72c.03.11.12.19.23.22l7.03,1.33c.32.09.32.54,0,.63l-7.04,1.56c-.11.03-.19.11-.22.22L.21,23.58c-.08.27.19.5.45.39Z" />
<rect class="cls-2" y="0" width="24" height="24" />
</g>
</svg>
\ No newline at end of file
...@@ -24,6 +24,8 @@ struct ChatView: View { ...@@ -24,6 +24,8 @@ struct ChatView: View {
isEmargency.toggle() isEmargency.toggle()
} }
} }
ChatInputView()
} }
} }
} }
......
//
// ChatInputView.swift
// Sailassist
//
// Created by Mamoru Sugita on 2023/11/08.
//
import SwiftUI
struct ChatInputView: View {
@EnvironmentObject private var sceneDelegate: SceneDelegate
@State var inputText = ""
@FocusState var isKeyboard : Bool
var body: some View {
VStack{
Spacer()
.onTapGesture {
isKeyboard = false
}
HStack(spacing: 11){
TextField("", text: $inputText, onEditingChanged: { isEdit in
sceneDelegate.tabWindow?.isHidden = isEdit
})
.focused($isKeyboard)
.foregroundColor(.black)
.padding(10)
.background(.white)
.cornerRadius(10)
.padding(.vertical, 10)
.padding(.leading, 20)
Button{
isKeyboard = false
} label: {
Image("send")
.resizable()
.frame(width: 24, height: 24)
.padding(10)
}
.padding(.vertical, 6)
.padding(.trailing, 11)
}
.background(ColorSet.BackgroundPrimary.color)
}
}
}
#Preview {
ChatInputView()
.environmentObject(SceneDelegate())
}
//
// CustomCornerRadius.swift
// Sailassist
//
// Created by Mamoru Sugita on 2023/11/08.
//
import Foundation
import SwiftUI
struct RoundedCorners: View {
var color: Color = .clear
var tl: CGFloat = 0.0
var tr: CGFloat = 0.0
var bl: CGFloat = 0.0
var br: CGFloat = 0.0
var body: some View {
GeometryReader { geometry in
Path { path in
let w = geometry.size.width
let h = geometry.size.height
let tr = min(min(tr, h/2), w/2)
let tl = min(min(tl, h/2), w/2)
let bl = min(min(bl, h/2), w/2)
let br = min(min(br, h/2), w/2)
path.move(to: CGPoint(x: w/2.0, y: 0))
path.addLine(to: CGPoint(x: w-tr, y: 0))
path.addArc(center: CGPoint(x: w-tr, y: tr), radius: tr, startAngle: Angle(degrees: -90), endAngle: Angle(degrees: 0), clockwise: false)
path.addLine(to: CGPoint(x: w, y: h-br))
path.addArc(center: CGPoint(x: w-br, y: h-br), radius: br, startAngle: Angle(degrees: 0), endAngle: Angle(degrees: 90), clockwise: false)
path.addLine(to: CGPoint(x: bl, y: h))
path.addArc(center: CGPoint(x: bl, y: h-bl), radius: bl, startAngle: Angle(degrees: 90), endAngle: Angle(degrees: 180), clockwise: false)
path.addLine(to: CGPoint(x: 0, y: tl))
path.addArc(center: CGPoint(x: tl, y: tl), radius: tl, startAngle: Angle(degrees: 180), endAngle: Angle(degrees: 270), clockwise: false)
}
.fill(color)
}
}
}
enum Corners{
case tl
case tr
}
//struct CustomCornerRadiusModifier: ViewModifier {
// let cornerRadius: CGFloat
// let maskedCorners: [Corners]
//
// func body(content: Content) -> some View {
// content.mask(PartlyRoundedCornerView(cornerRadius: self.cornerRadius,
// maskedCorners: self.maskedCorners))}
//}
//
// MyChatContentView.swift
// Sailassist
//
// Created by Mamoru Sugita on 2023/11/08.
//
import SwiftUI
struct MyChatContentView: View {
var body: some View {
VStack {
Text("Hello, World!")
.padding()
.background(.black)
.cornerRadius(10, antialiased: false)
}
}
}
#Preview {
MyChatContentView()
}
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
import SwiftUI import SwiftUI
struct ContentView: View { struct ContentView: View {
@State var isLogin = false//ContentView.LoginCheck() @State var isLogin = true//ContentView.LoginCheck()
@EnvironmentObject private var sceneDelegate: SceneDelegate @EnvironmentObject private var sceneDelegate: SceneDelegate
var selectedTabModel = SelectedTabModel() var selectedTabModel = SelectedTabModel()
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment