Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
N
Neos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
love_飞影
Neos
Commits
aba65cb5
Commit
aba65cb5
authored
Mar 04, 2023
by
Chunchi Che
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add sendBox.tsx
parent
d7b95792
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
64 additions
and
17 deletions
+64
-17
src/ui/Duel/main.tsx
src/ui/Duel/main.tsx
+14
-1
src/ui/Duel/sendBox.tsx
src/ui/Duel/sendBox.tsx
+30
-0
src/ui/Duel/timeLine.tsx
src/ui/Duel/timeLine.tsx
+20
-16
No files found.
src/ui/Duel/main.tsx
View file @
aba65cb5
...
...
@@ -23,6 +23,8 @@ import NeosLayout from "./layout";
import
{
initStrings
}
from
"
../../api/strings
"
;
import
NeosConfig
from
"
../../../neos.config.json
"
;
import
DuelTimeLine
from
"
./timeLine
"
;
import
{
Row
}
from
"
antd
"
;
import
SendBox
from
"
./sendBox
"
;
// Ref: https://github.com/brianzinn/react-babylonjs/issues/126
const
NeosDuel
=
()
=>
{
...
...
@@ -44,7 +46,7 @@ const NeosDuel = () => {
return
(
<>
<
NeosLayout
sider=
{
<
DuelTimeLine
/>
}
sider=
{
<
NeosSider
/>
}
header=
{
<
div
>
header
</
div
>
}
content=
{
<
NeosCanvas
/>
}
footer=
{
<
div
>
footer
</
div
>
}
...
...
@@ -61,6 +63,17 @@ const NeosDuel = () => {
);
};
const
NeosSider
=
()
=>
(
<
div
>
<
Row
>
<
DuelTimeLine
/>
</
Row
>
<
Row
align=
"bottom"
>
<
SendBox
/>
</
Row
>
</
div
>
);
const
NeosCanvas
=
()
=>
(
<
ReactReduxContext
.
Consumer
>
{
({
store
})
=>
(
...
...
src/ui/Duel/sendBox.tsx
0 → 100644
View file @
aba65cb5
import
React
,
{
useState
}
from
"
react
"
;
import
{
Input
,
Button
,
Row
}
from
"
antd
"
;
import
{
SendOutlined
}
from
"
@ant-design/icons
"
;
const
SendBox
=
()
=>
{
const
[
content
,
setContent
]
=
useState
(
""
);
return
(
<>
<
Row
>
<
Input
.
TextArea
placeholder=
"Message to sent..."
autoSize
value=
{
content
}
onChange=
{
(
e
)
=>
{
setContent
(
e
.
target
.
value
);
}
}
/>
</
Row
>
<
Row
>
<
Button
icon=
{
<
SendOutlined
/>
}
onClick=
{
()
=>
{}
}
disabled=
{
!
content
}
/>
</
Row
>
</>
);
};
export
default
SendBox
;
src/ui/Duel/timeLine.tsx
View file @
aba65cb5
...
...
@@ -2,21 +2,25 @@ import React from "react";
import
{
Timeline
}
from
"
antd
"
;
import
{
UserOutlined
,
SettingOutlined
}
from
"
@ant-design/icons
"
;
const
DuelTimeLine
=
()
=>
<
Timeline
items=
{
[
{
dot
:
<
UserOutlined
/>,
children
:
"
对手消息
"
,
color
:
"
red
"
},
{
dot
:
<
UserOutlined
/>,
children
:
"
自己消息
"
,
color
:
"
green
"
},
{
dot
:
<
SettingOutlined
/>,
children
:
'
系统消息
'
,
},
]
}
/>;
const
DuelTimeLine
=
()
=>
(
<
Timeline
items=
{
[
{
dot
:
<
UserOutlined
/>,
children
:
"
对手消息
"
,
color
:
"
red
"
,
},
{
dot
:
<
UserOutlined
/>,
children
:
"
自己消息
"
,
color
:
"
green
"
,
},
{
dot
:
<
SettingOutlined
/>,
children
:
"
系统消息
"
,
},
]
}
/>
);
export
default
DuelTimeLine
;
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