Fix yarn issues

This commit is contained in:
Rick Carlino 2017-08-22 13:16:30 -05:00
commit 492adb7fe7
7 changed files with 259 additions and 249 deletions

View file

@ -2,6 +2,7 @@
@import "temp";
// Node Modules
@import "../../node_modules/@blueprintjs/core/dist/blueprint.css";
@import "../../node_modules/@blueprintjs/datetime/dist/blueprint-datetime.css";
// Partials
@import "animations";
@import "colors";

View file

@ -209,17 +209,18 @@
.garden-map-legend {
position: fixed;
top: 11rem;
right: -12rem;
top: 110px;
right: -120px;
transition: all 0.4s ease;
box-shadow: 0px 1px 4px #555;
max-width: 336px;
&.active {
transform: translateX(-14rem);
transform: translateX(-140px);
}
.content {
background: $light_green;
padding: 1rem;
border-radius: 0.5rem;
padding: 10px;
border-radius: 5px;
display: flex;
flex-direction: column;
flex-wrap: wrap;

View file

@ -236,7 +236,8 @@ export class EditFEForm extends React.Component<EditFEProps, State> {
/>
</Col>
<Col xs={6}>
<BlurableInput type="time"
<BlurableInput
type="time"
className="add-event-start-time"
name="start_time"
value={this.fieldGet("startTime")}

View file

@ -22,7 +22,8 @@ export function GardenMapLegend(props: GardenMapLegendProps) {
let minusBtnClass = (zoomLvl && zoomLvl <= 0.4) ? "disabled" : "";
let menuClass = legendMenuOpen ? "active" : "";
return <div
return (
<div
className={"garden-map-legend " + menuClass}
style={{ zoom: 1 }}>
<div
@ -93,4 +94,5 @@ export function GardenMapLegend(props: GardenMapLegendProps) {
</div>
</div>
</div>
);
}

View file

@ -2,11 +2,7 @@ import * as React from "react";
import { Component } from "react";
import { TaggedPlantPointer } from "../../../resources/tagged_resources";
import { BotOriginQuadrant } from "../../interfaces";
import {
round,
scale,
getXYFromQuadrant
} from "../util";
import { round, scale, getXYFromQuadrant } from "../util";
import { cachedCrop } from "../../../open_farm/index";
interface SpreadLayerProps {
@ -18,8 +14,8 @@ interface SpreadLayerProps {
export function SpreadLayer(props: SpreadLayerProps) {
let { plants, visible, currentPlant, botOriginQuadrant } = props;
return <g>
return (
<g>
{
plants.map((p, index) => {
let isSelected = p === currentPlant;
@ -28,10 +24,13 @@ export function SpreadLayer(props: SpreadLayerProps) {
plant={p}
key={index}
quadrant={botOriginQuadrant}
/> : <g key={index} />;
/>
:
<g key={index} />;
})
}
</g>;
</g>
);
}
interface SpreadCircleProps {
@ -48,7 +47,7 @@ export class SpreadCircle extends
state: SpreadCircleState = { spread: undefined };
componentWillReceiveProps() {
componentDidMount() {
cachedCrop(this.props.plant.body.openfarm_slug)
.then(({ spread }) => this.setState({ spread }));
}

View file

@ -30,14 +30,13 @@ export class FrontPage extends React.Component<{}, Partial<FrontPageState>> {
}
componentDidMount() {
if (Session.get()) { window.location.href = "/app/controls"; }
logInit();
API.setBaseUrl(API.fetchBrowserLocation());
this.setState({
serverURL: API.fetchHostName(),
serverPort: API.inferPort()
});
// RICK CHECK ME ON THIS PLZ -CV
if (Session.get()) { window.location.href = "/app/controls"; }
}
set = (name: keyof FrontPageState) =>
@ -120,7 +119,8 @@ export class FrontPage extends React.Component<{}, Partial<FrontPageState>> {
}).catch(error => {
let errorMessage = prettyPrintApiErrors(error);
if (errorMessage.toLowerCase().includes("not found")) {
errorMessage = "That email address is not associated with an account.";
errorMessage =
`That email address is not associated with an account.`;
}
log(errorMessage);
});
@ -136,7 +136,8 @@ export class FrontPage extends React.Component<{}, Partial<FrontPageState>> {
<label>{t("I agree to the terms of use")}</label>
<input type="checkbox"
onChange={this.set("agreeToTerms").bind(this)}
value={this.state.agreeToTerms ? "false" : "true"} />
value={this.state.agreeToTerms ? "false" : "true"}
/>
</div>
<ul>
<li>
@ -173,6 +174,8 @@ export class FrontPage extends React.Component<{}, Partial<FrontPageState>> {
let expandIcon = showServerOpts ? "minus" : "plus";
let { toggleServerOpts } = this;
// If the user is already logged in, don't show this page.
if (!Session.get()) {
return (
<div className="static-page">
<Row>
@ -360,5 +363,8 @@ export class FrontPage extends React.Component<{}, Partial<FrontPageState>> {
</div>
</div>
);
} else {
return <div />;
}
}
}

View file

@ -1395,13 +1395,13 @@ debug@2.6.4:
dependencies:
ms "0.7.3"
debug@^2.1.1, debug@^2.2.0, debug@^2.4.5, debug@^2.6.3, debug@^2.6.6:
debug@^2.1.1, debug@^2.2.0, debug@^2.4.5, debug@^2.6.6:
version "2.6.6"
resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.6.tgz#a9fa6fbe9ca43cf1e79f73b75c0189cbb7d6db5a"
dependencies:
ms "0.7.3"
debug@^2.6.8:
debug@^2.6.3, debug@^2.6.8:
version "2.6.8"
resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.8.tgz#e731531ca2ede27d188222427da17821d68ff4fc"
dependencies: