From dbd28d98a71af16eb156b7e2e2a1d11099a52c82 Mon Sep 17 00:00:00 2001 From: jcw780 <30562395+jcw780@users.noreply.github.com> Date: Sat, 30 May 2020 15:26:47 -0400 Subject: [PATCH] added settings to navbar; added support item to navbar --- README.md | 3 ++- src/App.tsx | 5 +++-- src/Navbar.tsx | 6 ++++++ src/SettingsBar.tsx | 36 ++++++++++++++++++------------------ src/commonTypes.tsx | 3 ++- 5 files changed, 31 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index d74857a..6428d93 100644 --- a/README.md +++ b/README.md @@ -19,8 +19,9 @@ - Shell detonation distance after penetration - Checking whether the armor is thick enough to arm the shell ## Development Status -### Current Status - [Issues](/~https://github.com/jcw780/wows_ballistics/issues) +- Feels free to open an issue for questions, bugs, feature requests etc. +### Current Status - Calculations may be refined if contradicting data is provided ### Future Features - More tooltips diff --git a/src/App.tsx b/src/App.tsx index 2b1c0d9..d16cc34 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -12,6 +12,7 @@ import ShellWasm from './shellWasm.wasm'; class App extends React.Component<{},{}> { SFCref = React.createRef(); TFCref = React.createRef(); + Settingsref = React.createRef(); graphsRef : React.RefObject = React.createRef(); navRef : React.RefObject = React.createRef(); instance : any; @@ -195,7 +196,7 @@ class App extends React.Component<{},{}> {

- +
@@ -211,7 +212,7 @@ class App extends React.Component<{},{}> { ); } componentDidMount(){ - this.links.parameters.push(['Shell Parameters', this.SFCref], ['Target Parameters', this.TFCref]); + this.links.parameters.push(['Shell Parameters', this.SFCref], ['Target Parameters', this.TFCref], ['Settings', this.Settingsref]); } } diff --git a/src/Navbar.tsx b/src/Navbar.tsx index 39a16d3..9f80f98 100644 --- a/src/Navbar.tsx +++ b/src/Navbar.tsx @@ -36,6 +36,12 @@ class NavbarCustom extends React.Component<{links: T.linkT}>{ {makeDropdowns('post')} + ); } diff --git a/src/SettingsBar.tsx b/src/SettingsBar.tsx index 4242e70..9f87c16 100644 --- a/src/SettingsBar.tsx +++ b/src/SettingsBar.tsx @@ -41,7 +41,7 @@ interface settingsBarProps{ settings: T.settingsT, } export class SettingsBar extends React.Component{ - state = {open : false}; + state = {open : false}; scrollRef = React.createRef