Skip to content
This repository has been archived by the owner on Jul 31, 2024. It is now read-only.

Commit

Permalink
feat: bits and pieces
Browse files Browse the repository at this point in the history
  • Loading branch information
vycdev committed Jul 26, 2020
1 parent d105f29 commit 0e83e3b
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 9 deletions.
11 changes: 11 additions & 0 deletions packages/web/src/components/common/typingBox/style.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -169,3 +169,14 @@ export const WaitingPlayers = styled.div`
font-family: "Verdana";
`;

export const ImageWrapper = styled.div`
position: relative;
margin: auto;
width: 700px;
padding-top: 100px;
`;
export const KeyboardImage = styled.img`
margin: auto;
width: 700px;
`;
14 changes: 13 additions & 1 deletion packages/web/src/components/common/typingBox/typingBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ import {
ActuallyTyped,
BlockOfFinishedText,
TextInfo,
WaitingPlayers
WaitingPlayers,
ImageWrapper,
KeyboardImage
} from "./style";
import { sendWebsocket } from "../../../utils/websocket";

Expand Down Expand Up @@ -858,6 +860,16 @@ export const TypingBox = (props: TypingBoxProps) => {
}}
></InputBox>
</Container>
{time > 0 && props.tutorial ? (
<ImageWrapper>
<KeyboardImage
src="http://transcribeme.com/wp-content/uploads/2018/02/[email protected]"
alt="OOOPS Looks like the image failed to load."
></KeyboardImage>
</ImageWrapper>
) : (
""
)}
</Wrapper>
);
};
9 changes: 2 additions & 7 deletions packages/web/src/components/dashboard/dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -434,13 +434,12 @@ const AchievementItemSettings = (props: {
setIsHidden(true);
}}
>
Delete Text
Delete Achievement
</button>
<button
onClick={() => {
if (verifyForm()) {
UpdateAchievementData(data);
location.reload();
}
}}
>
Expand Down Expand Up @@ -688,7 +687,6 @@ const TextItemSettings = (props: { hidden: boolean; data: Text }) => {
onClick={() => {
if (verifyForm()) {
UpdateTextData(data);
location.reload();
}
}}
>
Expand Down Expand Up @@ -874,7 +872,6 @@ const AddNewAchievement = (props: { hidden: boolean }) => {
onClick={() => {
if (verifyForm()) {
PostNewAchievement(data);
location.reload();
}
}}
>
Expand Down Expand Up @@ -1092,7 +1089,6 @@ const AddNewText = (props: { hidden: boolean }) => {
onClick={() => {
if (verifyForm()) {
PostNewText(data);
location.reload();
}
}}
>
Expand Down Expand Up @@ -1124,7 +1120,7 @@ const UserItemSettings = (props: { hidden: boolean; data: AllUser }) => {
data.role != "member" &&
data.role != "unverified") ||
data.description.length > 250 ||
data.name.length <= 3 ||
data.name.length < 2 ||
data.email.length <= 10
) {
statusDiv.current.innerHTML =
Expand Down Expand Up @@ -1247,7 +1243,6 @@ const UserItemSettings = (props: { hidden: boolean; data: AllUser }) => {
onClick={() => {
if (verifyForm()) {
UpdateUserData(data);
location.reload();
}
}}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import { Tutorials } from "./components/tutorials/tutorials";
const theme = getTheme();

import { CreateNewWS } from "./helpers/websocket";
import { sendWebsocket } from "../../utils/websocket";
import { setWsHeartbeat } from "ws-heartbeat/client";

export const StartTypingPage = () => {
Expand Down

0 comments on commit 0e83e3b

Please sign in to comment.