format and add back to home button in editor
continuous-integration/drone/push Build is passing Details

pull/92/head
maxime 1 year ago
parent 3a437a7ad1
commit d6876ac033

@ -9,7 +9,6 @@ import {
} from "react" } from "react"
import CourtPlayer from "./CourtPlayer" import CourtPlayer from "./CourtPlayer"
import { Player } from "../../model/tactic/Player" import { Player } from "../../model/tactic/Player"
import { Action, ActionKind } from "../../model/tactic/Action" import { Action, ActionKind } from "../../model/tactic/Action"
import ArrowAction from "../actions/ArrowAction" import ArrowAction from "../actions/ArrowAction"

@ -6,7 +6,8 @@ export interface SaveState {
export class SaveStates { export class SaveStates {
static readonly Guest: SaveState = { static readonly Guest: SaveState = {
className: "save-state-guest", className: "save-state-guest",
message: "vous n'etes pas connectés, les changements seront sauvegardés sur votre navigateur.", message:
"vous n'etes pas connectés, les changements seront sauvegardés sur votre navigateur.",
} }
static readonly Ok: SaveState = { static readonly Ok: SaveState = {
className: "save-state-ok", className: "save-state-ok",

@ -1,4 +1,4 @@
import {User} from "./User"; import { User } from "./User"
export interface TeamInfo { export interface TeamInfo {
id: number id: number

@ -47,8 +47,6 @@
height: 100%; height: 100%;
} }
#allies-rack, #allies-rack,
#opponent-rack { #opponent-rack {
width: 125px; width: 125px;

@ -108,4 +108,3 @@
user-select: none; user-select: none;
font-family: var(--text-main-font); font-family: var(--text-main-font);
} }

@ -32,6 +32,7 @@ import { CourtAction } from "./editor/CourtAction"
import { BasketCourt } from "../components/editor/BasketCourt" import { BasketCourt } from "../components/editor/BasketCourt"
import { ratioWithinBase } from "../components/arrows/Pos" import { ratioWithinBase } from "../components/arrows/Pos"
import { Action, ActionKind } from "../model/tactic/Action" import { Action, ActionKind } from "../model/tactic/Action"
import {BASE} from "../Constants";
const ERROR_STYLE: CSSProperties = { const ERROR_STYLE: CSSProperties = {
borderColor: "red", borderColor: "red",
@ -394,8 +395,11 @@ function EditorView({
return ( return (
<div id="main-div"> <div id="main-div">
<div id="topbar-div"> <div id="topbar-div">
<button onClick={() => (location.pathname = BASE + "/")}>
Home
</button>
<div id="topbar-left"> <div id="topbar-left">
<SavingState state={saveState} /> <SavingState state={saveState}/>
</div> </div>
<div id="title-input-div"> <div id="title-input-div">
<TitleInput <TitleInput

@ -105,8 +105,7 @@ class TeamGateway {
* @param string $newSecondColor * @param string $newSecondColor
* @return void * @return void
*/ */
public function editTeam(int $idTeam, string $newName, string $newPicture, string $newMainColor, string $newSecondColor) public function editTeam(int $idTeam, string $newName, string $newPicture, string $newMainColor, string $newSecondColor) {
{
$this->con->exec( $this->con->exec(
"UPDATE team "UPDATE team
SET name = :newName, SET name = :newName,

@ -126,8 +126,7 @@ class TeamModel {
* @param string $newSecondColor * @param string $newSecondColor
* @return void * @return void
*/ */
public function editTeam(int $idTeam, string $newName, string $newPicture, string $newMainColor, string $newSecondColor) public function editTeam(int $idTeam, string $newName, string $newPicture, string $newMainColor, string $newSecondColor) {
{
$this->teams->editTeam($idTeam, $newName, $newPicture, $newMainColor, $newSecondColor); $this->teams->editTeam($idTeam, $newName, $newPicture, $newMainColor, $newSecondColor);
} }

Loading…
Cancel
Save