bfg-common 1.5.812 → 1.5.813

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.
Files changed (105) hide show
  1. package/CODE_STYLE.md +109 -109
  2. package/assets/img/icons/icons-sprite-dark-3.svg +227 -227
  3. package/assets/img/icons/icons-sprite-dark-5.svg +488 -488
  4. package/assets/img/icons/icons-sprite-light-3.svg +227 -227
  5. package/assets/img/icons/icons-sprite-light-5.svg +488 -488
  6. package/components/atoms/TheIcon3.vue +50 -50
  7. package/components/atoms/collapse/CollapseNav.vue +170 -170
  8. package/components/atoms/perPage/PerPage.vue +58 -58
  9. package/components/atoms/table/dataGrid/DataGridPagination.vue +97 -97
  10. package/components/atoms/table/dataGrid/lib/config/settingsTable.ts +94 -94
  11. package/components/atoms/table/dataGrid/lib/utils/export.ts +16 -16
  12. package/components/common/backup/storage/actions/add/lib/utils.ts +51 -51
  13. package/components/common/browse/blocks/contents/filesNew/Skeleton.vue +18 -18
  14. package/components/common/configure/advancedSystemSettings/AdvancedSystemSettings.vue +47 -47
  15. package/components/common/configure/advancedSystemSettings/modals/edit/Edit.vue +78 -78
  16. package/components/common/configure/advancedSystemSettings/modals/edit/New.vue +56 -56
  17. package/components/common/configure/advancedSystemSettings/modals/edit/Old.vue +66 -66
  18. package/components/common/configure/advancedSystemSettings/tableView/TableView.vue +40 -40
  19. package/components/common/configure/advancedSystemSettings/tableView/old/Old.vue +122 -122
  20. package/components/common/configure/advancedSystemSettings/tableView/old/field/Field.vue +139 -139
  21. package/components/common/configure/advancedSystemSettings/tableView/old/field/lib/models/enums.ts +13 -13
  22. package/components/common/configure/advancedSystemSettings/tableView/old/lib/config/table.ts +131 -131
  23. package/components/common/diagramMain/modals/lib/config/vCenterModal.ts +48 -48
  24. package/components/common/diagramMain/port/Port.vue +580 -580
  25. package/components/common/layout/theHeader/userMenu/UserMenu.vue +116 -116
  26. package/components/common/layout/theHeader/userMenu/modals/preferences/lib/models/types.ts +7 -7
  27. package/components/common/layout/topNotification/TopNotification.vue +37 -37
  28. package/components/common/layout/topNotification/lib/models/enums.ts +3 -3
  29. package/components/common/pages/backups/DetailView.vue +52 -52
  30. package/components/common/pages/backups/lib/models/interfaces.ts +36 -36
  31. package/components/common/pages/backups/modals/Modals.vue +243 -243
  32. package/components/common/pages/backups/modals/createBackup/configuration/maxBandwidth/lib/config/options.ts +6 -6
  33. package/components/common/pages/backups/modals/restore/disks/tableView/old/Table.vue +117 -117
  34. package/components/common/pages/backups/modals/restore/lib/config/readyToCompleteOptions.ts +96 -96
  35. package/components/common/pages/backups/modals/restore/lib/config/steps.ts +134 -134
  36. package/components/common/pages/backups/modals/restore/name/lib/models/interfaces.ts +6 -6
  37. package/components/common/pages/home/lib/models/interfaces.ts +48 -48
  38. package/components/common/pages/home/widgets/hosts/Hosts.vue +27 -27
  39. package/components/common/pages/home/widgets/hosts/lib/config/items.ts +23 -23
  40. package/components/common/pages/home/widgets/vms/VmsOld.vue +35 -35
  41. package/components/common/pages/home/widgets/vms/lib/config/items.ts +19 -19
  42. package/components/common/pages/scheduledTasks/lib/utils/utils.ts +84 -84
  43. package/components/common/readyToComplete/ReadyToComplete.vue +17 -17
  44. package/components/common/select/radio/RadioGroup.vue +137 -137
  45. package/components/common/spiceConsole/Drawer.vue +420 -420
  46. package/components/common/spiceConsole/SpiceConsole.vue +184 -184
  47. package/components/common/spiceConsole/lib/models/interfaces.ts +5 -5
  48. package/components/common/tools/Actions.vue +207 -207
  49. package/components/common/treeView/TreeView.vue +52 -52
  50. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/shares/lib/config/options.ts +28 -28
  51. package/components/common/vm/actions/common/customizeHardware/virtualHardware/memory/Memory.vue +283 -283
  52. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/New.vue +340 -340
  53. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/NewHardDisk.vue +511 -502
  54. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/Old.vue +279 -279
  55. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/vmStoragePolicy/New.vue +53 -53
  56. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/vmStoragePolicy/Old.vue +45 -45
  57. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/vmStoragePolicy/VmStoragePolicy.vue +31 -31
  58. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/vmStoragePolicy/lib/config/options.ts +12 -12
  59. package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/order/Order.vue +156 -156
  60. package/components/common/vm/actions/common/lib/models/interfaces.ts +192 -192
  61. package/components/common/vm/actions/common/select/compatibility/Old.vue +107 -107
  62. package/components/common/vm/actions/common/select/createType/lib/models/interfaces.ts +5 -5
  63. package/components/common/vm/actions/common/select/options/Options.vue +58 -58
  64. package/components/common/vm/actions/common/select/storage/Old.vue +125 -125
  65. package/components/common/vm/actions/common/select/storage/new/lib/models/interfaces.ts +5 -5
  66. package/components/common/vm/actions/common/select/storage/new/lib/utils/utils.ts +21 -21
  67. package/components/common/vm/actions/common/select/template/old/Old.vue +50 -50
  68. package/components/common/vm/actions/editSettings/new/Skeleton.vue +88 -88
  69. package/components/common/wizards/common/compatibility/Compatibility.vue +35 -35
  70. package/components/common/wizards/common/steps/name/Old.vue +121 -121
  71. package/components/common/wizards/common/steps/name/lib/models/interfaces.ts +4 -4
  72. package/components/common/wizards/common/steps/name/location/New.vue +40 -40
  73. package/components/common/wizards/datastore/add/steps/typeMode/lib/config/typeOptions.ts +43 -43
  74. package/components/common/wizards/network/add/steps/portProperties/PortProperties.vue +192 -192
  75. package/composables/useAppVersion.ts +21 -21
  76. package/composables/useLocal.ts +6 -6
  77. package/composables/useLocalCommon.ts +39 -39
  78. package/lib/config/regExp.ts +53 -53
  79. package/package.json +1 -1
  80. package/plugins/console.ts +21 -21
  81. package/plugins/helpers.ts +34 -34
  82. package/plugins/mouse.ts +21 -21
  83. package/plugins/panelStates.ts +70 -70
  84. package/plugins/text.ts +59 -59
  85. package/public/spice-console/application/clientgui.js +854 -854
  86. package/public/spice-console/application/packetfactory.js +211 -211
  87. package/public/spice-console/application/virtualmouse.js +147 -147
  88. package/public/spice-console/lib/images/bitmap.js +203 -203
  89. package/public/spice-console/network/spicechannel.js +440 -440
  90. package/public/spice-console/process/cursorprocess.js +128 -128
  91. package/public/spice-console/process/inputprocess.js +227 -227
  92. package/public/spice-console/process/mainprocess.js +212 -212
  93. package/public/spice-console/run.js +210 -210
  94. package/store/inventory/modules/configure/advancedSystemSettings/actions.ts +92 -92
  95. package/store/inventory/modules/configure/advancedSystemSettings/getters.ts +17 -17
  96. package/store/inventory/modules/configure/advancedSystemSettings/lib/models/interfaces.ts +45 -45
  97. package/store/inventory/modules/configure/advancedSystemSettings/lib/models/types.ts +30 -30
  98. package/store/inventory/modules/configure/advancedSystemSettings/mappers/mapSettings.ts +50 -50
  99. package/store/main/actions.ts +28 -28
  100. package/store/main/getters.ts +14 -14
  101. package/store/main/lib/interfaces.ts +18 -18
  102. package/store/main/mutations.ts +28 -28
  103. package/store/main/state.ts +9 -9
  104. package/store/tasks/mappers/recentTasks.ts +123 -123
  105. package/store/tasks/mutations.ts +82 -82
