Skip to content

Commit

Permalink
#79 update URLs, add new menu to template
Browse files Browse the repository at this point in the history
  • Loading branch information
literakl committed Aug 19, 2020
1 parent 1386e38 commit cfedf51
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 8 deletions.
13 changes: 9 additions & 4 deletions spa/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,17 @@

<b-navbar-nav class="ml-auto align-items-center">
<b-nav-item :to="{ name: 'sign-in'}" v-if="!authorized">{{ $t('app.sign-in-up') }}</b-nav-item>
<b-nav-item-dropdown v-if="authorized" toggle-class="text-warning" right>
<template v-slot:button-content>
<BIconPlus scale="2"></BIconPlus>
</template>
<b-dropdown-item :to="{ name: 'create-blog' }">{{ $t('app.new-post') }}</b-dropdown-item>
</b-nav-item-dropdown>
<b-nav-item-dropdown v-if="authorized" toggle-class="text-warning" right>
<template v-slot:button-content>
<BIconPersonFill scale="2"></BIconPersonFill>
</template>
<b-dropdown-item :to="{ name: 'user-profile', params: { id: userId } }" v-if="authorized">{{ $t('app.my-profile') }}</b-dropdown-item>
<b-dropdown-item :to="{ name: 'user-profile', params: { id: userId } }">{{ $t('app.my-profile') }}</b-dropdown-item>
<b-dropdown-item :to="{ name: 'update-password'}">{{ $t('app.change-password') }}</b-dropdown-item>
<b-dropdown-item href="#0" v-on:click="signMeOut()">{{ $t('app.sign-out') }}</b-dropdown-item>
</b-nav-item-dropdown>
Expand All @@ -46,13 +52,12 @@
</template>

<script>
import { BIconPersonFill, BIconInfo } from 'bootstrap-vue';
import { BIconPersonFill, BIconInfo, BIconPlus } from 'bootstrap-vue';
export default {
name: 'App',
components: {
BIconPersonFill,
BIconInfo,
BIconPersonFill, BIconInfo, BIconPlus,
},
computed: {
authorized() {
Expand Down
1 change: 1 addition & 0 deletions spa/src/locales/cs.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"sign-out": "Odhlásit se",
"my-profile": "Můj profil",
"change-password": "Změnit heslo",
"new-post": "Nový příspěvek",
"help": "Nápověda",
"our-mission": "Naše mise",
"contact": "Kontakt",
Expand Down
1 change: 1 addition & 0 deletions spa/src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"sign-out": "Sign out",
"my-profile": "My profile",
"change-password": "Change my password",
"new-post": "New post",
"help": "Help",
"our-mission": "Our mission",
"contact": "Contact",
Expand Down
8 changes: 4 additions & 4 deletions spa/src/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,22 +157,22 @@ export default new Router({
props: true,
},
{
path: '/createBlog',
path: '/novy-prispevek',
name: 'create-blog',
component: () => import('./views/item/CreateItem.vue'),
beforeEnter: requireAuth,
},
{
path: '/updateBlog',
path: '/uprava-prispevku',
name: 'update-blog',
component: () => import('./views/item/CreateItem.vue'),
beforeEnter: requireAuth,
},
{
path: '/viewBlog',
path: '/prispevek/:slug',
name: 'view-blog',
component: () => import('./views/item/ViewItem.vue'),
beforeEnter: requireAuth,
props: true,
},
{
path: '*',
Expand Down

0 comments on commit cfedf51

Please sign in to comment.