Skip to content

Commit

Permalink
feat(sentence-suggestions): removes sentence suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
cristiantela committed Aug 7, 2024
1 parent ad06be3 commit 9af19a4
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1,016 deletions.
85 changes: 24 additions & 61 deletions src/components/repository/sidebar/SideBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -198,61 +198,30 @@
: 'sidebar-wrapper__body__element',
]"
/>
<section class="training-menu">
<UnnnicSidebarItem
v-if="getCurrentRepository.authorization.can_contribute"
:icon="
dropSelect === 'isTrainActive'
? 'graph-status-circle-1-1'
: 'graph-status-circle-1'
"
:text="$t('webapp.menu.training')"
:enableTooltip="!collapse"
:active="dropSelect === 'isTrainActive'"
:class="{
'sidebar-wrapper__body--dropdown-open':
dropSelect === 'isTrainActive',
'sidebar-wrapper__body__element': true,
}"
@click.native="openDropdown('isTrainActive')"
>
</UnnnicSidebarItem>
<div
v-show="dropSelect === 'isTrainActive' && collapse"
class="sidebar-wrapper__body__item"
>
<UnnnicSidebarItem
:text="$t('webapp.menu.train')"
:class="[
checkSelectedMenu('repository-training')
? 'sidebar-wrapper__body--active'
: 'sidebar-wrapper__body__element',
]"
@click="
setSelectMenu({
name: 'repository-training',
to: 'repository-training',
closeDrop: false,
})
"
/>
<UnnnicSidebarItem
:text="$t('webapp.menu.suggestion')"
:class="[
checkSelectedMenu('repository-suggestion')
? 'sidebar-wrapper__body--active'
: 'sidebar-wrapper__body__element',
]"
@click="
setSelectMenu({
name: 'repository-suggestion',
to: 'repository-suggestion',
closeDrop: false,
})
"
/>
</div>
</section>

<UnnnicSidebarItem
v-if="getCurrentRepository.authorization.can_contribute"
:icon="
checkSelectedMenu('repository-training')
? 'graph-status-circle-1-1'
: 'graph-status-circle-1'
"
:text="$t('webapp.menu.training')"
:enableTooltip="!collapse"
:active="checkSelectedMenu('repository-training')"
:class="[
checkSelectedMenu('repository-training')
? 'sidebar-wrapper__body--active'
: 'sidebar-wrapper__body__element',
]"
@click="
setSelectMenu({
name: 'repository-training',
to: 'repository-training',
closeDrop: true,
})
"
/>

<UnnnicSidebarItem
v-if="getCurrentRepository.authorization.can_contribute"
Expand Down Expand Up @@ -631,12 +600,6 @@ export default {
) {
this.dropSelect = 'isTestsActive';
}
if (
this.$router.currentRoute.name === 'repository-training' ||
this.$router.currentRoute.name === 'repository-suggestion'
) {
this.dropSelect = 'isTrainActive';
}
},
checkSelectedMenu(menu) {
return menu === this.selectedMenu;
Expand Down
6 changes: 0 additions & 6 deletions src/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import RepositoryResults from '@/views/repository/Results';
import RepositoryResult from '@/views/repository/Result';
import RepositoryVersions from '@/views/repository/Versions';
import RepositoryLog from '@/views/repository/Log';
import PhraseSuggestion from '@/views/repository/PhraseSuggestion';
import Entity from '@/views/repository/Entity';
import Intent from '@/views/repository/Intent';
import NotFound from '@/views/NotFound';
Expand Down Expand Up @@ -186,11 +185,6 @@ const router = new Router({
name: 'repository-training',
component: RepositoryTrainings,
},
{
path: ':ownerNickname/:slug/suggestions/',
name: 'repository-suggestion',
component: PhraseSuggestion,
},
{
path: ':ownerNickname/:slug/database/',
name: 'repository-database',
Expand Down
Loading

0 comments on commit 9af19a4

Please sign in to comment.