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.
- package/assets/img/icons/icons-sprite-dark-1.svg +407 -407
- package/assets/img/icons/icons-sprite-dark-2.svg +343 -343
- package/assets/img/icons/icons-sprite-dark-3.svg +227 -227
- package/assets/img/icons/icons-sprite-dark-4.svg +255 -255
- package/assets/img/icons/icons-sprite-dark-5.svg +488 -488
- package/assets/img/icons/icons-sprite-dark-6.svg +83 -83
- package/assets/img/icons/icons-sprite-light-1.svg +407 -407
- package/assets/img/icons/icons-sprite-light-2.svg +343 -343
- package/assets/img/icons/icons-sprite-light-3.svg +227 -227
- package/assets/img/icons/icons-sprite-light-4.svg +255 -255
- package/assets/img/icons/icons-sprite-light-5.svg +488 -488
- package/assets/img/icons/icons-sprite-light-6.svg +83 -83
- package/assets/localization/local_be.json +0 -1
- package/assets/localization/local_en.json +2588 -2589
- package/assets/localization/local_hy.json +0 -1
- package/assets/localization/local_kk.json +0 -1
- package/assets/localization/local_ru.json +2590 -2591
- package/assets/localization/local_zh.json +2586 -2587
- package/components/atoms/modal/bySteps/BySteps.vue +253 -253
- package/components/atoms/stack/StackBlock.vue +185 -185
- package/components/common/browse/blocks/Title.vue +91 -91
- package/components/common/browse/blocks/info/Date.vue +21 -21
- package/components/common/context/lib/models/interfaces.ts +30 -30
- package/components/common/context/recursion/Recursion.vue +86 -86
- package/components/common/context/recursion/RecursionNew.vue +199 -199
- package/components/common/context/recursion/RecursionOld.vue +213 -213
- package/components/common/layout/theHeader/TheHeaderNew.vue +304 -304
- package/components/common/layout/theHeader/helpMenu/helpMenuNew/HelpMenuNew.vue +0 -14
- package/components/common/layout/theHeader/userMenu/userMenuNew/UserMenuNew.vue +0 -14
- package/components/common/mainNavigationPanel/MainNavigationPanelNew.vue +7 -15
- package/components/common/split/horizontal/HorizontalNew.vue +0 -1
- package/components/common/vm/actions/add/Add.vue +609 -609
- package/components/common/vm/actions/clone/Clone.vue +522 -522
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/bus/lib/config/options.ts +20 -20
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/Cpu.vue +403 -403
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/Hv.vue +99 -99
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/streamingMode/StreamingMode.vue +85 -85
- package/components/common/vm/actions/editSettings/EditSettings.vue +327 -327
- package/composables/productNameLocal.ts +30 -30
- package/modules/setLastUpdateTime/index.ts +36 -0
- package/modules/setLastUpdateTime/lib/utils/methods.ts +31 -0
- package/package.json +1 -1
- package/plugins/recursion.ts +311 -311
- package/public/spice-console/lib/images/bitmap.js +203 -203
- 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
|
+
}
|