open-book icon for closing inventory button on mobile #89

pull/120/head
Jon Eugster 1 year ago committed by joneugster
parent 0b1fe3baf1
commit 6ce5131c63

@ -7,7 +7,7 @@ import { useSelector } from 'react-redux'
import { useAppDispatch, useAppSelector } from '../hooks' import { useAppDispatch, useAppSelector } from '../hooks'
import { Button } from './button' import { Button } from './button'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faDownload, faUpload, faEraser, faBook, faGlobe, faHome, faArrowRight, faArrowLeft, faXmark, faBars, faCode, faCircleInfo, faTerminal } from '@fortawesome/free-solid-svg-icons' import { faDownload, faUpload, faEraser, faBook, faBookOpen, faGlobe, faHome, faArrowRight, faArrowLeft, faXmark, faBars, faCode, faCircleInfo, faTerminal } from '@fortawesome/free-solid-svg-icons'
import { PrivacyPolicyPopup } from './privacy_policy' import { PrivacyPolicyPopup } from './privacy_policy'
import { WorldSelectionMenu, downloadFile } from './world_tree' import { WorldSelectionMenu, downloadFile } from './world_tree'
@ -19,7 +19,7 @@ function MobileNav({pageNumber, setPageNumber}:
const dispatch = useAppDispatch() const dispatch = useAppDispatch()
let prevText = {0 : null, 1: "Intro", 2: null}[pageNumber] let prevText = {0 : null, 1: "Intro", 2: null}[pageNumber]
let prevIcon = {0 : null, 1: null, 2: faXmark}[pageNumber] let prevIcon = {0 : null, 1: null, 2: faBookOpen}[pageNumber]
let prevTitle = { let prevTitle = {
0: null, 0: null,
1: "Game Introduction", 1: "Game Introduction",
@ -312,8 +312,8 @@ export function LevelAppBar({
</Button> </Button>
: pageNumber == 1 && : pageNumber == 1 &&
<Button className="btn btn-inverted toggle-width" to="" <Button className="btn btn-inverted toggle-width" to=""
title="show inventory" inverted="true" onClick={() => {setPageNumber(0)}}> title="close inventory" inverted="true" onClick={() => {setPageNumber(0)}}>
<FontAwesomeIcon icon={faXmark}/> <FontAwesomeIcon icon={faBookOpen}/>
</Button> </Button>
} }
<Button to="" className="btn toggle-width" id="menu-btn" onClick={(ev) => {setNavOpen(!navOpen)}} > <Button to="" className="btn toggle-width" id="menu-btn" onClick={(ev) => {setNavOpen(!navOpen)}} >

@ -2,7 +2,7 @@ import * as React from 'react';
import { useState, useEffect } from 'react'; import { useState, useEffect } from 'react';
import './inventory.css' import './inventory.css'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faLock, faLockOpen, faBook, faHammer, faBan } from '@fortawesome/free-solid-svg-icons' import { faLock, faBan } from '@fortawesome/free-solid-svg-icons'
import { GameIdContext } from '../app'; import { GameIdContext } from '../app';
import Markdown from './markdown'; import Markdown from './markdown';
import { useLoadDocQuery, InventoryTile, LevelInfo, InventoryOverview, useLoadInventoryOverviewQuery } from '../state/api'; import { useLoadDocQuery, InventoryTile, LevelInfo, InventoryOverview, useLoadInventoryOverviewQuery } from '../state/api';

@ -4,7 +4,7 @@ import { useSelector, useStore } from 'react-redux'
import Split from 'react-split' import Split from 'react-split'
import { useParams } from 'react-router-dom' import { useParams } from 'react-router-dom'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faBars, faBook, faCode, faXmark, faHome, faCircleInfo, faArrowRight, faArrowLeft, faTerminal } from '@fortawesome/free-solid-svg-icons' import { faBars, faCode, faXmark, faHome, faCircleInfo, faArrowRight, faArrowLeft, faTerminal } from '@fortawesome/free-solid-svg-icons'
import { CircularProgress } from '@mui/material' import { CircularProgress } from '@mui/material'
import type { Location } from 'vscode-languageserver-protocol' import type { Location } from 'vscode-languageserver-protocol'
import * as monaco from 'monaco-editor/esm/vs/editor/editor.api.js' import * as monaco from 'monaco-editor/esm/vs/editor/editor.api.js'

@ -4,7 +4,7 @@ import { useSelector } from 'react-redux'
import Split from 'react-split' import Split from 'react-split'
import { Box, Typography, CircularProgress } from '@mui/material' import { Box, Typography, CircularProgress } from '@mui/material'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faGlobe, faBook, faArrowRight, faArrowLeft } from '@fortawesome/free-solid-svg-icons' import { faGlobe, faArrowRight, faArrowLeft } from '@fortawesome/free-solid-svg-icons'
import { GameIdContext } from '../app' import { GameIdContext } from '../app'
import { useAppDispatch } from '../hooks' import { useAppDispatch } from '../hooks'

Loading…
Cancel
Save