bfg-common 1.5.443 → 1.5.444

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 (138) 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/assets/localization/local_be.json +1 -0
  7. package/assets/localization/local_en.json +3 -2
  8. package/assets/localization/local_hy.json +1 -0
  9. package/assets/localization/local_kk.json +1 -0
  10. package/assets/localization/local_ru.json +1 -0
  11. package/assets/localization/local_zh.json +1 -0
  12. package/components/atoms/TheIcon3.vue +50 -50
  13. package/components/atoms/collapse/CollapseNav.vue +170 -170
  14. package/components/atoms/perPage/PerPage.vue +58 -58
  15. package/components/atoms/table/dataGrid/DataGrid.vue +1694 -1694
  16. package/components/atoms/table/dataGrid/DataGridPagination.vue +97 -97
  17. package/components/atoms/table/dataGrid/lib/config/settingsTable.ts +94 -94
  18. package/components/atoms/table/dataGrid/lib/utils/export.ts +16 -16
  19. package/components/common/browse/blocks/Container.vue +235 -235
  20. package/components/common/browse/blocks/contents/filesNew/Skeleton.vue +18 -18
  21. package/components/common/browse/blocks/lib/models/types.ts +1 -1
  22. package/components/common/browse/lib/models/interfaces.ts +5 -5
  23. package/components/common/context/lib/models/interfaces.ts +33 -33
  24. package/components/common/countdownTimer/CountdownTimer.vue +15 -26
  25. package/components/common/countdownTimer/CountdownTimerNew.vue +53 -0
  26. package/components/common/countdownTimer/CountdownTimerOld.vue +33 -0
  27. package/components/common/diagramMain/lib/config/initial.ts +50 -50
  28. package/components/common/diagramMain/lib/models/types.ts +21 -21
  29. package/components/common/diagramMain/lib/utils/utils.ts +331 -331
  30. package/components/common/diagramMain/modals/lib/config/networkModal.ts +398 -398
  31. package/components/common/diagramMain/modals/lib/config/portModal.ts +251 -251
  32. package/components/common/diagramMain/modals/lib/config/vCenterModal.ts +48 -48
  33. package/components/common/diagramMain/modals/lib/config/vmKernelAdapter.ts +90 -90
  34. package/components/common/diagramMain/modals/lib/mappers/mappers.ts +87 -87
  35. package/components/common/diagramMain/modals/lib/utils/index.ts +24 -24
  36. package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/common.ts +14 -14
  37. package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/validations.ts +19 -19
  38. package/components/common/diagramMain/port/Port.vue +580 -580
  39. package/components/common/diagramMain/port/Ports.vue +47 -47
  40. package/components/common/layout/theHeader/helpMenu/About.vue +82 -82
  41. package/components/common/layout/theHeader/modals/{Reconnect.vue → reconnect/Reconnect.vue} +43 -56
  42. package/components/common/layout/theHeader/modals/reconnect/ReconnectNew.vue +74 -0
  43. package/components/common/layout/theHeader/modals/reconnect/ReconnectOld.vue +67 -0
  44. package/components/common/pages/backups/Backups.vue +102 -102
  45. package/components/common/pages/backups/DetailView.vue +52 -52
  46. package/components/common/pages/backups/lib/models/interfaces.ts +36 -36
  47. package/components/common/pages/backups/modals/createBackup/configuration/Configuration.vue +29 -29
  48. package/components/common/pages/backups/modals/createBackup/configuration/backupWindow/BackupWindow.vue +26 -26
  49. package/components/common/pages/backups/modals/createBackup/configuration/maxBandwidth/MaxBandwidth.vue +66 -66
  50. package/components/common/pages/backups/modals/createBackup/configuration/maxBandwidth/lib/config/options.ts +6 -6
  51. package/components/common/pages/backups/modals/createBackup/configuration/strategy/Strategy.vue +35 -35
  52. package/components/common/pages/backups/modals/createBackup/datastores/Datastores.vue +59 -59
  53. package/components/common/pages/backups/modals/createBackup/datastores/tableView/TableView.vue +95 -95
  54. package/components/common/pages/backups/modals/createBackup/disks/tableView/lib/config/table.ts +117 -117
  55. package/components/common/pages/backups/modals/createBackup/general/General.vue +135 -135
  56. package/components/common/pages/backups/modals/createBackup/lib/config/strategyOptions.ts +12 -12
  57. package/components/common/pages/backups/modals/lib/config/restore.ts +115 -115
  58. package/components/common/pages/backups/modals/lib/models/interfaces.ts +186 -186
  59. package/components/common/pages/backups/modals/restore/disks/Disks.vue +27 -27
  60. package/components/common/pages/backups/modals/restore/disks/tableView/TableView.vue +102 -102
  61. package/components/common/pages/backups/modals/restore/disks/tableView/lib/config/table.ts +117 -117
  62. package/components/common/pages/backups/modals/restore/name/Name.vue +160 -160
  63. package/components/common/pages/backups/modals/restore/name/lib/models/interfaces.ts +6 -6
  64. package/components/common/pages/backups/modals/restore/networks/Networks.vue +67 -67
  65. package/components/common/pages/backups/modals/restore/networks/table/Table.vue +214 -214
  66. package/components/common/pages/backups/modals/restore/types/lib/config/typeOptions.ts +25 -25
  67. package/components/common/pages/backups/tools/Tools.vue +75 -75
  68. package/components/common/pages/backups/tools/lib/config/tabs.ts +36 -36
  69. package/components/common/pages/home/headline/HeadlineOld.vue +42 -42
  70. package/components/common/pages/home/lib/models/interfaces.ts +48 -48
  71. package/components/common/pages/home/widgets/hosts/Hosts.vue +27 -27
  72. package/components/common/pages/home/widgets/hosts/lib/config/items.ts +23 -23
  73. package/components/common/pages/home/widgets/vms/VmsOld.vue +35 -35
  74. package/components/common/pages/home/widgets/vms/lib/config/items.ts +19 -19
  75. package/components/common/pages/scheduledTasks/lib/utils/utils.ts +84 -84
  76. package/components/common/readyToComplete/ReadyToComplete.vue +17 -17
  77. package/components/common/select/radio/RadioGroup.vue +137 -137
  78. package/components/common/spiceConsole/Drawer.vue +381 -381
  79. package/components/common/spiceConsole/SpiceConsole.vue +127 -127
  80. package/components/common/spiceConsole/lib/models/interfaces.ts +5 -5
  81. package/components/common/tools/Actions.vue +207 -207
  82. package/components/common/treeView/TreeView.vue +52 -52
  83. package/components/common/vm/actions/add/folderTreeView/FolderTreeView.vue +72 -72
  84. package/components/common/vm/actions/add/folderTreeView/New.vue +40 -40
  85. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cdDvdDrive/media/Media.vue +25 -25
  86. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cdDvdDrive/media/MediaNew.vue +78 -78
  87. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cdDvdDrive/media/MediaOld.vue +50 -50
  88. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/Cpu.vue +2 -0
  89. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/shares/Shares.vue +140 -140
  90. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/shares/lib/config/options.ts +28 -28
  91. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/location/Location.vue +154 -154
  92. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/location/LocationOld.vue +85 -85
  93. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/location/new/table/Table.vue +99 -99
  94. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/macAddress/MacAddress.vue +119 -119
  95. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/directPathIo/DirectPathIoNew.vue +66 -66
  96. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/directPathIo/DirectPathIoOld.vue +62 -62
  97. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/dynamicDirectPathIo/DynamicDirectPathIo.vue +31 -31
  98. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/dynamicDirectPathIo/DynamicDirectPathIoOld.vue +76 -76
  99. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/note/Note.vue +15 -15
  100. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/note/NoteNew.vue +42 -42
  101. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/note/NoteOld.vue +30 -30
  102. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/nvidiaGrid/NvidiaGridOld.vue +84 -84
  103. package/components/common/vm/actions/common/customizeHardware/virtualHardware/other/Other.vue +16 -16
  104. package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/numberDisplays/NumberDisplays.vue +53 -53
  105. package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/delay/Delay.vue +32 -32
  106. package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/firmware/Firmware.vue +60 -60
  107. package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/order/Order.vue +174 -174
  108. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/keymap/Keymap.vue +32 -32
  109. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/keymap/KeymapOld.vue +44 -44
  110. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/password/Password.vue +103 -103
  111. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/usbRedirection/UsbRedirection.vue +28 -28
  112. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/usbRedirection/UsbRedirectionOld.vue +44 -44
  113. package/components/common/vm/actions/common/select/compatibility/Old.vue +107 -107
  114. package/components/common/vm/actions/common/select/computeResource/ComputeResource.vue +143 -143
  115. package/components/common/vm/actions/common/select/computeResource/New.vue +184 -184
  116. package/components/common/vm/actions/common/select/computeResource/treeView/TreeView.vue +131 -131
  117. package/components/common/vm/actions/common/select/createType/CreateType.vue +38 -38
  118. package/components/common/vm/actions/common/select/createType/lib/models/interfaces.ts +5 -5
  119. package/components/common/vm/actions/common/select/os/Old.vue +152 -152
  120. package/components/common/vm/actions/common/select/os/Os.vue +139 -139
  121. package/components/common/vm/actions/common/select/storage/new/New.vue +320 -320
  122. package/components/common/vm/actions/common/select/storage/new/lib/models/interfaces.ts +5 -5
  123. package/components/common/vm/actions/common/select/storage/new/lib/utils/utils.ts +21 -21
  124. package/components/common/vm/actions/common/select/template/old/Old.vue +50 -50
  125. package/components/common/vm/actions/editSettings/new/Skeleton.vue +88 -88
  126. package/components/common/wizards/datastore/add/steps/typeMode/lib/config/typeOptions.ts +43 -43
  127. package/components/common/wizards/vm/migrate/select/network/Network.vue +103 -103
  128. package/components/common/wizards/vm/migrate/select/type/lib/config/typeOptions.ts +45 -45
  129. package/composables/productNameLocal.ts +30 -30
  130. package/composables/useAppVersion.ts +21 -21
  131. package/package.json +1 -1
  132. package/plugins/date.ts +233 -233
  133. package/plugins/panelStates.ts +70 -70
  134. package/plugins/text.ts +59 -59
  135. package/public/spice-console/lib/images/bitmap.js +203 -203
  136. package/public/spice-console/network/spicechannel.js +390 -390
  137. package/store/main/mutations.ts +7 -7
  138. package/store/main/state.ts +7 -7
