в публичных страницах убрал мидлварь
This commit is contained in:
parent
0f66d00f96
commit
2f03560ef1
|
@ -5,6 +5,9 @@ function auth(to, from, next){
|
|||
if (to.path === '/'){
|
||||
next({path: '/wishlist'});
|
||||
}
|
||||
if (to.path.includes('/api')){
|
||||
next();
|
||||
}
|
||||
if (to.path === '/auth_options' || to.path === '/login' || to.path === '/registration'){
|
||||
if (useUserStore().token !== null){
|
||||
next({path: '/wishlist'});
|
||||
|
|
|
@ -16,6 +16,13 @@ const vuetify = createVuetify({
|
|||
|
||||
const pinia = createPinia()
|
||||
|
||||
import router from './js/router.js'
|
||||
// import router from './js/router.js'
|
||||
|
||||
const routes = [
|
||||
]
|
||||
|
||||
const router = createRouter({
|
||||
history: createMemoryHistory(),
|
||||
routes,
|
||||
})
|
||||
createApp(PublicApp).use(vuetify).use(router).use(pinia).mount("#app")
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
</v-dialog>
|
||||
</v-card-title>
|
||||
<v-card-text class="d-flex justify-center align-center h-auto">
|
||||
<ShowWhishlist/>
|
||||
<ShowWishlist/>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
<FeedbackFooter/>
|
||||
|
@ -53,7 +53,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import ShowWhishlist from "./PublicWishlist/ShowWhishlist.vue";
|
||||
import ShowWishlist from "./PublicWishlist/ShowWishlist.vue";
|
||||
import {useUserStore} from "../store/user.js";
|
||||
import { watch } from "vue";
|
||||
import Login from "./Auth/Login.vue";
|
||||
|
@ -61,7 +61,7 @@ import Registration from "./Auth/Registration.vue";
|
|||
import FeedbackFooter from "./PublicWishlist/FeedbackFooter.vue";
|
||||
export default {
|
||||
name: "Public",
|
||||
components: {FeedbackFooter, Registration, Login, ShowWhishlist},
|
||||
components: {FeedbackFooter, Registration, Login, ShowWishlist},
|
||||
data: ()=>({
|
||||
isAuthenticated: false,
|
||||
isWide: window.innerWidth >= 800,
|
||||
|
|
|
@ -6,7 +6,7 @@ import CreateWish from "../Wishlist/CreateWish.vue";
|
|||
import EditWish from "../Wishlist/EditWish.vue";
|
||||
import {watch} from "vue";
|
||||
export default {
|
||||
name: "ShowWhishlist",
|
||||
name: "ShowWishlist",
|
||||
components: {EditWish, CreateWish, DeleteWish},
|
||||
data: () => ({
|
||||
isAuthenticated: false,
|
Loading…
Reference in New Issue