0
0
Fork 0

refactor: refs #7889 deleted subtitle attr and use keyBinding instead

This commit is contained in:
Jon Elias 2024-09-06 10:00:07 +02:00
parent 585919a4d9
commit 5d78f564dd
14 changed files with 16 additions and 15 deletions

View File

@ -15,6 +15,7 @@ export default {
const handleKeyDown = (event) => {
const { ctrlKey, altKey, key } = event;
if (ctrlKey && altKey && keyBindingMap[key] && !isNotified) {
event.preventDefault();
router.push(keyBindingMap[key]);

View File

@ -55,10 +55,21 @@ const pinnedModules = computed(() => navigation.getPinnedModules());
>
<div class="text-center text-primary button-text">
{{ t(item.title) }}
<div v-if="item.subtitle">
{{ '(' + item.subtitle + ')' }}
<div v-if="item.keyBinding">
{{
'(' +
(item.keyBinding == '€'
? 'E'
: item.keyBinding) +
')'
}}
<QTooltip>
{{ 'Ctrl + Alt + ' + item.subtitle }}
{{
'Ctrl + Alt + ' +
(item.keyBinding == '€'
? 'E'
: item.keyBinding.toUpperCase())
}}
</QTooltip>
</div>
</div>

View File

@ -5,7 +5,6 @@ export default {
name: 'Supplier',
meta: {
title: 'suppliers',
subtitle: 'P',
icon: 'vn:supplier',
moduleName: 'Supplier',
keyBinding: 'p',

View File

@ -5,7 +5,6 @@ export default {
name: 'Account',
meta: {
title: 'users',
subtitle: 'U',
icon: 'face',
moduleName: 'Account',
keyBinding: 'u',

View File

@ -5,7 +5,6 @@ export default {
path: '/claim',
meta: {
title: 'claims',
subtitle: 'R',
icon: 'vn:claims',
moduleName: 'Claim',
keyBinding: 'r',

View File

@ -5,7 +5,6 @@ export default {
name: 'Customer',
meta: {
title: 'customers',
subtitle: 'C',
icon: 'vn:client',
moduleName: 'Customer',
keyBinding: 'c',

View File

@ -5,7 +5,6 @@ export default {
name: 'Entry',
meta: {
title: 'entries',
subtitle: 'E',
icon: 'vn:entry',
moduleName: 'Entry',
keyBinding: '€',

View File

@ -5,7 +5,6 @@ export default {
name: 'Item',
meta: {
title: 'items',
subtitle: 'A',
icon: 'vn:item',
moduleName: 'Item',
keyBinding: 'a',

View File

@ -5,7 +5,6 @@ export default {
name: 'Monitor',
meta: {
title: 'monitors',
subtitle: 'M',
icon: 'grid_view',
moduleName: 'Monitor',
keyBinding: 'm',

View File

@ -5,7 +5,6 @@ export default {
name: 'Order',
meta: {
title: 'order',
subtitle: 'O',
icon: 'vn:basket',
moduleName: 'Order',
keyBinding: 'o',

View File

@ -5,7 +5,6 @@ export default {
path: '/ticket',
meta: {
title: 'tickets',
subtitle: 'T',
icon: 'vn:ticket',
moduleName: 'Ticket',
keyBinding: 't',

View File

@ -5,7 +5,6 @@ export default {
name: 'Worker',
meta: {
title: 'workers',
subtitle: 'W',
icon: 'vn:worker',
moduleName: 'Worker',
keyBinding: 'w',

View File

@ -5,7 +5,6 @@ export default {
name: 'Zone',
meta: {
title: 'zones',
subtitle: 'Z',
icon: 'vn:zone',
moduleName: 'Zone',
keyBinding: 'z',

View File

@ -72,7 +72,7 @@ export const useNavigationStore = defineStore('navigationStore', () => {
if (meta) {
item.title = `globals.pageTitles.${meta.title}`;
item.icon = meta.icon;
item.subtitle = meta.subtitle;
item.keyBinding = meta.keyBinding;
}
parent.push(item);