dashboar can no longer be added to favorites
gitea/salix-front/pipeline/head This commit looks good Details

This commit is contained in:
Carlos Jimenez Ruiz 2022-06-09 09:45:53 +02:00
parent 6038c662f8
commit 12b1345315
2 changed files with 14 additions and 6 deletions

View File

@ -4,10 +4,10 @@ import { useI18n } from 'vue-i18n';
import { useNavigation } from 'src/composables/useNavigation'; import { useNavigation } from 'src/composables/useNavigation';
const { t } = useI18n(); const { t } = useI18n();
const modules = useNavigation(); const navigation = useNavigation();
onMounted(() => { onMounted(() => {
modules.fetchFavorites(); navigation.fetchFavorites();
}); });
</script> </script>
@ -18,9 +18,9 @@ onMounted(() => {
max-width="350px" max-width="350px"
max-height="400px" max-height="400px"
style="justify-content: center" style="justify-content: center"
v-if="modules.favorites.value.length" v-if="navigation.favorites.value.length"
> >
<div v-for="module of modules.favorites.value" :key="module.title" class="row no-wrap q-pa-xs flex-item"> <div v-for="module of navigation.favorites.value" :key="module.title" class="row no-wrap q-pa-xs flex-item">
<q-btn <q-btn
align="evenly" align="evenly"
padding="16px" padding="16px"

View File

@ -109,7 +109,11 @@ async function onToggleFavoriteModule(moduleName, event) {
</q-item-section> </q-item-section>
<q-item-section>{{ t(`${module.name}.pageTitles.${module.title}`) }}</q-item-section> <q-item-section>{{ t(`${module.name}.pageTitles.${module.title}`) }}</q-item-section>
<q-item-section side> <q-item-section side>
<div @click="onToggleFavoriteModule(module.name, $event)" class="row items-center"> <div
@click="onToggleFavoriteModule(module.name, $event)"
class="row items-center"
v-if="module.name != 'dashboard'"
>
<q-icon style="padding-right: 40px" name="push_pin" class="push_pin"></q-icon> <q-icon style="padding-right: 40px" name="push_pin" class="push_pin"></q-icon>
</div> </div>
</q-item-section> </q-item-section>
@ -130,7 +134,11 @@ async function onToggleFavoriteModule(moduleName, event) {
</q-item-section> </q-item-section>
<q-item-section>{{ t(`${module.name}.pageTitles.${module.title}`) }}</q-item-section> <q-item-section>{{ t(`${module.name}.pageTitles.${module.title}`) }}</q-item-section>
<q-item-section side> <q-item-section side>
<div @click="onToggleFavoriteModule(module.name, $event)" class="row items-center"> <div
@click="onToggleFavoriteModule(module.name, $event)"
class="row items-center"
v-if="module.name != 'dashboard'"
>
<q-icon name="push_pin" class="push_pin"></q-icon> <q-icon name="push_pin" class="push_pin"></q-icon>
</div> </div>
</q-item-section> </q-item-section>