aboutsummaryrefslogtreecommitdiff
path: root/src/components/Form.astro
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/Form.astro')
-rw-r--r--src/components/Form.astro7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/components/Form.astro b/src/components/Form.astro
index 417b569..540a4d4 100644
--- a/src/components/Form.astro
+++ b/src/components/Form.astro
@@ -1,7 +1,11 @@
---
-import '../styles/blackbox.css';
import { sha256 } from 'js-sha256';
+export interface Props {
+ board: string;
+ tid?: string
+}
+
const { board, tid } = Astro.props;
const iphash = sha256(Astro.clientAddress);
---
@@ -31,6 +35,7 @@ const iphash = sha256(Astro.clientAddress);
if(r.status == 200) {
alert('Thread Successfuly Posted');
let id = await r.text();
+ if(id == 'close') window.top.close();
window.location.assign(`/board/${board}/${id}`);
}
else alert('An Error has Accured');