@@ -1,45 +1,45 @@
1
- import type { API_UI_I_DataTable } from '~/lib/models/table/interfaces'
2
- import type { UI_I_LoadingPayload } from '~/lib/models/store/interfaces'
3
- import type {
4
- T_AdvancedSystemSettingLoading,
5
- UI_T_AdvancedSystemSettingFormat,
6
- UI_T_AdvancedSystemSettingType,
7
- } from '~/store/inventory/modules/configure/advancedSystemSettings/lib/models/types'
8
-
9
- export interface UI_I_AdvancedSystemSettingLoadingPayload
10
- extends UI_I_LoadingPayload<T_AdvancedSystemSettingLoading> {}
11
-
12
- export interface UI_I_AdvancedSystemSettingPayload {
13
- host: string
14
- onlyUpdatedSettings: UI_API_I_AdvancedSystemSetting[]
15
- allUpdatedSettings: UI_API_I_AdvancedSystemSetting[]
16
- }
17
-
18
- export interface UI_API_I_AdvancedSystemSetting {
19
- key: string
20
- summary: string
21
- type: UI_T_AdvancedSystemSettingType
22
- value: number | boolean | string
23
- validation: {
24
- Format: UI_T_AdvancedSystemSettingFormat
25
- min?: number
26
- max?: number
27
- equal?: []
28
- notEqual?: []
29
- }
30
- }
31
-
32
- export interface UI_I_AdvancedSystemSetting {
33
- key: string
34
- summary: string
35
- type: 'number' | 'boolean' | 'string'
36
- value: number | boolean | string
37
- validation: UI_API_I_AdvancedSystemSetting['validation']
38
- }
39
-
40
- export interface UI_I_AdvancedSystemSettingsState {
41
- settings: API_UI_I_DataTable<UI_I_AdvancedSystemSetting[]>
42
- loading: {
43
- settings: boolean
44
- }
45
- }
1
+ import type { API_UI_I_DataTable } from '~/lib/models/table/interfaces'
2
+ import type { UI_I_LoadingPayload } from '~/lib/models/store/interfaces'
3
+ import type {
4
+ T_AdvancedSystemSettingLoading,
5
+ UI_T_AdvancedSystemSettingFormat,
6
+ UI_T_AdvancedSystemSettingType,
7
+ } from '~/store/inventory/modules/configure/advancedSystemSettings/lib/models/types'
8
+
9
+ export interface UI_I_AdvancedSystemSettingLoadingPayload
10
+ extends UI_I_LoadingPayload<T_AdvancedSystemSettingLoading> {}
11
+
12
+ export interface UI_I_AdvancedSystemSettingPayload {
13
+ host: string
14
+ onlyUpdatedSettings: UI_API_I_AdvancedSystemSetting[]
15
+ allUpdatedSettings: UI_API_I_AdvancedSystemSetting[]
16
+ }
17
+
18
+ export interface UI_API_I_AdvancedSystemSetting {
19
+ key: string
20
+ summary: string
21
+ type: UI_T_AdvancedSystemSettingType
22
+ value: number | boolean | string
23
+ validation: {
24
+ Format: UI_T_AdvancedSystemSettingFormat
25
+ min?: number
26
+ max?: number
27
+ equal?: []
28
+ notEqual?: []
29
+ }
30
+ }
31
+
32
+ export interface UI_I_AdvancedSystemSetting {
33
+ key: string
34
+ summary: string
35
+ type: 'number' | 'boolean' | 'string'
36
+ value: number | boolean | string
37
+ validation: UI_API_I_AdvancedSystemSetting['validation']
38
+ }
39
+
40
+ export interface UI_I_AdvancedSystemSettingsState {
41
+ settings: API_UI_I_DataTable<UI_I_AdvancedSystemSetting[]>
42
+ loading: {
43
+ settings: boolean
44
+ }
45
+ }
@@ -1,30 +1,30 @@
1
- export type UI_T_AdvancedSystemSettingType =
2
- | 'int'
3
- | 'int8'
4
- | 'int16'
5
- | 'int32'
6
- | 'int64'
7
- | 'uint'
8
- | 'uint8'
9
- | 'uint16'
10
- | 'uint32'
11
- | 'uint64'
12
- | 'float32'
13
- | 'float64'
14
- | 'bool'
15
- | 'string'
16
- export type UI_T_AdvancedSystemSettingFormat =
17
- | 'unix path'
18
- | 'win path'
19
- | 'mac'
20
- | 'ip4'
21
- | 'ip6'
22
- | 'url'
23
- | 'uuid'
24
- | 'semver'
25
- | 'domain'
26
- | 'base64'
27
- | 'regex'
28
- | 'hex color'
29
- export type T_AdvancedSystemSettingLoading =
30
- | 'settings'
1
+ export type UI_T_AdvancedSystemSettingType =
2
+ | 'int'
3
+ | 'int8'
4
+ | 'int16'
5
+ | 'int32'
6
+ | 'int64'
7
+ | 'uint'
8
+ | 'uint8'
9
+ | 'uint16'
10
+ | 'uint32'
11
+ | 'uint64'
12
+ | 'float32'
13
+ | 'float64'
14
+ | 'bool'
15
+ | 'string'
16
+ export type UI_T_AdvancedSystemSettingFormat =
17
+ | 'unix path'
18
+ | 'win path'
19
+ | 'mac'
20
+ | 'ip4'
21
+ | 'ip6'
22
+ | 'url'
23
+ | 'uuid'
24
+ | 'semver'
25
+ | 'domain'
26
+ | 'base64'
27
+ | 'regex'
28
+ | 'hex color'
29
+ export type T_AdvancedSystemSettingLoading =
30
+ | 'settings'
@@ -1,50 +1,50 @@
1
- import type { API_UI_I_DataTable } from '~/lib/models/table/interfaces'
2
- import type {
3
- UI_API_I_AdvancedSystemSetting,
4
- UI_I_AdvancedSystemSetting,
5
- } from '~/store/inventory/modules/configure/advancedSystemSettings/lib/models/interfaces'
6
- import type { UI_T_AdvancedSystemSettingType } from '~/store/inventory/modules/configure/advancedSystemSettings/lib/models/types'
7
-
8
- const getType = (
9
- type: UI_T_AdvancedSystemSettingType
10
- ): 'number' | 'boolean' | 'string' => {
11
- switch (type) {
12
- case 'int':
13
- case 'int8':
14
- case 'int16':
15
- case 'int32':
16
- case 'int64':
17
- case 'uint':
18
- case 'uint8':
19
- case 'uint16':
20
- case 'uint32':
21
- case 'uint64':
22
- case 'float32':
23
- case 'float64':
24
- return 'number'
25
- case 'bool':
26
- return 'boolean'
27
- case 'string':
28
- return 'string'
29
- }
30
- }
31
- export const mapSettings = (
32
- data: UI_API_I_AdvancedSystemSetting[]
33
- ): API_UI_I_DataTable<UI_I_AdvancedSystemSetting[]> => {
34
- const tableData: API_UI_I_DataTable<UI_I_AdvancedSystemSetting[]> = {
35
- items: [],
36
- total_items: 0,
37
- total_pages: 0,
38
- }
39
- tableData.items = data.map((item) => {
40
- return {
41
- key: item.key,
42
- summary: item.summary,
43
- type: getType(item.type),
44
- value: item.value,
45
- validation: item.validation,
46
- }
47
- })
48
- tableData.total_pages = Math.ceil(tableData.items.length / 100)
49
- return tableData
50
- }
1
+ import type { API_UI_I_DataTable } from '~/lib/models/table/interfaces'
2
+ import type {
3
+ UI_API_I_AdvancedSystemSetting,
4
+ UI_I_AdvancedSystemSetting,
5
+ } from '~/store/inventory/modules/configure/advancedSystemSettings/lib/models/interfaces'
6
+ import type { UI_T_AdvancedSystemSettingType } from '~/store/inventory/modules/configure/advancedSystemSettings/lib/models/types'
7
+
8
+ const getType = (
9
+ type: UI_T_AdvancedSystemSettingType
10
+ ): 'number' | 'boolean' | 'string' => {
11
+ switch (type) {
12
+ case 'int':
13
+ case 'int8':
14
+ case 'int16':
15
+ case 'int32':
16
+ case 'int64':
17
+ case 'uint':
18
+ case 'uint8':
19
+ case 'uint16':
20
+ case 'uint32':
21
+ case 'uint64':
22
+ case 'float32':
23
+ case 'float64':
24
+ return 'number'
25
+ case 'bool':
26
+ return 'boolean'
27
+ case 'string':
28
+ return 'string'
29
+ }
30
+ }
31
+ export const mapSettings = (
32
+ data: UI_API_I_AdvancedSystemSetting[]
33
+ ): API_UI_I_DataTable<UI_I_AdvancedSystemSetting[]> => {
34
+ const tableData: API_UI_I_DataTable<UI_I_AdvancedSystemSetting[]> = {
35
+ items: [],
36
+ total_items: 0,
37
+ total_pages: 0,
38
+ }
39
+ tableData.items = data.map((item) => {
40
+ return {
41
+ key: item.key,
42
+ summary: item.summary,
43
+ type: getType(item.type),
44
+ value: item.value,
45
+ validation: item.validation,
46
+ }
47
+ })
48
+ tableData.total_pages = Math.ceil(tableData.items.length / 100)
49
+ return tableData
50
+ }
@@ -1,28 +1,28 @@
1
- import type { UI_I_NotificationItem } from '~/node_modules/bfg-uikit/components/ui/notification/lib/models/interfaces'
2
-
3
- export default {
4
- A_MENU_PINED(
5
- context: { commit: (arg0: string, arg1: boolean) => void },
6
- payload: boolean
7
- ): void {
8
- context.commit('M_MENU_PINED', payload)
9
- },
10
- A_ADD_TOP_NOTIFICATION(
11
- context: { commit: (arg0: string, arg1: UI_I_NotificationItem[]) => void },
12
- payload: UI_I_NotificationItem[]
13
- ): void {
14
- context.commit('M_ADD_TOP_NOTIFICATION', payload)
15
- },
16
- A_REMOVE_TOP_NOTIFICATIONS(
17
- context: { commit: (arg0: string, arg1: number[]) => void },
18
- payload: number[]
19
- ): void {
20
- context.commit('M_REMOVE_TOP_NOTIFICATIONS', payload)
21
- },
22
- A_SET_TOP_NOTIFICATION_ACTION_ID(
23
- context: { commit: (arg0: string, arg1: number) => void },
24
- payload: number
25
- ): void {
26
- context.commit('M_SET_TOP_NOTIFICATION_ACTION_ID', payload)
27
- },
28
- }
1
+ import type { UI_I_NotificationItem } from '~/node_modules/bfg-uikit/components/ui/notification/lib/models/interfaces'
2
+
3
+ export default {
4
+ A_MENU_PINED(
5
+ context: { commit: (arg0: string, arg1: boolean) => void },
6
+ payload: boolean
7
+ ): void {
8
+ context.commit('M_MENU_PINED', payload)
9
+ },
10
+ A_ADD_TOP_NOTIFICATION(
11
+ context: { commit: (arg0: string, arg1: UI_I_NotificationItem[]) => void },
12
+ payload: UI_I_NotificationItem[]
13
+ ): void {
14
+ context.commit('M_ADD_TOP_NOTIFICATION', payload)
15
+ },
16
+ A_REMOVE_TOP_NOTIFICATIONS(
17
+ context: { commit: (arg0: string, arg1: number[]) => void },
18
+ payload: number[]
19
+ ): void {
20
+ context.commit('M_REMOVE_TOP_NOTIFICATIONS', payload)
21
+ },
22
+ A_SET_TOP_NOTIFICATION_ACTION_ID(
23
+ context: { commit: (arg0: string, arg1: number) => void },
24
+ payload: number
25
+ ): void {
26
+ context.commit('M_SET_TOP_NOTIFICATION_ACTION_ID', payload)
27
+ },
28
+ }
@@ -1,14 +1,14 @@
1
- import type { UI_I_NotificationItem } from '~/node_modules/bfg-uikit/components/ui/notification/lib/models/interfaces'
2
- import type { UI_I_MainState } from '~/store/main/lib/interfaces'
3
-
4
- export default {
5
- getIsMenuPined: (state: UI_I_MainState): boolean => {
6
- return state.isMenuPined
7
- },
8
- getTopNotifications: (state: UI_I_MainState): UI_I_NotificationItem[] => {
9
- return state.topNotifications
10
- },
11
- getTopNotificationActionId: (state: UI_I_MainState): number => {
12
- return state.topNotificationActionId
13
- },
14
- }
1
+ import type { UI_I_NotificationItem } from '~/node_modules/bfg-uikit/components/ui/notification/lib/models/interfaces'
2
+ import type { UI_I_MainState } from '~/store/main/lib/interfaces'
3
+
4
+ export default {
5
+ getIsMenuPined: (state: UI_I_MainState): boolean => {
6
+ return state.isMenuPined
7
+ },
8
+ getTopNotifications: (state: UI_I_MainState): UI_I_NotificationItem[] => {
9
+ return state.topNotifications
10
+ },
11
+ getTopNotificationActionId: (state: UI_I_MainState): number => {
12
+ return state.topNotificationActionId
13
+ },
14
+ }
@@ -1,18 +1,18 @@
1
- // TODO move to models folder
2
-
3
- import type { UI_I_NotificationItem } from '~/node_modules/bfg-uikit/components/ui/notification/lib/models/interfaces'
4
- import type { UI_I_Options } from '~/lib/models/composables/useMyFetch/interfaces'
5
-
6
- export interface UI_I_RefreshStack {
7
- key: string
8
- // method: () => void | any
9
- url: string
10
- options: UI_I_Options
11
- paused?: boolean
12
- }
13
-
14
- export interface UI_I_MainState {
15
- isMenuPined: boolean
16
- topNotifications: UI_I_NotificationItem[]
17
- topNotificationActionId: number
18
- }
1
+ // TODO move to models folder
2
+
3
+ import type { UI_I_NotificationItem } from '~/node_modules/bfg-uikit/components/ui/notification/lib/models/interfaces'
4
+ import type { UI_I_Options } from '~/lib/models/composables/useMyFetch/interfaces'
5
+
6
+ export interface UI_I_RefreshStack {
7
+ key: string
8
+ // method: () => void | any
9
+ url: string
10
+ options: UI_I_Options
11
+ paused?: boolean
12
+ }
13
+
14
+ export interface UI_I_MainState {
15
+ isMenuPined: boolean
16
+ topNotifications: UI_I_NotificationItem[]
17
+ topNotificationActionId: number
18
+ }
@@ -1,28 +1,28 @@
1
- import type { UI_I_NotificationItem } from '~/node_modules/bfg-uikit/components/ui/notification/lib/models/interfaces'
2
- import type { UI_I_MainState } from '~/store/main/lib/interfaces'
3
-
4
- export default {
5
- M_MENU_PINED(state: UI_I_MainState, payload: boolean): void {
6
- state.isMenuPined = payload
7
- },
8
- M_ADD_TOP_NOTIFICATION(
9
- state: UI_I_MainState,
10
- payload: UI_I_NotificationItem[]
11
- ): void {
12
- state.topNotifications = [...state.topNotifications, ...payload]
13
- },
14
- M_REMOVE_TOP_NOTIFICATIONS(
15
- state: UI_I_MainState,
16
- payload: number[]
17
- ): void {
18
- state.topNotifications = state.topNotifications.filter((item: UI_I_NotificationItem) => {
19
- return !payload.includes(item.id)
20
- })
21
- },
22
- M_SET_TOP_NOTIFICATION_ACTION_ID(
23
- state: UI_I_MainState,
24
- payload: number
25
- ): void {
26
- state.topNotificationActionId = payload
27
- },
28
- }
1
+ import type { UI_I_NotificationItem } from '~/node_modules/bfg-uikit/components/ui/notification/lib/models/interfaces'
2
+ import type { UI_I_MainState } from '~/store/main/lib/interfaces'
3
+
4
+ export default {
5
+ M_MENU_PINED(state: UI_I_MainState, payload: boolean): void {
6
+ state.isMenuPined = payload
7
+ },
8
+ M_ADD_TOP_NOTIFICATION(
9
+ state: UI_I_MainState,
10
+ payload: UI_I_NotificationItem[]
11
+ ): void {
12
+ state.topNotifications = [...state.topNotifications, ...payload]
13
+ },
14
+ M_REMOVE_TOP_NOTIFICATIONS(
15
+ state: UI_I_MainState,
16
+ payload: number[]
17
+ ): void {
18
+ state.topNotifications = state.topNotifications.filter((item: UI_I_NotificationItem) => {
19
+ return !payload.includes(item.id)
20
+ })
21
+ },
22
+ M_SET_TOP_NOTIFICATION_ACTION_ID(
23
+ state: UI_I_MainState,
24
+ payload: number
25
+ ): void {
26
+ state.topNotificationActionId = payload
27
+ },
28
+ }
@@ -1,9 +1,9 @@
1
- import type { UI_I_MainState } from '~/store/main/lib/interfaces'
2
-
3
- const state: UI_I_MainState = {
4
- isMenuPined: false,
5
- topNotifications: [],
6
- topNotificationActionId: -1,
7
- }
8
-
9
- export default state
1
+ import type { UI_I_MainState } from '~/store/main/lib/interfaces'
2
+
3
+ const state: UI_I_MainState = {
4
+ isMenuPined: false,
5
+ topNotifications: [],
6
+ topNotificationActionId: -1,
7
+ }
8
+
9
+ export default state