import Head from 'next/head' import Image from 'next/image'; import React from 'react'; import { FaMicrophoneAlt, FaHeadphonesAlt, FaTh, FaAngleDown, FaPlusSquare, FaBroom, FaBell, FaFilePdf, FaCopy, FaClock, FaPlay, FaPlus, FaCheck } from "react-icons/fa"; import { IoPulseOutline, IoRemoveOutline, IoTimer } from "react-icons/io5"; import { BsThreeDots } from "react-icons/bs"; import { UserStatus, User } from '../../models/user' import { KeyCode } from '../../globals/keycode' import { Tabs } from 'antd'; const { TabPane } = Tabs; let testFriends = [ { name: "Liam", role: "engineer", systemAvatar: "29", status: UserStatus.online }, { name: "Emily", role: "engineer", systemAvatar: "02", status: UserStatus.online }, { name: "Paul", role: "architect", systemAvatar: "43", status: UserStatus.online }, { name: "Mark", role: "engineer", systemAvatar: "04", status: UserStatus.busy }, { name: "Adriana", role: "design", systemAvatar: "06", status: UserStatus.busy }, { name: "Josh", role: "design", systemAvatar: "05", status: UserStatus.offline } ] function getUser(name: string) : User { return new User() } type MyProps = { }; type MyState = { selectedChannel?: number }; export default class Demo extends React.Component { constructor(props) { super(props); this.state = { selectedChannel: null } this.handleKeyboardShortcut = this.handleKeyboardShortcut.bind(this); } componentDidMount(): void { document.addEventListener("keydown", this.handleKeyboardShortcut) } componentWillUnmount(): void { document.removeEventListener("keydown", this.handleKeyboardShortcut); } statusBubble(status: UserStatus) { console.log(status) switch(status) { case UserStatus.online: return case UserStatus.busy: return case UserStatus.offline: return default: return } } renderPulse(status: UserStatus) { switch(status) { case UserStatus.online: return case UserStatus.busy: return case UserStatus.offline: return default: return } } handleKeyboardShortcut(event) { console.log(event.keyCode) switch(event.keyCode) { case KeyCode.Zero: this.setState({ selectedChannel: 0 }); break case KeyCode.One: this.setState({ selectedChannel: 1 }); break case KeyCode.Two: this.setState({ selectedChannel: 2 }); break case KeyCode.Three: this.setState({ selectedChannel: 3 }); break case KeyCode.Four: this.setState({ selectedChannel: 4 }); break case KeyCode.Five: this.setState({ selectedChannel: 5 }); break default: return } } render() { return ( <>
{/* header content */}
{/* welcome message */} πŸ‘‹Hey Arjun, Good Afternoon! you collabed 1.5 hours and worked 2 hours yesterday {/* Date and time */} Tues, Jan 11th {/* avatar */} profile
{/* personal line */}
TEAM {/* list of team members */} { testFriends.map((friend, i) => { return ( {this.statusBubble(friend.status)} profile {friend.name} { this.state.selectedChannel == i ? <> : } {friend.role} {this.renderPulse(friend.status)} ) }) }
{/* pinned */}
ANNOUNCEMENTS updates, pep talks, blockers, reminders {/* tab pane */} Active Resolved TODAY
{/* adriana's announcement */} {this.statusBubble(UserStatus.busy)} profile Adriana 5 minutes ago blockers {/* arjun's announcement */} {this.statusBubble(UserStatus.busy)} profile Arjun 30 minutes ago engineering
{/* rooms */}
ROOMS {/* tab pane */} All Live Scheduled Recurring {/* all rooms */} {/* spontaneous bugs room */} {/* header */} {/* meeting details */} bug fixing were just fixing that jsx bug thats a paiiinnnn {/* badges and tags */} 00:35 blockers engineering {/* room status */} spontaneous {/* footer */} profile profile Arjun and Liam {/* scheduled room - design meeting */} {/* header */} {/* meeting details */} Shopping Cart Experience lets finish the mockups @josh, @mark, and @arjun please step in for feedback {/* badges and tags */} 00:01 design {/* room status */} scheduled sometime this afternoon? {/* footer */} profile Adriana {/* scheduled room - one on one */} {/* header */} {/* meeting details */} Arjun and Paul - One on one performance review {/* badges and tags */} private {/* room status */} scheduled 3ish? Ill ping you Arjun {/* footer */} {/* recurring room - dsu */} {/* header */} {/* meeting details */} Daily Standup {/* badges and tags */} scrum engineering {/* room status */} recurring 10am daily {/* footer */} {/* recurring room - demo */} {/* header */} {/* meeting details */} Sprint Demo all hands on deck...lets have fun :) {/* badges and tags */} scrum {/* room status */} recurring biweekly fridays! {/* footer */} {/* header */} {/* meeting details */} Wine Wednesdays all hands on deck...lets have fun :) {/* badges and tags */} party πŸŽ‰ {/* room status */} recurring wednesdays 7-9pm {/* footer */}
{/* attachments */}
Attachments
report.pdf
{/* dynamic footer based on selection */}
{this.statusBubble(UserStatus.online)} profile {this.state.selectedChannel == null ? "" : testFriends[this.state.selectedChannel].name} {this.state.selectedChannel == null ? "" : testFriends[this.state.selectedChannel].role} {/* shortcuts */} R SPACE
) } }