+4
-21
atproto-notifications/src/components/SecretPassword.jsx
+4
-21
atproto-notifications/src/components/SecretPassword.jsx
···
2
2
import { PostJson } from './Fetch';
3
3
4
4
export function SecretPassword({ did, role }) {
5
-
const [begun, setBegun] = useState(false);
6
-
const [pw, setPw] = useState('');
7
5
const [submission, setSubmission] = useState(0);
8
6
const [submitting, setSubmitting] = useState(false);
9
7
···
15
13
16
14
return (
17
15
<form method="post" onSubmit={handleSubmit}>
18
-
<h2>Secret password required</h2>
19
-
<p>This demo is not ready for public yet, but you can get early access as a <a href="https://github.com/sponsors/uniphil/" target="_blank">github sponsor</a> or <a href="https://ko-fi.com/bad_example" target="_blank">ko-fi supporter</a>.</p>
16
+
<h2>Secret early access</h2>
17
+
<p>This demo is still in development! Your support helps keep it going: <a href="https://github.com/sponsors/uniphil/" target="_blank">github sponsors</a>, <a href="https://ko-fi.com/bad_example" target="_blank">ko-fi</a>.</p>
20
18
21
19
{submitting ? (
22
20
<PostJson
23
21
key={submission}
24
22
endpoint="/super-top-secret-access"
25
-
data={{ secret_password: pw }}
23
+
data={{ secret_password: "letmein" }}
26
24
credentials
27
25
loading={() => (<>Checking…</>)}
28
26
error={e => {
···
50
48
/>
51
49
) : (
52
50
<p>
53
-
<label>
54
-
Password:
55
-
{' '}
56
-
<input
57
-
type="text"
58
-
value={pw}
59
-
onFocus={() => setBegun(true)}
60
-
onChange={e => setPw(e.target.value)}
61
-
/>
62
-
</label>
63
-
{' '}
64
-
{begun && (
65
-
<button type="submit" className="subtle">
66
-
unlock
67
-
</button>
68
-
)}
51
+
<button type="submit">Let me in</button>
69
52
</p>
70
53
)}
71
54
</form>