back to logic gates
This commit is contained in:
parent
2c6fa3a281
commit
76e48bf8d5
|
@ -4,23 +4,42 @@ import ListItemIcon from '@material-ui/core/ListItemIcon'
|
|||
import ListItemText from '@material-ui/core/ListItemText'
|
||||
import Icon from '@material-ui/core/Icon'
|
||||
import { useTranslation } from '../../internalisation/helpers/useLanguage'
|
||||
import { Link } from 'react-router-dom'
|
||||
|
||||
const BackToSimulation = () => {
|
||||
const translation = useTranslation()
|
||||
import { Link, Route } from 'react-router-dom'
|
||||
|
||||
const linkButton = (to: string, text: string, contained = true) => {
|
||||
const a = 'arrow_back_ios'
|
||||
return (
|
||||
<Link to="/">
|
||||
<ListItem button className="contained">
|
||||
<Link to={to}>
|
||||
<ListItem button className={contained ? 'contained' : ''}>
|
||||
<ListItemIcon>
|
||||
<Icon>arrow_back_ios</Icon>
|
||||
<Icon>
|
||||
{contained ? 'device_hub' : 'keyboard_arrow_left'}
|
||||
</Icon>
|
||||
</ListItemIcon>
|
||||
<ListItemText>
|
||||
{translation.sidebar.backToSimulation}
|
||||
</ListItemText>
|
||||
<ListItemText>{text}</ListItemText>
|
||||
</ListItem>
|
||||
</Link>
|
||||
)
|
||||
}
|
||||
|
||||
const BackToSimulation = () => {
|
||||
const translation = useTranslation()
|
||||
|
||||
return (
|
||||
<>
|
||||
{linkButton('/', translation.sidebar.backToSimulation)}
|
||||
<Route
|
||||
path="/info/:name"
|
||||
component={() => {
|
||||
return linkButton(
|
||||
'/gates',
|
||||
translation.sidebar.backToGates,
|
||||
false
|
||||
)
|
||||
}}
|
||||
/>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
export default BackToSimulation
|
||||
|
|
|
@ -11,7 +11,8 @@ export const EnglishTranslation: Translation = {
|
|||
openSimulation: 'Open simulations',
|
||||
simulation: 'Simulation',
|
||||
language: 'Language',
|
||||
backToSimulation: 'Back to simulation'
|
||||
backToSimulation: 'Back to simulation',
|
||||
backToGates: 'Back to logic gates'
|
||||
},
|
||||
createSimulation: {
|
||||
mode: {
|
||||
|
|
|
@ -11,7 +11,8 @@ export const DutchTranslation: Translation = {
|
|||
openSimulation: 'Open simulatie',
|
||||
simulation: 'Todo',
|
||||
language: 'Taal',
|
||||
backToSimulation: 'Todo'
|
||||
backToSimulation: 'Todo',
|
||||
backToGates: 'Todo'
|
||||
},
|
||||
actions: {
|
||||
'delete selection': 'Todo',
|
||||
|
|
|
@ -11,7 +11,8 @@ export const RomanianTranslation: Translation = {
|
|||
logicGates: 'Porți logice',
|
||||
simulation: 'Simulație',
|
||||
language: 'Limba',
|
||||
backToSimulation: 'Înapoi la simulație'
|
||||
backToSimulation: 'Înapoi la simulație',
|
||||
backToGates: 'Înapoi la porțile logice'
|
||||
},
|
||||
createSimulation: {
|
||||
mode: {
|
||||
|
|
|
@ -17,6 +17,7 @@ export interface Translation {
|
|||
simulation: string
|
||||
language: string
|
||||
backToSimulation: string
|
||||
backToGates: string
|
||||
}
|
||||
createSimulation: {
|
||||
mode: {
|
||||
|
|
|
@ -58,7 +58,7 @@ export const descriptions: Record<string, string> = {
|
|||
only true if a === b and the 3rd input is only true if a < b.
|
||||
`,
|
||||
'parallel delayer': `
|
||||
Delays the inputs by a certain delay. ${delay}
|
||||
Delays the inputs by a amount of time. ${delay}
|
||||
`,
|
||||
'sequential delayer': `
|
||||
Delays the input by a certain amount of time relative to the last change. ${delay}
|
||||
|
|
Loading…
Reference in a new issue