Tighten AI prompts modal actions and drop Templates home card.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
co-authored by
Cursor
parent
0aab7b5529
commit
7b2ed7c7b0
@@ -608,20 +608,6 @@
|
|||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.promptsListHeader {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: space-between;
|
|
||||||
gap: 12px;
|
|
||||||
margin-bottom: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.promptsListTitle {
|
|
||||||
font-size: 13px;
|
|
||||||
font-weight: 600;
|
|
||||||
color: var(--text-secondary);
|
|
||||||
}
|
|
||||||
|
|
||||||
.promptsRowActions {
|
.promptsRowActions {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
@@ -1680,72 +1680,55 @@ export function BusinessesPage() {
|
|||||||
{promptsLoading ? (
|
{promptsLoading ? (
|
||||||
<p className={styles.subText}>Loading…</p>
|
<p className={styles.subText}>Loading…</p>
|
||||||
) : promptsBusiness?.domainId ? (
|
) : promptsBusiness?.domainId ? (
|
||||||
<>
|
domainPrompts.length === 0 ? (
|
||||||
<div className={styles.promptsListHeader}>
|
<div className={styles.promptsEmpty}>
|
||||||
<span className={styles.promptsListTitle}>
|
<FileText size={20} aria-hidden="true" />
|
||||||
{domainPrompts.length} prompt{domainPrompts.length === 1 ? '' : 's'}
|
<p>No prompts yet. Use Add to create one from a template.</p>
|
||||||
</span>
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
className={`${styles.btn} ${styles.btnPrimary}`}
|
|
||||||
onClick={openAddDomainPrompt}
|
|
||||||
disabled={promptEditorSubmitting}
|
|
||||||
>
|
|
||||||
<Plus size={16} />
|
|
||||||
Add
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
|
) : (
|
||||||
{domainPrompts.length === 0 ? (
|
<ul className={styles.promptsList}>
|
||||||
<div className={styles.promptsEmpty}>
|
{domainPrompts.map((prompt) => (
|
||||||
<FileText size={20} aria-hidden="true" />
|
<li key={prompt.id} className={styles.promptsRow}>
|
||||||
<p>No prompts yet. Use Add to create one from a template.</p>
|
<div className={styles.promptsRowText}>
|
||||||
</div>
|
<span className={styles.promptsRowName}>{prompt.name}</span>
|
||||||
) : (
|
<span className={styles.promptsRowPreview}>{prompt.body}</span>
|
||||||
<ul className={styles.promptsList}>
|
</div>
|
||||||
{domainPrompts.map((prompt) => (
|
<div className={styles.promptsRowActions}>
|
||||||
<li key={prompt.id} className={styles.promptsRow}>
|
<button
|
||||||
<div className={styles.promptsRowText}>
|
type="button"
|
||||||
<span className={styles.promptsRowName}>{prompt.name}</span>
|
className={styles.controlBtn}
|
||||||
<span className={styles.promptsRowPreview}>{prompt.body}</span>
|
onClick={() => openEditDomainPrompt(prompt)}
|
||||||
</div>
|
disabled={promptBusyId === prompt.id}
|
||||||
<div className={styles.promptsRowActions}>
|
aria-label={`Edit ${prompt.name}`}
|
||||||
<button
|
title="Edit"
|
||||||
type="button"
|
>
|
||||||
className={styles.controlBtn}
|
<Pencil size={15} />
|
||||||
onClick={() => openEditDomainPrompt(prompt)}
|
</button>
|
||||||
disabled={promptBusyId === prompt.id}
|
<button
|
||||||
aria-label={`Edit ${prompt.name}`}
|
type="button"
|
||||||
title="Edit"
|
className={styles.controlBtn}
|
||||||
>
|
onClick={() => void copyDomainPromptLink(prompt.publicUrl)}
|
||||||
<Pencil size={15} />
|
disabled={promptBusyId === prompt.id}
|
||||||
</button>
|
aria-label={`Copy link for ${prompt.name}`}
|
||||||
<button
|
title="Copy public link"
|
||||||
type="button"
|
>
|
||||||
className={styles.controlBtn}
|
<Copy size={15} />
|
||||||
onClick={() => void copyDomainPromptLink(prompt.publicUrl)}
|
</button>
|
||||||
disabled={promptBusyId === prompt.id}
|
<button
|
||||||
aria-label={`Copy link for ${prompt.name}`}
|
type="button"
|
||||||
title="Copy public link"
|
className={styles.controlBtn}
|
||||||
>
|
onClick={() => void removeDomainPromptItem(prompt)}
|
||||||
<Copy size={15} />
|
disabled={promptBusyId === prompt.id}
|
||||||
</button>
|
aria-label={`Remove ${prompt.name}`}
|
||||||
<button
|
title="Remove"
|
||||||
type="button"
|
>
|
||||||
className={styles.controlBtn}
|
<Trash2 size={15} />
|
||||||
onClick={() => void removeDomainPromptItem(prompt)}
|
</button>
|
||||||
disabled={promptBusyId === prompt.id}
|
</div>
|
||||||
aria-label={`Remove ${prompt.name}`}
|
</li>
|
||||||
title="Remove"
|
))}
|
||||||
>
|
</ul>
|
||||||
<Trash2 size={15} />
|
)
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
))}
|
|
||||||
</ul>
|
|
||||||
)}
|
|
||||||
</>
|
|
||||||
) : null}
|
) : null}
|
||||||
|
|
||||||
<div style={{ height: 12 }} />
|
<div style={{ height: 12 }} />
|
||||||
@@ -1758,6 +1741,15 @@ export function BusinessesPage() {
|
|||||||
>
|
>
|
||||||
Close
|
Close
|
||||||
</button>
|
</button>
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
className={`${styles.btn} ${styles.btnPrimary}`}
|
||||||
|
onClick={openAddDomainPrompt}
|
||||||
|
disabled={promptEditorSubmitting || !promptsBusiness?.domainId || promptsLoading}
|
||||||
|
>
|
||||||
|
<Plus size={16} />
|
||||||
|
Add
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</Modal>
|
</Modal>
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { CalendarDays, Building2, Users, Globe, FileText, Settings } from 'lucide-react'
|
import { CalendarDays, Building2, Users, Globe, Settings } from 'lucide-react'
|
||||||
import { useAuth } from '../context/AuthContext'
|
import { useAuth } from '../context/AuthContext'
|
||||||
import { SectionCard } from '../components/SectionCard'
|
import { SectionCard } from '../components/SectionCard'
|
||||||
import styles from '../components/PageContent.module.css'
|
import styles from '../components/PageContent.module.css'
|
||||||
@@ -25,13 +25,6 @@ const sections = [
|
|||||||
linkText: 'View websites',
|
linkText: 'View websites',
|
||||||
href: '/websites',
|
href: '/websites',
|
||||||
},
|
},
|
||||||
{
|
|
||||||
icon: FileText,
|
|
||||||
title: 'Templates',
|
|
||||||
description: 'AI prompt templates per website with shareable public links.',
|
|
||||||
linkText: 'View templates',
|
|
||||||
href: '/templates',
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
icon: Settings,
|
icon: Settings,
|
||||||
title: 'Settings',
|
title: 'Settings',
|
||||||
|
|||||||
Reference in New Issue
Block a user