aboutsummaryrefslogtreecommitdiff
path: root/src/components/Form.astro
diff options
context:
space:
mode:
authorkartofen <mladenovnasko0@gmail.com>2022-08-29 19:01:20 +0300
committerkartofen <mladenovnasko0@gmail.com>2022-08-29 19:01:20 +0300
commit8e4163e3f08e29f38fe87c59d8cfb91e0fa98063 (patch)
tree2b117f4bafa0a4d10252eef95ca868a247a081a1 /src/components/Form.astro
parent9d952483f250a97cbeab4061fa1c4e68341b330f (diff)
everything works
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');