Add statistics panel
This commit is contained in:
parent
fcbe646b67
commit
ce99b17fcb
@ -62,6 +62,8 @@ const EN_US = {
|
||||
"Panel.Info.Behavior.Clip.Player": "Pre render recorded data",
|
||||
"Panel.Title.Behavior.Clip.Details": "Clip",
|
||||
"Panel.Info.Behavior.Clip.Details": "Edit view clip attributes",
|
||||
"Panel.Info.Statistics": "View statistics",
|
||||
"Panel.Title.Statistics": "Statistics",
|
||||
"Panel.Info.Behavior.Clip.Time.Formate": "{current} / {all} / {fps}fps",
|
||||
"Panel.Info.Behavior.Clip.Record.Formate": "Record: {time}",
|
||||
"Panel.Info.Behavior.Clip.Uname.Clip": "Waiting for recording...",
|
||||
|
@ -62,6 +62,8 @@ const ZH_CN = {
|
||||
"Panel.Info.Behavior.Clip.Player": "预渲染录制数据",
|
||||
"Panel.Title.Behavior.Clip.Details": "剪辑",
|
||||
"Panel.Info.Behavior.Clip.Details": "编辑查看剪辑片段属性",
|
||||
"Panel.Info.Statistics": "查看统计信息",
|
||||
"Panel.Title.Statistics": "统计",
|
||||
"Panel.Info.Behavior.Clip.Time.Formate": "{current} / {all} / {fps} fps",
|
||||
"Panel.Info.Behavior.Clip.Record.Formate": "录制: {time}",
|
||||
"Panel.Info.Behavior.Clip.Uname.Clip": "等待录制...",
|
||||
|
@ -74,7 +74,7 @@ class SimulatorDesktop extends Component {
|
||||
},
|
||||
{
|
||||
items: [{
|
||||
panels: ["ObjectList"]
|
||||
panels: ["ObjectList", "Statistics"]
|
||||
}, {
|
||||
panels: ["GroupDetails", "RangeDetails", "LabelDetails", "BehaviorDetails", "ClipDetails"]
|
||||
}],
|
||||
|
@ -65,7 +65,7 @@ class SimulatorWeb extends Component {
|
||||
},
|
||||
{
|
||||
items: [{
|
||||
panels: ["ObjectList"]
|
||||
panels: ["ObjectList", "Statistics"]
|
||||
}, {
|
||||
panels: ["GroupDetails", "RangeDetails", "LabelDetails", "BehaviorDetails", "ClipDetails"]
|
||||
}],
|
||||
|
@ -13,6 +13,7 @@ import { BehaviorDetails } from "@Panel/BehaviorDetails/BehaviorDetails";
|
||||
import { ClipPlayer } from "@Panel/ClipPlayer/ClipPlayer";
|
||||
import { ClipRecorder } from "@Panel/ClipPlayer/ClipRecorder";
|
||||
import { ClipDetails } from "@Panel/ClipDetails/ClipDetails";
|
||||
import { Statistics } from "@Panel/Statistics/Statistics";
|
||||
|
||||
interface IPanelInfo {
|
||||
nameKey: string;
|
||||
@ -36,6 +37,7 @@ type PanelId = ""
|
||||
| "BehaviorDetails" // 行为属性
|
||||
| "ClipPlayer" // 剪辑影片
|
||||
| "ClipDetails" // 剪辑详情
|
||||
| "Statistics" // 统计信息
|
||||
;
|
||||
|
||||
const PanelInfoMap = new Map<PanelId, IPanelInfo>();
|
||||
@ -79,6 +81,10 @@ PanelInfoMap.set("ClipDetails", {
|
||||
nameKey: "Panel.Title.Behavior.Clip.Details", introKay: "Panel.Info.Behavior.Clip.Details",
|
||||
class: ClipDetails
|
||||
});
|
||||
PanelInfoMap.set("Statistics", {
|
||||
nameKey: "Panel.Title.Statistics", introKay: "Panel.Info.Statistics",
|
||||
class: Statistics
|
||||
});
|
||||
|
||||
function getPanelById(panelId: PanelId): ReactNode {
|
||||
switch (panelId) {
|
||||
|
8
source/Panel/Statistics/Statistics.scss
Normal file
8
source/Panel/Statistics/Statistics.scss
Normal file
@ -0,0 +1,8 @@
|
||||
@import "../../Component/Theme/Theme.scss";
|
||||
|
||||
div.statistics-panel {
|
||||
width: 100%;
|
||||
min-height: 100%;
|
||||
padding: 10px;
|
||||
box-sizing: border-box;
|
||||
}
|
22
source/Panel/Statistics/Statistics.tsx
Normal file
22
source/Panel/Statistics/Statistics.tsx
Normal file
@ -0,0 +1,22 @@
|
||||
import { Component, ReactNode } from "react";
|
||||
import { useStatusWithEvent, IMixinStatusProps } from "@Context/Status";
|
||||
import { useSetting, IMixinSettingProps } from "@Context/Setting";
|
||||
import Theme from "@Component/Theme/Theme";
|
||||
import "./Statistics.scss";
|
||||
|
||||
interface IStatisticsProps {
|
||||
|
||||
}
|
||||
|
||||
@useSetting
|
||||
@useStatusWithEvent("labelChange", "focusLabelChange", "labelAttrChange")
|
||||
class Statistics extends Component<IStatisticsProps & IMixinStatusProps & IMixinSettingProps> {
|
||||
|
||||
public render(): ReactNode {
|
||||
return <Theme className="statistics-panel">
|
||||
|
||||
</Theme>;
|
||||
}
|
||||
}
|
||||
|
||||
export { Statistics };
|
Loading…
Reference in New Issue
Block a user