eliminado essentialLinks y rutas en navbar
This commit is contained in:
@@ -1,49 +0,0 @@
|
||||
<template>
|
||||
<q-item
|
||||
clickable
|
||||
tag="a"
|
||||
target="_blank"
|
||||
:href="link"
|
||||
>
|
||||
<q-item-section
|
||||
v-if="icon"
|
||||
avatar
|
||||
>
|
||||
<q-icon :name="icon" />
|
||||
</q-item-section>
|
||||
|
||||
<q-item-section>
|
||||
<q-item-label>{{ title }}</q-item-label>
|
||||
<q-item-label caption>{{ caption }}</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { defineComponent } from 'vue'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'EssentialLink',
|
||||
props: {
|
||||
title: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
|
||||
caption: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
|
||||
link: {
|
||||
type: String,
|
||||
default: '#'
|
||||
},
|
||||
|
||||
icon: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
@@ -2,16 +2,16 @@
|
||||
<q-layout view="lHh Lpr lFf">
|
||||
<q-header elevated>
|
||||
<q-toolbar>
|
||||
<q-btn
|
||||
flat
|
||||
dense
|
||||
round
|
||||
icon="menu"
|
||||
aria-label="Menu"
|
||||
@click="toggleLeftDrawer"
|
||||
/>
|
||||
|
||||
<q-toolbar-title> Quasar App </q-toolbar-title>
|
||||
<q-toolbar-title>
|
||||
{{ listaStore.pb.authStore.model.name }} -
|
||||
{{
|
||||
$router.currentRoute.value.path == "/"
|
||||
? "Listas"
|
||||
: $router.currentRoute.value.path == "/perfil"
|
||||
? "Perfil"
|
||||
: "Otra ruta"
|
||||
}}
|
||||
</q-toolbar-title>
|
||||
|
||||
<div>
|
||||
<q-btn @click="listaStore.logout()">Cerrar</q-btn>
|
||||
@@ -19,18 +19,6 @@
|
||||
</q-toolbar>
|
||||
</q-header>
|
||||
|
||||
<q-drawer v-model="leftDrawerOpen" show-if-above bordered>
|
||||
<q-list>
|
||||
<q-item-label header> Essential Links </q-item-label>
|
||||
|
||||
<EssentialLink
|
||||
v-for="link in essentialLink"
|
||||
:key="link.title"
|
||||
v-bind="link"
|
||||
/>
|
||||
</q-list>
|
||||
</q-drawer>
|
||||
|
||||
<q-page-container>
|
||||
<router-view />
|
||||
</q-page-container>
|
||||
@@ -39,57 +27,9 @@
|
||||
|
||||
<script setup>
|
||||
import { ref } from "vue";
|
||||
import EssentialLink from "components/EssentialLink.vue";
|
||||
import { useListaStore } from "../stores/lista.js";
|
||||
import { useRouter } from "vue-router";
|
||||
|
||||
const $router = useRouter();
|
||||
const listaStore = useListaStore();
|
||||
|
||||
const essentialLink = [
|
||||
{
|
||||
title: "Docs",
|
||||
caption: "quasar.dev",
|
||||
icon: "school",
|
||||
link: "https://quasar.dev",
|
||||
},
|
||||
{
|
||||
title: "Github",
|
||||
caption: "github.com/quasarframework",
|
||||
icon: "code",
|
||||
link: "https://github.com/quasarframework",
|
||||
},
|
||||
{
|
||||
title: "Discord Chat Channel",
|
||||
caption: "chat.quasar.dev",
|
||||
icon: "chat",
|
||||
link: "https://chat.quasar.dev",
|
||||
},
|
||||
{
|
||||
title: "Forum",
|
||||
caption: "forum.quasar.dev",
|
||||
icon: "record_voice_over",
|
||||
link: "https://forum.quasar.dev",
|
||||
},
|
||||
{
|
||||
title: "Twitter",
|
||||
caption: "@quasarframework",
|
||||
icon: "rss_feed",
|
||||
link: "https://twitter.quasar.dev",
|
||||
},
|
||||
{
|
||||
title: "Facebook",
|
||||
caption: "@QuasarFramework",
|
||||
icon: "public",
|
||||
link: "https://facebook.quasar.dev",
|
||||
},
|
||||
{
|
||||
title: "Quasar Awesome",
|
||||
caption: "Community Quasar projects",
|
||||
icon: "favorite",
|
||||
link: "https://awesome.quasar.dev",
|
||||
},
|
||||
];
|
||||
const leftDrawerOpen = ref(false);
|
||||
|
||||
const toggleLeftDrawer = () => {
|
||||
leftDrawerOpen.value = !leftDrawerOpen.value;
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user