fix: Ui changes and Hyperlink fix
This commit is contained in:
parent
bd883a9c96
commit
942970f7ac
@ -330,7 +330,7 @@ async function buildCartResponse(params: {
|
||||
const cartCount = nextCartLines.reduce((sum, line) => sum + line.quantity, 0)
|
||||
|
||||
return {
|
||||
content: `Added ${product.title}${variantText}. Your cart now has ${cartCount} item${cartCount === 1 ? "" : "s"}: ${cartUrl}`,
|
||||
content: `Added ${product.title}${variantText}. Your cart now has ${cartCount} item${cartCount === 1 ? "" : "s"}.`,
|
||||
actions: [buildOpenCartAction(cartUrl, actionProduct)],
|
||||
pendingCartProduct: null,
|
||||
cartLines: nextCartLines,
|
||||
|
||||
@ -713,46 +713,6 @@ export default function JunoEngineModulesPage() {
|
||||
)
|
||||
}
|
||||
|
||||
function renderAddModuleCard() {
|
||||
return (
|
||||
<button
|
||||
type="button"
|
||||
className={cn(
|
||||
cardShell,
|
||||
isLight
|
||||
? "border-dashed border-indigo-200 bg-indigo-50/40 hover:bg-indigo-50"
|
||||
: "border-dashed border-indigo-400/30 bg-indigo-500/10 hover:bg-indigo-500/15",
|
||||
)}
|
||||
onClick={() => setModalId(ADD_CUSTOM_MODULE_ID)}
|
||||
>
|
||||
<span className="p-5 flex items-start gap-4 w-full">
|
||||
<span className={iconWrap}>
|
||||
<Plus className="w-5 h-5" />
|
||||
</span>
|
||||
<span className="flex-1 min-w-0 text-left">
|
||||
<span
|
||||
className={cn(
|
||||
"font-black text-base leading-tight block",
|
||||
isLight ? "text-slate-900" : "text-white",
|
||||
)}
|
||||
>
|
||||
Add Module
|
||||
</span>
|
||||
<span
|
||||
className={cn(
|
||||
"text-xs mt-1 line-clamp-2 block",
|
||||
isLight ? "text-slate-500" : "text-slate-400",
|
||||
)}
|
||||
>
|
||||
Create custom knowledge with title, subtitle, and answer.
|
||||
</span>
|
||||
</span>
|
||||
<ChevronRight className="w-5 h-5 shrink-0 text-slate-400 self-center" />
|
||||
</span>
|
||||
</button>
|
||||
)
|
||||
}
|
||||
|
||||
function renderCustomModuleEditor() {
|
||||
const subtle = isLight ? "text-slate-600" : "text-slate-400"
|
||||
const rowBorder = isLight ? "border-slate-200 bg-slate-50/50" : "border-white/10 bg-white/[0.03]"
|
||||
@ -1249,6 +1209,7 @@ export default function JunoEngineModulesPage() {
|
||||
{toast}
|
||||
</p>
|
||||
) : null}
|
||||
<div className="flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-end">
|
||||
<button
|
||||
type="button"
|
||||
disabled={saving}
|
||||
@ -1262,6 +1223,21 @@ export default function JunoEngineModulesPage() {
|
||||
)}
|
||||
Save changes
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
disabled={saving}
|
||||
onClick={() => setModalId(ADD_CUSTOM_MODULE_ID)}
|
||||
className={cn(
|
||||
"inline-flex items-center justify-center gap-2 rounded-xl border px-5 py-2.5 text-sm font-bold transition-colors disabled:opacity-50 sm:min-w-[10rem]",
|
||||
isLight
|
||||
? "border-indigo-200 bg-indigo-50 text-indigo-700 hover:bg-indigo-100"
|
||||
: "border-indigo-400/30 bg-indigo-500/10 text-indigo-200 hover:bg-indigo-500/20",
|
||||
)}
|
||||
>
|
||||
<Plus className="h-4 w-4" />
|
||||
Add Module
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
) : null}
|
||||
</div>
|
||||
@ -1364,7 +1340,6 @@ export default function JunoEngineModulesPage() {
|
||||
{renderCustomModuleCard(module)}
|
||||
</div>
|
||||
))}
|
||||
<div className="contents">{renderAddModuleCard()}</div>
|
||||
</div>
|
||||
|
||||
{modal}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user