Set up a tabletop view for both the GM and the player #260

Merged
savanni merged 15 commits from visions-playfield into main 2024-11-20 04:06:13 +00:00
5 changed files with 2804 additions and 43 deletions
Showing only changes of commit 2ab6e88634 - Show all commits

File diff suppressed because it is too large Load Diff

View File

@ -19,7 +19,8 @@
"react-scripts": "5.0.1", "react-scripts": "5.0.1",
"react-use-websocket": "^4.11.1", "react-use-websocket": "^4.11.1",
"typescript": "^4.9.5", "typescript": "^4.9.5",
"web-vitals": "^2.1.4" "web-vitals": "^2.1.4",
"visions-types": "../visions-types"
}, },
"scripts": { "scripts": {
"start": "react-scripts start", "start": "react-scripts start",

View File

@ -1,6 +1,6 @@
import React, { useContext } from 'react'; import React, { useContext } from 'react';
import './Tabletop.css'; import './Tabletop.css';
import { RGB } from 'visions'; import { RGB } from 'visions-types';
interface TabletopElementProps { interface TabletopElementProps {
backgroundColor: RGB; backgroundColor: RGB;

View File

@ -1,6 +1,6 @@
import React, { createContext, PropsWithChildren, useEffect, useReducer } from "react"; import React, { createContext, PropsWithChildren, useEffect, useReducer } from "react";
import useWebSocket from "react-use-websocket"; import useWebSocket from "react-use-websocket";
import { Message, Tabletop } from "visions"; import { Message, Tabletop } from "visions-types";
type TabletopState = { type TabletopState = {
tabletop: Tabletop; tabletop: Tabletop;

View File

@ -6,11 +6,13 @@
.player-view__left-panel { .player-view__left-panel {
flex-grow: 0; flex-grow: 0;
min-width: 100px; min-width: 100px;
max-width: 20%;
} }
.player-view__right-panel { .player-view__right-panel {
flex-grow: 0; flex-grow: 0;
min-width: 100px; min-width: 100px;
max-width: 20%;
} }