@@ -89,9 +89,9 @@ const SecretView = ({ id, stat }: SecretViewProps) => {
8989 return (
9090 < React . Fragment key = { id } >
9191 < tr >
92- < td className = { `border-b border-gray-400/25 text-center ${ unlocked ? 'bg-green-300/50' : 'bg-gray-800 ' } pointer-events-none select-none justify-center items-center` } >
92+ < td className = { `border-b border-t border- gray-400/25 text-center ${ unlocked ? 'bg-green-300/50' : '' } pointer-events-none select-none justify-center items-center` } >
9393 < FontAwesomeIcon icon = { stat . isUnlocked ? faUnlockAlt : faLock }
94- className = { `py-3 w-full h-full mx-3` } size = "lg" />
94+ className = { `py-3 w-full h-full mx-3` } />
9595 </ td >
9696 < td className = { `border border-gray-300/25 text-ellipsis text-nowrap text-xs md:text-lg px-2 ${ ! unlocked && 'text-gray-400' } ` }
9797 ref = { elementRef } >
@@ -123,11 +123,24 @@ const SecretView = ({ id, stat }: SecretViewProps) => {
123123export const SecretsView = ( ) => {
124124
125125 const { stats, secrets, secretGroups } = useSecret ( ) ;
126+ const [ allUnlocked , setAllUnlocked ] = useState ( false ) ;
127+
128+ useEffect ( ( ) => {
129+
130+ if ( ! stats ) return ;
131+
132+ const lockedCount = Array . from ( stats ) . filter ( ( [ , stat ] ) => {
133+ return ! stat . isUnlocked ;
134+ } ) . length ;
135+
136+ setAllUnlocked ( lockedCount !== 0 ) ;
137+
138+ } , [ stats ] ) ;
126139
127140 return (
128141 < >
129- < div className = "modal-content modal-content-secrets text-white h-full lg:m-4 " >
130- < table className = "table-auto border-collapse mx-auto w-full" >
142+ < div className = "modal-content modal-content-secrets text-white h-full grid " >
143+ < table className = "table-auto border-collapse mx-auto mb-0 w-full lg:mt-5 lg:max-w-[90%] " >
131144 < thead className = "bg-gray-600/40" >
132145 < tr className = "content-center" >
133146 < th className = " text-sm md:text-lg border border-gray-400/25" >
@@ -151,9 +164,8 @@ export const SecretsView = () => {
151164 } ) ;
152165 return (
153166 < React . Fragment key = { g } >
154- < tr className = "bg-gray-600/40" >
155- < td />
156- < th className = "md:text-xl py-2 pl-2 text-left align-middle pointer-events-none select-none" colSpan = { 4 } >
167+ < tr className = "" >
168+ < th className = "text-lg md:text-xl py-2 lg:py-5 pl-2 my-2 text-left align-middle pointer-events-none select-none" colSpan = { 4 } >
157169 { group . title }
158170 </ th >
159171 </ tr >
@@ -170,6 +182,15 @@ export const SecretsView = () => {
170182 }
171183 </ tbody >
172184 </ table >
185+ {
186+ allUnlocked && (
187+ < div className = "h-full w-full grid" >
188+ < p className = "opacity-50 align-middle my-auto text-center mx-2" >
189+ { `Tip: You can tap on a hidden secret's name ${ SECRET_TAP_MIN } times instead of unlocking them normally.` }
190+ </ p >
191+ </ div >
192+ )
193+ }
173194 </ div >
174195 </ >
175196 ) ;
0 commit comments