Исправил текст указывающий на режим комнаты

This commit is contained in:
2020-09-24 18:51:30 +03:00
parent 72406a4fe7
commit c0155e8a4a

View File

@@ -10,13 +10,13 @@
import { onMount } from 'svelte'; import { onMount } from 'svelte';
let room; let room;
async function getRoom() {
onMount(async () => {
var url = `http://localhost:3000/api/join/?id=${parsed.id}`; var url = `http://localhost:3000/api/join/?id=${parsed.id}`;
const res = await fetch(url); const res = await fetch(url);
room = await res.json(); room = await res.json();
console.log(room); }
});
onMount(async () => getRoom());
String.prototype.toColor = function() { String.prototype.toColor = function() {
var colors = ['#FF6633', '#FFB399', '#FF33FF', '#FFFF99', '#00B3E6', var colors = ['#FF6633', '#FFB399', '#FF33FF', '#FFFF99', '#00B3E6',
@@ -85,7 +85,7 @@
<list> <list>
{#if room} {#if room}
<h1>{room.name}</h1> <h1>{room.name}</h1>
<p class="subtext">По {room.group ? "бригадам" : "вариантам"}</p> <p class="subtext">По {room.group == "true" ? "бригадам" : "вариантам"}</p>
<ol> <ol>
{#each room.teams as _, i} {#each room.teams as _, i}
<li class={room.group === "true" ? "group" : "individual"} on:click={() => selectInput(i)} style="border-color: {enabledInput==i ? 'gray' : 'lightgray'}"> <li class={room.group === "true" ? "group" : "individual"} on:click={() => selectInput(i)} style="border-color: {enabledInput==i ? 'gray' : 'lightgray'}">