Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/components/built/Gallery.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ import { useUtilsComponents } from "./UtilsContext";
import { ComputerContext } from "./ComputerContext";
function HomePageCard(_a) {
var content = _a.content;
return (_jsx("div", __assign({ className: "block w-80 p-6 bg-white border border-gray-200 rounded-lg shadow hover:bg-gray-100 dark:bg-gray-800 dark:border-gray-700 dark:hover:bg-gray-700" }, { children: _jsx("pre", __assign({ className: "font-normal overflow-auto text-gray-700 dark:text-gray-400 text-xs" }, { children: content() })) })));
return (_jsx("div", __assign({ className: "block w-72 p-6 bg-white border border-gray-200 rounded-lg shadow hover:bg-gray-100 dark:bg-gray-800 dark:border-gray-700 dark:hover:bg-gray-700" }, { children: _jsx("pre", __assign({ className: "font-normal overflow-auto text-gray-700 dark:text-gray-400 text-xs" }, { children: content() })) })));
}
function ValueComponent(_a) {
var _this = this;
Expand Down Expand Up @@ -92,7 +92,7 @@ function ValueComponent(_a) {
}
function FromRevs(_a) {
var revs = _a.revs, computer = _a.computer;
return (_jsx("div", __assign({ className: "flex flex-wrap gap-4 mb-4 mt-4" }, { children: revs.map(function (rev) { return (_jsx("div", { children: _jsx(Link, __assign({ to: "/objects/".concat(rev), className: "block font-medium text-blue-600 dark:text-blue-500" }, { children: _jsx(ValueComponent, { rev: rev, computer: computer }) })) }, rev)); }) })));
return (_jsx("div", __assign({ className: "flex flex-wrap flex-col max-h-[75vh] gap-4 mb-4 mt-4" }, { children: revs.map(function (rev) { return (_jsx("div", { children: _jsx(Link, __assign({ to: "/objects/".concat(rev), className: "block font-medium text-blue-600 dark:text-blue-500" }, { children: _jsx(ValueComponent, { rev: rev, computer: computer }) })) }, rev)); }) })));
}
function Pagination(_a) {
var isPrevAvailable = _a.isPrevAvailable, handlePrev = _a.handlePrev, isNextAvailable = _a.isNextAvailable, handleNext = _a.handleNext;
Expand Down
4 changes: 3 additions & 1 deletion packages/components/built/common/SmartCallExecutionResult.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,7 @@ export function FunctionResultModalContent(_a) {
navigate("/objects/".concat(functionResult._rev));
window.location.reload();
} }, { children: "smart object" })), "."] })) }));
return (_jsxs("p", __assign({ className: "text-base leading-relaxed text-gray-500 dark:text-gray-400" }, { children: ["You created the value below at Revision ", functionResult._rev, _jsx("pre", { children: functionResult.res.toString() })] })));
if (functionResult._rev && functionResult.res.toString())
return (_jsxs("p", __assign({ className: "text-base leading-relaxed text-gray-500 dark:text-gray-400" }, { children: ["You created the value below at Revision ", functionResult._rev, _jsx("pre", { children: functionResult.res.toString() })] })));
return (_jsx("p", __assign({ className: "text-base leading-relaxed text-gray-500 dark:text-gray-400 p-2" }, { children: functionResult })));
}
4 changes: 2 additions & 2 deletions packages/components/src/Gallery.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export type UserQuery<T extends Class> = Partial<{

function HomePageCard({ content }: any) {
return (
<div className="block w-80 p-6 bg-white border border-gray-200 rounded-lg shadow hover:bg-gray-100 dark:bg-gray-800 dark:border-gray-700 dark:hover:bg-gray-700">
<div className="block w-72 p-6 bg-white border border-gray-200 rounded-lg shadow hover:bg-gray-100 dark:bg-gray-800 dark:border-gray-700 dark:hover:bg-gray-700">
<pre className="font-normal overflow-auto text-gray-700 dark:text-gray-400 text-xs">
{content()}
</pre>
Expand Down Expand Up @@ -81,7 +81,7 @@ function ValueComponent({ rev, computer }: { rev: string; computer: Computer })

function FromRevs({ revs, computer }: { revs: string[]; computer: any }) {
return (
<div className="flex flex-wrap gap-4 mb-4 mt-4">
<div className="flex flex-wrap flex-col max-h-[75vh] gap-4 mb-4 mt-4">
{revs.map((rev) => (
<div key={rev}>
<Link
Expand Down
13 changes: 10 additions & 3 deletions packages/components/src/common/SmartCallExecutionResult.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,17 @@ export function FunctionResultModalContent({ functionResult }: any) {
</>
)

if (functionResult._rev && functionResult.res.toString())
return (
<p className="text-base leading-relaxed text-gray-500 dark:text-gray-400">
You created the value below at Revision {functionResult._rev}
<pre>{functionResult.res.toString()}</pre>
</p>
)

return (
<p className="text-base leading-relaxed text-gray-500 dark:text-gray-400">
You created the value below at Revision {functionResult._rev}
<pre>{functionResult.res.toString()}</pre>
<p className="text-base leading-relaxed text-gray-500 dark:text-gray-400 p-2">
{functionResult}
</p>
)
}