@@ -10,6 +10,7 @@ import {
1010 GitCommit ,
1111 Cpu ,
1212} from '@phosphor-icons/react' ;
13+ import { useAchievements } from "../../context/AchievementContext" ;
1314
1415const THEMES = {
1516 green : {
@@ -77,14 +78,14 @@ const ScanLine = ({ theme = 'green' }) => (
7778const MiniTerminal = ( { theme, setTheme } ) => {
7879 const navigate = useNavigate ( ) ;
7980 const [ history , setHistory ] = useState ( [
80- { type : 'output' , text : 'FEZ.OS v4.2 .0 initialized...' } ,
81+ { type : 'output' , text : 'FEZ.OS Shell v0.4 .0 initialized...' } ,
8182 { type : 'output' , text : 'Type "help" for available commands.' } ,
8283 ] ) ;
8384 const [ input , setInput ] = useState ( '' ) ;
8485 const [ commandHistory , setCommandHistory ] = useState ( [ ] ) ;
8586 const [ historyIndex , setHistoryIndex ] = useState ( - 1 ) ;
8687 const bottomRef = React . useRef ( null ) ;
87-
88+ const { unlockAchievement } = useAchievements ( ) ;
8889 React . useEffect ( ( ) => {
8990 bottomRef . current ?. scrollIntoView ( { behavior : 'smooth' } ) ;
9091 } , [ history ] ) ;
@@ -258,6 +259,11 @@ const MiniTerminal = ({ theme, setTheme }) => {
258259 return ;
259260 case '' :
260261 break ;
262+ case 'sudo' :
263+ newHistory . push ( { type : 'output' , text : 'Checking user privileges...' , className : `${ THEMES [ theme ] . text } font-bold` } ) ;
264+ newHistory . push ( { type : 'output' , text : `Access Granted...` , className : THEMES [ theme ] . textDim } ) ;
265+ unlockAchievement ( 'su-done' ) ;
266+ break ;
261267 default :
262268 newHistory . push ( { type : 'error' , text : `Command not found: ${ trimmed } ` , className : 'text-red-500 font-bold' } ) ;
263269 }
0 commit comments