bfg-common 1.3.558 → 1.3.559
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/components/common/browse/Browse.vue +221 -186
- package/components/common/browse/blocks/Container.vue +5 -5
- package/components/common/browse/blocks/Title.vue +91 -66
- package/components/common/browse/blocks/contents/Files.vue +1 -1
- package/components/common/browse/blocks/info/Date.vue +21 -21
- package/components/common/browse/blocks/info/Size.vue +1 -1
- package/components/common/layout/theHeader/TheHeader.vue +17 -3
- package/components/common/layout/theHeader/TheHeaderNew.vue +10 -0
- package/components/common/layout/theHeader/TheHeaderOld.vue +10 -0
- package/components/common/layout/theHeader/ThemeSwitch.vue +1 -1
- package/components/common/layout/theHeader/userMenu/UserMenu.vue +11 -9
- package/components/common/layout/theHeader/userMenu/modals/preferences/Preferences.vue +16 -9
- package/components/common/layout/theHeader/userMenu/modals/preferences/PreferencesNew.vue +22 -21
- package/components/common/layout/theHeader/userMenu/modals/preferences/PreferencesOld.vue +20 -17
- package/components/common/layout/theHeader/userMenu/modals/preferences/changeLanguage/ChangeLanguage.vue +110 -0
- package/components/common/layout/theHeader/userMenu/modals/preferences/changeLanguage/ChangeLanguageNew.vue +22 -88
- package/components/common/layout/theHeader/userMenu/modals/preferences/changeLanguage/ChangeLanguageOld.vue +28 -82
- package/components/common/layout/theHeader/userMenu/modals/preferences/defaultConsole/DefaultConsole.vue +23 -47
- package/components/common/layout/theHeader/userMenu/modals/preferences/defaultConsole/DefaultConsoleNew.vue +52 -0
- package/components/common/layout/theHeader/userMenu/modals/preferences/defaultConsole/DefaultConsoleOld.vue +48 -0
- package/components/common/layout/theHeader/userMenu/modals/preferences/inventory/Inventory.vue +36 -0
- package/components/common/layout/theHeader/userMenu/modals/preferences/inventory/InventoryNew.vue +35 -0
- package/components/common/layout/theHeader/userMenu/modals/preferences/{Inventory.vue → inventory/InventoryOld.vue} +1 -13
- package/components/common/layout/theHeader/userMenu/modals/preferences/timeFormat/TimeFormat.vue +54 -0
- package/components/common/layout/theHeader/userMenu/modals/preferences/timeFormat/TimeFormatNew.vue +10 -27
- package/components/common/layout/theHeader/userMenu/modals/preferences/timeFormat/TimeFormatOld.vue +6 -28
- package/components/common/layout/theHeader/userMenu/modals/preferences/view/View.vue +45 -0
- package/components/common/layout/theHeader/userMenu/modals/preferences/view/ViewNew.vue +5 -92
- package/components/common/layout/theHeader/userMenu/modals/preferences/view/ViewOld.vue +5 -27
- package/components/common/selectLanguage/SelectLanguage.vue +10 -14
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/browseView/BrowseView.vue +7 -7
- package/composables/useEnvLanguage.ts +4 -1
- package/package.json +2 -2
- package/plugins/recursion.ts +293 -271
- package/components/common/layout/theHeader/userMenu/modals/preferences/changeLanguage/lib/config/lang.ts +0 -10
|
@@ -10,12 +10,12 @@
|
|
|
10
10
|
{{ localization.language }}
|
|
11
11
|
</div>
|
|
12
12
|
<div class="form-second-title">
|
|
13
|
-
{{ description }}
|
|
13
|
+
{{ props.description }}
|
|
14
14
|
</div>
|
|
15
15
|
|
|
16
16
|
<div v-for="(item, key) in radioOptions" :key="key" class="radio flex">
|
|
17
17
|
<ui-radio
|
|
18
|
-
v-model="
|
|
18
|
+
v-model="languageModeLocal"
|
|
19
19
|
:test-id="item.testId"
|
|
20
20
|
:label="item.label"
|
|
21
21
|
:value="item.value"
|
|
@@ -24,12 +24,11 @@
|
|
|
24
24
|
|
|
25
25
|
<span v-if="item.selectLang" class="select-language">
|
|
26
26
|
<common-select-language
|
|
27
|
-
|
|
28
|
-
:
|
|
29
|
-
:disabled="
|
|
27
|
+
v-model="selectedLanguageLocal"
|
|
28
|
+
:normalize-lang="props.locales"
|
|
29
|
+
:disabled="languageModeLocal === 'BROWSER'"
|
|
30
30
|
width="97px"
|
|
31
31
|
size="sm"
|
|
32
|
-
@change="onSelectLang"
|
|
33
32
|
/>
|
|
34
33
|
</span>
|
|
35
34
|
</div>
|
|
@@ -40,108 +39,43 @@
|
|
|
40
39
|
|
|
41
40
|
<script setup lang="ts">
|
|
42
41
|
import type { UI_I_Dropdown } from '~/node_modules/bfg-uikit/components/ui/dropdown/models/interfaces'
|
|
43
|
-
import type { UI_T_LangValue, UI_T_Project } from '~/lib/models/types'
|
|
44
42
|
import type { UI_T_SelectedRadio } from '~/components/common/layout/theHeader/userMenu/modals/preferences/changeLanguage/lib/models/types'
|
|
45
43
|
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
46
44
|
import type { UI_I_RadioItemLang } from '~/components/common/layout/theHeader/userMenu/modals/preferences/changeLanguage/lib/models/interfaces'
|
|
47
|
-
import { locales } from '~/components/common/selectLanguage/lib/config/config'
|
|
48
|
-
import { findInLocals } from '~/components/common/selectLanguage/lib/utils/utils'
|
|
49
|
-
import { UI_E_DetectSelectedRadio } from '~/components/common/layout/theHeader/userMenu/modals/preferences/changeLanguage/lib/models/enums'
|
|
50
|
-
import { radioOptionsFunc } from '~/components/common/layout/theHeader/userMenu/modals/preferences/changeLanguage/lib/config/radioOptions'
|
|
51
|
-
import { defineBrowserLangFunc } from '~/components/common/layout/theHeader/lib/utils/localization'
|
|
52
45
|
|
|
53
46
|
const props = defineProps<{
|
|
54
|
-
selectedType: UI_T_LangValue
|
|
55
47
|
selectedLanguage: UI_I_Dropdown
|
|
56
|
-
|
|
48
|
+
description: string
|
|
49
|
+
radioOptions: UI_I_RadioItemLang[]
|
|
50
|
+
languageMode: UI_T_SelectedRadio
|
|
51
|
+
locales: UI_I_Dropdown[]
|
|
57
52
|
}>()
|
|
58
53
|
|
|
59
54
|
const emits = defineEmits<{
|
|
60
55
|
(event: 'update-language', value: UI_I_Dropdown): void
|
|
61
|
-
(event: 'update-language-type', value: UI_T_SelectedRadio): void
|
|
62
56
|
(event: 'update-is-browser', value: string): void
|
|
63
57
|
}>()
|
|
64
58
|
|
|
65
59
|
const config = useRuntimeConfig()
|
|
66
60
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
67
61
|
|
|
68
|
-
const
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
String(config.public[`TRADEMARK_${useEnvLanguage()}`])
|
|
72
|
-
)
|
|
73
|
-
})
|
|
74
|
-
|
|
75
|
-
const languageMode = ref<UI_T_SelectedRadio>(
|
|
76
|
-
UI_E_DetectSelectedRadio[props.selectedType]
|
|
77
|
-
)
|
|
78
|
-
const radioOptions = readonly<UI_I_RadioItemLang[]>(
|
|
79
|
-
radioOptionsFunc(localization.value)
|
|
80
|
-
)
|
|
81
|
-
|
|
82
|
-
const selectedLanguageLocal = ref<UI_I_Dropdown>(props.selectedLanguage)
|
|
83
|
-
|
|
84
|
-
const setPreferenceLang = (language: string): void => {
|
|
85
|
-
let currentLang = language
|
|
86
|
-
|
|
87
|
-
language === 'BROWSER' &&
|
|
88
|
-
(currentLang = findInLocals(defineBrowserLangFunc()))
|
|
89
|
-
|
|
90
|
-
if (props.project === 'sphere') {
|
|
91
|
-
const { $store }: any = useNuxtApp()
|
|
92
|
-
|
|
93
|
-
$store.dispatch('profile/A_PREFERENCES_FOR_CHANGING', {
|
|
94
|
-
language: currentLang,
|
|
95
|
-
})
|
|
96
|
-
} else if (props.project === 'procurator') {
|
|
97
|
-
emits('update-language', currentLang)
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
const onSelectLang = (newValue): void => {
|
|
102
|
-
selectedLanguageLocal.value && setPreferenceLang(newValue)
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
const onChange = (): void => {
|
|
106
|
-
const lang =
|
|
107
|
-
languageMode.value === 'LANG'
|
|
108
|
-
? selectedLanguageLocal.value
|
|
109
|
-
: languageMode.value // 'BROWSER'
|
|
110
|
-
|
|
111
|
-
lang && setPreferenceLang(lang)
|
|
112
|
-
|
|
113
|
-
props.project === 'sphere' &&
|
|
114
|
-
emits('update-language-type', languageMode.value)
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
const updateIsBrowser = (value: string): void => {
|
|
118
|
-
emits('update-is-browser', value)
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
watch(
|
|
122
|
-
languageMode,
|
|
123
|
-
(newValue) => {
|
|
124
|
-
onChange()
|
|
125
|
-
newValue && updateIsBrowser(newValue)
|
|
62
|
+
const selectedLanguageLocal = computed<UI_I_Dropdown>({
|
|
63
|
+
get() {
|
|
64
|
+
return props.selectedLanguage
|
|
126
65
|
},
|
|
127
|
-
|
|
128
|
-
)
|
|
129
|
-
|
|
130
|
-
watch(
|
|
131
|
-
() => props.selectedLanguage,
|
|
132
|
-
(newValue) => {
|
|
133
|
-
selectedLanguageLocal.value = newValue
|
|
66
|
+
set(newValue: UI_I_Dropdown) {
|
|
67
|
+
emits('update-language', newValue)
|
|
134
68
|
},
|
|
135
|
-
|
|
136
|
-
)
|
|
69
|
+
})
|
|
137
70
|
|
|
138
|
-
|
|
139
|
-
()
|
|
140
|
-
|
|
141
|
-
languageMode.value = UI_E_DetectSelectedRadio[newValue]
|
|
71
|
+
const languageModeLocal = computed<UI_T_SelectedRadio>({
|
|
72
|
+
get() {
|
|
73
|
+
return props.languageMode
|
|
142
74
|
},
|
|
143
|
-
|
|
144
|
-
)
|
|
75
|
+
set(newValue: UI_T_SelectedRadio) {
|
|
76
|
+
emits('update-is-browser', newValue)
|
|
77
|
+
},
|
|
78
|
+
})
|
|
145
79
|
</script>
|
|
146
80
|
|
|
147
81
|
<style lang="scss" scoped>
|
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<form
|
|
3
3
|
id="change-language-form"
|
|
4
|
-
class="compact change-default-console
|
|
4
|
+
class="compact change-default-console"
|
|
5
5
|
>
|
|
6
6
|
<div class="description">
|
|
7
|
-
{{ description }}
|
|
7
|
+
{{ props.description }}
|
|
8
8
|
</div>
|
|
9
9
|
|
|
10
|
-
<div v-for="(item, key) in radioOptions" :key="key" class="radio">
|
|
10
|
+
<div v-for="(item, key) in props.radioOptions" :key="key" class="radio">
|
|
11
11
|
<input
|
|
12
12
|
:id="item.label"
|
|
13
|
-
v-model="
|
|
13
|
+
v-model="languageModeLocal"
|
|
14
14
|
:data-id="item.testId"
|
|
15
15
|
type="radio"
|
|
16
16
|
:value="item.value"
|
|
17
|
-
@change="onChange"
|
|
18
17
|
/>
|
|
19
18
|
<label :for="item.label"> {{ item.label }} </label>
|
|
20
19
|
|
|
@@ -22,12 +21,11 @@
|
|
|
22
21
|
<select
|
|
23
22
|
id="language-select"
|
|
24
23
|
v-model="selectedLanguageLocal"
|
|
25
|
-
:disabled="
|
|
24
|
+
:disabled="languageModeLocal !== item.value"
|
|
26
25
|
data-id="language-select"
|
|
27
|
-
@change="onSelectLang"
|
|
28
26
|
>
|
|
29
27
|
<option
|
|
30
|
-
v-for="(item2, key2) in
|
|
28
|
+
v-for="(item2, key2) in props.locales"
|
|
31
29
|
:key="key2"
|
|
32
30
|
:value="item2.value"
|
|
33
31
|
>
|
|
@@ -40,94 +38,42 @@
|
|
|
40
38
|
</template>
|
|
41
39
|
|
|
42
40
|
<script setup lang="ts">
|
|
43
|
-
import type {
|
|
41
|
+
import type { UI_I_Dropdown } from '~/node_modules/bfg-uikit/components/ui/dropdown/models/interfaces'
|
|
44
42
|
import type { UI_T_SelectedRadio } from '~/components/common/layout/theHeader/userMenu/modals/preferences/changeLanguage/lib/models/types'
|
|
45
|
-
import type {
|
|
46
|
-
import type {
|
|
47
|
-
UI_I_LanguageItem,
|
|
48
|
-
UI_I_RadioItemLang,
|
|
49
|
-
} from '~/components/common/layout/theHeader/userMenu/modals/preferences/changeLanguage/lib/models/interfaces'
|
|
50
|
-
import { UI_E_DetectSelectedRadio } from '~/components/common/layout/theHeader/userMenu/modals/preferences/changeLanguage/lib/models/enums'
|
|
51
|
-
import { langConfig } from '~/components/common/layout/theHeader/userMenu/modals/preferences/changeLanguage/lib/config/lang'
|
|
52
|
-
import { radioOptionsFunc } from '~/components/common/layout/theHeader/userMenu/modals/preferences/changeLanguage/lib/config/radioOptions'
|
|
53
|
-
import { defineBrowserLangFunc } from '~/components/common/layout/theHeader/lib/utils/localization'
|
|
43
|
+
import type { UI_I_RadioItemLang } from '~/components/common/layout/theHeader/userMenu/modals/preferences/changeLanguage/lib/models/interfaces'
|
|
54
44
|
|
|
55
45
|
const props = defineProps<{
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
46
|
+
selectedLanguage: UI_I_Dropdown
|
|
47
|
+
description: string
|
|
48
|
+
radioOptions: UI_I_RadioItemLang[]
|
|
49
|
+
languageMode: UI_T_SelectedRadio
|
|
50
|
+
locales: UI_I_Dropdown[]
|
|
59
51
|
}>()
|
|
60
52
|
|
|
61
53
|
const emits = defineEmits<{
|
|
62
|
-
(event: 'update', value:
|
|
63
|
-
(event: 'update-language-type', value: UI_T_SelectedRadio): void
|
|
54
|
+
(event: 'update-language', value: UI_I_Dropdown): void
|
|
64
55
|
(event: 'update-is-browser', value: string): void
|
|
65
56
|
}>()
|
|
66
57
|
|
|
67
58
|
const config = useRuntimeConfig()
|
|
68
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
69
59
|
|
|
70
|
-
const
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
)
|
|
60
|
+
const selectedLanguageLocal = computed<UI_I_Dropdown>({
|
|
61
|
+
get() {
|
|
62
|
+
return props.selectedLanguage
|
|
63
|
+
},
|
|
64
|
+
set(newValue: UI_I_Dropdown) {
|
|
65
|
+
emits('update-language', newValue)
|
|
66
|
+
},
|
|
75
67
|
})
|
|
76
68
|
|
|
77
|
-
const
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
const radioOptions = readonly<UI_I_RadioItemLang[]>(
|
|
81
|
-
radioOptionsFunc(localization.value)
|
|
82
|
-
)
|
|
83
|
-
|
|
84
|
-
const langOptions = ref<UI_I_LanguageItem[]>(langConfig)
|
|
85
|
-
|
|
86
|
-
const selectedLanguageLocal = ref<string>(props.selectedLanguage)
|
|
87
|
-
|
|
88
|
-
const setPreferenceLang = (language: string): void => {
|
|
89
|
-
let browserLang = language
|
|
90
|
-
|
|
91
|
-
language === 'BROWSER' && (browserLang = defineBrowserLangFunc())
|
|
92
|
-
|
|
93
|
-
if (props.project === 'sphere') {
|
|
94
|
-
const { $store }: any = useNuxtApp()
|
|
95
|
-
|
|
96
|
-
$store.dispatch('profile/A_PREFERENCES_FOR_CHANGING', {
|
|
97
|
-
language: browserLang,
|
|
98
|
-
})
|
|
99
|
-
} else if (props.project === 'procurator') {
|
|
100
|
-
emits('update', browserLang)
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
const onSelectLang = (): void => {
|
|
105
|
-
selectedLanguageLocal.value && setPreferenceLang(selectedLanguageLocal.value)
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
const onChange = (): void => {
|
|
109
|
-
const lang =
|
|
110
|
-
languageMode.value === 'LANG'
|
|
111
|
-
? selectedLanguageLocal.value
|
|
112
|
-
: languageMode.value
|
|
113
|
-
|
|
114
|
-
lang && setPreferenceLang(lang)
|
|
115
|
-
|
|
116
|
-
props.project === 'sphere' &&
|
|
117
|
-
emits('update-language-type', languageMode.value)
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
const updateIsBrowser = (value: string): void => {
|
|
121
|
-
emits('update-is-browser', value)
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
watch(
|
|
125
|
-
languageMode,
|
|
126
|
-
(newValue) => {
|
|
127
|
-
newValue && updateIsBrowser(newValue)
|
|
69
|
+
const languageModeLocal = computed<UI_T_SelectedRadio>({
|
|
70
|
+
get() {
|
|
71
|
+
return props.languageMode
|
|
128
72
|
},
|
|
129
|
-
|
|
130
|
-
)
|
|
73
|
+
set(newValue: UI_T_SelectedRadio) {
|
|
74
|
+
emits('update-is-browser', newValue)
|
|
75
|
+
},
|
|
76
|
+
})
|
|
131
77
|
</script>
|
|
132
78
|
|
|
133
79
|
<style lang="scss" scoped>
|
|
@@ -1,66 +1,42 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
<input
|
|
13
|
-
:id="item.label"
|
|
14
|
-
v-model="consoleValue"
|
|
15
|
-
:data-id="item.testId"
|
|
16
|
-
type="radio"
|
|
17
|
-
:value="item.value"
|
|
18
|
-
:disabled="item.disabled"
|
|
19
|
-
@change="onChange"
|
|
20
|
-
/>
|
|
21
|
-
<label :for="item.label">
|
|
22
|
-
{{ item.label }}
|
|
23
|
-
</label>
|
|
24
|
-
</div>
|
|
25
|
-
</form>
|
|
2
|
+
<common-layout-the-header-user-menu-modals-preferences-default-console-new
|
|
3
|
+
v-if="props.newView"
|
|
4
|
+
v-model="consoleValue"
|
|
5
|
+
:console-options="consoleOptions"
|
|
6
|
+
/>
|
|
7
|
+
<common-layout-the-header-user-menu-modals-preferences-default-console-old
|
|
8
|
+
v-else
|
|
9
|
+
v-model="consoleValue"
|
|
10
|
+
:console-options="consoleOptions"
|
|
11
|
+
/>
|
|
26
12
|
</template>
|
|
27
13
|
|
|
28
14
|
<script setup lang="ts">
|
|
29
15
|
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
30
16
|
import type { UI_I_RadioItemConsole } from '~/components/common/layout/theHeader/userMenu/modals/preferences/defaultConsole/lib/models/interfaces'
|
|
31
|
-
import type { UI_T_Project } from '~/lib/models/types'
|
|
32
17
|
import { consoleOptionsFunc } from '~/components/common/layout/theHeader/userMenu/modals/preferences/defaultConsole/lib/config/consoleOptions'
|
|
33
18
|
|
|
34
19
|
const props = defineProps<{
|
|
35
20
|
remoteConsole: string
|
|
36
|
-
|
|
21
|
+
newView: boolean
|
|
22
|
+
}>()
|
|
23
|
+
|
|
24
|
+
const emits = defineEmits<{
|
|
25
|
+
(event: 'update-remote-console', value: string): void
|
|
37
26
|
}>()
|
|
38
27
|
|
|
39
28
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
40
|
-
const { $store }: any = useNuxtApp()
|
|
41
29
|
|
|
42
|
-
const consoleValue = ref<string>(props.remoteConsole)
|
|
43
30
|
const consoleOptions = readonly<UI_I_RadioItemConsole[]>(
|
|
44
31
|
consoleOptionsFunc(localization.value)
|
|
45
32
|
)
|
|
46
33
|
|
|
47
|
-
const
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
})
|
|
56
|
-
}
|
|
34
|
+
const consoleValue = computed<string>({
|
|
35
|
+
get() {
|
|
36
|
+
return props.remoteConsole
|
|
37
|
+
},
|
|
38
|
+
set(newValue: string) {
|
|
39
|
+
emits('update-remote-console', newValue)
|
|
40
|
+
},
|
|
41
|
+
})
|
|
57
42
|
</script>
|
|
58
|
-
|
|
59
|
-
<style lang="scss" scoped>
|
|
60
|
-
.radio {
|
|
61
|
-
margin-bottom: 5px;
|
|
62
|
-
&:nth-child(2) {
|
|
63
|
-
margin-top: 10px;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
</style>
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<form id="change-default-console" @submit.prevent>
|
|
3
|
+
<div class="flex">
|
|
4
|
+
<ui-modal-icon>
|
|
5
|
+
<ui-icon-icon3 name="console" width="20" height="20" />
|
|
6
|
+
</ui-modal-icon>
|
|
7
|
+
|
|
8
|
+
<div>
|
|
9
|
+
<div class="form-first-title">
|
|
10
|
+
{{ localization.defaultConsole }}
|
|
11
|
+
</div>
|
|
12
|
+
<div class="form-second-title">
|
|
13
|
+
{{ localization.defaultConsoleDesc }}
|
|
14
|
+
</div>
|
|
15
|
+
|
|
16
|
+
<div
|
|
17
|
+
v-for="(item, key) in props.consoleOptions"
|
|
18
|
+
:key="key"
|
|
19
|
+
class="radio flex"
|
|
20
|
+
>
|
|
21
|
+
<ui-radio
|
|
22
|
+
v-model="consoleValue"
|
|
23
|
+
:test-id="item.testId"
|
|
24
|
+
:label="item.label"
|
|
25
|
+
:value="item.value"
|
|
26
|
+
:disabled="item.disabled"
|
|
27
|
+
size="sm"
|
|
28
|
+
/>
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
</form>
|
|
33
|
+
</template>
|
|
34
|
+
|
|
35
|
+
<script setup lang="ts">
|
|
36
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
37
|
+
import type { UI_I_RadioItemConsole } from '~/components/common/layout/theHeader/userMenu/modals/preferences/defaultConsole/lib/models/interfaces'
|
|
38
|
+
|
|
39
|
+
const props = defineProps<{
|
|
40
|
+
consoleOptions: UI_I_RadioItemConsole[]
|
|
41
|
+
}>()
|
|
42
|
+
|
|
43
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
44
|
+
|
|
45
|
+
const consoleValue = defineModel<string>()
|
|
46
|
+
</script>
|
|
47
|
+
|
|
48
|
+
<style lang="scss" scoped>
|
|
49
|
+
.radio:not(:last-child) {
|
|
50
|
+
margin-bottom: 12px;
|
|
51
|
+
}
|
|
52
|
+
</style>
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<form class="compact change-default-console">
|
|
3
|
+
<div class="description">
|
|
4
|
+
{{ localization.defaultConsoleDesc }}
|
|
5
|
+
</div>
|
|
6
|
+
|
|
7
|
+
<div
|
|
8
|
+
v-for="(item, key) in props.consoleOptions"
|
|
9
|
+
:key="key"
|
|
10
|
+
:class="['radio', item.disabled && 'disabled']"
|
|
11
|
+
>
|
|
12
|
+
<input
|
|
13
|
+
:id="item.label"
|
|
14
|
+
v-model="consoleValue"
|
|
15
|
+
:data-id="item.testId"
|
|
16
|
+
type="radio"
|
|
17
|
+
:value="item.value"
|
|
18
|
+
:disabled="item.disabled"
|
|
19
|
+
@change="onChange"
|
|
20
|
+
/>
|
|
21
|
+
<label :for="item.label">
|
|
22
|
+
{{ item.label }}
|
|
23
|
+
</label>
|
|
24
|
+
</div>
|
|
25
|
+
</form>
|
|
26
|
+
</template>
|
|
27
|
+
|
|
28
|
+
<script setup lang="ts">
|
|
29
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
30
|
+
import type { UI_I_RadioItemConsole } from '~/components/common/layout/theHeader/userMenu/modals/preferences/defaultConsole/lib/models/interfaces'
|
|
31
|
+
|
|
32
|
+
const props = defineProps<{
|
|
33
|
+
consoleOptions: UI_I_RadioItemConsole[]
|
|
34
|
+
}>()
|
|
35
|
+
|
|
36
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
37
|
+
|
|
38
|
+
const consoleValue = defineModel<string>()
|
|
39
|
+
</script>
|
|
40
|
+
|
|
41
|
+
<style lang="scss" scoped>
|
|
42
|
+
.radio {
|
|
43
|
+
margin-bottom: 5px;
|
|
44
|
+
&:nth-child(2) {
|
|
45
|
+
margin-top: 10px;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
</style>
|
package/components/common/layout/theHeader/userMenu/modals/preferences/inventory/Inventory.vue
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<common-layout-the-header-user-menu-modals-preferences-inventory-new
|
|
3
|
+
v-if="props.newView"
|
|
4
|
+
v-model="vmInHostsClusters"
|
|
5
|
+
/>
|
|
6
|
+
<common-layout-the-header-user-menu-modals-preferences-inventory-old
|
|
7
|
+
v-else
|
|
8
|
+
v-model="vmInHostsClusters"
|
|
9
|
+
/>
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<script setup lang="ts">
|
|
13
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
14
|
+
|
|
15
|
+
const props = defineProps<{
|
|
16
|
+
vmCluster: boolean
|
|
17
|
+
newView: boolean
|
|
18
|
+
}>()
|
|
19
|
+
|
|
20
|
+
const emits = defineEmits<{
|
|
21
|
+
(event: 'update-vm-clusters', value: boolean): void
|
|
22
|
+
}>()
|
|
23
|
+
|
|
24
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
25
|
+
|
|
26
|
+
const vmInHostsClusters = computed<boolean>({
|
|
27
|
+
get() {
|
|
28
|
+
return props.vmCluster
|
|
29
|
+
},
|
|
30
|
+
set(newValue: boolean) {
|
|
31
|
+
emits('update-vm-clusters', newValue)
|
|
32
|
+
},
|
|
33
|
+
})
|
|
34
|
+
</script>
|
|
35
|
+
|
|
36
|
+
<style lang="scss" scoped></style>
|
package/components/common/layout/theHeader/userMenu/modals/preferences/inventory/InventoryNew.vue
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<form id="inventor-form" @submit.prevent>
|
|
3
|
+
<div class="flex">
|
|
4
|
+
<ui-modal-icon>
|
|
5
|
+
<ui-icon-main-navigation-panel
|
|
6
|
+
name="icon-inventory"
|
|
7
|
+
width="20"
|
|
8
|
+
height="20"
|
|
9
|
+
/>
|
|
10
|
+
</ui-modal-icon>
|
|
11
|
+
|
|
12
|
+
<div>
|
|
13
|
+
<div class="form-first-title">
|
|
14
|
+
{{ localization.inventory }}
|
|
15
|
+
</div>
|
|
16
|
+
<div class="form-second-title">
|
|
17
|
+
{{ localization.inventoryDesc }}
|
|
18
|
+
</div>
|
|
19
|
+
<ui-checkbox
|
|
20
|
+
v-model="vmInHostsClusters"
|
|
21
|
+
test-id="user-preferences-inventory-show-vms-checkbox"
|
|
22
|
+
:label-text="localization.virtualMachinesLabel"
|
|
23
|
+
/>
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
26
|
+
</form>
|
|
27
|
+
</template>
|
|
28
|
+
|
|
29
|
+
<script setup lang="ts">
|
|
30
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
31
|
+
|
|
32
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
33
|
+
|
|
34
|
+
const vmInHostsClusters = defineModel<boolean>()
|
|
35
|
+
</script>
|
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
data-id="user-preferences-inventory-show-vms-checkbox"
|
|
12
12
|
type="checkbox"
|
|
13
13
|
name="showVmsInHostsAndClusters"
|
|
14
|
-
@change="onHandlerChange"
|
|
15
14
|
/>
|
|
16
15
|
|
|
17
16
|
<label for="show-vms-in-hosts-and-clusters" tabindex="-1">{{
|
|
@@ -24,20 +23,9 @@
|
|
|
24
23
|
<script setup lang="ts">
|
|
25
24
|
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
26
25
|
|
|
27
|
-
const props = defineProps<{
|
|
28
|
-
vmCluster: boolean
|
|
29
|
-
}>()
|
|
30
|
-
const { $store }: any = useNuxtApp()
|
|
31
|
-
|
|
32
26
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
33
27
|
|
|
34
|
-
const vmInHostsClusters =
|
|
35
|
-
|
|
36
|
-
const onHandlerChange = (): void => {
|
|
37
|
-
$store.dispatch('profile/A_PREFERENCES_FOR_CHANGING', {
|
|
38
|
-
vm_in_hosts_clusters: vmInHostsClusters.value,
|
|
39
|
-
})
|
|
40
|
-
}
|
|
28
|
+
const vmInHostsClusters = defineModel<boolean>()
|
|
41
29
|
</script>
|
|
42
30
|
|
|
43
31
|
<style lang="scss" scoped></style>
|
package/components/common/layout/theHeader/userMenu/modals/preferences/timeFormat/TimeFormat.vue
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<common-layout-the-header-user-menu-modals-preferences-time-format-new
|
|
3
|
+
v-if="props.newView"
|
|
4
|
+
v-model="timeItem"
|
|
5
|
+
:description="description"
|
|
6
|
+
:format-options="formatOptions"
|
|
7
|
+
/>
|
|
8
|
+
<common-layout-the-header-user-menu-modals-preferences-time-format-old
|
|
9
|
+
v-else
|
|
10
|
+
v-model="timeItem"
|
|
11
|
+
:description="description"
|
|
12
|
+
:format-options="formatOptions"
|
|
13
|
+
/>
|
|
14
|
+
</template>
|
|
15
|
+
|
|
16
|
+
<script setup lang="ts">
|
|
17
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
18
|
+
import type { UI_I_RadioItem } from '~/components/common/layout/theHeader/userMenu/lib/models/interfaces'
|
|
19
|
+
import type { UI_T_TimeValue } from '~/components/common/layout/theHeader/userMenu/modals/preferences/timeFormat/lib/models/types'
|
|
20
|
+
import { formatOptionsFunc } from '~/components/common/layout/theHeader/userMenu/modals/preferences/timeFormat/lib/config/formatOptions'
|
|
21
|
+
|
|
22
|
+
const props = defineProps<{
|
|
23
|
+
timeFormat: UI_T_TimeValue
|
|
24
|
+
newView: boolean
|
|
25
|
+
}>()
|
|
26
|
+
|
|
27
|
+
const emits = defineEmits<{
|
|
28
|
+
(event: 'update-time-format', value: UI_T_TimeValue): void
|
|
29
|
+
}>()
|
|
30
|
+
|
|
31
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
32
|
+
|
|
33
|
+
const config = useRuntimeConfig()
|
|
34
|
+
|
|
35
|
+
const description = computed<string>(() =>
|
|
36
|
+
localization.value.timeFormatDesc.replaceAll(
|
|
37
|
+
'{trademark}',
|
|
38
|
+
String(config.public[`TRADEMARK_${useEnvLanguage()}`])
|
|
39
|
+
)
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
const formatOptions = readonly<UI_I_RadioItem[]>(
|
|
43
|
+
formatOptionsFunc(localization.value)
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
const timeItem = computed<UI_T_TimeValue>({
|
|
47
|
+
get() {
|
|
48
|
+
return props.timeFormat
|
|
49
|
+
},
|
|
50
|
+
set(newValue: UI_T_TimeValue) {
|
|
51
|
+
emits('update-time-format', newValue)
|
|
52
|
+
},
|
|
53
|
+
})
|
|
54
|
+
</script>
|