user: move user settings to navbar user dropdown

This commit is contained in:
Simone Gotti 2019-05-23 14:09:08 +02:00
parent 05b338c9bc
commit 972da7d7d3
2 changed files with 12 additions and 9 deletions

View File

@ -77,6 +77,15 @@
<li> <li>
<hr class="navbar-divider"> <hr class="navbar-divider">
</li> </li>
<li>
<router-link
class="block px-4 py-2 hover:bg-blue-500 hover:text-white"
:to="ownerSettingsLink('user', user.username)"
>
<i class="mr-1 mdi mdi-settings"/>
<span>User Settings</span>
</router-link>
</li>
<li> <li>
<router-link <router-link
class="block px-4 py-2 hover:bg-blue-500 hover:text-white" class="block px-4 py-2 hover:bg-blue-500 hover:text-white"
@ -122,6 +131,8 @@ import vClickOutside from "v-click-outside";
import { mapGetters } from "vuex"; import { mapGetters } from "vuex";
import { ownerSettingsLink } from "@/util/link.js";
export default { export default {
name: "App", name: "App",
directives: { directives: {
@ -155,6 +166,7 @@ export default {
}, },
// method to reload current view from https://github.com/vuejs/vue-router/issues/296#issuecomment-356530037 // method to reload current view from https://github.com/vuejs/vue-router/issues/296#issuecomment-356530037
methods: { methods: {
ownerSettingsLink: ownerSettingsLink,
reload() { reload() {
this.$store.dispatch("setError", null); this.$store.dispatch("setError", null);
this.routerActive = false; this.routerActive = false;

View File

@ -121,15 +121,6 @@
<span>Root Project Group Settings</span> <span>Root Project Group Settings</span>
</router-link> </router-link>
</li> </li>
<li>
<router-link
class="block px-4 py-2 hover:bg-blue-500 hover:text-white"
:to="ownerSettingsLink('user', username)"
>
<i class="mr-1 mdi mdi-settings"/>
<span>User Settings</span>
</router-link>
</li>
</ul> </ul>
</div> </div>
</div> </div>