diff --git a/.gitmodules b/.gitmodules index 149507d..7d33d7a 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "livesplit-core"] path = livesplit-core - url = https://github.com/CryZe/livesplit-core + url = https://github.com/LiveSplit/livesplit-core diff --git a/README.md b/README.md index 1290f45..a71ef1f 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@

LiveSplit LiveSplit One

-[![Build Status](https://travis-ci.org/CryZe/LiveSplitOne.svg?branch=master)](https://travis-ci.org/CryZe/LiveSplitOne) +[![Build Status](https://travis-ci.org/LiveSplit/LiveSplitOne.svg?branch=master)](https://travis-ci.org/LiveSplit/LiveSplitOne) -LiveSplit One is a version of LiveSplit that uses the multiplatform [livesplit-core](https://github.com/CryZe/livesplit-core) Library and Web Technologies like React and Electron to create a new LiveSplit experience that works on a lot of different platforms. +LiveSplit One is a version of LiveSplit that uses the multiplatform [livesplit-core](https://github.com/LiveSplit/livesplit-core) Library and Web Technologies like React and Electron to create a new LiveSplit experience that works on a lot of different platforms. -The Web Version is available [here](https://cryze.github.io/LiveSplitOne/). +The Web Version is available [here](https://livesplit.github.io/LiveSplitOne/). diff --git a/ci/script.sh b/ci/script.sh index fa40076..cc47a56 100644 --- a/ci/script.sh +++ b/ci/script.sh @@ -41,6 +41,6 @@ chmod 600 deploy_key eval `ssh-agent -s` ssh-add deploy_key -git remote set-url origin git@github.com:CryZe/LiveSplitOne.git +git remote set-url origin git@github.com:LiveSplit/LiveSplitOne.git git push origin gh-pages -f diff --git a/livesplit-core b/livesplit-core index c87cb6f..8f0aef4 160000 --- a/livesplit-core +++ b/livesplit-core @@ -1 +1 @@ -Subproject commit c87cb6f0d1f7b10d49a9cd5b97d9249e2d8f9b0e +Subproject commit 8f0aef44db340d03839cfecc405c17b2c31ad634 diff --git a/src/layout/Text.tsx b/src/layout/Text.tsx index 71edeff..d813e30 100644 --- a/src/layout/Text.tsx +++ b/src/layout/Text.tsx @@ -1,5 +1,6 @@ import * as React from "react"; import * as LiveSplit from "../livesplit"; +import { gradientToCss } from "../util/ColorUtil"; export interface Props { state: LiveSplit.TextComponentStateJson } @@ -9,22 +10,29 @@ export default class Text extends React.Component { } public render() { - const { state } = this.props; - const text = "Center" in state ? ( + const { background, text } = this.props.state; + + const rendered = "Center" in text ? ( - {state.Center} + {text.Center} ) : ( - {state.Split[0]} - {state.Split[1]} + {text.Split[0]} + {text.Split[1]} ); + return ( -
+
- {text} + {rendered}
diff --git a/src/livesplit.ts b/src/livesplit.ts index b84b662..726ed69 100644 --- a/src/livesplit.ts +++ b/src/livesplit.ts @@ -363,8 +363,16 @@ export interface GraphComponentStatePointJson { is_best_segment: boolean, } +/** The state object describes the information to visualize for this component. */ +export interface TextComponentStateJson { + /** The background shown behind the component. */ + background: Gradient, + /** The text to show for the component. */ + text: TextComponentStateText, +} + /** The text that is supposed to be shown. */ -export type TextComponentStateJson = +export type TextComponentStateText = { Center: string } | { Split: string[] };