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