starting to abstract the game
This commit is contained in:
@@ -14,6 +14,7 @@ import { createObservable, createObservableWithInit, cx } from "~/fn";
|
||||
import { me, mePromise } from "~/profile";
|
||||
import Game from "./Game";
|
||||
import Player from "./Player";
|
||||
import games from "@games/shared/games/index";
|
||||
|
||||
export const TableContext = createContext<{
|
||||
view: Accessor<any>;
|
||||
@@ -110,7 +111,14 @@ export default (props: { tableKey: string }) => {
|
||||
}}
|
||||
>
|
||||
<Show when={view() == null}>
|
||||
<div class="absolute center">
|
||||
<div class="absolute tc mt-8 flex gap-4">
|
||||
<select>
|
||||
<For each={Object.entries(games)}>
|
||||
{([gameId, game]) => (
|
||||
<option value={gameId}>{game.title}</option>
|
||||
)}
|
||||
</For>
|
||||
</select>
|
||||
<button
|
||||
onClick={() => setReady((prev) => !prev)}
|
||||
class="button p-1 "
|
||||
|
||||
@@ -25,20 +25,16 @@ export default defineConfig({
|
||||
"bc",
|
||||
{
|
||||
bottom: 0,
|
||||
left: 0,
|
||||
right: 0,
|
||||
"margin-left": "auto",
|
||||
"margin-right": "auto",
|
||||
left: "50%",
|
||||
transform: "translateX(-50%)",
|
||||
},
|
||||
],
|
||||
[
|
||||
"tc",
|
||||
{
|
||||
top: 0,
|
||||
left: 0,
|
||||
right: 0,
|
||||
"margin-left": "auto",
|
||||
"margin-right": "auto",
|
||||
left: "50%",
|
||||
transform: "translateX(-50%)",
|
||||
},
|
||||
],
|
||||
|
||||
|
||||
Reference in New Issue
Block a user