Skip to content

Commit

Permalink
Merge pull request #244 from us3r-network/F-appModelLink-ttang
Browse files Browse the repository at this point in the history
feat: app model link
  • Loading branch information
sin-bufan authored Sep 26, 2023
2 parents a64de1c + 7f51f09 commit a7cbd4d
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 22 deletions.
11 changes: 6 additions & 5 deletions packages/client/scan/src/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,12 @@ export default function Header() {
{(showBack && window.history.length > 1 && (
<BackBtn
backAction={() => {
if (location.pathname.startsWith('/models/modelview')) {
navigate('/models')
} else {
navigate(-1)
}
navigate(-1)
// if (location.pathname.startsWith('/models/modelview')) {
// navigate('/models')
// } else {
// navigate(-1)
// }
}}
/>
)) || <div></div>}
Expand Down
11 changes: 8 additions & 3 deletions packages/client/scan/src/container/DappsList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,13 @@ export default function DappsList() {
{(item.modelDetals.length > 0 &&
item.modelDetals.map((item, idx) => {
return (
<span key={idx}>{item.stream_content.name}</span>
<span key={idx}>
<Link
to={`/models/modelview/${item.stream_id}?network=${network}`}
>
{item.stream_content.name}
</Link>
</span>
)
})) ||
'-'}
Expand Down Expand Up @@ -217,9 +223,8 @@ const TableContainer = styled.table<{ isMobile: boolean }>`
align-items: center;
gap: 10px;
max-width: 550px;
overflow: hidden;
text-overflow: ellipsis;
overflow: hidden;
overflow: scroll;
padding-right: 5px;
white-space: nowrap;
}
Expand Down
30 changes: 16 additions & 14 deletions packages/client/scan/src/container/ModelView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -160,20 +160,22 @@ export default function ModelView() {
return (
<Tabs disabledKeys={disabledKeys}>
<div className="title-bar">
<ToolsBox>
<span>{modelStream?.streamContent?.name}</span>
{isAdmin && !isIndexed && (
<>
{indexing ? (
<button>
<Spinner />
</button>
) : (
<button onClick={startIndex}>Start index</button>
)}
</>
)}
</ToolsBox>
{(modelStream?.streamContent?.name && (
<ToolsBox>
<span>{modelStream?.streamContent?.name}</span>
{isAdmin && !isIndexed && (
<>
{indexing ? (
<button>
<Spinner />
</button>
) : (
<button onClick={startIndex}>Start index</button>
)}
</>
)}
</ToolsBox>
)) || <div></div>}
<TabList aria-label="History of Ancient Rome">
<Tab id="Definition">Model Definition</Tab>
<Tab id="Instance">Model Instance Documents</Tab>
Expand Down

0 comments on commit a7cbd4d

Please sign in to comment.