mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-06-08 20:25:19 +02:00
Unify SuccessCard for create and update tools to show only title and URL
This commit is contained in:
parent
2bbb8e6a3a
commit
254ed5ed11
2 changed files with 12 additions and 31 deletions
|
|
@ -423,28 +423,27 @@ function SuccessCard({ result }: { result: SuccessResult }) {
|
|||
<CheckIcon className="size-4 text-green-500" />
|
||||
</div>
|
||||
<div className="min-w-0 flex-1">
|
||||
<p className=" text-[.8rem] text-muted-foreground">
|
||||
<p className="text-[.8rem] text-muted-foreground">
|
||||
{result.message || "Notion page created successfully"}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Show details to verify the arguments were used */}
|
||||
<div className="space-y-2 px-4 py-3 text-xs">
|
||||
<div>
|
||||
<span className="font-medium text-muted-foreground">Page ID: </span>
|
||||
<span className="font-mono">{result.page_id}</span>
|
||||
<span className="font-medium text-muted-foreground">Title: </span>
|
||||
<span>{result.title}</span>
|
||||
</div>
|
||||
{result.content_length != null && (
|
||||
{result.url && (
|
||||
<div>
|
||||
<span className="font-medium text-muted-foreground">Content: </span>
|
||||
<span>{result.content_length} characters</span>
|
||||
</div>
|
||||
)}
|
||||
{result.content_preview && (
|
||||
<div>
|
||||
<span className="font-medium text-muted-foreground">Preview: </span>
|
||||
<span className="text-muted-foreground italic">{result.content_preview}</span>
|
||||
<a
|
||||
href={result.url}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="text-primary hover:underline"
|
||||
>
|
||||
Open in Notion
|
||||
</a>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -393,19 +393,13 @@ function SuccessCard({ result }: { result: SuccessResult }) {
|
|||
</div>
|
||||
</div>
|
||||
|
||||
{/* Show details to verify the update */}
|
||||
<div className="space-y-2 px-4 py-3 text-xs">
|
||||
<div>
|
||||
<span className="font-medium text-muted-foreground">Page ID: </span>
|
||||
<span className="font-mono">{result.page_id}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span className="font-medium text-muted-foreground">Title: </span>
|
||||
<span>{result.title}</span>
|
||||
</div>
|
||||
{result.url && (
|
||||
<div>
|
||||
<span className="font-medium text-muted-foreground">URL: </span>
|
||||
<a
|
||||
href={result.url}
|
||||
target="_blank"
|
||||
|
|
@ -416,18 +410,6 @@ function SuccessCard({ result }: { result: SuccessResult }) {
|
|||
</a>
|
||||
</div>
|
||||
)}
|
||||
{result.content_length != null && (
|
||||
<div>
|
||||
<span className="font-medium text-muted-foreground">Content: </span>
|
||||
<span>{result.content_length} characters</span>
|
||||
</div>
|
||||
)}
|
||||
{result.content_preview && (
|
||||
<div>
|
||||
<span className="font-medium text-muted-foreground">Preview: </span>
|
||||
<span className="text-muted-foreground italic">{result.content_preview}</span>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue