bfg-common 1.4.149 → 1.4.150

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 (45) hide show
  1. package/assets/img/icons/icons-sprite-dark-1.svg +407 -407
  2. package/assets/img/icons/icons-sprite-dark-2.svg +343 -343
  3. package/assets/img/icons/icons-sprite-dark-3.svg +227 -227
  4. package/assets/img/icons/icons-sprite-dark-4.svg +255 -255
  5. package/assets/img/icons/icons-sprite-dark-5.svg +488 -488
  6. package/assets/img/icons/icons-sprite-dark-6.svg +83 -83
  7. package/assets/img/icons/icons-sprite-light-1.svg +407 -407
  8. package/assets/img/icons/icons-sprite-light-2.svg +343 -343
  9. package/assets/img/icons/icons-sprite-light-3.svg +227 -227
  10. package/assets/img/icons/icons-sprite-light-4.svg +255 -255
  11. package/assets/img/icons/icons-sprite-light-5.svg +488 -488
  12. package/assets/img/icons/icons-sprite-light-6.svg +83 -83
  13. package/assets/localization/local_be.json +0 -1
  14. package/assets/localization/local_en.json +2588 -2589
  15. package/assets/localization/local_hy.json +0 -1
  16. package/assets/localization/local_kk.json +0 -1
  17. package/assets/localization/local_ru.json +2590 -2591
  18. package/assets/localization/local_zh.json +2586 -2587
  19. package/components/atoms/modal/bySteps/BySteps.vue +253 -253
  20. package/components/atoms/stack/StackBlock.vue +185 -185
  21. package/components/common/browse/blocks/Title.vue +91 -91
  22. package/components/common/browse/blocks/info/Date.vue +21 -21
  23. package/components/common/context/lib/models/interfaces.ts +30 -30
  24. package/components/common/context/recursion/Recursion.vue +86 -86
  25. package/components/common/context/recursion/RecursionNew.vue +199 -199
  26. package/components/common/context/recursion/RecursionOld.vue +213 -213
  27. package/components/common/layout/theHeader/TheHeaderNew.vue +304 -304
  28. package/components/common/layout/theHeader/helpMenu/helpMenuNew/HelpMenuNew.vue +0 -14
  29. package/components/common/layout/theHeader/userMenu/userMenuNew/UserMenuNew.vue +0 -14
  30. package/components/common/mainNavigationPanel/MainNavigationPanelNew.vue +7 -15
  31. package/components/common/split/horizontal/HorizontalNew.vue +0 -1
  32. package/components/common/vm/actions/add/Add.vue +609 -609
  33. package/components/common/vm/actions/clone/Clone.vue +522 -522
  34. package/components/common/vm/actions/common/customizeHardware/virtualHardware/bus/lib/config/options.ts +20 -20
  35. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/Cpu.vue +403 -403
  36. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/Hv.vue +99 -99
  37. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/streamingMode/StreamingMode.vue +85 -85
  38. package/components/common/vm/actions/editSettings/EditSettings.vue +327 -327
  39. package/composables/productNameLocal.ts +30 -30
  40. package/modules/setLastUpdateTime/index.ts +36 -0
  41. package/modules/setLastUpdateTime/lib/utils/methods.ts +31 -0
  42. package/package.json +1 -1
  43. package/plugins/recursion.ts +311 -311
  44. package/public/spice-console/lib/images/bitmap.js +203 -203
  45. package/store/tasks/mappers/recentTasks.ts +45 -45
@@ -1,30 +1,30 @@
1
- import type { UI_I_Localization } from '~/lib/models/interfaces'
2
- import type { UI_T_LanguageKey } from '~/lib/models/types'
3
-
4
- export function productNameLocal(
5
- localization: UI_I_Localization
6
- ): UI_I_Localization {
7
- const config = useRuntimeConfig()
8
-
9
- const productName =
10
- config.public.LOCALIZATION_CODE === 'ru'
11
- ? config.public.PRODUCT_NAME_RU
12
- : config.public.PRODUCT_NAME_EN
13
-
14
- return replaceProductNameRecursion(localization, productName)
15
- }
16
-
17
- const replaceProductNameRecursion = (
18
- localization: UI_I_Localization,
19
- productName: any
20
- ): UI_I_Localization => {
21
- for (const key of Object.keys(localization)) {
22
- let item = localization[key as UI_T_LanguageKey]
23
-
24
- for (const key2 of Object.keys(item)) {
25
- item[key2] = item[key2].replaceAll('{productName}', productName)
26
- }
27
- }
28
-
29
- return localization
30
- }
1
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
2
+ import type { UI_T_LanguageKey } from '~/lib/models/types'
3
+
4
+ export function productNameLocal(
5
+ localization: UI_I_Localization
6
+ ): UI_I_Localization {
7
+ const config = useRuntimeConfig()
8
+
9
+ const productName =
10
+ config.public.LOCALIZATION_CODE === 'ru'
11
+ ? config.public.PRODUCT_NAME_RU
12
+ : config.public.PRODUCT_NAME_EN
13
+
14
+ return replaceProductNameRecursion(localization, productName)
15
+ }
16
+
17
+ const replaceProductNameRecursion = (
18
+ localization: UI_I_Localization,
19
+ productName: any
20
+ ): UI_I_Localization => {
21
+ for (const key of Object.keys(localization)) {
22
+ let item = localization[key as UI_T_LanguageKey]
23
+
24
+ for (const key2 of Object.keys(item)) {
25
+ item[key2] = item[key2].replaceAll('{productName}', productName)
26
+ }
27
+ }
28
+
29
+ return localization
30
+ }
@@ -0,0 +1,36 @@
1
+ import { defineNuxtModule } from '@nuxt/kit'
2
+ const path = require('path')
3
+ import {
4
+ replaceFileContent,
5
+ } from './lib/utils/methods'
6
+
7
+ // Правим путь к файлу
8
+ const filePath = path.join(
9
+ __dirname.replace('/node_modules/bfg-common/modules/setLastUpdateTime', ''),
10
+ 'lib',
11
+ 'utils',
12
+ 'setLastUpdateTime.ts'
13
+ )
14
+
15
+ const npmDev = (): void => {
16
+ const searchString = /window\.lastUpdateTimeRun = \d+/
17
+ const replacementString = `window.lastUpdateTimeRun = ${new Date().getTime()}`
18
+ replaceFileContent(filePath, searchString, replacementString)
19
+ }
20
+ const npmGenerate = (): void => {
21
+ const searchString = /window\.lastUpdateTimeBuild = \d+/
22
+ const replacementString = `window.lastUpdateTimeBuild = ${new Date().getTime()}`
23
+ replaceFileContent(filePath, searchString, replacementString)
24
+ }
25
+
26
+ // @ts-ignore
27
+ export default defineNuxtModule(() => {
28
+ switch (process.env.npm_command) {
29
+ case 'run-script':
30
+ npmDev()
31
+ break
32
+ case 'exec':
33
+ npmGenerate()
34
+ break
35
+ }
36
+ })
@@ -0,0 +1,31 @@
1
+ import fs from 'fs'
2
+
3
+ export const replaceFileContent = async (
4
+ filePath: string,
5
+ searchString: string | RegExp,
6
+ replacementString: any
7
+ ): Promise<void> => {
8
+ return new Promise((resolve, reject) => {
9
+ fs.readFile(filePath, 'utf8', (err: any, data: string) => {
10
+ if (err) {
11
+ reject()
12
+ return console.log(err)
13
+ }
14
+
15
+ if (data.match(replacementString)) {
16
+ resolve()
17
+ return
18
+ }
19
+
20
+ const updatedContent = data.replace(searchString, replacementString)
21
+
22
+ fs.writeFile(filePath, updatedContent, 'utf8', (err: any) => {
23
+ if (err) {
24
+ reject()
25
+ return console.log(err)
26
+ }
27
+ resolve()
28
+ })
29
+ })
30
+ })
31
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.4.149",
4
+ "version": "1.4.150",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",