feat: refs #7889 added shortcuts to modules
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
This commit is contained in:
parent
a48c293a9a
commit
585919a4d9
|
@ -15,7 +15,6 @@ export default {
|
||||||
|
|
||||||
const handleKeyDown = (event) => {
|
const handleKeyDown = (event) => {
|
||||||
const { ctrlKey, altKey, key } = event;
|
const { ctrlKey, altKey, key } = event;
|
||||||
|
|
||||||
if (ctrlKey && altKey && keyBindingMap[key] && !isNotified) {
|
if (ctrlKey && altKey && keyBindingMap[key] && !isNotified) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
router.push(keyBindingMap[key]);
|
router.push(keyBindingMap[key]);
|
||||||
|
|
|
@ -55,6 +55,12 @@ const pinnedModules = computed(() => navigation.getPinnedModules());
|
||||||
>
|
>
|
||||||
<div class="text-center text-primary button-text">
|
<div class="text-center text-primary button-text">
|
||||||
{{ t(item.title) }}
|
{{ t(item.title) }}
|
||||||
|
<div v-if="item.subtitle">
|
||||||
|
{{ '(' + item.subtitle + ')' }}
|
||||||
|
<QTooltip>
|
||||||
|
{{ 'Ctrl + Alt + ' + item.subtitle }}
|
||||||
|
</QTooltip>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</QBtn>
|
</QBtn>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -5,8 +5,10 @@ export default {
|
||||||
name: 'Supplier',
|
name: 'Supplier',
|
||||||
meta: {
|
meta: {
|
||||||
title: 'suppliers',
|
title: 'suppliers',
|
||||||
|
subtitle: 'P',
|
||||||
icon: 'vn:supplier',
|
icon: 'vn:supplier',
|
||||||
moduleName: 'Supplier',
|
moduleName: 'Supplier',
|
||||||
|
keyBinding: 'p',
|
||||||
},
|
},
|
||||||
component: RouterView,
|
component: RouterView,
|
||||||
redirect: { name: 'SupplierMain' },
|
redirect: { name: 'SupplierMain' },
|
||||||
|
|
|
@ -5,8 +5,10 @@ export default {
|
||||||
name: 'Account',
|
name: 'Account',
|
||||||
meta: {
|
meta: {
|
||||||
title: 'users',
|
title: 'users',
|
||||||
|
subtitle: 'U',
|
||||||
icon: 'face',
|
icon: 'face',
|
||||||
moduleName: 'Account',
|
moduleName: 'Account',
|
||||||
|
keyBinding: 'u',
|
||||||
},
|
},
|
||||||
component: RouterView,
|
component: RouterView,
|
||||||
redirect: { name: 'AccountMain' },
|
redirect: { name: 'AccountMain' },
|
||||||
|
|
|
@ -5,8 +5,10 @@ export default {
|
||||||
path: '/claim',
|
path: '/claim',
|
||||||
meta: {
|
meta: {
|
||||||
title: 'claims',
|
title: 'claims',
|
||||||
|
subtitle: 'R',
|
||||||
icon: 'vn:claims',
|
icon: 'vn:claims',
|
||||||
moduleName: 'Claim',
|
moduleName: 'Claim',
|
||||||
|
keyBinding: 'r',
|
||||||
},
|
},
|
||||||
component: RouterView,
|
component: RouterView,
|
||||||
redirect: { name: 'ClaimMain' },
|
redirect: { name: 'ClaimMain' },
|
||||||
|
|
|
@ -5,8 +5,10 @@ export default {
|
||||||
name: 'Customer',
|
name: 'Customer',
|
||||||
meta: {
|
meta: {
|
||||||
title: 'customers',
|
title: 'customers',
|
||||||
|
subtitle: 'C',
|
||||||
icon: 'vn:client',
|
icon: 'vn:client',
|
||||||
moduleName: 'Customer',
|
moduleName: 'Customer',
|
||||||
|
keyBinding: 'c',
|
||||||
},
|
},
|
||||||
component: RouterView,
|
component: RouterView,
|
||||||
redirect: { name: 'CustomerMain' },
|
redirect: { name: 'CustomerMain' },
|
||||||
|
|
|
@ -5,8 +5,10 @@ export default {
|
||||||
name: 'Entry',
|
name: 'Entry',
|
||||||
meta: {
|
meta: {
|
||||||
title: 'entries',
|
title: 'entries',
|
||||||
|
subtitle: 'E',
|
||||||
icon: 'vn:entry',
|
icon: 'vn:entry',
|
||||||
moduleName: 'Entry',
|
moduleName: 'Entry',
|
||||||
|
keyBinding: '€',
|
||||||
},
|
},
|
||||||
component: RouterView,
|
component: RouterView,
|
||||||
redirect: { name: 'EntryMain' },
|
redirect: { name: 'EntryMain' },
|
||||||
|
|
|
@ -5,8 +5,10 @@ export default {
|
||||||
name: 'Item',
|
name: 'Item',
|
||||||
meta: {
|
meta: {
|
||||||
title: 'items',
|
title: 'items',
|
||||||
|
subtitle: 'A',
|
||||||
icon: 'vn:item',
|
icon: 'vn:item',
|
||||||
moduleName: 'Item',
|
moduleName: 'Item',
|
||||||
|
keyBinding: 'a',
|
||||||
},
|
},
|
||||||
component: RouterView,
|
component: RouterView,
|
||||||
redirect: { name: 'ItemMain' },
|
redirect: { name: 'ItemMain' },
|
||||||
|
|
|
@ -5,8 +5,10 @@ export default {
|
||||||
name: 'Monitor',
|
name: 'Monitor',
|
||||||
meta: {
|
meta: {
|
||||||
title: 'monitors',
|
title: 'monitors',
|
||||||
|
subtitle: 'M',
|
||||||
icon: 'grid_view',
|
icon: 'grid_view',
|
||||||
moduleName: 'Monitor',
|
moduleName: 'Monitor',
|
||||||
|
keyBinding: 'm',
|
||||||
},
|
},
|
||||||
component: RouterView,
|
component: RouterView,
|
||||||
redirect: { name: 'MonitorMain' },
|
redirect: { name: 'MonitorMain' },
|
||||||
|
|
|
@ -5,8 +5,10 @@ export default {
|
||||||
name: 'Order',
|
name: 'Order',
|
||||||
meta: {
|
meta: {
|
||||||
title: 'order',
|
title: 'order',
|
||||||
|
subtitle: 'O',
|
||||||
icon: 'vn:basket',
|
icon: 'vn:basket',
|
||||||
moduleName: 'Order',
|
moduleName: 'Order',
|
||||||
|
keyBinding: 'o',
|
||||||
},
|
},
|
||||||
component: RouterView,
|
component: RouterView,
|
||||||
redirect: { name: 'OrderMain' },
|
redirect: { name: 'OrderMain' },
|
||||||
|
|
|
@ -7,7 +7,6 @@ export default {
|
||||||
title: 'routes',
|
title: 'routes',
|
||||||
icon: 'vn:delivery',
|
icon: 'vn:delivery',
|
||||||
moduleName: 'Route',
|
moduleName: 'Route',
|
||||||
keyBinding: 'r',
|
|
||||||
},
|
},
|
||||||
component: RouterView,
|
component: RouterView,
|
||||||
redirect: { name: 'RouteMain' },
|
redirect: { name: 'RouteMain' },
|
||||||
|
|
|
@ -5,8 +5,10 @@ export default {
|
||||||
path: '/ticket',
|
path: '/ticket',
|
||||||
meta: {
|
meta: {
|
||||||
title: 'tickets',
|
title: 'tickets',
|
||||||
|
subtitle: 'T',
|
||||||
icon: 'vn:ticket',
|
icon: 'vn:ticket',
|
||||||
moduleName: 'Ticket',
|
moduleName: 'Ticket',
|
||||||
|
keyBinding: 't',
|
||||||
},
|
},
|
||||||
component: RouterView,
|
component: RouterView,
|
||||||
redirect: { name: 'TicketMain' },
|
redirect: { name: 'TicketMain' },
|
||||||
|
|
|
@ -5,8 +5,10 @@ export default {
|
||||||
name: 'Worker',
|
name: 'Worker',
|
||||||
meta: {
|
meta: {
|
||||||
title: 'workers',
|
title: 'workers',
|
||||||
|
subtitle: 'W',
|
||||||
icon: 'vn:worker',
|
icon: 'vn:worker',
|
||||||
moduleName: 'Worker',
|
moduleName: 'Worker',
|
||||||
|
keyBinding: 'w',
|
||||||
},
|
},
|
||||||
component: RouterView,
|
component: RouterView,
|
||||||
redirect: { name: 'WorkerMain' },
|
redirect: { name: 'WorkerMain' },
|
||||||
|
|
|
@ -5,8 +5,10 @@ export default {
|
||||||
name: 'Zone',
|
name: 'Zone',
|
||||||
meta: {
|
meta: {
|
||||||
title: 'zones',
|
title: 'zones',
|
||||||
|
subtitle: 'Z',
|
||||||
icon: 'vn:zone',
|
icon: 'vn:zone',
|
||||||
moduleName: 'Zone',
|
moduleName: 'Zone',
|
||||||
|
keyBinding: 'z',
|
||||||
},
|
},
|
||||||
component: RouterView,
|
component: RouterView,
|
||||||
redirect: { name: 'ZoneMain' },
|
redirect: { name: 'ZoneMain' },
|
||||||
|
|
|
@ -72,6 +72,7 @@ export const useNavigationStore = defineStore('navigationStore', () => {
|
||||||
if (meta) {
|
if (meta) {
|
||||||
item.title = `globals.pageTitles.${meta.title}`;
|
item.title = `globals.pageTitles.${meta.title}`;
|
||||||
item.icon = meta.icon;
|
item.icon = meta.icon;
|
||||||
|
item.subtitle = meta.subtitle;
|
||||||
}
|
}
|
||||||
|
|
||||||
parent.push(item);
|
parent.push(item);
|
||||||
|
|
Loading…
Reference in New Issue