Skip to content

Commit d9b7976

Browse files
authored
Merge pull request #30 from MobileReality/fix/demo-seo
Fix/demo seo
2 parents 2616c59 + b2930b6 commit d9b7976

7 files changed

Lines changed: 65 additions & 3 deletions

File tree

.changeset/nine-streets-fix.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@mobile-reality/mdma-demo": patch
3+
---
4+
5+
updated seo, patch fixes in demo app

demo/index.html

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,25 @@
44
<meta charset="UTF-8" />
55
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
66
<link rel="icon" type="image/svg+xml" href="/mdma/logo.svg" />
7-
<title>MDMA - Interactive Document Demo</title>
7+
<title>MDMA — The open standard for AI-generated interactive UI</title>
8+
9+
<!-- SEO -->
10+
<meta name="description" content="MDMA extends Markdown with interactive UI components — forms, tables, approval gates — generated by LLMs and rendered instantly. Open standard, schema-validated, framework-agnostic." />
11+
<meta name="keywords" content="MDMA, AI, LLM, interactive UI, Markdown, open standard, generative UI, prompt, components" />
12+
<meta name="author" content="Mobile Reality" />
13+
14+
<!-- Open Graph -->
15+
<meta property="og:type" content="website" />
16+
<meta property="og:url" content="https://mobilereality.github.io/mdma/" />
17+
<meta property="og:title" content="MDMA — The open standard for AI-generated interactive UI" />
18+
<meta property="og:description" content="MDMA extends Markdown with interactive UI components — forms, tables, approval gates — generated by LLMs and rendered instantly. Open standard, schema-validated, framework-agnostic." />
19+
<meta property="og:image" content="https://mobilereality.github.io/mdma/logo.png" />
20+
21+
<!-- Twitter / X -->
22+
<meta name="twitter:card" content="summary" />
23+
<meta name="twitter:title" content="MDMA — The open standard for AI-generated interactive UI" />
24+
<meta name="twitter:description" content="MDMA extends Markdown with interactive UI components — forms, tables, approval gates — generated by LLMs and rendered instantly." />
25+
<meta name="twitter:image" content="https://mobilereality.github.io/mdma/512x512logo.png" />
826
</head>
927
<body>
1028
<div id="root"></div>

demo/public/512x512logo.png

678 KB
Loading

demo/public/logo.png

4.03 MB
Loading

demo/src/agent/AgentSettings.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ export const AgentSettings = memo(function AgentSettings({ config, onUpdate }: A
8080

8181
const provider = config.provider ?? 'anthropic';
8282
const models = PROVIDER_MODELS[provider] ?? [];
83+
const missingKey = !getApiKey(config, provider);
8384

8485
function switchProvider(next: NonNullable<AnthropicConfig['provider']>) {
8586
if (next === provider) return;
@@ -97,9 +98,11 @@ export const AgentSettings = memo(function AgentSettings({ config, onUpdate }: A
9798
type="button"
9899
className="chat-settings-toggle"
99100
data-open={open ? 'true' : 'false'}
101+
data-alert={missingKey ? 'true' : undefined}
100102
onClick={() => setOpen((v) => !v)}
101103
>
102104
Agent Settings
105+
{missingKey && <span className="settings-missing-key">API key required</span>}
103106
</button>
104107
{open && (
105108
<div className="chat-settings">

demo/src/chat/ChatSettings.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,16 +74,19 @@ export const ChatSettings = memo(function ChatSettings({
7474
const models = provider ? MODEL_OPTIONS[provider] : null;
7575
const isKnownModel = models?.some((m) => m.value === config.model);
7676
const isCustom = !models || !isKnownModel;
77+
const missingKey = !config.apiKey;
7778

7879
return (
7980
<div className="chat-settings-bar">
8081
<button
8182
type="button"
8283
className="chat-settings-toggle"
8384
data-open={open ? 'true' : 'false'}
85+
data-alert={missingKey ? 'true' : undefined}
8486
onClick={() => setOpen(!open)}
8587
>
8688
LLM Settings
89+
{missingKey && <span className="settings-missing-key">API key required</span>}
8790
</button>
8891
{open && (
8992
<div className="chat-settings">

demo/src/styles.css

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1452,6 +1452,32 @@ body {
14521452
color: #6c5ce7;
14531453
}
14541454

1455+
.chat-settings-toggle[data-alert="true"] {
1456+
color: #dc2626;
1457+
background: #fff1f1;
1458+
border-left: 3px solid #dc2626;
1459+
}
1460+
1461+
.chat-settings-toggle[data-alert="true"]:hover {
1462+
color: #b91c1c;
1463+
background: #ffe4e4;
1464+
}
1465+
1466+
.chat-settings-toggle[data-alert="true"]::after {
1467+
color: #dc2626;
1468+
}
1469+
1470+
.settings-missing-key {
1471+
font-size: 11px;
1472+
font-weight: 600;
1473+
color: #dc2626;
1474+
background: #fee2e2;
1475+
border: 1px solid #fca5a5;
1476+
border-radius: 4px;
1477+
padding: 1px 6px;
1478+
margin-left: 10px;
1479+
}
1480+
14551481
.chat-settings {
14561482
padding: 0 24px 12px;
14571483
}
@@ -1488,12 +1514,19 @@ body {
14881514
.ai-preset-btn:hover {
14891515
border-color: #6c5ce7;
14901516
color: #6c5ce7;
1517+
background: #f5f3ff;
14911518
}
14921519

1493-
.ai-preset-btn--active {
1520+
.ai-preset-btn--active,
1521+
.ai-preset-btn--active:hover {
14941522
background: #6c5ce7;
1495-
border-color: #6c5ce7;
1523+
border-color: #5b4bd5;
14961524
color: #fff;
1525+
cursor: default;
1526+
}
1527+
1528+
.ai-preset-btn--active:hover {
1529+
background: #5b4bd5;
14971530
}
14981531

14991532
.ai-setting {

0 commit comments

Comments
 (0)