v0.12.0 codes for FCM and rebranded jama to RosterChirp
This commit is contained in:
@@ -3,9 +3,9 @@ import { useState, useEffect, useCallback } from 'react';
|
||||
// ── Constants ─────────────────────────────────────────────────────────────────
|
||||
|
||||
const PLANS = [
|
||||
{ value: 'chat', label: 'JAMA-Chat', desc: 'Chat only' },
|
||||
{ value: 'brand', label: 'JAMA-Brand', desc: 'Chat + Branding' },
|
||||
{ value: 'team', label: 'JAMA-Team', desc: 'Chat + Branding + Groups + Schedule' },
|
||||
{ value: 'chat', label: 'RosterChirp-Chat', desc: 'Chat only' },
|
||||
{ value: 'brand', label: 'RosterChirp-Brand', desc: 'Chat + Branding' },
|
||||
{ value: 'team', label: 'RosterChirp-Team', desc: 'Chat + Branding + Groups + Schedule' },
|
||||
];
|
||||
|
||||
const PLAN_BADGE = {
|
||||
@@ -393,7 +393,7 @@ function KeyEntry({ onSubmit }) {
|
||||
headers: { 'X-Host-Admin-Key': key.trim() },
|
||||
});
|
||||
if (res.ok) {
|
||||
sessionStorage.setItem('jama-host-key', key.trim());
|
||||
sessionStorage.setItem('rosterchirp-host-key', key.trim());
|
||||
onSubmit(key.trim());
|
||||
} else {
|
||||
setError('Invalid admin key');
|
||||
@@ -406,7 +406,7 @@ function KeyEntry({ onSubmit }) {
|
||||
<div style={{ background: '#fff', borderRadius: 12, padding: 40, width: '100%', maxWidth: 380,
|
||||
boxShadow: '0 2px 16px rgba(0,0,0,0.12)', textAlign: 'center' }}>
|
||||
<div style={{ fontSize: 32, marginBottom: 8 }}>🏠</div>
|
||||
<h1 style={{ fontSize: 20, fontWeight: 700, margin: '0 0 4px' }}>JAMA-HOST</h1>
|
||||
<h1 style={{ fontSize: 20, fontWeight: 700, margin: '0 0 4px' }}>RosterChirp-Host</h1>
|
||||
<p style={{ color: '#5f6368', fontSize: 13, margin: '0 0 24px' }}>Host Administration Panel</p>
|
||||
{error && <div style={{ padding: '8px 12px', background: '#fce8e6', color: '#d93025',
|
||||
borderRadius: 6, fontSize: 13, marginBottom: 16 }}>{error}</div>}
|
||||
@@ -428,7 +428,7 @@ function KeyEntry({ onSubmit }) {
|
||||
// ── Main host admin panel ─────────────────────────────────────────────────────
|
||||
|
||||
export default function HostAdmin() {
|
||||
const [adminKey, setAdminKey] = useState(() => sessionStorage.getItem('jama-host-key') || '');
|
||||
const [adminKey, setAdminKey] = useState(() => sessionStorage.getItem('rosterchirp-host-key') || '');
|
||||
const [status, setStatus] = useState(null);
|
||||
const [tenants, setTenants] = useState([]);
|
||||
const [loading, setLoading] = useState(false);
|
||||
@@ -454,7 +454,7 @@ export default function HostAdmin() {
|
||||
} catch (e) {
|
||||
toast(e.message, 'error');
|
||||
if (e.message.includes('Invalid') || e.message.includes('401')) {
|
||||
sessionStorage.removeItem('jama-host-key');
|
||||
sessionStorage.removeItem('rosterchirp-host-key');
|
||||
setAdminKey('');
|
||||
}
|
||||
} finally { setLoading(false); }
|
||||
@@ -479,7 +479,7 @@ export default function HostAdmin() {
|
||||
!search || t.name.toLowerCase().includes(search.toLowerCase()) ||
|
||||
t.slug.toLowerCase().includes(search.toLowerCase())
|
||||
);
|
||||
const baseDomain = status?.baseDomain || 'jamachat.com';
|
||||
const baseDomain = status?.baseDomain || 'rosterchirp.com';
|
||||
|
||||
return (
|
||||
<div style={{ minHeight: '100vh', background: '#f1f3f4', fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif' }}>
|
||||
@@ -489,7 +489,7 @@ export default function HostAdmin() {
|
||||
justifyContent: 'space-between', height: 56 }}>
|
||||
<div style={{ display: 'flex', alignItems: 'center', gap: 10 }}>
|
||||
<span style={{ fontSize: 20 }}>🏠</span>
|
||||
<span style={{ fontWeight: 700, fontSize: 16 }}>JAMA-HOST</span>
|
||||
<span style={{ fontWeight: 700, fontSize: 16 }}>RosterChirp-Host</span>
|
||||
<span style={{ opacity: 0.7, fontSize: 13 }}>/ {baseDomain}</span>
|
||||
</div>
|
||||
<div style={{ display: 'flex', alignItems: 'center', gap: 16 }}>
|
||||
@@ -498,7 +498,7 @@ export default function HostAdmin() {
|
||||
{status.tenants.active} active · {status.tenants.total} total
|
||||
</span>
|
||||
)}
|
||||
<Btn size="sm" variant="secondary" onClick={() => { sessionStorage.removeItem('jama-host-key'); setAdminKey(''); }}>
|
||||
<Btn size="sm" variant="secondary" onClick={() => { sessionStorage.removeItem('rosterchirp-host-key'); setAdminKey(''); }}>
|
||||
Sign Out
|
||||
</Btn>
|
||||
</div>
|
||||
@@ -581,7 +581,7 @@ export default function HostAdmin() {
|
||||
|
||||
{/* Footer */}
|
||||
<div style={{ textAlign: 'center', marginTop: 24, fontSize: 12, color: '#9aa0a6' }}>
|
||||
JAMA-HOST Control Plane · {baseDomain}
|
||||
RosterChirp-Host Control Plane · {baseDomain}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user