@@ -1,47 +1,47 @@
1
- <template>
2
- <g>
3
- <template v-if="props.network.toggle">
4
- <template v-for="port in props.network.ports" :key="port.id">
5
- <common-diagram-main-port
6
- :network="props.network"
7
- :port="port"
8
- :is-dark-mode="props.isDarkMode"
9
- :selected-port="props.selectedPort"
10
- :selected-adapter="props.selectedAdapter"
11
- @select-port="onSelectPort"
12
- @show-modal="onShowModal"
13
- />
14
- </template>
15
- </template>
16
- </g>
17
- </template>
18
-
19
- <script setup lang="ts">
20
- import type {
21
- UI_I_ModalsInitialData,
22
- UI_I_NetworkFullWithPositions,
23
- UI_I_SelectedAdapter,
24
- UI_I_SelectedPort,
25
- } from '~/components/common/diagramMain/lib/models/interfaces'
26
-
27
- const props = defineProps<{
28
- network: UI_I_NetworkFullWithPositions
29
- selectedPort: UI_I_SelectedPort
30
- selectedAdapter: UI_I_SelectedAdapter
31
- isDarkMode: boolean
32
- }>()
33
-
34
- const emits = defineEmits<{
35
- (event: 'select-port', networkId: string, portId: string): void
36
- (
37
- event: 'show-modal',
38
- value: string,
39
- properties?: UI_I_ModalsInitialData
40
- ): void
41
- }>()
42
-
43
- const onSelectPort = (networkId: string, portId: string) =>
44
- emits('select-port', networkId, portId)
45
- const onShowModal = (value: string, properties?: UI_I_ModalsInitialData) =>
46
- emits('show-modal', value, properties)
47
- </script>
1
+ <template>
2
+ <g>
3
+ <template v-if="props.network.toggle">
4
+ <template v-for="port in props.network.ports" :key="port.id">
5
+ <common-diagram-main-port
6
+ :network="props.network"
7
+ :port="port"
8
+ :is-dark-mode="props.isDarkMode"
9
+ :selected-port="props.selectedPort"
10
+ :selected-adapter="props.selectedAdapter"
11
+ @select-port="onSelectPort"
12
+ @show-modal="onShowModal"
13
+ />
14
+ </template>
15
+ </template>
16
+ </g>
17
+ </template>
18
+
19
+ <script setup lang="ts">
20
+ import type {
21
+ UI_I_ModalsInitialData,
22
+ UI_I_NetworkFullWithPositions,
23
+ UI_I_SelectedAdapter,
24
+ UI_I_SelectedPort,
25
+ } from '~/components/common/diagramMain/lib/models/interfaces'
26
+
27
+ const props = defineProps<{
28
+ network: UI_I_NetworkFullWithPositions
29
+ selectedPort: UI_I_SelectedPort
30
+ selectedAdapter: UI_I_SelectedAdapter
31
+ isDarkMode: boolean
32
+ }>()
33
+
34
+ const emits = defineEmits<{
35
+ (event: 'select-port', networkId: string, portId: string): void
36
+ (
37
+ event: 'show-modal',
38
+ value: string,
39
+ properties?: UI_I_ModalsInitialData
40
+ ): void
41
+ }>()
42
+
43
+ const onSelectPort = (networkId: string, portId: string) =>
44
+ emits('select-port', networkId, portId)
45
+ const onShowModal = (value: string, properties?: UI_I_ModalsInitialData) =>
46
+ emits('show-modal', value, properties)
47
+ </script>
@@ -1,82 +1,82 @@
1
- <template>
2
- <Teleport to="body">
3
- <common-layout-the-header-help-menu-about-new
4
- v-if="isNewView"
5
- :title="title"
6
- :subtitle="subtitle"
7
- :about-heading-text="aboutHeadingText"
8
- :about-desc-one="aboutDesc1"
9
- :about-desc-second="aboutDesc2"
10
- :project-name="props.projectName"
11
- :url="companyWebSitePath"
12
- @hide="emits('hide')"
13
- />
14
-
15
- <common-layout-the-header-help-menu-about-old
16
- v-else
17
- :title="title"
18
- :subtitle="subtitle"
19
- :about-heading-text="aboutHeadingText"
20
- :about-desc-one="aboutDesc1"
21
- :about-desc-second="aboutDesc2"
22
- :project-name="props.projectName"
23
- :url="companyWebSitePath"
24
- @hide="emits('hide')"
25
- />
26
- </Teleport>
27
- </template>
28
-
29
- <script lang="ts" setup>
30
- import type { UI_I_Localization } from '~/lib/models/interfaces'
31
-
32
- const props = defineProps<{
33
- version: string
34
- projectName: string
35
- }>()
36
- const emits = defineEmits<{
37
- (event: 'hide'): void
38
- }>()
39
-
40
- const localization = computed<UI_I_Localization>(() => useLocal())
41
- const { $store }: any = useNuxtApp()
42
- const config = useRuntimeConfig()
43
-
44
- const companyName = computed<string>(
45
- () => config.public[`COMPANY_NAME_${useEnvLanguage()}`]
46
- )
47
- const brandName = computed<string>(
48
- () => config.public[`TRADEMARK_${useEnvLanguage()}`]
49
- )
50
-
51
- const companyWebSitePath = ref<string>('https://iridium-soft.com/')
52
-
53
- const title = computed<string>(() => `${brandName.value}® ${props.projectName}`)
54
- const subtitle = computed<string>(() =>
55
- localization.value.layout.aboutWebClientVersion
56
- .replace('{0}', props.projectName)
57
- .replace('{1}', props.version)
58
- )
59
-
60
- const aboutHeadingText = computed<string>(() =>
61
- localization.value.layout.aboutHeading.replace(
62
- '{companyName}',
63
- companyName.value
64
- ).replace(
65
- '{year}',
66
- new Date().getFullYear() + ''
67
- )
68
- )
69
-
70
- const aboutDesc1 = computed<string>(() =>
71
- localization.value.layout.aboutDesc1
72
- .replaceAll('{companyName}', companyName.value)
73
- .replaceAll('{trademark}', brandName.value)
74
- )
75
- const aboutDesc2 = computed<string>(() =>
76
- localization.value.layout.aboutDesc2
77
- .replaceAll('{companyName}', companyName.value)
78
- .replaceAll('{trademark}', brandName.value)
79
- )
80
-
81
- const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
82
- </script>
1
+ <template>
2
+ <Teleport to="body">
3
+ <common-layout-the-header-help-menu-about-new
4
+ v-if="isNewView"
5
+ :title="title"
6
+ :subtitle="subtitle"
7
+ :about-heading-text="aboutHeadingText"
8
+ :about-desc-one="aboutDesc1"
9
+ :about-desc-second="aboutDesc2"
10
+ :project-name="props.projectName"
11
+ :url="companyWebSitePath"
12
+ @hide="emits('hide')"
13
+ />
14
+
15
+ <common-layout-the-header-help-menu-about-old
16
+ v-else
17
+ :title="title"
18
+ :subtitle="subtitle"
19
+ :about-heading-text="aboutHeadingText"
20
+ :about-desc-one="aboutDesc1"
21
+ :about-desc-second="aboutDesc2"
22
+ :project-name="props.projectName"
23
+ :url="companyWebSitePath"
24
+ @hide="emits('hide')"
25
+ />
26
+ </Teleport>
27
+ </template>
28
+
29
+ <script lang="ts" setup>
30
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
31
+
32
+ const props = defineProps<{
33
+ version: string
34
+ projectName: string
35
+ }>()
36
+ const emits = defineEmits<{
37
+ (event: 'hide'): void
38
+ }>()
39
+
40
+ const localization = computed<UI_I_Localization>(() => useLocal())
41
+ const { $store }: any = useNuxtApp()
42
+ const config = useRuntimeConfig()
43
+
44
+ const companyName = computed<string>(
45
+ () => config.public[`COMPANY_NAME_${useEnvLanguage()}`]
46
+ )
47
+ const brandName = computed<string>(
48
+ () => config.public[`TRADEMARK_${useEnvLanguage()}`]
49
+ )
50
+
51
+ const companyWebSitePath = ref<string>('https://iridium-soft.com/')
52
+
53
+ const title = computed<string>(() => `${brandName.value}® ${props.projectName}`)
54
+ const subtitle = computed<string>(() =>
55
+ localization.value.layout.aboutWebClientVersion
56
+ .replace('{0}', props.projectName)
57
+ .replace('{1}', props.version)
58
+ )
59
+
60
+ const aboutHeadingText = computed<string>(() =>
61
+ localization.value.layout.aboutHeading.replace(
62
+ '{companyName}',
63
+ companyName.value
64
+ ).replace(
65
+ '{year}',
66
+ new Date().getFullYear() + ''
67
+ )
68
+ )
69
+
70
+ const aboutDesc1 = computed<string>(() =>
71
+ localization.value.layout.aboutDesc1
72
+ .replaceAll('{companyName}', companyName.value)
73
+ .replaceAll('{trademark}', brandName.value)
74
+ )
75
+ const aboutDesc2 = computed<string>(() =>
76
+ localization.value.layout.aboutDesc2
77
+ .replaceAll('{companyName}', companyName.value)
78
+ .replaceAll('{trademark}', brandName.value)
79
+ )
80
+
81
+ const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
82
+ </script>
@@ -1,73 +1,71 @@
1
1
  <template>
