This commit is contained in:
@@ -14,12 +14,18 @@ export default {
|
||||
if (ctx.icon && !ctx.icon.startsWith("fa-")) {
|
||||
ctx.icon = "fa-" + ctx.icon;
|
||||
}
|
||||
|
||||
vm.appBar.icon = ctx.icon;
|
||||
|
||||
vm.appBar.title = ctx.title;
|
||||
|
||||
//Parse the forms object type if present
|
||||
var formAyaType = 0;
|
||||
if (ctx.formData && ctx.formData.ayaType != undefined) {
|
||||
formAyaType = ctx.formData.ayaType;
|
||||
}
|
||||
|
||||
//set the help url if presented or default to the User section intro
|
||||
vm.appBar.helpUrl = ctx.helpUrl ? ctx.helpUrl : "user-intro";
|
||||
|
||||
vm.appBar.menuItems = [];
|
||||
|
||||
//CONTEXT TOP PORTION
|
||||
@@ -42,19 +48,24 @@ export default {
|
||||
//LOGOUT
|
||||
vm.appBar.menuItems.push({
|
||||
title: window.$gz.locale.get("Logout"),
|
||||
|
||||
icon: "sign-out-alt",
|
||||
|
||||
key: "app:logout"
|
||||
});
|
||||
|
||||
//divider
|
||||
vm.appBar.menuItems.push({ divider: true, inset: false });
|
||||
|
||||
//SEARCH
|
||||
vm.appBar.menuItems.push({
|
||||
title: window.$gz.locale.get("Search"),
|
||||
icon: "search",
|
||||
key: "app:search",
|
||||
data: formAyaType
|
||||
});
|
||||
|
||||
//HELP
|
||||
vm.appBar.menuItems.push({
|
||||
title: window.$gz.locale.get("MenuHelp"),
|
||||
|
||||
icon: "question-circle",
|
||||
key: "app:help",
|
||||
data: vm.appBar.helpUrl
|
||||
@@ -149,6 +160,12 @@ export default {
|
||||
var helpurl = vm.$store.state.helpUrl + item.data;
|
||||
window.open(helpurl, "_blank");
|
||||
break;
|
||||
case "search":
|
||||
vm.$router.push({
|
||||
name: "home-search",
|
||||
params: { ayatype: item.data }
|
||||
});
|
||||
break;
|
||||
case "logout":
|
||||
vm.$router.push("/login");
|
||||
break;
|
||||
|
||||
@@ -77,7 +77,7 @@ export default new Router({
|
||||
import(/* webpackChunkName: "home" */ "./views/home-dashboard.vue")
|
||||
},
|
||||
{
|
||||
path: "/home-search",
|
||||
path: "/home-search/:ayatype",
|
||||
name: "home-search",
|
||||
component: () =>
|
||||
import(/* webpackChunkName: "home" */ "./views/home-search.vue")
|
||||
|
||||
Reference in New Issue
Block a user