Skip to content

Commit

Permalink
feat: add link to task.analysis.list
Browse files Browse the repository at this point in the history
  • Loading branch information
pirhoo committed Oct 3, 2024
1 parent 9aa0048 commit b9f3939
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
20 changes: 16 additions & 4 deletions src/components/Widget/WidgetEntities.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</div>
</template>
<div class="widget widget--entities d-flex h-100 w-100">
<template v-if="total">
<template v-if="total || isServer">
<div class="row flex-grow-1">
<div v-for="category in categories" :key="category" class="col-6 col-lg">
<widget-barometer
Expand All @@ -19,9 +19,15 @@
</div>
</div>
</template>
<p v-else class="text-muted text-center w-100 align-self-center m-0">
{{ $t('widget.noEntities') }}
</p>
<div v-else class="text-center w-100 align-self-center">
<p>{{ $t('widget.noEntitiesFindSome') }}</p>
<button-icon
:to="{ name: 'task.analysis.list' }"
icon-left="plus"
variant="outline-action"
:label="$t('widget.findEntities')"
/>
</div>
</div>
</v-wait>
</template>
Expand All @@ -32,15 +38,18 @@ import bodybuilder from 'bodybuilder'
import WidgetBarometer from './WidgetBarometer'
import { MODE_NAME } from '@/mode'
import { getCategoryIcon, getCategoryVariant } from '@/utils/entity'
import { ENTITY_CATEGORY } from '@/enums/entityCategories'
import ButtonIcon from '@/components/Button/ButtonIcon'
/**
* Widget to display a summary of entities
*/
export default {
name: 'WidgetEntities',
components: {
ButtonIcon,
WidgetBarometer
},
props: {
Expand Down Expand Up @@ -73,6 +82,9 @@ export default {
},
project() {
return this.$store.state.insights.project
},
isServer() {
return this.$config?.get('mode') === MODE_NAME.SERVER
}
},
watch: {
Expand Down
2 changes: 2 additions & 0 deletions src/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1237,6 +1237,8 @@
"noRecommendations": "No recommendations",
"noFolders": "No folders",
"noEntities": "No named entities",
"noEntitiesFindSome": "You have not found entities yet. Want to identify some?",
"findEntities": "Find entities",
"languages": {
"title": "Languages"
},
Expand Down

0 comments on commit b9f3939

Please sign in to comment.