bfg-common 1.4.365 → 1.4.367
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 +94 -94
- 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 +94 -94
- package/assets/localization/local_en.json +1 -1
- package/components/atoms/TheIcon3.vue +50 -50
- package/components/atoms/modal/bySteps/BySteps.vue +253 -253
- package/components/atoms/stack/StackBlock.vue +185 -185
- 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/modals/confirmation/Confirmation.vue +65 -65
- package/components/common/vm/actions/add/Add.vue +617 -617
- package/components/common/vm/actions/clone/lib/config/steps.ts +129 -129
- package/components/common/vm/actions/common/customizeHardware/CustomizeHardware.vue +2 -2
- 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/virtualHardware/newHardDisk/{location/Location.vue → Location.vue} +173 -172
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/NewHardDisk.vue +2 -2
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/order/Order.vue +201 -201
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/streamingMode/StreamingMode.vue +85 -85
- package/components/common/vm/actions/common/select/storage/Storage.vue +198 -202
- package/components/common/vm/actions/editSettings/EditSettings.vue +1 -1
- package/composables/productNameLocal.ts +30 -30
- package/package.json +1 -1
- package/plugins/date.ts +181 -181
- package/plugins/recursion.ts +311 -311
- package/public/spice-console/lib/images/bitmap.js +203 -203
- package/public/spice-console/network/spicechannel.js +383 -383
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/location/StorageModalOld.vue +0 -52
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/location/storageModalNew/StorageModalNew.vue +0 -175
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/location/storageModalNew/lib/config/table.ts +0 -167
|
@@ -1,202 +1,198 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="select-storage">
|
|
3
|
-
<atoms-alert
|
|
4
|
-
v-show="errors.length"
|
|
5
|
-
status="alert-danger"
|
|
6
|
-
test-id="storage-alert"
|
|
7
|
-
:items="errors"
|
|
8
|
-
@remove="onRemoveValidationErrors"
|
|
9
|
-
/>
|
|
10
|
-
<div class="table-wrap">
|
|
11
|
-
<atoms-table-data-grid
|
|
12
|
-
v-model:selected-row="selectedRow"
|
|
13
|
-
v-model:column-keys="columnKeys"
|
|
14
|
-
v-model:page-size="pagination.pageSize"
|
|
15
|
-
v-model:page="pagination.page"
|
|
16
|
-
type="radio"
|
|
17
|
-
test-id="storage-table"
|
|
18
|
-
:head-items="headItems"
|
|
19
|
-
:body-items="bodyItems"
|
|
20
|
-
:total-items="bodyItems.length"
|
|
21
|
-
:total-pages="1"
|
|
22
|
-
server-off
|
|
23
|
-
hide-page-size
|
|
24
|
-
@change="changeStorage"
|
|
25
|
-
>
|
|
26
|
-
<template #icon="{ item }">
|
|
27
|
-
<span :class="['datagrid-cell-icon', item.data]" />
|
|
28
|
-
<span class="text-ellipsis">
|
|
29
|
-
{{ item.text }}
|
|
30
|
-
</span>
|
|
31
|
-
</template>
|
|
32
|
-
</atoms-table-data-grid>
|
|
33
|
-
</div>
|
|
34
|
-
|
|
35
|
-
<div v-if="!hideCompatibility" class="compatibility-wrap">
|
|
36
|
-
<p class="compatibility">
|
|
37
|
-
{{ localization.inventorySummary.compatibility }}
|
|
38
|
-
</p>
|
|
39
|
-
<div class="compatibility-message flex-align-center">
|
|
40
|
-
<template v-if="selectedStorage">
|
|
41
|
-
<div class="icon-status-ok" />
|
|
42
|
-
<span>{{ localization.common.compatibilityChecksSucceeded }}</span>
|
|
43
|
-
</template>
|
|
44
|
-
<div v-else>
|
|
45
|
-
<br />
|
|
46
|
-
</div>
|
|
47
|
-
</div>
|
|
48
|
-
</div>
|
|
49
|
-
</div>
|
|
50
|
-
</template>
|
|
51
|
-
|
|
52
|
-
<script setup lang="ts">
|
|
53
|
-
import type {
|
|
54
|
-
UI_I_Pagination,
|
|
55
|
-
UI_I_TablePayload,
|
|
56
|
-
} from '~/lib/models/table/interfaces'
|
|
57
|
-
import type { UI_I_DatastoreTableItem } from '~/lib/models/store/storage/interfaces'
|
|
58
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
59
|
-
import type {
|
|
60
|
-
UI_I_ColumnKey,
|
|
61
|
-
UI_I_HeadItem,
|
|
62
|
-
UI_I_BodyItem,
|
|
63
|
-
} from '~/components/atoms/table/dataGrid/lib/models/interfaces'
|
|
64
|
-
import * as table from '~/components/common/vm/actions/common/select/storage/lib/config/config'
|
|
65
|
-
|
|
66
|
-
const props = defineProps<{
|
|
67
|
-
storageSubmit: null | Function
|
|
68
|
-
datastore: UI_I_DatastoreTableItem[]
|
|
69
|
-
storage: UI_I_DatastoreTableItem
|
|
70
|
-
hideCompatibility?: boolean
|
|
71
|
-
getDatastoreTableFunc: (payload: UI_I_TablePayload) => Promise<void>
|
|
72
|
-
}>()
|
|
73
|
-
const emits = defineEmits<{
|
|
74
|
-
(event: 'submit', value: UI_I_DatastoreTableItem): void
|
|
75
|
-
}>()
|
|
76
|
-
|
|
77
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
78
|
-
|
|
79
|
-
const headItems = ref<UI_I_HeadItem[]>(table.headItems(localization.value))
|
|
80
|
-
const columnKeys = ref<UI_I_ColumnKey[]>(table.columnKeys(localization.value))
|
|
81
|
-
watch(localization, () => {
|
|
82
|
-
columnKeys.value = table.columnKeys(localization.value)
|
|
83
|
-
})
|
|
84
|
-
|
|
85
|
-
const bodyItems = computed<UI_I_BodyItem[][]>(() => {
|
|
86
|
-
return table.bodyItems(props.datastore || [], localization.value)
|
|
87
|
-
})
|
|
88
|
-
|
|
89
|
-
const pagination = ref<UI_I_Pagination>({
|
|
90
|
-
page: 1,
|
|
91
|
-
pageSize: 100,
|
|
92
|
-
})
|
|
93
|
-
|
|
94
|
-
const getStorage = async (): Promise<void> => {
|
|
95
|
-
const payload: UI_I_TablePayload = {
|
|
96
|
-
pagination: pagination.value,
|
|
97
|
-
sortBy: null,
|
|
98
|
-
type: 'datastore',
|
|
99
|
-
schema: 'full',
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
props.getDatastoreTableFunc(payload).then(() => {
|
|
103
|
-
selectedRow.value = null
|
|
104
|
-
setStorageFromProps()
|
|
105
|
-
})
|
|
106
|
-
}
|
|
107
|
-
getStorage()
|
|
108
|
-
|
|
109
|
-
const selectedStorage = ref<UI_I_DatastoreTableItem | null>(null)
|
|
110
|
-
const selectedRow = ref<number | null>(null)
|
|
111
|
-
const changeStorage = (index: number): void => {
|
|
112
|
-
if (!props.datastore) return
|
|
113
|
-
selectedStorage.value = props.datastore[index]
|
|
114
|
-
selectedRow.value = index
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
const setStorageFromProps = (): void => {
|
|
118
|
-
if (!props.storage) return
|
|
119
|
-
props.datastore.forEach((item, index) => {
|
|
120
|
-
if (item.id === props.storage.id) changeStorage(index)
|
|
121
|
-
})
|
|
122
|
-
}
|
|
123
|
-
watch(
|
|
124
|
-
() => props.storage,
|
|
125
|
-
() => {
|
|
126
|
-
setStorageFromProps()
|
|
127
|
-
},
|
|
128
|
-
{ immediate: true }
|
|
129
|
-
)
|
|
130
|
-
watch(
|
|
131
|
-
() => props.datastore,
|
|
132
|
-
() => {
|
|
133
|
-
selectedRow.value = null
|
|
134
|
-
selectedStorage.value = null
|
|
135
|
-
},
|
|
136
|
-
{ immediate: true }
|
|
137
|
-
)
|
|
138
|
-
|
|
139
|
-
watch(
|
|
140
|
-
() => props.storageSubmit,
|
|
141
|
-
(newValue) => {
|
|
142
|
-
newValue && submit(newValue)
|
|
143
|
-
}
|
|
144
|
-
)
|
|
145
|
-
const submit = (cb: Function): void => {
|
|
146
|
-
if (!selectedStorage.value) {
|
|
147
|
-
showValidationErrors([
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
const
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
.
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="select-storage">
|
|
3
|
+
<atoms-alert
|
|
4
|
+
v-show="errors.length"
|
|
5
|
+
status="alert-danger"
|
|
6
|
+
test-id="storage-alert"
|
|
7
|
+
:items="errors"
|
|
8
|
+
@remove="onRemoveValidationErrors"
|
|
9
|
+
/>
|
|
10
|
+
<div class="table-wrap">
|
|
11
|
+
<atoms-table-data-grid
|
|
12
|
+
v-model:selected-row="selectedRow"
|
|
13
|
+
v-model:column-keys="columnKeys"
|
|
14
|
+
v-model:page-size="pagination.pageSize"
|
|
15
|
+
v-model:page="pagination.page"
|
|
16
|
+
type="radio"
|
|
17
|
+
test-id="storage-table"
|
|
18
|
+
:head-items="headItems"
|
|
19
|
+
:body-items="bodyItems"
|
|
20
|
+
:total-items="bodyItems.length"
|
|
21
|
+
:total-pages="1"
|
|
22
|
+
server-off
|
|
23
|
+
hide-page-size
|
|
24
|
+
@change="changeStorage"
|
|
25
|
+
>
|
|
26
|
+
<template #icon="{ item }">
|
|
27
|
+
<span :class="['datagrid-cell-icon', item.data]" />
|
|
28
|
+
<span class="text-ellipsis">
|
|
29
|
+
{{ item.text }}
|
|
30
|
+
</span>
|
|
31
|
+
</template>
|
|
32
|
+
</atoms-table-data-grid>
|
|
33
|
+
</div>
|
|
34
|
+
|
|
35
|
+
<div v-if="!hideCompatibility" class="compatibility-wrap">
|
|
36
|
+
<p class="compatibility">
|
|
37
|
+
{{ localization.inventorySummary.compatibility }}
|
|
38
|
+
</p>
|
|
39
|
+
<div class="compatibility-message flex-align-center">
|
|
40
|
+
<template v-if="selectedStorage">
|
|
41
|
+
<div class="icon-status-ok" />
|
|
42
|
+
<span>{{ localization.common.compatibilityChecksSucceeded }}</span>
|
|
43
|
+
</template>
|
|
44
|
+
<div v-else>
|
|
45
|
+
<br />
|
|
46
|
+
</div>
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
50
|
+
</template>
|
|
51
|
+
|
|
52
|
+
<script setup lang="ts">
|
|
53
|
+
import type {
|
|
54
|
+
UI_I_Pagination,
|
|
55
|
+
UI_I_TablePayload,
|
|
56
|
+
} from '~/lib/models/table/interfaces'
|
|
57
|
+
import type { UI_I_DatastoreTableItem } from '~/lib/models/store/storage/interfaces'
|
|
58
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
59
|
+
import type {
|
|
60
|
+
UI_I_ColumnKey,
|
|
61
|
+
UI_I_HeadItem,
|
|
62
|
+
UI_I_BodyItem,
|
|
63
|
+
} from '~/components/atoms/table/dataGrid/lib/models/interfaces'
|
|
64
|
+
import * as table from '~/components/common/vm/actions/common/select/storage/lib/config/config'
|
|
65
|
+
|
|
66
|
+
const props = defineProps<{
|
|
67
|
+
storageSubmit: null | Function
|
|
68
|
+
datastore: UI_I_DatastoreTableItem[]
|
|
69
|
+
storage: UI_I_DatastoreTableItem
|
|
70
|
+
hideCompatibility?: boolean
|
|
71
|
+
getDatastoreTableFunc: (payload: UI_I_TablePayload) => Promise<void>
|
|
72
|
+
}>()
|
|
73
|
+
const emits = defineEmits<{
|
|
74
|
+
(event: 'submit', value: UI_I_DatastoreTableItem): void
|
|
75
|
+
}>()
|
|
76
|
+
|
|
77
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
78
|
+
|
|
79
|
+
const headItems = ref<UI_I_HeadItem[]>(table.headItems(localization.value))
|
|
80
|
+
const columnKeys = ref<UI_I_ColumnKey[]>(table.columnKeys(localization.value))
|
|
81
|
+
watch(localization, () => {
|
|
82
|
+
columnKeys.value = table.columnKeys(localization.value)
|
|
83
|
+
})
|
|
84
|
+
|
|
85
|
+
const bodyItems = computed<UI_I_BodyItem[][]>(() => {
|
|
86
|
+
return table.bodyItems(props.datastore || [], localization.value)
|
|
87
|
+
})
|
|
88
|
+
|
|
89
|
+
const pagination = ref<UI_I_Pagination>({
|
|
90
|
+
page: 1,
|
|
91
|
+
pageSize: 100,
|
|
92
|
+
})
|
|
93
|
+
|
|
94
|
+
const getStorage = async (): Promise<void> => {
|
|
95
|
+
const payload: UI_I_TablePayload = {
|
|
96
|
+
pagination: pagination.value,
|
|
97
|
+
sortBy: null,
|
|
98
|
+
type: 'datastore',
|
|
99
|
+
schema: 'full',
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
props.getDatastoreTableFunc(payload).then(() => {
|
|
103
|
+
selectedRow.value = null
|
|
104
|
+
setStorageFromProps()
|
|
105
|
+
})
|
|
106
|
+
}
|
|
107
|
+
getStorage()
|
|
108
|
+
|
|
109
|
+
const selectedStorage = ref<UI_I_DatastoreTableItem | null>(null)
|
|
110
|
+
const selectedRow = ref<number | null>(null)
|
|
111
|
+
const changeStorage = (index: number): void => {
|
|
112
|
+
if (!props.datastore) return
|
|
113
|
+
selectedStorage.value = props.datastore[index]
|
|
114
|
+
selectedRow.value = index
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
const setStorageFromProps = (): void => {
|
|
118
|
+
if (!props.storage) return
|
|
119
|
+
props.datastore.forEach((item, index) => {
|
|
120
|
+
if (item.id === props.storage.id) changeStorage(index)
|
|
121
|
+
})
|
|
122
|
+
}
|
|
123
|
+
watch(
|
|
124
|
+
() => props.storage,
|
|
125
|
+
() => {
|
|
126
|
+
setStorageFromProps()
|
|
127
|
+
},
|
|
128
|
+
{ immediate: true }
|
|
129
|
+
)
|
|
130
|
+
watch(
|
|
131
|
+
() => props.datastore,
|
|
132
|
+
() => {
|
|
133
|
+
selectedRow.value = null
|
|
134
|
+
selectedStorage.value = null
|
|
135
|
+
},
|
|
136
|
+
{ immediate: true }
|
|
137
|
+
)
|
|
138
|
+
|
|
139
|
+
watch(
|
|
140
|
+
() => props.storageSubmit,
|
|
141
|
+
(newValue) => {
|
|
142
|
+
newValue && submit(newValue)
|
|
143
|
+
}
|
|
144
|
+
)
|
|
145
|
+
const submit = (cb: Function): void => {
|
|
146
|
+
if (!selectedStorage.value) {
|
|
147
|
+
showValidationErrors([localization.value.common.selectValidDestinationStorage])
|
|
148
|
+
cb(false)
|
|
149
|
+
return
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
emits('submit', selectedStorage.value)
|
|
153
|
+
cb(true)
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
const errors = ref<string[]>([])
|
|
157
|
+
const showValidationErrors = (arr: string[]): void => {
|
|
158
|
+
errors.value = arr
|
|
159
|
+
}
|
|
160
|
+
const onRemoveValidationErrors = (): void => {
|
|
161
|
+
errors.value = []
|
|
162
|
+
}
|
|
163
|
+
</script>
|
|
164
|
+
|
|
165
|
+
<style scoped lang="scss">
|
|
166
|
+
.select-storage {
|
|
167
|
+
flex: 1;
|
|
168
|
+
display: flex;
|
|
169
|
+
flex-direction: column;
|
|
170
|
+
|
|
171
|
+
.table-wrap {
|
|
172
|
+
flex: 1;
|
|
173
|
+
|
|
174
|
+
.datagrid-cell-icon {
|
|
175
|
+
margin-right: 6px;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
:deep(.relative) {
|
|
179
|
+
height: 100%;
|
|
180
|
+
|
|
181
|
+
.datagrid-outer-wrapper {
|
|
182
|
+
height: 100%;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.compatibility-wrap {
|
|
188
|
+
padding-top: 10px;
|
|
189
|
+
|
|
190
|
+
.compatibility-message {
|
|
191
|
+
border: 1px solid #000;
|
|
192
|
+
padding-top: 5px;
|
|
193
|
+
padding-left: 5px;
|
|
194
|
+
overflow: auto;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
</style>
|
|
@@ -71,7 +71,7 @@ import type { UI_T_Project } from '~/lib/models/types'
|
|
|
71
71
|
import type { UI_I_FileTreeNode } from '~/components/lib/models/interfaces'
|
|
72
72
|
import type { UI_I_NetworkTableItem } from '~/lib/models/store/network/interfaces'
|
|
73
73
|
import type {
|
|
74
|
-
|
|
74
|
+
UI_I_EditVmPayload,
|
|
75
75
|
UI_I_PciDevice,
|
|
76
76
|
} from '~/lib/models/store/vm/interfaces'
|
|
77
77
|
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
@@ -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
|
+
}
|