@rubytech/create-maxy 0.3.8 → 0.3.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/payload/maxy/app/globals.css +31 -0
- package/payload/maxy/app/page.tsx +50 -34
package/package.json
CHANGED
|
@@ -1340,11 +1340,42 @@ a:hover {
|
|
|
1340
1340
|
|
|
1341
1341
|
.admin-pin-form form {
|
|
1342
1342
|
display: flex;
|
|
1343
|
+
flex-direction: column;
|
|
1343
1344
|
gap: 8px;
|
|
1344
1345
|
width: 100%;
|
|
1345
1346
|
max-width: 300px;
|
|
1346
1347
|
}
|
|
1347
1348
|
|
|
1349
|
+
.pin-input-row {
|
|
1350
|
+
display: flex;
|
|
1351
|
+
gap: 8px;
|
|
1352
|
+
align-items: center;
|
|
1353
|
+
}
|
|
1354
|
+
|
|
1355
|
+
.pin-input-row .chat-input {
|
|
1356
|
+
flex: 1;
|
|
1357
|
+
}
|
|
1358
|
+
|
|
1359
|
+
.pin-toggle {
|
|
1360
|
+
background: none;
|
|
1361
|
+
border: 1px solid var(--border-strong);
|
|
1362
|
+
border-radius: 50%;
|
|
1363
|
+
width: 40px;
|
|
1364
|
+
height: 40px;
|
|
1365
|
+
cursor: pointer;
|
|
1366
|
+
font-size: 16px;
|
|
1367
|
+
color: var(--text-secondary);
|
|
1368
|
+
flex-shrink: 0;
|
|
1369
|
+
display: flex;
|
|
1370
|
+
align-items: center;
|
|
1371
|
+
justify-content: center;
|
|
1372
|
+
transition: border-color 0.15s;
|
|
1373
|
+
}
|
|
1374
|
+
|
|
1375
|
+
.pin-toggle:hover {
|
|
1376
|
+
border-color: var(--sage);
|
|
1377
|
+
}
|
|
1378
|
+
|
|
1348
1379
|
.admin-pin-error {
|
|
1349
1380
|
color: #c44;
|
|
1350
1381
|
font-size: 14px;
|
|
@@ -16,6 +16,7 @@ export default function AdminPage() {
|
|
|
16
16
|
const [pin, setPin] = useState('')
|
|
17
17
|
const [confirmPin, setConfirmPin] = useState('')
|
|
18
18
|
const [pinError, setPinError] = useState('')
|
|
19
|
+
const [showPin, setShowPin] = useState(false)
|
|
19
20
|
const [sessionKey, setSessionKey] = useState<string | null>(null)
|
|
20
21
|
const [messages, setMessages] = useState<Message[]>([])
|
|
21
22
|
const [input, setInput] = useState('')
|
|
@@ -215,25 +216,35 @@ export default function AdminPage() {
|
|
|
215
216
|
</header>
|
|
216
217
|
<div className="admin-pin-form">
|
|
217
218
|
<form onSubmit={handleSetPin}>
|
|
218
|
-
<input
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
type="
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
219
|
+
<div className="pin-input-row">
|
|
220
|
+
<input
|
|
221
|
+
ref={pinInputRef}
|
|
222
|
+
type={showPin ? 'text' : 'password'}
|
|
223
|
+
value={pin}
|
|
224
|
+
onChange={e => setPin(e.target.value)}
|
|
225
|
+
placeholder="Choose a PIN"
|
|
226
|
+
className="chat-input"
|
|
227
|
+
autoFocus
|
|
228
|
+
/>
|
|
229
|
+
<button type="button" className="pin-toggle" onClick={() => setShowPin(!showPin)} aria-label={showPin ? 'Hide' : 'Show'}>
|
|
230
|
+
{showPin ? '◉' : '○'}
|
|
231
|
+
</button>
|
|
232
|
+
</div>
|
|
233
|
+
<div className="pin-input-row">
|
|
234
|
+
<input
|
|
235
|
+
type={showPin ? 'text' : 'password'}
|
|
236
|
+
value={confirmPin}
|
|
237
|
+
onChange={e => setConfirmPin(e.target.value)}
|
|
238
|
+
placeholder="Confirm PIN"
|
|
239
|
+
className="chat-input"
|
|
240
|
+
/>
|
|
241
|
+
<button type="submit" className="chat-send" disabled={!pin || !confirmPin} aria-label="Set PIN">
|
|
242
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
|
|
243
|
+
<line x1="5" y1="12" x2="19" y2="12" />
|
|
244
|
+
<polyline points="12 5 19 12 12 19" />
|
|
245
|
+
</svg>
|
|
246
|
+
</button>
|
|
247
|
+
</div>
|
|
237
248
|
</form>
|
|
238
249
|
{pinError && <p className="admin-pin-error">{pinError}</p>}
|
|
239
250
|
</div>
|
|
@@ -252,21 +263,26 @@ export default function AdminPage() {
|
|
|
252
263
|
</header>
|
|
253
264
|
<div className="admin-pin-form">
|
|
254
265
|
<form onSubmit={handleLogin}>
|
|
255
|
-
<input
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
<
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
266
|
+
<div className="pin-input-row">
|
|
267
|
+
<input
|
|
268
|
+
ref={pinInputRef}
|
|
269
|
+
type={showPin ? 'text' : 'password'}
|
|
270
|
+
value={pin}
|
|
271
|
+
onChange={e => setPin(e.target.value)}
|
|
272
|
+
placeholder="Enter PIN"
|
|
273
|
+
className="chat-input"
|
|
274
|
+
autoFocus
|
|
275
|
+
/>
|
|
276
|
+
<button type="button" className="pin-toggle" onClick={() => setShowPin(!showPin)} aria-label={showPin ? 'Hide' : 'Show'}>
|
|
277
|
+
{showPin ? '◉' : '○'}
|
|
278
|
+
</button>
|
|
279
|
+
<button type="submit" className="chat-send" disabled={!pin}>
|
|
280
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
|
|
281
|
+
<line x1="5" y1="12" x2="19" y2="12" />
|
|
282
|
+
<polyline points="12 5 19 12 12 19" />
|
|
283
|
+
</svg>
|
|
284
|
+
</button>
|
|
285
|
+
</div>
|
|
270
286
|
</form>
|
|
271
287
|
{pinError && <p className="admin-pin-error">{pinError}</p>}
|
|
272
288
|
</div>
|