Skip to content

Commit b7f89dd

Browse files
committed
Fixed minor style issues
1 parent 5d6438b commit b7f89dd

3 files changed

Lines changed: 30 additions & 9 deletions

File tree

‎src/components/background/secretBackground.css‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ canvas.pixelated {
2222
}
2323

2424
.clock, .psp-clock {
25-
border-color: black !important;
25+
/* border-color: black !important; */
2626
text-shadow: -1px -1px 0 #0000009f, 1px -1px 0 #0000009f, -1px 1px 0 #0000009f, 1px 1px 0 #0000009f;
2727
}
2828

‎src/components/clock/Clock.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ export default function Clock() {
9191
isPspSecretActive
9292
? (
9393
<>
94-
<div className="mx-3 object-scale-down h-8 -my-2 -mt-1">
94+
<div className="mx-3 object-scale-down h-8 -mb-1">
9595
<Image src={pspBatteryIcon} alt="psp battery" className="clock-icon" width={20} height={20} title="100%" />
9696
</div>
9797
</>

‎src/components/modal/views/secrets.tsx‎

Lines changed: 28 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -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) => {
123123
export 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

Comments
 (0)