Skip to content

Commit e315637

Browse files
committed
added sample title, removed some unnecessary styling
1 parent 659a37c commit e315637

File tree

5 files changed

+14
-35
lines changed

5 files changed

+14
-35
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"react-hotkeys": "^2.0.0",
1919
"react-json-view": "^1.19.1",
2020
"react-markdown": "^4.0.6",
21-
"react-material-workspace-layout": "^0.1.14",
21+
"react-material-workspace-layout": "^0.1.16",
2222
"react-monaco-editor": "^0.25.1",
2323
"react-remove-scroll": "^2.0.4",
2424
"react-select": "^3.0.8",

src/MainLayout/icon-dictionary.js

+2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import {
1616
faSearch,
1717
faMask,
1818
} from "@fortawesome/free-solid-svg-icons"
19+
import FullscreenIcon from "@material-ui/icons/Fullscreen"
1920

2021
const faStyle = { marginTop: 4, width: 16, height: 16, marginBottom: 4 }
2122

@@ -62,6 +63,7 @@ export const iconDictionary = {
6263
"show-mask": () => (
6364
<FontAwesomeIcon style={faStyle} size="xs" fixedWidth icon={faMask} />
6465
),
66+
window: FullscreenIcon,
6567
}
6668

6769
export default iconDictionary

src/MainLayout/index.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -202,14 +202,16 @@ export const MainLayout = ({
202202
allowFullscreen
203203
iconDictionary={iconDictionary}
204204
headerLeftSide={[
205-
state.annotationType === "video" && (
205+
state.annotationType === "video" ? (
206206
<KeyframeTimeline
207207
currentTime={state.currentVideoTime}
208208
duration={state.videoDuration}
209209
onChangeCurrentTime={action("CHANGE_VIDEO_TIME", "newTime")}
210210
keyframes={state.keyframes}
211211
/>
212-
),
212+
) : activeImage ? (
213+
<div className={classes.headerTitle}>{activeImage.name}</div>
214+
) : null,
213215
].filter(Boolean)}
214216
headerItems={[
215217
{ name: "Prev" },

src/MainLayout/styles.js

+3-28
Original file line numberDiff line numberDiff line change
@@ -18,34 +18,9 @@ export default {
1818
bottom: 0,
1919
},
2020
},
21-
workspace: {
22-
backgroundColor: grey[200],
23-
flexGrow: 1,
24-
display: "flex",
25-
flexDirection: "row",
26-
height: "100%",
27-
overflow: "hidden",
28-
},
29-
iconToolsContainer: { display: "flex" },
30-
imageCanvasContainer: {
31-
display: "flex",
32-
flexGrow: 1,
33-
alignItems: "center",
34-
justifyContent: "center",
35-
},
36-
noImageSelected: {
21+
headerTitle: {
3722
fontWeight: "bold",
38-
fontSize: 32,
39-
color: grey[500],
40-
},
41-
sidebarContainer: {
42-
width: 300,
43-
flexShrink: 0,
44-
overflowY: "auto",
45-
backgroundColor: grey[100],
46-
borderLeft: `1px solid ${grey[300]}`,
47-
zIndex: 9,
48-
height: "100%",
49-
boxShadow: "0px 0px 5px rgba(0,0,0,0.1)",
23+
color: grey[700],
24+
paddingLeft: 16,
5025
},
5126
}

yarn.lock

+4-4
Original file line numberDiff line numberDiff line change
@@ -14522,10 +14522,10 @@ react-markdown@^4.0.6:
1452214522
unist-util-visit "^1.3.0"
1452314523
xtend "^4.0.1"
1452414524

14525-
react-material-workspace-layout@^0.1.14:
14526-
version "0.1.14"
14527-
resolved "https://registry.yarnpkg.com/react-material-workspace-layout/-/react-material-workspace-layout-0.1.14.tgz#7a50fb18c89c14fd23353d5ad2c23d8e61fbfd70"
14528-
integrity sha512-muYUkTr27dSvSQ+NU0DmPjxYkI+DrDBWz0xwC189SN4+ANCE1V4Ul3wMkbeXSqxEk/9oRFkMae0+4ygHBkGi8A==
14525+
react-material-workspace-layout@^0.1.16:
14526+
version "0.1.16"
14527+
resolved "https://registry.yarnpkg.com/react-material-workspace-layout/-/react-material-workspace-layout-0.1.16.tgz#fa51c8a52e19cc3f8cc1627d69f761851447621e"
14528+
integrity sha512-knxP+1dYMueWdpp/LZoTt23P5LJjtoexZsKBTgRZFMZwvc1uXSK3u2Lwxf6jw5AMI55mrTrWNhB7aqOpzROtjA==
1452914529
dependencies:
1453014530
"@material-ui/core" "^4.10.0"
1453114531
"@material-ui/icons" "^4.9.1"

0 commit comments

Comments
 (0)