2
- <atoms-modal
3
- :show="isShow"
4
- :title="localization.common.connectionTimeout"
5
- test-id="connection-timeout-reconnect-modal"
6
- width="580px"
7
- class="connection-timeout"
8
- is-hide-close-icon
9
- >
10
- <template #modalBody>
11
- <div class="connection-timeout__body">
12
- <span>{{ localization.common.yourSessionExpireAfter }}:</span>
13
- <common-countdown-timer :timer="timer" :total-time="totalTime" />
14
- </div>
15
- </template>
16
-
17
- <template #modalFooter>
18
- <button
19
- id="logout-button"
20
- data-id="logout-button"
21
- class="btn btn-outline"
22
- @click="onLogout"
23
- >
24
- {{ localization.common.logout }}
25
- </button>
26
-
27
- <button
28
- id="reconnect-button"
29
- data-id="reconnect-button"
30
- class="btn btn-primary"
31
- @click="onReconnect"
32
- >
33
- {{ localization.common.reconnect }}
34
- </button>
35
- </template>
36
- </atoms-modal>
2
+ <common-layout-the-header-modals-reconnect-new
3
+ v-if="isNewView"
4
+ :is-show="isShow"
5
+ :title="title"
6
+ :timer="timer"
7
+ :total-time="totalTime"
8
+ @logout="onLogout"
9
+ @reconnect="onReconnect"
10
+ />
11
+ <common-layout-the-header-modals-reconnect-old
12
+ v-else
13
+ :is-show="isShow"
14
+ :title="title"
15
+ :timer="timer"
16
+ :total-time="totalTime"
17
+ @logout="onLogout"
18
+ @reconnect="onReconnect"
19
+ />
37
20
  </template>
