Use the data constants from the common module
This commit is contained in:
parent
a6935d9d96
commit
02dece1af0
1 changed files with 2 additions and 19 deletions
|
|
@ -1,5 +1,5 @@
|
|||
<script lang="ts">
|
||||
import { IColour, SaveShipResponse, Status, ISpaceship } from "common";
|
||||
import { Status, colours, spaceships } from "common";
|
||||
import SpaceShuttle from "../icons/spaceship.svelte";
|
||||
import SciFiButton from "../SciFi-Button.svelte";
|
||||
import { createEventDispatcher } from "svelte";
|
||||
|
|
@ -11,23 +11,6 @@ const emit = createEventDispatcher();
|
|||
|
||||
export let open: boolean = false;
|
||||
|
||||
const colours: IColour[] = [
|
||||
{ name: "Green", hex: "#00aa00" },
|
||||
{ name: "Blue", hex: "#0077b6" },
|
||||
{ name: "Red", hex: "#cb0b0a" },
|
||||
{ name: "Purple", hex: "#7400b8" },
|
||||
{ name: "Orange", hex: "#faa307" },
|
||||
{ name: "Light Green", hex: "#9ef01a" },
|
||||
{ name: "Magenta", hex: "#b7094c" },
|
||||
{ name: "Pink", hex: "#f72585" },
|
||||
{ name: "Yellow", hex: "#f9c80e" },
|
||||
];
|
||||
const spaceships: ISpaceship[] = [
|
||||
{ name: "Space Shuttle", id: "space-shuttle" },
|
||||
{ name: "Rocket", id: "rocket" },
|
||||
{ name: "Sailboat", id: "sailboat" },
|
||||
]
|
||||
|
||||
let player = $players.find(p => p.name == $myName);
|
||||
|
||||
$: myColour = player.colour;
|
||||
|
|
@ -39,7 +22,7 @@ var error = null;
|
|||
|
||||
function saveShipDesign() {
|
||||
/* TODO: Send event to server, wait for confirmation */
|
||||
let response: SaveShipResponse = {
|
||||
let response: any = {
|
||||
status: Status.UnknownError,
|
||||
message: `Testing the error design`,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue