Renames most components to match new naming strategy.
This commit is contained in:
parent
ef1ba07a64
commit
93368c6617
|
@ -1,8 +1,11 @@
|
|||
<template>
|
||||
<ion-page>
|
||||
<ion-header>
|
||||
<ion-header collapse="fade">
|
||||
<ion-toolbar>
|
||||
<ion-img slot="start" :src="tainacanLogo" class="header__tainacan-logo" />
|
||||
<ion-buttons slot="start">
|
||||
<ion-back-button :default-href="pageDefaultBackLink"></ion-back-button>
|
||||
</ion-buttons>
|
||||
<ion-img :src="tainacanLogo" class="header__tainacan-logo" />
|
||||
<ion-buttons slot="end">
|
||||
<ion-button @click="logOff" aria-label="Sair">
|
||||
<ion-icon slot="icon-only" :icon="logOutOutline"></ion-icon>
|
||||
|
@ -10,13 +13,10 @@
|
|||
</ion-buttons>
|
||||
</ion-toolbar>
|
||||
<ion-toolbar>
|
||||
<ion-buttons slot="start">
|
||||
<ion-back-button :default-href="pageDefaultBackLink"></ion-back-button>
|
||||
</ion-buttons>
|
||||
<ion-title> {{ pageTitle }} </ion-title>
|
||||
<ion-title size="small"> {{ pageTitle }} </ion-title>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
<ion-content>
|
||||
<ion-content fullscreen="true">
|
||||
<slot />
|
||||
</ion-content>
|
||||
</ion-page>
|
||||
|
|
|
@ -28,7 +28,7 @@ export default {
|
|||
IonLabel,
|
||||
},
|
||||
setup() {
|
||||
const image = computed (() => require('../assets/placeholder_square_small.png'))
|
||||
const image = computed (() => require('../../assets/placeholder_square_small.png'))
|
||||
return { image }
|
||||
},
|
||||
}
|
|
@ -16,7 +16,7 @@
|
|||
<script lang="ts">
|
||||
import {
|
||||
useCollectionsStore
|
||||
} from '../store/storeCollection';
|
||||
} from '../../store/storeCollection';
|
||||
import {
|
||||
IonCard,
|
||||
IonLoading,
|
|
@ -2,8 +2,8 @@ import { createApp } from 'vue'
|
|||
|
||||
import App from './App.vue'
|
||||
import BaseLayout from './components/base/BaseLayout.vue';
|
||||
import CollectionList from './components/CollectionList.vue';
|
||||
import ItemList from './components/ItemList.vue';
|
||||
import CollectionList from './components/lists/CollectionsList.vue';
|
||||
import ItemList from './components/lists/ItemsList.vue';
|
||||
import router from './router';
|
||||
import { createPinia } from 'pinia';
|
||||
|
||||
|
|
|
@ -9,13 +9,13 @@
|
|||
<ion-list-header>
|
||||
Coleções
|
||||
</ion-list-header>
|
||||
<collection-list :collections="collectionStore.collections"></collection-list>
|
||||
<collections-list :collections="collectionStore.collections"></collections-list>
|
||||
</ion-list>
|
||||
</base-layout>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import CollectionList from '@/components/CollectionList.vue';
|
||||
import CollectionsList from '@/components/lists/CollectionsList.vue';
|
||||
import BaseLayout from '@/components/base/BaseLayout.vue';
|
||||
import { IonLoading, IonListHeader, IonList } from '@ionic/vue';
|
||||
|
||||
|
@ -27,7 +27,7 @@ import { ref } from 'vue';
|
|||
|
||||
export default {
|
||||
components: {
|
||||
CollectionList,
|
||||
CollectionsList,
|
||||
BaseLayout,
|
||||
IonLoading,
|
||||
IonList,
|
|
@ -9,17 +9,17 @@
|
|||
<ion-list-header>
|
||||
Coleções
|
||||
</ion-list-header>
|
||||
<collection-list :collections="collectionStore.collections"></collection-list>
|
||||
<collections-list :collections="collectionStore.collections"></collections-list>
|
||||
</ion-list>
|
||||
<ion-button fill="clear" size="small" routerLink="/collectionsfull">
|
||||
<ion-button fill="clear" size="small" routerLink="/collections">
|
||||
Acessar lista completa de coleções
|
||||
</ion-button>
|
||||
<ion-list>
|
||||
<ion-list-header>
|
||||
Items
|
||||
</ion-list-header>
|
||||
<item-list></item-list>
|
||||
<ion-button fill="clear" size="small" routerLink="/itemsfull">
|
||||
<items-list></items-list>
|
||||
<ion-button fill="clear" size="small" routerLink="/items">
|
||||
Acessar lista completa de itens
|
||||
</ion-button>
|
||||
</ion-list>
|
||||
|
@ -27,8 +27,8 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import CollectionList from '@/components/CollectionList.vue';
|
||||
import ItemList from '@/components/ItemList.vue';
|
||||
import CollectionsList from '@/components/lists/CollectionsList.vue';
|
||||
import ItemsList from '@/components/lists/ItemsList.vue';
|
||||
import BaseLayout from '@/components/base/BaseLayout.vue';
|
||||
|
||||
import {
|
||||
|
@ -46,8 +46,8 @@ import { ref } from 'vue';
|
|||
|
||||
export default {
|
||||
components: {
|
||||
CollectionList,
|
||||
ItemList,
|
||||
CollectionsList,
|
||||
ItemsList,
|
||||
BaseLayout,
|
||||
IonList,
|
||||
IonListHeader,
|
|
@ -117,7 +117,7 @@ export default {
|
|||
// this.collectionStore.siteUrl = this.siteUrl;
|
||||
// this.collectionStore.userLogin = this.userLogin;
|
||||
// this.collectionStore.userPassword = this.userPassword;
|
||||
this.$router.push('/homeview');
|
||||
this.$router.push('/home');
|
||||
}
|
||||
}
|
||||
|
|
@ -2,41 +2,41 @@ import { createRouter, createWebHistory } from '@ionic/vue-router';
|
|||
import { RouteRecordRaw } from 'vue-router';
|
||||
import { useUserStore } from '../store/storeUser'
|
||||
|
||||
import HomeView from '../pages/HomeView.vue';
|
||||
import LoginForm from '../pages/LoginForm.vue';
|
||||
import ItemsByCollection from '../pages/ItemsByCollection.vue';
|
||||
import CollectionsFull from '../pages/ColletionsFull.vue';
|
||||
import ItemsFull from '../pages/ItemsFull.vue';
|
||||
import HomePage from '../pages/HomePage.vue';
|
||||
import LoginPage from '../pages/LoginPage.vue';
|
||||
import CollectionPage from '../pages/CollectionPage.vue';
|
||||
import CollectionsPage from '../pages/CollectionsPage.vue';
|
||||
import ItemsPage from '../pages/ItemsPage.vue';
|
||||
|
||||
const routes: Array<RouteRecordRaw> = [
|
||||
{
|
||||
path: '/',
|
||||
redirect: '/homeview'
|
||||
redirect: '/home'
|
||||
},
|
||||
{
|
||||
path: '/homeview',
|
||||
component: HomeView,
|
||||
name: 'homeview'
|
||||
path: '/home',
|
||||
component: HomePage,
|
||||
name: 'home'
|
||||
},
|
||||
{
|
||||
path: '/loginform',
|
||||
component: LoginForm,
|
||||
name: 'loginform'
|
||||
path: '/login',
|
||||
component: LoginPage,
|
||||
name: 'login'
|
||||
},
|
||||
{
|
||||
path: '/itemsbycollection/:id',
|
||||
component: ItemsByCollection,
|
||||
name: 'itemsbycollection'
|
||||
path: '/collections/:id',
|
||||
component: CollectionPage,
|
||||
name: 'collection'
|
||||
},
|
||||
{
|
||||
path: '/collectionsfull',
|
||||
component: CollectionsFull,
|
||||
name: 'collectionsfull'
|
||||
path: '/collections',
|
||||
component: CollectionsPage,
|
||||
name: 'collections'
|
||||
},
|
||||
{
|
||||
path: '/itemsfull',
|
||||
component: ItemsFull,
|
||||
name: 'itemsfull'
|
||||
path: '/items',
|
||||
component: ItemsPage,
|
||||
name: 'items'
|
||||
}
|
||||
]
|
||||
|
||||
|
@ -48,7 +48,7 @@ const router = createRouter({
|
|||
router.beforeEach(async(to, from, next) => {
|
||||
const userStore = useUserStore();
|
||||
await userStore.checkUserLogin();
|
||||
if (to.name !== 'loginform' && !userStore.userIsLoggedIn) next({ name: 'loginform' })
|
||||
if (to.name !== 'login' && !userStore.userIsLoggedIn) next({ name: 'login' })
|
||||
else next()
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in New Issue