Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Chebi Frontend
Manage
Activity
Members
Labels
Plan
Issues
20
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package Registry
Container Registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ChEMBL
ChEBI
ChEBI-2.0
Chebi Frontend
Commits
a51add5b
Commit
a51add5b
authored
1 year ago
by
Muhammad Arsalan
Browse files
Options
Downloads
Patches
Plain Diff
improve search result page
parent
91e077b6
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
components/search/ResultsList.vue
+55
-1
55 additions, 1 deletion
components/search/ResultsList.vue
model/searchResults.ts
+1
-0
1 addition, 0 deletions
model/searchResults.ts
with
56 additions
and
1 deletion
components/search/ResultsList.vue
+
55
−
1
View file @
a51add5b
...
...
@@ -36,7 +36,8 @@
></h4>
</NuxtLink>
</v-card-title>
<v-row
style=
"flex: 1"
>
<!-- Card body display if SVG structure exists -->
<v-row
style=
"flex: 1"
v-if=
"result._source.default_structure"
>
<v-col
cols=
"4"
style=
"
...
...
@@ -90,6 +91,58 @@
</v-card-text>
</v-col>
</v-row>
<!-- Card body display if structure does not exist (show definition instead)-->
<v-row
style=
"flex: 1"
v-else
>
<v-col
cols=
"12"
style=
"
display: flex;
justify-content: center;
align-items: center;
padding-right: 0px;
"
>
<v-card-text>
<div
class=
"text-overflow-adjust"
>
<b>
CHEBI:{{ result._id }}
</b><br
/>
</div>
<div
class=
"text-overflow-adjust"
>
<b>
Stars:
</b>
<SharedDisplayStars
:stars=
"result._source.stars"
:show-tooltip=
"false"
/>
</div>
<div>
<div
class=
"text-overflow-adjust"
v-if=
"result._source.formula"
>
<b>
Formula:
</b>
{{ result._source.formula }}
<br
/>
</div>
<div
class=
"text-overflow-adjust"
v-if=
"result._source.mass"
>
<b>
Mass:
</b>
{{ result._source.mass }}
<br
/>
</div>
<div
class=
"text-overflow-adjust"
v-if=
"result._source.charge"
>
<b>
Charge:
</b>
{{ result._source.charge }}
<br
/>
</div>
</div>
<div
class=
""
v-if=
"result._source.definition"
>
<b>
Definition:
</b>
{{ result._source.definition }}
</div>
</v-card-text>
</v-col>
</v-row>
</v-card>
</v-hover>
</v-col>
...
...
@@ -113,6 +166,7 @@ defineProps<{
stars
:
number
;
monoisotopicmass
:
number
;
ascii_name
:
string
;
definition
:
string
;
};
}[];
};
...
...
This diff is collapsed.
Click to expand it.
model/searchResults.ts
+
1
−
0
View file @
a51add5b
...
...
@@ -12,6 +12,7 @@ interface SearchResult {
stars
:
number
;
monoisotopicmass
:
number
;
ascii_name
:
string
;
definition
:
string
;
};
}[];
}
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment