search added
This commit is contained in:
		| @@ -61,6 +61,11 @@ export default class BrowseComponent extends Component { | ||||
|     this.props.socket.removeEventListener("message", this.handleMessage); | ||||
|   } | ||||
|  | ||||
|   searchUpdate = () => { | ||||
|     let value = document.querySelector(".browse-search input").value; | ||||
|     this.props.socket.send(`{"type":"cable_search","call":"request","data":{"string":"${value}"}}`); | ||||
|   }; | ||||
|  | ||||
|   render() { | ||||
|     return ( | ||||
|       <div className="browse"> | ||||
| @@ -68,7 +73,14 @@ export default class BrowseComponent extends Component { | ||||
|           <img src={BeldenLogo} alt="Belden" /> | ||||
|         </div> | ||||
|         <div className="browse-fieldContainer"> | ||||
|           <h1 className="browse-title">Browse</h1> | ||||
|           <h1 className="browse-title">🛍️ Browse</h1> | ||||
|           <div className="browse-search"> | ||||
|             <input | ||||
|               type="text" | ||||
|               onChange={() => this.searchUpdate()} | ||||
|               placeholder="🔎 Start typing to search..." | ||||
|             /> | ||||
|           </div> | ||||
|           {this.state.cableList.map((cableObj, index) => ( | ||||
|             <React.Fragment key={index}>{cableObj.returnDiv()}</React.Fragment> | ||||
|           ))} | ||||
|   | ||||
| @@ -387,7 +387,7 @@ export default class CableDetailComponent extends Component { | ||||
|               onClick={() => this.openModal("modalOpen_dispense")} | ||||
|             > | ||||
|               <span>➤ Dispense</span> | ||||
|               <span>🤖</span> | ||||
|               <span>🫴</span> | ||||
|             </div> | ||||
|             <Modal | ||||
|               isOpen={modalOpen_dispense} | ||||
| @@ -397,7 +397,7 @@ export default class CableDetailComponent extends Component { | ||||
|             > | ||||
|               <div className="modal-container"> | ||||
|                 <div className="modal-title"> | ||||
|                   <span>🤖</span> | ||||
|                   <span>🫴</span> | ||||
|                   <span>Dispensing Item</span> | ||||
|                 </div> | ||||
|                 <div className="modal-body"> | ||||
|   | ||||
| @@ -134,7 +134,7 @@ export default class MapComponent extends Component { | ||||
|           <img src={BeldenLogo} alt="Belden" /> | ||||
|         </div> | ||||
|         <div className="map-fieldContainer"> | ||||
|           <h1 className="map-title">Map</h1> | ||||
|           <h1 className="map-title">🗺️ Map</h1> | ||||
|           <div className="map-boxContainer"> | ||||
|             <div className="map-box"> | ||||
|               <div className="map-box-row" id="row-1"> | ||||
|   | ||||
| @@ -8,9 +8,6 @@ export default class NavBar extends Component { | ||||
|     if (path.includes("browse")) { | ||||
|       document.getElementById("browse").style.backgroundColor = "#007CBE"; | ||||
|       document.getElementById("browse-s").style.color = "white"; | ||||
|     } else if (path.includes("settings")) { | ||||
|       document.getElementById("settings").style.backgroundColor = "#007CBE"; | ||||
|       document.getElementById("settings-s").style.color = "white"; | ||||
|     } else if (path.includes("map")) { | ||||
|       document.getElementById("map").style.backgroundColor = "#007CBE"; | ||||
|       document.getElementById("map-s").style.color = "white"; | ||||
| @@ -32,10 +29,6 @@ export default class NavBar extends Component { | ||||
|         <div className="navbar-top"> | ||||
|           <div className="navbar-top-hamburger">≡</div> | ||||
|           <h1>Jukebox</h1> | ||||
|           <div className="navbar-search"> | ||||
|             <input type="text" placeholder="Search" /> | ||||
|             <button>🔍</button> | ||||
|           </div> | ||||
|           <ol className="navbar-list"> | ||||
|             <NavLink | ||||
|               style={this.upper} | ||||
| @@ -53,12 +46,13 @@ export default class NavBar extends Component { | ||||
|             <NavLink className="navbar-list-item" id="map" to="/map"> | ||||
|               <span id="map-s">🗺️ Map</span> | ||||
|             </NavLink> | ||||
|             <NavLink className="navbar-list-item" id="statistics" to="/statistics"> | ||||
|             <NavLink | ||||
|               className="navbar-list-item" | ||||
|               id="statistics" | ||||
|               to="/statistics" | ||||
|             > | ||||
|               <span id="statistics-s">📊 Statistics</span> | ||||
|             </NavLink> | ||||
|             <NavLink className="navbar-list-item" id="settings" to="/settings"> | ||||
|               <span id="settings-s">⚙️ Settings</span> | ||||
|             </NavLink> | ||||
|           </ol> | ||||
|         </div> | ||||
|       </div> | ||||
|   | ||||
| @@ -10,7 +10,7 @@ export default class StatisticsComponent extends Component { | ||||
|           <img src={BeldenLogo} alt="Belden" /> | ||||
|         </div> | ||||
|         <div className="statistics-fieldContainer"> | ||||
|           <h1 className="statistics-title">Statistics</h1> | ||||
|           <h1 className="statistics-title">📊 Statistics</h1> | ||||
|           <div className="statistics-grid"> | ||||
|             <div className="statistics-grid-container"> | ||||
|               <iframe src="http://192.168.1.12:3000/d-solo/cdiqwmlr8c9ogf/sensors?orgId=1&refresh=1s&theme=light&panelId=8" title="Belden" className="statistics-iframe" /> | ||||
|   | ||||
| @@ -10,7 +10,7 @@ export default class SummaryComponent extends Component { | ||||
|           <img src={BeldenLogo} alt="Belden" /> | ||||
|         </div> | ||||
|         <div className="summary-fieldContainer"> | ||||
|           <h1 className="summary-title">Summary</h1> | ||||
|           <h1 className="summary-title">❤️ Summary</h1> | ||||
|           <div className="summary-grid"> | ||||
|             <div className="summary-grid-container"> | ||||
|               <iframe src="http://192.168.1.12:3000/d-solo/cdiqwmlr8c9ogf/sensors?orgId=1&refresh=1s&theme=light&panelId=8" title="Belden" className="summary-iframe" /> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user