Added ability to change admin password
This commit is contained in:
parent
4880f695fb
commit
fd42eeccdb
2 changed files with 21 additions and 3 deletions
|
|
@ -1,5 +1,3 @@
|
|||
### `Dockerfile`
|
||||
```dockerfile
|
||||
# Multi-Stage Dockerfile for Gothic II Mod Website
|
||||
FROM node:20-alpine AS builder
|
||||
|
||||
|
|
@ -33,4 +31,3 @@ COPY --from=builder /app/cms-data.json ./cms-data.json
|
|||
EXPOSE 3000
|
||||
|
||||
CMD ["node", "dist/server.cjs"]
|
||||
```
|
||||
|
|
|
|||
|
|
@ -457,6 +457,27 @@ export const AdminCMSModal: React.FC<AdminCMSModalProps> = ({
|
|||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Security & Admin PIN Section */}
|
||||
<div className="bg-zinc-950/80 border border-amber-900/60 rounded-xl p-4 mt-6 space-y-3">
|
||||
<h4 className="text-sm font-serif font-bold text-amber-300 flex items-center gap-2">
|
||||
<KeyRound className="w-4 h-4 text-amber-400" />
|
||||
CMS Passwort / Zugangs-PIN
|
||||
</h4>
|
||||
<p className="text-xs text-zinc-400">
|
||||
Hier kannst du das Passwort ändern, das zum Freischalten dieses Modder-Portals benötigt wird.
|
||||
Nach dem Klicken auf <strong className="text-amber-200">"Änderungen Live Speichern"</strong> wird das neue Passwort in <code className="text-amber-300 bg-zinc-900 px-1 py-0.5 rounded">cms-data.json</code> übernommen.
|
||||
</p>
|
||||
<div className="max-w-xs">
|
||||
<label className="block text-xs font-mono text-amber-400 mb-1">Neues CMS Passwort</label>
|
||||
<input
|
||||
type="text"
|
||||
value={formData.adminPin || "gothic2026"}
|
||||
onChange={(e) => setFormData({ ...formData, adminPin: e.target.value })}
|
||||
className="w-full bg-zinc-900 border border-amber-800/80 rounded px-3 py-2 text-sm font-mono text-amber-200 focus:border-amber-500 focus:ring-1 focus:ring-amber-500"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue