diff --git a/src/handbook/src/ui/pages/ScenesPage.tsx b/src/handbook/src/ui/pages/ScenesPage.tsx index f5a1c581f..4d8686128 100644 --- a/src/handbook/src/ui/pages/ScenesPage.tsx +++ b/src/handbook/src/ui/pages/ScenesPage.tsx @@ -14,14 +14,22 @@ import "@css/pages/ScenesPage.scss"; */ function sceneTypeToString(type: SceneType): string { switch (type) { - default: return "Unknown"; - case SceneType.None: return "None"; - case SceneType.World: return "World"; - case SceneType.Activity: return "Activity"; - case SceneType.Dungeon: return "Dungeon"; - case SceneType.Room: return "Room"; - case SceneType.HomeRoom: return "Home Room"; - case SceneType.HomeWorld: return "Home World"; + default: + return "Unknown"; + case SceneType.None: + return "None"; + case SceneType.World: + return "World"; + case SceneType.Activity: + return "Activity"; + case SceneType.Dungeon: + return "Dungeon"; + case SceneType.Room: + return "Room"; + case SceneType.HomeRoom: + return "Home Room"; + case SceneType.HomeWorld: + return "Home World"; } } @@ -45,11 +53,12 @@ class ScenesPage extends React.PureComponent { key={command.identifier} title={command.identifier} alternate={`ID: ${command.id} | ${sceneTypeToString(command.type)}`} - button={( - - )} rightOffset={13} + button={ + + } + rightOffset={13} height={75} /> ))} diff --git a/src/handbook/src/ui/views/SideBar.tsx b/src/handbook/src/ui/views/SideBar.tsx index f1a0b2967..b7eb8c96d 100644 --- a/src/handbook/src/ui/views/SideBar.tsx +++ b/src/handbook/src/ui/views/SideBar.tsx @@ -40,12 +40,14 @@ class SideBar extends React.Component<{}, IState> { The Ultimate Anime Game Handbook -
+
diff --git a/src/handbook/src/ui/widgets/Card.tsx b/src/handbook/src/ui/widgets/Card.tsx index b8c93acf4..c8308bbcd 100644 --- a/src/handbook/src/ui/widgets/Card.tsx +++ b/src/handbook/src/ui/widgets/Card.tsx @@ -52,9 +52,7 @@ class Card extends React.PureComponent {
{this.props.button ? ( -
+
{this.props.button}
) : undefined} diff --git a/src/handbook/src/ui/widgets/ItemCard.tsx b/src/handbook/src/ui/widgets/ItemCard.tsx index 8d86519fd..69a1d5453 100644 --- a/src/handbook/src/ui/widgets/ItemCard.tsx +++ b/src/handbook/src/ui/widgets/ItemCard.tsx @@ -14,10 +14,9 @@ import "@css/widgets/ItemCard.scss"; function toDescription(description: string | undefined): JSX.Element[] { if (!description) return []; - return description.split("\\n") - .map((line, index) => { - return

{line}

; - }); + return description.split("\\n").map((line, index) => { + return

{line}

; + }); } interface IProps { @@ -65,8 +64,7 @@ class ItemCard extends React.Component { private addCount(positive: boolean, multiple: boolean) { let { count } = this.state; if (count === "") count = 1; - if (typeof count == "string") - count = parseInt(count); + if (typeof count == "string") count = parseInt(count); if (count < 1) count = 1; let increment = 1; @@ -105,49 +103,57 @@ class ItemCard extends React.Component {

{data?.type ?? itemTypeToString(item.type)}

- { this.state.icon && {item.name} this.setState({ icon: false })} - /> } + {this.state.icon && ( + {item.name} this.setState({ icon: false })} + /> + )}
-
- {toDescription(data?.description)} -
+
{toDescription(data?.description)}
-
this.addCount(false, false)} - onContextMenu={(e) => { - e.preventDefault(); - this.addCount(false, true); - }} - className={"ItemCard_Operation"}>-
- { - if (this.state.count == "") { - this.setState({ count: 1 }); - } - }} +
this.addCount(false, false)} + onContextMenu={(e) => { + e.preventDefault(); + this.addCount(false, true); + }} + className={"ItemCard_Operation"} + > + - +
+ { + if (this.state.count == "") { + this.setState({ count: 1 }); + } + }} /> -
this.addCount(true, false)} - onContextMenu={(e) => { - e.preventDefault(); - this.addCount(true, true); - }} - className={"ItemCard_Operation"}>+
+
this.addCount(true, false)} + onContextMenu={(e) => { + e.preventDefault(); + this.addCount(true, true); + }} + className={"ItemCard_Operation"} + > + + +
- +
) : undefined;