38
21
 
39
22
  <script lang="ts" setup>
40
23
  import type { UI_I_Localization } from '~/lib/models/interfaces'
41
24
 
42
- const localization = computed<UI_I_Localization>(() => useLocal())
43
25
  const { $store }: any = useNuxtApp()
44
26
 
27
+ const localization = computed<UI_I_Localization>(() => useLocal())
28
+
29
+ const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
30
+
45
31
  const isShow = computed<boolean>(
46
32
  () => $store.getters['main/isShowReconnectModal']
47
33
  )
48
- const hideModal = (): void => {
49
- $store.dispatch('main/A_SHOW_RECONNECT_MODAL', false)
50
- }
51
34
 
52
- const totalTime = ref<number>(60)
35
+ const title = ref<string>(localization.value.common.connectionTimeout)
36
+
53
37
  const timer = ref<NodeJS.Timer | null>(null)
38
+ const totalTime = ref<number>(60)
54
39
  const countdown = (): void => {
55
40
  totalTime.value--
56
41
  if (totalTime.value === 0) {
57
42
  endTimer()
58
43
  }
59
44
  }
60
- const startTimer = (): void => {
61
- timer.value = setInterval(() => countdown(), 1000)
45
+
46
+ const resetTimer = (): void => {
47
+ timer.value !== null && clearInterval(timer.value)
48
+ totalTime.value = 60
62
49
  }
63
- const endTimer = (): void => {
64
- onLogout()
50
+
51
+ const hideModal = (): void => {
52
+ $store.dispatch('main/A_SHOW_RECONNECT_MODAL', false)
65
53
  }
54
+
66
55
  const onLogout = async (): Promise<void> => {
67
56
  await $store.dispatch('auth/A_LOGOUT')
68
57
  resetTimer()
69
58
  hideModal()
70
59
  }
60
+
61
+ const endTimer = (): void => {
62
+ onLogout()
63
+ }
64
+
65
+ const startTimer = (): void => {
66
+ timer.value = setInterval(() => countdown(), 1000)
67
+ }
68
+
71
69
  const onReconnect = async (): Promise<void> => {
72
70
  location.reload()
73
71
  // await $store.dispatch('auth/A_REFRESH')
@@ -75,10 +73,6 @@ const onReconnect = async (): Promise<void> => {
75
73
  hideModal()
76
74
  }
77
75
 
78
- const resetTimer = (): void => {
79
- timer.value !== null && clearInterval(timer.value)
80
- totalTime.value = 60
81
- }
82
76
  watch(
83
77
  isShow,
84
78
  (newValue) => {
@@ -88,11 +82,4 @@ watch(
88
82
  )
89
83
  </script>
90
84
 
91
- <style lang="scss" scoped>
92
- .connection-timeout {
93
- &__body {
94
- text-align: center;
95
- margin: 15px 0;
96
- }
97
- }
98
- </style>
85
+ <style lang="scss" scoped></style>
@@ -0,0 +1,74 @@
1
+ <template>
2
+ <ui-modal
3
+ :show="props.isShow"
4
+ :title="props.title"
5
+ :texts="modalTexts"
6
+ test-id="reconnect-modal"
7
+ size="sm"
8
+ width="560px"
9
+ @hide="emits('logout')"
10
+ @submit="emits('reconnect')"
11
+ >
12
+ <template #content>
13
+ <div class="reconnect-content">
14
+ <div class="icon-content flex items-center gap-2">
15
+ <span class="icon-sessions"></span>
16
+ <span class="description-text">{{
17
+ localization.common.reconnectDesc
18
+ }}</span>
19
+ </div>
20
+ <div class="timer-block mt-4">
21
+ <common-countdown-timer
22
+ :timer="props.timer"
23
+ :total-time="props.totalTime"
24
+ />
25
+ </div>
26
+ </div>
27
+ </template>
28
+ <template #footerLeftContent>
29
+ <span></span>
30
+ </template>
31
+ </ui-modal>
32
+ </template>
33
+
34
+ <script lang="ts" setup>
35
+ import type { UI_I_ModalTexts } from '~/node_modules/bfg-uikit/components/ui/modal/models/interfaces'
36
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
37
+
38
+ const props = defineProps<{
39
+ isShow: boolean
40
+ title: string
41
+ timer: NodeJS.Timer | null
42
+ totalTime: number
43
+ }>()
44
+
45
+ const emits = defineEmits<{
46
+ (event: 'logout'): void
47
+ (event: 'reconnect'): void
48
+ }>()
49
+
50
+ const localization = computed<UI_I_Localization>(() => useLocal())
51
+
52
+ const modalTexts = ref<UI_I_ModalTexts>({
53
+ button1: localization.value.auth.logout,
54
+ button2: localization.value.common.reconnect,
55
+ })
56
+ </script>
57
+
58
+ <style lang="scss" scoped>
59
+ .reconnect-content {
60
+ padding: 16px 32px 8px 32px;
61
+
62
+ .icon-content {
63
+ .icon-sessions {
64
+ width: 24px;
65
+ height: 24px;
66
+ }
67
+ .description-text {
68
+ font-size: 14px;
69
+ font-weight: 400;
70
+ color: #9da6ad;
71
+ }
72
+ }
73
+ }
74
+ </style>
@@ -0,0 +1,67 @@
1
+ <template>
2
+ <atoms-modal
3
+ :show="props.isShow"
4
+ :title="props.title"
5
+ test-id="connection-timeout-reconnect-modal"
6
+ width="580px"
7
+ class="connection-timeout"
8
+ is-hide-close-icon
9
+ >
10
+ <template #modalBody>
11
+ <div class="connection-timeout__body">
12
+ <span>{{ localization.common.yourSessionExpireAfter }}:</span>
13
+ <common-countdown-timer
14
+ :timer="props.timer"
15
+ :total-time="props.totalTime"
16
+ />
17
+ </div>
18
+ </template>
19
+
20
+ <template #modalFooter>
21
+ <button
22
+ id="logout-button"
23
+ data-id="logout-button"
24
+ class="btn btn-outline"
25
+ @click="emits('logout')"
26
+ >
27
+ {{ localization.common.logout }}
28
+ </button>
29
+
30
+ <button
31
+ id="reconnect-button"
32
+ data-id="reconnect-button"
33
+ class="btn btn-primary"
34
+ @click="emits('reconnect')"
35
+ >
36
+ {{ localization.common.reconnect }}
37
+ </button>
38
+ </template>
39
+ </atoms-modal>
40
+ </template>
41
+
42
+ <script lang="ts" setup>
43
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
44
+
45
+ const props = defineProps<{
46
+ isShow: boolean
47
+ title: string
48
+ timer: NodeJS.Timer | null
49
+ totalTime: number
50
+ }>()
51
+
52
+ const emits = defineEmits<{
53
+ (event: 'logout'): void
54
+ (event: 'reconnect'): void
55
+ }>()
56
+
57
+ const localization = computed<UI_I_Localization>(() => useLocal())
58
+ </script>
59
+
60
+ <style lang="scss" scoped>
61
+ .connection-timeout {
62
+ &__body {
63
+ text-align: center;
64
+ margin: 15px 0;
65
+ }
66
+ }
67
+ </style>