Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
galaxy-iOS
Project
Project
Details
Activity
Releases
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
mobile-group
galaxy-iOS
Commits
1fb75a3e
Commit
1fb75a3e
authored
Dec 13, 2024
by
Steven杜宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
// AI
parent
f3f52283
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
42 deletions
+20
-42
YHAutoTextView.swift
galaxy/galaxy/Classes/Base/V/YHAutoTextView.swift
+2
-0
YHAIMainChatViewController.swift
...s/AI/AI-Dialogue(AI对话)/C/YHAIMainChatViewController.swift
+2
-1
YHAIServiceListViewController.swift
...I/AI-Dialogue(AI对话)/C/YHAIServiceListViewController.swift
+7
-40
YHAITabViewController.swift
...odules/AI/AI-Dialogue(AI对话)/C/YHAITabViewController.swift
+2
-0
YHAITextInputView.swift
...es/Modules/AI/AI-Dialogue(AI对话)/V/YHAITextInputView.swift
+7
-1
No files found.
galaxy/galaxy/Classes/Base/V/YHAutoTextView.swift
View file @
1fb75a3e
...
...
@@ -78,11 +78,13 @@ class YHAutoTextView: UITextView, UITextViewDelegate {
height
=
maxHeight
self
.
snp
.
updateConstraints
{
make
in
make
.
top
.
equalTo
(
11
)
make
.
height
.
equalTo
(
height
)
make
.
bottom
.
equalTo
(
-
11
)
}
}
else
{
self
.
snp
.
updateConstraints
{
make
in
make
.
top
.
equalTo
(
11
-
Self
.
verticalGap
)
make
.
height
.
equalTo
(
height
)
make
.
bottom
.
equalTo
(
-
(
11
-
Self
.
verticalGap
))
}
}
...
...
galaxy/galaxy/Classes/Modules/AI/AI-Dialogue(AI对话)/C/YHAIMainChatViewController.swift
View file @
1fb75a3e
...
...
@@ -47,6 +47,7 @@ class YHAIMainChatViewController: YHBaseViewController {
lazy
var
bottomInputView
:
YHAITextInputView
=
{
let
v
=
YHAITextInputView
(
frame
:
.
zero
)
v
.
backgroundColor
=
.
clear
v
.
sendBlock
=
{
[
weak
self
]
text
in
guard
let
self
=
self
else
{
return
}
...
...
@@ -82,7 +83,7 @@ class YHAIMainChatViewController: YHBaseViewController {
tableView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
right
.
equalTo
(
0
)
make
.
top
.
equalTo
(
0
)
make
.
bottom
.
equalTo
(
-
6
4
-
k_Height_safeAreaInsetsBottom
())
make
.
bottom
.
equalTo
(
-
6
6
-
k_Height_safeAreaInsetsBottom
())
}
bottomInputView
.
snp
.
makeConstraints
{
make
in
...
...
galaxy/galaxy/Classes/Modules/AI/AI-Dialogue(AI对话)/C/YHAIServiceListViewController.swift
View file @
1fb75a3e
...
...
@@ -39,43 +39,13 @@ class YHAIServiceListViewController: YHBaseViewController {
return
collectView
}()
lazy
var
bottomInputView
:
UIView
=
{
let
v
=
UIView
()
let
whiteView
=
UIView
()
whiteView
.
backgroundColor
=
.
white
whiteView
.
layer
.
cornerRadius
=
12.0
v
.
addSubview
(
whiteView
)
let
label
=
UILabel
()
label
.
font
=
.
PFSC_R
(
ofSize
:
14
)
label
.
text
=
"有什么问题尽管问我"
label
.
textColor
=
.
init
(
hex
:
0xB3C8E9
)
whiteView
.
addSubview
(
label
)
let
sendImgV
=
UIImageView
(
image
:
UIImage
(
named
:
"ai_chat_send_gray"
))
whiteView
.
addSubview
(
sendImgV
)
lazy
var
bottomInputView
:
YHAITextInputView
=
{
let
v
=
YHAITextInputView
(
frame
:
.
zero
)
v
.
backgroundColor
=
.
clear
v
.
disable
=
true
let
btn
=
UIButton
()
btn
.
addTarget
(
self
,
action
:
#selector(
didInputButtonClicked
)
,
for
:
.
touchUpInside
)
whiteView
.
addSubview
(
btn
)
whiteView
.
snp
.
makeConstraints
{
make
in
make
.
edges
.
equalToSuperview
()
}
label
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
16
)
make
.
height
.
equalTo
(
20
)
make
.
centerY
.
equalToSuperview
()
}
sendImgV
.
snp
.
makeConstraints
{
make
in
make
.
right
.
equalTo
(
-
16
)
make
.
width
.
height
.
equalTo
(
24
)
make
.
centerY
.
equalToSuperview
()
}
v
.
addSubview
(
btn
)
btn
.
snp
.
makeConstraints
{
make
in
make
.
edges
.
equalToSuperview
()
}
...
...
@@ -102,14 +72,11 @@ class YHAIServiceListViewController: YHBaseViewController {
make
.
left
.
equalTo
(
16
)
make
.
right
.
equalTo
(
-
16
)
make
.
top
.
equalToSuperview
()
make
.
bottom
.
equalTo
(
bottomInputView
.
snp
.
top
)
.
offset
(
-
8
)
}
bottomInputView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
20
)
make
.
right
.
equalTo
(
-
20
)
make
.
height
.
equalTo
(
46
)
make
.
bottom
.
equalTo
(
-
10
-
k_Height_safeAreaInsetsBottom
())
make
.
top
.
equalTo
(
collectionView
.
snp
.
bottom
)
.
offset
(
8
)
make
.
left
.
right
.
bottom
.
equalToSuperview
()
}
}
}
...
...
galaxy/galaxy/Classes/Modules/AI/AI-Dialogue(AI对话)/C/YHAITabViewController.swift
View file @
1fb75a3e
...
...
@@ -241,11 +241,13 @@ extension YHAITabViewController: JXSegmentedViewDelegate {
bgImgView
.
isHidden
=
false
headerImgView
.
isHidden
=
true
cleanBtn
.
isHidden
=
false
mainChatVC
.
bottomInputView
.
backgroundColor
=
mainChatVC
.
bottomInputView
.
bgColor
}
else
{
// 港小宝
bgImgView
.
isHidden
=
true
headerImgView
.
isHidden
=
false
cleanBtn
.
isHidden
=
true
mainChatVC
.
bottomInputView
.
backgroundColor
=
.
clear
}
}
}
...
...
galaxy/galaxy/Classes/Modules/AI/AI-Dialogue(AI对话)/V/YHAITextInputView.swift
View file @
1fb75a3e
...
...
@@ -18,9 +18,11 @@ enum YHAITextInputStatus: Int {
class
YHAITextInputView
:
UIView
{
let
bgColor
=
UIColor
.
init
(
hex
:
0xF8FCFF
)
var
sendBlock
:
((
String
)
->
())?
var
stopSendBlock
:
(()
->
())?
var
keyBoardChangeBlock
:
((
_
isShow
:
Bool
)
->
())?
var
disable
:
Bool
=
false
var
status
:
YHAITextInputStatus
=
.
enableSend
{
didSet
{
...
...
@@ -145,7 +147,7 @@ class YHAITextInputView: UIView {
func
createUI
()
{
self
.
backgroundColor
=
UIColor
.
init
(
hex
:
0xF8FCFF
)
self
.
backgroundColor
=
self
.
bgColor
self
.
addSubview
(
whiteView
)
whiteView
.
addSubview
(
shadowView
)
whiteView
.
addSubview
(
contentView
)
...
...
@@ -183,6 +185,7 @@ class YHAITextInputView: UIView {
textView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
16
)
make
.
top
.
equalTo
(
11
-
YHAutoTextView
.
verticalGap
)
make
.
height
.
equalTo
(
30
)
make
.
bottom
.
equalTo
(
-
(
11
-
YHAutoTextView
.
verticalGap
))
make
.
right
.
equalTo
(
sendBtn
.
snp
.
left
)
.
offset
(
-
5
)
}
...
...
@@ -191,6 +194,9 @@ class YHAITextInputView: UIView {
@objc
func
handleKeyboardNotification
(
_
notification
:
Notification
)
{
if
disable
{
return
}
if
notification
.
userInfo
!=
nil
{
guard
let
keyboardFrame
=
(
notification
.
userInfo
?[
UIResponder
.
keyboardFrameEndUserInfoKey
]
as
AnyObject
)
.
cgRectValue
else
{
return
}
...
...
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