forked from verdnatura/salix-front
refs #5995 Added left space to subsection
This commit is contained in:
parent
68935f2a4d
commit
d16c215936
|
@ -55,10 +55,6 @@ function addChildren(module, route, parent) {
|
|||
}
|
||||
}
|
||||
|
||||
const pinnedItems = computed(() => {
|
||||
return items.value.filter((item) => item.isPinned);
|
||||
});
|
||||
|
||||
const items = ref([]);
|
||||
function getRoutes() {
|
||||
if (props.source === 'main') {
|
||||
|
@ -117,46 +113,14 @@ async function togglePinned(item, event) {
|
|||
<template>
|
||||
<QList padding>
|
||||
<template v-if="$props.source === 'main'">
|
||||
<template v-if="this.$route.matched[1].name === 'Dashboard'">
|
||||
<QItemLabel header>
|
||||
{{ t('globals.pinnedModules') }}
|
||||
{{ t('globals.modules') }}
|
||||
</QItemLabel>
|
||||
<template v-for="item in pinnedItems" :key="item.name">
|
||||
<template v-if="item.children">
|
||||
<LeftMenuItemGroup :item="item" group="pinnedModules" class="pinned">
|
||||
<template #side>
|
||||
<QBtn
|
||||
v-if="item.isPinned === true"
|
||||
@click="togglePinned(item, $event)"
|
||||
icon="remove_circle"
|
||||
size="xs"
|
||||
flat
|
||||
round
|
||||
>
|
||||
<QTooltip>{{
|
||||
t('components.leftMenu.removeFromPinned')
|
||||
}}</QTooltip>
|
||||
</QBtn>
|
||||
<QBtn
|
||||
v-if="item.isPinned === false"
|
||||
@click="togglePinned(item, $event)"
|
||||
icon="push_pin"
|
||||
size="xs"
|
||||
flat
|
||||
round
|
||||
>
|
||||
<QTooltip>{{
|
||||
t('components.leftMenu.addToPinned')
|
||||
}}</QTooltip>
|
||||
</QBtn>
|
||||
</template>
|
||||
</LeftMenuItemGroup>
|
||||
</template>
|
||||
|
||||
<LeftMenuItem v-if="!item.children" :item="item" />
|
||||
</template>
|
||||
<QSeparator />
|
||||
<QExpansionItem :label="t('moduleIndex.allModules')">
|
||||
</template>
|
||||
<template v-for="item in items" :key="item.name">
|
||||
<template v-if="item.name === this.$route.matched[1].name || this.$route.matched[1].name === 'Dashboard'">
|
||||
<template v-if="item.children">
|
||||
<LeftMenuItemGroup :item="item" group="modules">
|
||||
<template #side>
|
||||
|
@ -188,7 +152,7 @@ async function togglePinned(item, event) {
|
|||
</LeftMenuItemGroup>
|
||||
</template>
|
||||
</template>
|
||||
</QExpansionItem>
|
||||
</template>
|
||||
<QSeparator />
|
||||
</template>
|
||||
<template v-if="$props.source === 'card'">
|
||||
|
|
|
@ -9,6 +9,7 @@ export default {
|
|||
backToDashboard: 'Return to dashboard',
|
||||
notifications: 'Notifications',
|
||||
userPanel: 'User panel',
|
||||
modules: 'Modules',
|
||||
pinnedModules: 'Pinned modules',
|
||||
darkMode: 'Dark mode',
|
||||
logOut: 'Log out',
|
||||
|
@ -32,9 +33,6 @@ export default {
|
|||
pleaseWait: 'Please wait...',
|
||||
noPinnedModules: 'You have dont have any pinned modules',
|
||||
},
|
||||
moduleIndex: {
|
||||
allModules: 'All modules',
|
||||
},
|
||||
errors: {
|
||||
statusUnauthorized: 'Access denied',
|
||||
statusInternalServerError: 'An internal server error has ocurred',
|
||||
|
|
|
@ -9,6 +9,7 @@ export default {
|
|||
backToDashboard: 'Volver al tablón',
|
||||
notifications: 'Notificaciones',
|
||||
userPanel: 'Panel de usuario',
|
||||
modules: 'Módulos',
|
||||
pinnedModules: 'Módulos fijados',
|
||||
darkMode: 'Modo oscuro',
|
||||
logOut: 'Cerrar sesión',
|
||||
|
@ -32,9 +33,6 @@ export default {
|
|||
pleaseWait: 'Por favor, espera...',
|
||||
noPinnedModules: 'No has fijado ningún módulo',
|
||||
},
|
||||
moduleIndex: {
|
||||
allModules: 'Todos los módulos',
|
||||
},
|
||||
errors: {
|
||||
statusUnauthorized: 'Acceso denegado',
|
||||
statusInternalServerError: 'Ha ocurrido un error interno del servidor',
|
||||
|
|
Loading…
Reference in New Issue