bfg-common 1.4.522 → 1.4.524
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/common/mainNavigationPanel/MainNavigationPanel.vue +152 -142
- package/components/common/pages/shortcuts/Shortcuts.vue +67 -0
- package/components/common/pages/shortcuts/block/Block.vue +35 -0
- package/components/common/pages/shortcuts/block/BlockNew.vue +71 -0
- package/components/common/pages/shortcuts/block/BlockOld.vue +55 -0
- package/components/common/pages/shortcuts/category/Category.vue +26 -0
- package/components/common/pages/shortcuts/category/CategoryNew.vue +41 -0
- package/components/common/{shortcuts/Category.vue → pages/shortcuts/category/CategoryOld.vue} +2 -2
- package/package.json +1 -1
- package/store/main/actions.ts +8 -0
- package/store/main/getters.ts +7 -0
- package/store/main/lib/interfaces.ts +6 -0
- package/store/main/mutations.ts +7 -0
- package/store/main/state.ts +7 -0
- package/store/main/store.ts +12 -0
- package/components/common/shortcuts/Block.vue +0 -96
- package/components/common/shortcuts/Shortcuts.vue +0 -44
- /package/components/common/{shortcuts → pages/shortcuts}/lib/models/interfaces.ts +0 -0
|
@@ -1,142 +1,152 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<common-main-navigation-panel-new
|
|
3
|
-
v-if="props.isNewView"
|
|
4
|
-
v-model:main-menu-hovered="mainMenuHovered"
|
|
5
|
-
v-model:menu-pined="menuPined"
|
|
6
|
-
:main-menu-status="props.mainMenuStatus"
|
|
7
|
-
:navigation-items="props.navigationItems"
|
|
8
|
-
:parent-status="props.parentStatus"
|
|
9
|
-
:disabled-pin="props.disabledPin"
|
|
10
|
-
:menu-collapsed="menuCollapsed"
|
|
11
|
-
:show-menu="showMenu"
|
|
12
|
-
@toggle="emits('toggle', $event)"
|
|
13
|
-
@collapse-menu="collapseMenu"
|
|
14
|
-
@change-menu-pin="changeMenuPin"
|
|
15
|
-
@hide-main-menu="hideMainMenu"
|
|
16
|
-
/>
|
|
17
|
-
<common-main-navigation-panel-old
|
|
18
|
-
v-else
|
|
19
|
-
v-model:main-menu-hovered="mainMenuHovered"
|
|
20
|
-
v-model:menu-pined="menuPined"
|
|
21
|
-
:main-menu-status="props.mainMenuStatus"
|
|
22
|
-
:navigation-items="props.navigationItems"
|
|
23
|
-
:parent-status="props.parentStatus"
|
|
24
|
-
:disabled-pin="props.disabledPin"
|
|
25
|
-
:menu-collapsed="menuCollapsed"
|
|
26
|
-
:show-menu="showMenu"
|
|
27
|
-
@toggle="emits('toggle', $event)"
|
|
28
|
-
@collapse-menu="collapseMenu"
|
|
29
|
-
@change-menu-pin="changeMenuPin"
|
|
30
|
-
@hide-main-menu="hideMainMenu"
|
|
31
|
-
/>
|
|
32
|
-
</template>
|
|
33
|
-
|
|
34
|
-
<script setup lang="ts">
|
|
35
|
-
import type { UI_I_NavigationItem } from '~/components/common/mainNavigationPanel/lib/models/interfaces'
|
|
36
|
-
import type { UI_T_ParentStatus } from '~/components/common/mainNavigationPanel/lib/models/types'
|
|
37
|
-
|
|
38
|
-
const props = withDefaults(
|
|
39
|
-
defineProps<{
|
|
40
|
-
mainMenuStatus: boolean
|
|
41
|
-
navigationItems: UI_I_NavigationItem[][]
|
|
42
|
-
parentStatus: UI_T_ParentStatus
|
|
43
|
-
disabledPin: boolean
|
|
44
|
-
isNewView?: boolean
|
|
45
|
-
}>(),
|
|
46
|
-
{
|
|
47
|
-
isNewView: false,
|
|
48
|
-
}
|
|
49
|
-
)
|
|
50
|
-
|
|
51
|
-
const emits = defineEmits<{
|
|
52
|
-
(event: 'toggle', value: boolean): void
|
|
53
|
-
}>()
|
|
54
|
-
|
|
55
|
-
const
|
|
56
|
-
|
|
57
|
-
const
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
const
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<common-main-navigation-panel-new
|
|
3
|
+
v-if="props.isNewView"
|
|
4
|
+
v-model:main-menu-hovered="mainMenuHovered"
|
|
5
|
+
v-model:menu-pined="menuPined"
|
|
6
|
+
:main-menu-status="props.mainMenuStatus"
|
|
7
|
+
:navigation-items="props.navigationItems"
|
|
8
|
+
:parent-status="props.parentStatus"
|
|
9
|
+
:disabled-pin="props.disabledPin"
|
|
10
|
+
:menu-collapsed="menuCollapsed"
|
|
11
|
+
:show-menu="showMenu"
|
|
12
|
+
@toggle="emits('toggle', $event)"
|
|
13
|
+
@collapse-menu="collapseMenu"
|
|
14
|
+
@change-menu-pin="changeMenuPin"
|
|
15
|
+
@hide-main-menu="hideMainMenu"
|
|
16
|
+
/>
|
|
17
|
+
<common-main-navigation-panel-old
|
|
18
|
+
v-else
|
|
19
|
+
v-model:main-menu-hovered="mainMenuHovered"
|
|
20
|
+
v-model:menu-pined="menuPined"
|
|
21
|
+
:main-menu-status="props.mainMenuStatus"
|
|
22
|
+
:navigation-items="props.navigationItems"
|
|
23
|
+
:parent-status="props.parentStatus"
|
|
24
|
+
:disabled-pin="props.disabledPin"
|
|
25
|
+
:menu-collapsed="menuCollapsed"
|
|
26
|
+
:show-menu="showMenu"
|
|
27
|
+
@toggle="emits('toggle', $event)"
|
|
28
|
+
@collapse-menu="collapseMenu"
|
|
29
|
+
@change-menu-pin="changeMenuPin"
|
|
30
|
+
@hide-main-menu="hideMainMenu"
|
|
31
|
+
/>
|
|
32
|
+
</template>
|
|
33
|
+
|
|
34
|
+
<script setup lang="ts">
|
|
35
|
+
import type { UI_I_NavigationItem } from '~/components/common/mainNavigationPanel/lib/models/interfaces'
|
|
36
|
+
import type { UI_T_ParentStatus } from '~/components/common/mainNavigationPanel/lib/models/types'
|
|
37
|
+
|
|
38
|
+
const props = withDefaults(
|
|
39
|
+
defineProps<{
|
|
40
|
+
mainMenuStatus: boolean
|
|
41
|
+
navigationItems: UI_I_NavigationItem[][]
|
|
42
|
+
parentStatus: UI_T_ParentStatus
|
|
43
|
+
disabledPin: boolean
|
|
44
|
+
isNewView?: boolean
|
|
45
|
+
}>(),
|
|
46
|
+
{
|
|
47
|
+
isNewView: false,
|
|
48
|
+
}
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
const emits = defineEmits<{
|
|
52
|
+
(event: 'toggle', value: boolean): void
|
|
53
|
+
}>()
|
|
54
|
+
|
|
55
|
+
const { $store }: any = useNuxtApp()
|
|
56
|
+
|
|
57
|
+
const route = useRoute()
|
|
58
|
+
|
|
59
|
+
const showMenu = computed<boolean>(
|
|
60
|
+
() => props.mainMenuStatus || menuPined.value
|
|
61
|
+
)
|
|
62
|
+
|
|
63
|
+
const menuPined = ref<boolean>(false)
|
|
64
|
+
const changeMenuPin = (): void => {
|
|
65
|
+
useLocalStorage('menuPined', menuPined.value)
|
|
66
|
+
}
|
|
67
|
+
const setMenuPined = (): void => {
|
|
68
|
+
menuPined.value = props.disabledPin ? false : useLocalStorage('menuPined')
|
|
69
|
+
}
|
|
70
|
+
watch(
|
|
71
|
+
() => props.disabledPin,
|
|
72
|
+
() => {
|
|
73
|
+
setMenuPined()
|
|
74
|
+
},
|
|
75
|
+
{ immediate: true }
|
|
76
|
+
)
|
|
77
|
+
|
|
78
|
+
const menuCollapsed = ref<boolean>(false)
|
|
79
|
+
const collapseMenu = (): void => {
|
|
80
|
+
menuCollapsed.value = !menuCollapsed.value
|
|
81
|
+
useLocalStorage('menuCollapsed', menuCollapsed.value)
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
const mainMenuHovered = ref<boolean>(false)
|
|
85
|
+
|
|
86
|
+
const clickWindow = (event: Event): void => {
|
|
87
|
+
const target = event.target as any
|
|
88
|
+
if (
|
|
89
|
+
menuPined.value ||
|
|
90
|
+
mainMenuHovered.value ||
|
|
91
|
+
target.className.baseVal?.includes('menu-icon') ||
|
|
92
|
+
target.className.baseVal?.includes('clr-i-outline')
|
|
93
|
+
) {
|
|
94
|
+
return
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
emits('toggle', false)
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
const mountedReady = ref<boolean>(false)
|
|
101
|
+
onMounted(() => {
|
|
102
|
+
mountedReady.value = true
|
|
103
|
+
window.addEventListener('click', clickWindow)
|
|
104
|
+
})
|
|
105
|
+
|
|
106
|
+
onUnmounted(() => {
|
|
107
|
+
window.removeEventListener('click', clickWindow)
|
|
108
|
+
})
|
|
109
|
+
|
|
110
|
+
watch(
|
|
111
|
+
[mountedReady, (): any => route.fullPath, (): any => props.parentStatus],
|
|
112
|
+
([newValue1, newValue2, newValue3]: [
|
|
113
|
+
boolean,
|
|
114
|
+
any,
|
|
115
|
+
UI_T_ParentStatus
|
|
116
|
+
]): void => {
|
|
117
|
+
if (newValue3 === 1) return
|
|
118
|
+
|
|
119
|
+
const name = location.pathname.split('/')[1]
|
|
120
|
+
|
|
121
|
+
if (!newValue1 || name === 'auth') return
|
|
122
|
+
|
|
123
|
+
setSidebarOptions()
|
|
124
|
+
useLocalStorage('navigationHistoryRoute', newValue2)
|
|
125
|
+
},
|
|
126
|
+
{ immediate: true, deep: true }
|
|
127
|
+
)
|
|
128
|
+
|
|
129
|
+
const setSidebarOptions = (): void => {
|
|
130
|
+
setMenuPined()
|
|
131
|
+
menuCollapsed.value = useLocalStorage('menuCollapsed')
|
|
132
|
+
|
|
133
|
+
if (menuPined.value) {
|
|
134
|
+
emits('toggle', true)
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
const hideMainMenu = (): void => {
|
|
139
|
+
if (menuPined.value) return
|
|
140
|
+
emits('toggle', false)
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
watch(
|
|
144
|
+
menuPined,
|
|
145
|
+
(newValue) => {
|
|
146
|
+
$store.dispatch('main/A_MENU_PINED', newValue)
|
|
147
|
+
},
|
|
148
|
+
{ immediate: true }
|
|
149
|
+
)
|
|
150
|
+
</script>
|
|
151
|
+
|
|
152
|
+
<style scoped lang="scss"></style>
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="shortcut" :class="isNewView && 'new'">
|
|
3
|
+
<h1>{{ localization.mainNavigation.shortcuts }}</h1>
|
|
4
|
+
<template v-for="item in props.shortcutsItems">
|
|
5
|
+
<div class="shortcut-category">
|
|
6
|
+
<common-pages-shortcuts-category
|
|
7
|
+
:title="item.title"
|
|
8
|
+
:block-items="item.blockItems"
|
|
9
|
+
/>
|
|
10
|
+
</div>
|
|
11
|
+
</template>
|
|
12
|
+
</div>
|
|
13
|
+
</template>
|
|
14
|
+
|
|
15
|
+
<script setup lang="ts">
|
|
16
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
17
|
+
import type { UI_I_ShortcutsItems } from '~/components/common/pages/shortcuts/lib/models/interfaces'
|
|
18
|
+
|
|
19
|
+
const props = defineProps<{
|
|
20
|
+
shortcutsItems: UI_I_ShortcutsItems[]
|
|
21
|
+
}>()
|
|
22
|
+
|
|
23
|
+
const { $store }: any = useNuxtApp()
|
|
24
|
+
|
|
25
|
+
const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
|
|
26
|
+
|
|
27
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
28
|
+
</script>
|
|
29
|
+
|
|
30
|
+
<style lang="scss" scoped>
|
|
31
|
+
.shortcut {
|
|
32
|
+
margin: 20px;
|
|
33
|
+
height: 100%;
|
|
34
|
+
overflow: auto;
|
|
35
|
+
&.new {
|
|
36
|
+
background: var(--bottom-pannel-bg-color);
|
|
37
|
+
padding: 16px;
|
|
38
|
+
margin: 0;
|
|
39
|
+
|
|
40
|
+
& h1 {
|
|
41
|
+
color: var(--home-title-color);
|
|
42
|
+
font-size: 22px;
|
|
43
|
+
font-weight: 400;
|
|
44
|
+
line-height: 26.63px;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
& h1 {
|
|
49
|
+
line-height: 26px;
|
|
50
|
+
font-size: 22px;
|
|
51
|
+
font-weight: 200;
|
|
52
|
+
letter-spacing: normal;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&-category {
|
|
56
|
+
margin-top: 30px;
|
|
57
|
+
.new & {
|
|
58
|
+
&:first-of-type {
|
|
59
|
+
margin-top: 19px;
|
|
60
|
+
}
|
|
61
|
+
&:not(:first-of-type) {
|
|
62
|
+
margin-top: 24px;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
</style>
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<common-pages-shortcuts-block-new
|
|
3
|
+
v-if="isNewView"
|
|
4
|
+
:item="props.item"
|
|
5
|
+
:test-id="props.testId"
|
|
6
|
+
@change-navigation="onChangeLastNavigation"
|
|
7
|
+
/>
|
|
8
|
+
<common-pages-shortcuts-block-old
|
|
9
|
+
v-else
|
|
10
|
+
:item="props.item"
|
|
11
|
+
:test-id="props.testId"
|
|
12
|
+
@change-navigation="onChangeLastNavigation"
|
|
13
|
+
/>
|
|
14
|
+
</template>
|
|
15
|
+
<script setup lang="ts">
|
|
16
|
+
import type { UI_I_BlockItem } from '~/components/common/pages/shortcuts/lib/models/interfaces'
|
|
17
|
+
|
|
18
|
+
const props = defineProps<{
|
|
19
|
+
item: UI_I_BlockItem
|
|
20
|
+
testId?: string
|
|
21
|
+
}>()
|
|
22
|
+
|
|
23
|
+
const { $store }: any = useNuxtApp()
|
|
24
|
+
|
|
25
|
+
const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
|
|
26
|
+
|
|
27
|
+
const onChangeLastNavigation = (): void => {
|
|
28
|
+
if (!props.item.nav) return
|
|
29
|
+
|
|
30
|
+
const lastSelectedInventory = 'lastSelectedInventoryTreeIdStorageKey'
|
|
31
|
+
useLocalStorage(lastSelectedInventory, props.item.nav)
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
</script>
|
|
35
|
+
<style lang="scss" scoped></style>
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<ui-widget class="category-block-item">
|
|
3
|
+
<nuxt-link
|
|
4
|
+
class="unit"
|
|
5
|
+
:to="navigate"
|
|
6
|
+
:title="props.item.navigateTo"
|
|
7
|
+
:data-id="props.testId"
|
|
8
|
+
@click="emits('change-navigation')"
|
|
9
|
+
@contextmenu="emits('change-navigation')"
|
|
10
|
+
>
|
|
11
|
+
<span class="unit-icon">
|
|
12
|
+
<ui-icon :name="props.item.iconName" width="28" height="28"></ui-icon>
|
|
13
|
+
</span>
|
|
14
|
+
<div class="unit-text" :title="props.item.text">
|
|
15
|
+
{{ props.item.text }}
|
|
16
|
+
</div>
|
|
17
|
+
</nuxt-link>
|
|
18
|
+
</ui-widget>
|
|
19
|
+
</template>
|
|
20
|
+
<script setup lang="ts">
|
|
21
|
+
import type { UI_I_BlockItem } from '~/components/common/pages/shortcuts/lib/models/interfaces'
|
|
22
|
+
|
|
23
|
+
const props = defineProps<{
|
|
24
|
+
item: UI_I_BlockItem
|
|
25
|
+
testId?: string
|
|
26
|
+
}>()
|
|
27
|
+
const emits = defineEmits<{
|
|
28
|
+
(event: 'change-navigation'): void
|
|
29
|
+
}>()
|
|
30
|
+
|
|
31
|
+
const navigate = computed<string>(() => '/' + props.item.navigateTo)
|
|
32
|
+
</script>
|
|
33
|
+
<style lang="scss" scoped>
|
|
34
|
+
@import 'assets/scss/common/mixins';
|
|
35
|
+
.category-block-item {
|
|
36
|
+
max-width: 176px;
|
|
37
|
+
min-height: 110px;
|
|
38
|
+
.unit {
|
|
39
|
+
@include flex($dir: column, $just: space-between);
|
|
40
|
+
width: 100%;
|
|
41
|
+
height: 100%;
|
|
42
|
+
text-decoration-line: none;
|
|
43
|
+
&-icon {
|
|
44
|
+
min-width: 28px;
|
|
45
|
+
min-height: 28px;
|
|
46
|
+
display: inline-block;
|
|
47
|
+
color: var(--close-icon);
|
|
48
|
+
}
|
|
49
|
+
&-text {
|
|
50
|
+
color: #9da6ad;
|
|
51
|
+
font-size: 14px;
|
|
52
|
+
font-weight: 500;
|
|
53
|
+
line-height: 16.94px;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
&:hover {
|
|
58
|
+
background: #e9ebed33;
|
|
59
|
+
cursor: pointer;
|
|
60
|
+
.unit {
|
|
61
|
+
&-icon {
|
|
62
|
+
color: var(--widget-text-hover);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
&-text {
|
|
66
|
+
color: var(--widget-text-hover);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
</style>
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<nuxt-link
|
|
4
|
+
class="unit"
|
|
5
|
+
:to="navigate"
|
|
6
|
+
:title="props.item.navigateTo"
|
|
7
|
+
:data-id="props.testId"
|
|
8
|
+
@click="emits('change-navigation')"
|
|
9
|
+
@contextmenu="emits('change-navigation')"
|
|
10
|
+
>
|
|
11
|
+
<span class="icon-2">
|
|
12
|
+
<ui-icon :name="props.item.iconName" width="34" height="34"></ui-icon>
|
|
13
|
+
</span>
|
|
14
|
+
<div class="unit-text" :title="props.item.text">
|
|
15
|
+
{{ props.item.text }}
|
|
16
|
+
</div>
|
|
17
|
+
</nuxt-link>
|
|
18
|
+
</div>
|
|
19
|
+
</template>
|
|
20
|
+
<script setup lang="ts">
|
|
21
|
+
import type { UI_I_BlockItem } from '~/components/common/pages/shortcuts/lib/models/interfaces'
|
|
22
|
+
|
|
23
|
+
const props = defineProps<{
|
|
24
|
+
item: UI_I_BlockItem
|
|
25
|
+
testId?: string
|
|
26
|
+
}>()
|
|
27
|
+
const emits = defineEmits<{
|
|
28
|
+
(event: 'change-navigation'): void
|
|
29
|
+
}>()
|
|
30
|
+
|
|
31
|
+
const navigate = computed<string>(() => '/' + props.item.navigateTo)
|
|
32
|
+
</script>
|
|
33
|
+
<style lang="scss" scoped>
|
|
34
|
+
.unit {
|
|
35
|
+
display: flex;
|
|
36
|
+
flex-direction: column;
|
|
37
|
+
justify-content: center;
|
|
38
|
+
align-items: center;
|
|
39
|
+
width: 95px;
|
|
40
|
+
margin: 21px 10px;
|
|
41
|
+
text-decoration-line: none;
|
|
42
|
+
.icon-2 {
|
|
43
|
+
margin: 0 10px 15px 10px;
|
|
44
|
+
color: var(--global-font-color3);
|
|
45
|
+
}
|
|
46
|
+
&-text {
|
|
47
|
+
color: var(--global-font-color3);
|
|
48
|
+
font-size: 13px;
|
|
49
|
+
line-height: 13px;
|
|
50
|
+
font-weight: 400;
|
|
51
|
+
padding-bottom: 2px;
|
|
52
|
+
text-align: center;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
</style>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<common-pages-shortcuts-category-new
|
|
3
|
+
v-if="isNewView"
|
|
4
|
+
:title="props.title"
|
|
5
|
+
:block-items="props.blockItems"
|
|
6
|
+
/>
|
|
7
|
+
<common-pages-shortcuts-category-old
|
|
8
|
+
v-else
|
|
9
|
+
:title="props.title"
|
|
10
|
+
:block-items="props.blockItems"
|
|
11
|
+
/>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<script setup lang="ts">
|
|
15
|
+
import type { UI_I_BlockItem } from '~/components/common/pages/shortcuts/lib/models/interfaces'
|
|
16
|
+
|
|
17
|
+
const props = defineProps<{
|
|
18
|
+
title: string
|
|
19
|
+
blockItems: UI_I_BlockItem[]
|
|
20
|
+
}>()
|
|
21
|
+
|
|
22
|
+
const { $store }: any = useNuxtApp()
|
|
23
|
+
|
|
24
|
+
const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
|
|
25
|
+
</script>
|
|
26
|
+
<style lang="scss" scoped></style>
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="category">
|
|
3
|
+
<span class="category__headline">
|
|
4
|
+
{{ props.title }}
|
|
5
|
+
</span>
|
|
6
|
+
<div class="category__block">
|
|
7
|
+
<common-pages-shortcuts-block
|
|
8
|
+
v-for="(item, key) in props.blockItems"
|
|
9
|
+
:key="key"
|
|
10
|
+
:item="item"
|
|
11
|
+
:test-id="item.testId"
|
|
12
|
+
/>
|
|
13
|
+
</div>
|
|
14
|
+
</div>
|
|
15
|
+
</template>
|
|
16
|
+
|
|
17
|
+
<script setup lang="ts">
|
|
18
|
+
import type { UI_I_BlockItem } from '~/components/common/pages/shortcuts/lib/models/interfaces'
|
|
19
|
+
|
|
20
|
+
const props = defineProps<{
|
|
21
|
+
title: string
|
|
22
|
+
blockItems: UI_I_BlockItem[]
|
|
23
|
+
}>()
|
|
24
|
+
</script>
|
|
25
|
+
<style lang="scss" scoped>
|
|
26
|
+
@import 'assets/scss/common/mixins';
|
|
27
|
+
.category {
|
|
28
|
+
&__headline {
|
|
29
|
+
color: #9da6ad;
|
|
30
|
+
font-size: 16px;
|
|
31
|
+
font-weight: 400;
|
|
32
|
+
line-height: 19.36px;
|
|
33
|
+
}
|
|
34
|
+
&__block {
|
|
35
|
+
@include flex($dir: row, $just: flex-start, $w: wrap);
|
|
36
|
+
gap: 12px;
|
|
37
|
+
border-bottom: 1px solid var(--horizontal-line);
|
|
38
|
+
padding: 16px 0 24px;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
</style>
|
package/components/common/{shortcuts/Category.vue → pages/shortcuts/category/CategoryOld.vue}
RENAMED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
{{ props.title }}
|
|
5
5
|
</span>
|
|
6
6
|
<div class="category-block">
|
|
7
|
-
<common-shortcuts-block
|
|
7
|
+
<common-pages-shortcuts-block
|
|
8
8
|
v-for="(item, key) in props.blockItems"
|
|
9
9
|
:key="key"
|
|
10
10
|
:item="item"
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
</template>
|
|
16
16
|
|
|
17
17
|
<script setup lang="ts">
|
|
18
|
-
import type { UI_I_BlockItem } from '~/components/common/shortcuts/lib/models/interfaces'
|
|
18
|
+
import type { UI_I_BlockItem } from '~/components/common/pages/shortcuts/lib/models/interfaces'
|
|
19
19
|
|
|
20
20
|
const props = defineProps<{
|
|
21
21
|
title: string
|
package/package.json
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// TODO move to models folder
|
|
2
|
+
|
|
1
3
|
import type { UI_I_Options } from '~/lib/models/composables/useMyFetch/interfaces'
|
|
2
4
|
|
|
3
5
|
export interface UI_I_RefreshStack {
|
|
@@ -7,3 +9,7 @@ export interface UI_I_RefreshStack {
|
|
|
7
9
|
options: UI_I_Options
|
|
8
10
|
paused?: boolean
|
|
9
11
|
}
|
|
12
|
+
|
|
13
|
+
export interface UI_I_MainState {
|
|
14
|
+
isMenuPined: boolean
|
|
15
|
+
}
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<nuxt-link
|
|
4
|
-
class="unit"
|
|
5
|
-
:to="navigate"
|
|
6
|
-
:title="props.item.navigateTo"
|
|
7
|
-
:data-id="props.testId"
|
|
8
|
-
@click="changeLastNavigation"
|
|
9
|
-
@contextmenu="changeLastNavigation"
|
|
10
|
-
>
|
|
11
|
-
<span
|
|
12
|
-
v-if="props.item.iconClassName"
|
|
13
|
-
:class="['unit-icon', props.item.iconClassName]"
|
|
14
|
-
/>
|
|
15
|
-
<span v-else-if="props.item.iconName" class="icon-2">
|
|
16
|
-
<atoms-the-icon2 :name="props.item.iconName" width="34" height="34" />
|
|
17
|
-
</span>
|
|
18
|
-
<div class="unit-text" :title="props.item.text">
|
|
19
|
-
{{ props.item.text }}
|
|
20
|
-
</div>
|
|
21
|
-
</nuxt-link>
|
|
22
|
-
</div>
|
|
23
|
-
</template>
|
|
24
|
-
<script setup lang="ts">
|
|
25
|
-
import type { UI_I_BlockItem } from '~/components/common/shortcuts/lib/models/interfaces'
|
|
26
|
-
|
|
27
|
-
const props = defineProps<{
|
|
28
|
-
item: UI_I_BlockItem
|
|
29
|
-
testId?: string
|
|
30
|
-
}>()
|
|
31
|
-
|
|
32
|
-
const navigate = computed<string>(() => '/' + props.item.navigateTo)
|
|
33
|
-
|
|
34
|
-
const changeLastNavigation = (): void => {
|
|
35
|
-
if (!props.item.nav) return
|
|
36
|
-
|
|
37
|
-
const lastSelectedInventory = 'lastSelectedInventoryTreeIdStorageKey'
|
|
38
|
-
useLocalStorage(lastSelectedInventory, props.item.nav)
|
|
39
|
-
}
|
|
40
|
-
</script>
|
|
41
|
-
<style lang="scss" scoped>
|
|
42
|
-
.unit {
|
|
43
|
-
display: flex;
|
|
44
|
-
flex-direction: column;
|
|
45
|
-
justify-content: center;
|
|
46
|
-
align-items: center;
|
|
47
|
-
width: 95px;
|
|
48
|
-
margin: 21px 10px;
|
|
49
|
-
text-decoration-line: none;
|
|
50
|
-
&-icon {
|
|
51
|
-
margin: 0px 10px 15px 10px;
|
|
52
|
-
min-width: 34px;
|
|
53
|
-
min-height: 34px;
|
|
54
|
-
display: inline-block;
|
|
55
|
-
color: var(--global-font-color3);
|
|
56
|
-
|
|
57
|
-
&.icon-lifecycle-manager,
|
|
58
|
-
&.icon-cloud-provider-services {
|
|
59
|
-
background-size: contain;
|
|
60
|
-
background-repeat: no-repeat;
|
|
61
|
-
}
|
|
62
|
-
&.icon-lifecycle-manager {
|
|
63
|
-
background-image: url('assets/img/icons/icon-life-m-light.svg');
|
|
64
|
-
html.dark-theme & {
|
|
65
|
-
background-image: url('assets/img/icons/icon-life-m-dark.svg');
|
|
66
|
-
color: var(--global-font-color3);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
&.icon-cloud-provider-services {
|
|
70
|
-
background-image: url('assets/img/icons/icon-cps.png');
|
|
71
|
-
html.dark-theme & {
|
|
72
|
-
background-image: url('assets/img/icons/icon-cps-dark-mode.png');
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
&.icon-vm-customizationManager-32x,
|
|
76
|
-
&.icon-storage-profile-32x,
|
|
77
|
-
&.icon-Host_Policy-32x,
|
|
78
|
-
&.icon-certificate-32x {
|
|
79
|
-
width: 34px;
|
|
80
|
-
height: 34px;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
.icon-2 {
|
|
84
|
-
margin: 0 10px 15px 10px;
|
|
85
|
-
color: var(--global-font-color3);
|
|
86
|
-
}
|
|
87
|
-
&-text {
|
|
88
|
-
color: var(--global-font-color3);
|
|
89
|
-
font-size: 13px;
|
|
90
|
-
line-height: 13px;
|
|
91
|
-
font-weight: 400;
|
|
92
|
-
padding-bottom: 2px;
|
|
93
|
-
text-align: center;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
</style>
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="shortcut">
|
|
3
|
-
<h1>{{ localization.mainNavigation.shortcuts }}</h1>
|
|
4
|
-
<template v-for="item in props.shortcutsItems">
|
|
5
|
-
<div class="shortcut-category">
|
|
6
|
-
<common-shortcuts-category
|
|
7
|
-
:title="item.title"
|
|
8
|
-
:block-items="item.blockItems"
|
|
9
|
-
/>
|
|
10
|
-
</div>
|
|
11
|
-
</template>
|
|
12
|
-
</div>
|
|
13
|
-
</template>
|
|
14
|
-
|
|
15
|
-
<script setup lang="ts">
|
|
16
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
17
|
-
import type { UI_I_ShortcutsItems } from '~/components/common/shortcuts/lib/models/interfaces'
|
|
18
|
-
|
|
19
|
-
const props = defineProps<{
|
|
20
|
-
shortcutsItems: UI_I_ShortcutsItems[]
|
|
21
|
-
}>()
|
|
22
|
-
|
|
23
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
24
|
-
</script>
|
|
25
|
-
|
|
26
|
-
<style lang="scss" scoped>
|
|
27
|
-
.shortcut {
|
|
28
|
-
margin: 20px;
|
|
29
|
-
width: 100%;
|
|
30
|
-
height: 100%;
|
|
31
|
-
overflow-y: scroll;
|
|
32
|
-
|
|
33
|
-
h1 {
|
|
34
|
-
line-height: 26px;
|
|
35
|
-
font-size: 22px;
|
|
36
|
-
font-weight: 200;
|
|
37
|
-
letter-spacing: normal;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
&-category {
|
|
41
|
-
margin: 30px 20px 0 0;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
</style>
|
|
File without changes
|