trailing slash fix

This commit is contained in:
2026-09-10 21:40:29 +02:00
parent fb8e3d0ed9
commit 58ce567c86
6 changed files with 27 additions and 9 deletions
+6 -6
View File
@@ -3,11 +3,11 @@ import { playLine1Sequence, markConnected } from '../lib/sound';
type DialState = 'idle' | 'dialing';
export default function ModemIntro() {
const [state, setState] = useState<DialState>('idle');
function selectLine(line: 1 | 2) {
if (line === 2) { markConnected(); window.location.href = '/bbs/'; return; }
setState('dialing');
playLine1Sequence(() => { markConnected(); window.location.href = '/bbs/'; });
}
function selectLine(line: 1 | 2) {
if (line === 2) { markConnected(); window.location.href = '/bbs'; return; }
setState('dialing');
playLine1Sequence(() => { markConnected(); window.location.href = '/bbs'; });
}
useEffect(() => {
if (state !== 'idle') return;
function onKeyDown(e: KeyboardEvent) {
@@ -23,7 +23,7 @@ export default function ModemIntro() {
| 28k8 [MODEM] ATDT +49-821-2191-038 |
+------------------------------------------+`}</pre>
{state === 'idle' && (
<pre style={{ textAlign: 'center' }}><a href="#" onClick={(e) => { e.preventDefault(); selectLine(1); }}>{`> Line 1: +49-821-2191-038 [VFC V34] 28800 <`}</a>{'\n\n'}<a href="/bbs/" onClick={(e) => { e.preventDefault(); selectLine(2); }}>{`> Line 2: +49-821-2191-036 [X75] 64000 <`}</a>{'\n\n'}<span className="select-line-hint">{`>>>>>>>>> SELECT A LINE TO CONNECT <<<<<<<<<`}</span></pre>
<pre style={{ textAlign: 'center' }}><a href="#" onClick={(e) => { e.preventDefault(); selectLine(1); }}>{`> Line 1: +49-821-2191-038 [VFC V34] 28800 <`}</a>{'\n\n'}<a href="/bbs" onClick={(e) => { e.preventDefault(); selectLine(2); }}>{`> Line 2: +49-821-2191-036 [X75] 64000 <`}</a>{'\n\n'}<span className="select-line-hint">{`>>>>>>>>> SELECT A LINE TO CONNECT <<<<<<<<<`}</span></pre>
)}
{state === 'dialing' && <p style={{ textAlign: 'center' }}>Dialing... please wait.</p>}
</div>
+1 -1
View File
@@ -3,5 +3,5 @@ export interface Props { showBack?: boolean; }
const { showBack = true } = Astro.props;
---
<div class="nav-bar">
{showBack && <a href="/bbs/">[B] Back to Main Menu</a>}
{showBack && <a href="/bbs">[B] Back to Main Menu</a>}
</div>