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
|
@@ -1,186 +1,221 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<atoms-modal
|
|
3
|
-
test-id="browse"
|
|
4
|
-
width="864px"
|
|
5
|
-
height="586px"
|
|
6
|
-
:show="props.show"
|
|
7
|
-
:title="localization.selectFile"
|
|
8
|
-
:disabled-submit="!props.selectedFile"
|
|
9
|
-
>
|
|
10
|
-
<template #modalBody>
|
|
11
|
-
<common-browse-blocks-container
|
|
12
|
-
type="horizontal"
|
|
13
|
-
:blocks-width="blocksWidth"
|
|
14
|
-
@change-widths="onChangeWidths"
|
|
15
|
-
>
|
|
16
|
-
<template #firstBlock>
|
|
17
|
-
<common-browse-blocks-title
|
|
18
|
-
:width="blocksWidth[0]"
|
|
19
|
-
:title="localization.datastores"
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
:
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
:
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
>
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
</
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
const
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
const
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
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
|
-
</
|
|
1
|
+
<template>
|
|
2
|
+
<atoms-modal
|
|
3
|
+
test-id="browse"
|
|
4
|
+
width="864px"
|
|
5
|
+
height="586px"
|
|
6
|
+
:show="props.show"
|
|
7
|
+
:title="localization.selectFile"
|
|
8
|
+
:disabled-submit="!props.selectedFile"
|
|
9
|
+
>
|
|
10
|
+
<template #modalBody>
|
|
11
|
+
<common-browse-blocks-container
|
|
12
|
+
type="horizontal"
|
|
13
|
+
:blocks-width="blocksWidth"
|
|
14
|
+
@change-widths="onChangeWidths"
|
|
15
|
+
>
|
|
16
|
+
<template #firstBlock>
|
|
17
|
+
<common-browse-blocks-title
|
|
18
|
+
:width="blocksWidth[0]"
|
|
19
|
+
:title="localization.datastores"
|
|
20
|
+
:sorting="firstBlockSorting"
|
|
21
|
+
@sort="onSortFirstBlock"
|
|
22
|
+
>
|
|
23
|
+
<template #content>
|
|
24
|
+
<div class="">
|
|
25
|
+
<common-recursion-tree
|
|
26
|
+
:nodes="nodesLocal"
|
|
27
|
+
class="recursion-tree"
|
|
28
|
+
@get-nodes="onShowNodes"
|
|
29
|
+
@select-node="onSelectNode"
|
|
30
|
+
/>
|
|
31
|
+
</div>
|
|
32
|
+
</template>
|
|
33
|
+
</common-browse-blocks-title>
|
|
34
|
+
</template>
|
|
35
|
+
<template #secondBlock>
|
|
36
|
+
<common-browse-blocks-title
|
|
37
|
+
:width="blocksWidth[1]"
|
|
38
|
+
:title="localization.contents"
|
|
39
|
+
:sorting="secondBlockSorting"
|
|
40
|
+
@sort="onSortSecondBlock"
|
|
41
|
+
>
|
|
42
|
+
<template #content>
|
|
43
|
+
<common-browse-blocks-contents-files
|
|
44
|
+
:selected-folder-files="filesLocal"
|
|
45
|
+
:selected-file="props.selectedFile"
|
|
46
|
+
@select-file="onSelectFile"
|
|
47
|
+
/>
|
|
48
|
+
</template>
|
|
49
|
+
</common-browse-blocks-title>
|
|
50
|
+
</template>
|
|
51
|
+
<template #thirdBlock>
|
|
52
|
+
<common-browse-blocks-title
|
|
53
|
+
:width="blocksWidth[2]"
|
|
54
|
+
:title="localization.information"
|
|
55
|
+
>
|
|
56
|
+
<template v-if="info" #content>
|
|
57
|
+
<div
|
|
58
|
+
v-for="item in info"
|
|
59
|
+
:key="item.title"
|
|
60
|
+
class="info-container"
|
|
61
|
+
>
|
|
62
|
+
<common-browse-blocks-info-text
|
|
63
|
+
v-if="item.type === 'text'"
|
|
64
|
+
:title="item.title"
|
|
65
|
+
:value="item.value"
|
|
66
|
+
/>
|
|
67
|
+
<common-browse-blocks-info-size
|
|
68
|
+
v-if="item.type === 'size'"
|
|
69
|
+
:title="item.title"
|
|
70
|
+
:value="item.value"
|
|
71
|
+
/>
|
|
72
|
+
<common-browse-blocks-info-date
|
|
73
|
+
v-if="item.type === 'date'"
|
|
74
|
+
:title="item.title"
|
|
75
|
+
:value="item.value"
|
|
76
|
+
/>
|
|
77
|
+
</div>
|
|
78
|
+
</template>
|
|
79
|
+
</common-browse-blocks-title>
|
|
80
|
+
</template>
|
|
81
|
+
</common-browse-blocks-container>
|
|
82
|
+
<div v-if="props.fileTypes" class="ptm">
|
|
83
|
+
<b>{{ localization.fileType }}:</b>
|
|
84
|
+
<select
|
|
85
|
+
v-model="selectedFileTypeLocal"
|
|
86
|
+
:data-id="`${props.testId}-select`"
|
|
87
|
+
>
|
|
88
|
+
<option
|
|
89
|
+
v-for="item in props.fileTypes"
|
|
90
|
+
:key="item.value"
|
|
91
|
+
:value="item.value"
|
|
92
|
+
>
|
|
93
|
+
{{ item.text }}
|
|
94
|
+
</option>
|
|
95
|
+
</select>
|
|
96
|
+
</div>
|
|
97
|
+
</template>
|
|
98
|
+
</atoms-modal>
|
|
99
|
+
</template>
|
|
100
|
+
|
|
101
|
+
<script setup lang="ts">
|
|
102
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
103
|
+
import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
|
|
104
|
+
import type { UI_T_BlocksWidth } from '~/components/common/browse/blocks/lib/models/types'
|
|
105
|
+
import type { UI_I_FileInfo } from '~/components/common/browse/lib/models/interfaces'
|
|
106
|
+
|
|
107
|
+
const props = defineProps<{
|
|
108
|
+
show: boolean
|
|
109
|
+
nodes: any[]
|
|
110
|
+
files: any[]
|
|
111
|
+
info: UI_I_FileInfo[] | null
|
|
112
|
+
selectedFile: any | null
|
|
113
|
+
fileTypes?: UI_I_OptionItem[]
|
|
114
|
+
selectedFileType?: any
|
|
115
|
+
testId?: string
|
|
116
|
+
}>()
|
|
117
|
+
const emits = defineEmits<{
|
|
118
|
+
(
|
|
119
|
+
event: 'get-nodes',
|
|
120
|
+
value: {
|
|
121
|
+
node: any | null
|
|
122
|
+
cb: () => void
|
|
123
|
+
}
|
|
124
|
+
): void
|
|
125
|
+
(event: 'select-node', value: any): void
|
|
126
|
+
(event: 'update:selected-file', value: any): void
|
|
127
|
+
(event: 'update:selected-file-type', value: any): void
|
|
128
|
+
}>()
|
|
129
|
+
|
|
130
|
+
const { $recursion }: any = useNuxtApp()
|
|
131
|
+
|
|
132
|
+
const nodesLocal = computed<any[]>(() => {
|
|
133
|
+
if (!firstBlockSorting.value[0]) return props.nodes
|
|
134
|
+
|
|
135
|
+
const nodesCopy = useDeepCopy(props.nodes)
|
|
136
|
+
$recursion.sortByProp(nodesCopy, 'name', firstBlockSorting.value[1], 'nodes')
|
|
137
|
+
|
|
138
|
+
return nodesCopy
|
|
139
|
+
})
|
|
140
|
+
const filesLocal = computed<any[]>(() => {
|
|
141
|
+
if (!secondBlockSorting.value[0]) return props.files
|
|
142
|
+
|
|
143
|
+
const value = secondBlockSorting.value[1] ? 1 : -1
|
|
144
|
+
return [...props.files].sort((a, b) => {
|
|
145
|
+
const first = a.name.toLowerCase()
|
|
146
|
+
const second = b.name.toLowerCase()
|
|
147
|
+
return first > second ? value : first < second ? -value : 0
|
|
148
|
+
})
|
|
149
|
+
})
|
|
150
|
+
|
|
151
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
152
|
+
|
|
153
|
+
const blocksWidth = ref<UI_T_BlocksWidth>([272, 272, 256])
|
|
154
|
+
|
|
155
|
+
const onChangeWidths = (width: number, index: number): void => {
|
|
156
|
+
blocksWidth.value[index] = width
|
|
157
|
+
}
|
|
158
|
+
const onSelectFile = (file: any): void => {
|
|
159
|
+
emits('update:selected-file', file)
|
|
160
|
+
}
|
|
161
|
+
const onSelectNode = (node: any): void => {
|
|
162
|
+
emits('select-node', node)
|
|
163
|
+
}
|
|
164
|
+
const onShowNodes = (data: { node: any | null; cb: () => void }): void => {
|
|
165
|
+
emits('get-nodes', data)
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
const selectedFileTypeLocal = computed<any>({
|
|
169
|
+
get() {
|
|
170
|
+
return props.selectedFileType
|
|
171
|
+
},
|
|
172
|
+
set(newValue) {
|
|
173
|
+
emits('update:selected-file-type', newValue)
|
|
174
|
+
},
|
|
175
|
+
})
|
|
176
|
+
|
|
177
|
+
const firstBlockSorting = ref<[boolean, boolean]>([false, false])
|
|
178
|
+
const secondBlockSorting = ref<[boolean, boolean]>([false, false])
|
|
179
|
+
|
|
180
|
+
const onSortFirstBlock = (): void => {
|
|
181
|
+
firstBlockSorting.value = [true, !firstBlockSorting.value[1]]
|
|
182
|
+
}
|
|
183
|
+
const onSortSecondBlock = (): void => {
|
|
184
|
+
secondBlockSorting.value = [true, !secondBlockSorting.value[1]]
|
|
185
|
+
}
|
|
186
|
+
</script>
|
|
187
|
+
|
|
188
|
+
<style scoped lang="scss">
|
|
189
|
+
:deep(.recursion-tree) {
|
|
190
|
+
.tree-node-text-drag {
|
|
191
|
+
border-radius: 3px 0 0 3px;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
:deep(.modal-body) {
|
|
196
|
+
overflow: hidden;
|
|
197
|
+
min-height: 430px;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.info-container {
|
|
201
|
+
padding: 3px;
|
|
202
|
+
div {
|
|
203
|
+
line-height: 17px;
|
|
204
|
+
span {
|
|
205
|
+
font-size: 13px;
|
|
206
|
+
font-weight: 400;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.ptm {
|
|
212
|
+
padding-top: 5px;
|
|
213
|
+
|
|
214
|
+
select {
|
|
215
|
+
outline: none;
|
|
216
|
+
border-color: rgb(118, 118, 118);
|
|
217
|
+
color: rgb(133, 133, 133);
|
|
218
|
+
margin-left: 5px;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
</style>
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
</template>
|
|
20
20
|
|
|
21
21
|
<script setup lang="ts">
|
|
22
|
-
import { UI_T_BlocksWidth } from '~/components/common/browse/blocks/lib/models/types'
|
|
22
|
+
import type { UI_T_BlocksWidth } from '~/components/common/browse/blocks/lib/models/types'
|
|
23
23
|
|
|
24
24
|
const props = defineProps<{
|
|
25
25
|
type: 'horizontal' | 'vertical'
|
|
@@ -42,14 +42,14 @@ const rightPosition = computed(() => ({
|
|
|
42
42
|
const emits = defineEmits<{
|
|
43
43
|
(event: 'change-widths', width: number, index: number): void
|
|
44
44
|
}>()
|
|
45
|
-
const onMouseDown = (event: MouseEvent, section: string) => {
|
|
45
|
+
const onMouseDown = (event: MouseEvent, section: string): void => {
|
|
46
46
|
sectionSelected.value = true
|
|
47
47
|
sectionSelectedName.value = section
|
|
48
48
|
positionOnDown.value = (
|
|
49
49
|
event.target as HTMLDivElement
|
|
50
50
|
).getBoundingClientRect().x
|
|
51
51
|
}
|
|
52
|
-
const onMouseMove = (event: MouseEvent) => {
|
|
52
|
+
const onMouseMove = (event: MouseEvent): void => {
|
|
53
53
|
if (!sectionSelected.value) return
|
|
54
54
|
if (event.stopPropagation) event.stopPropagation()
|
|
55
55
|
if (event.preventDefault) event.preventDefault()
|
|
@@ -58,7 +58,7 @@ const onMouseMove = (event: MouseEvent) => {
|
|
|
58
58
|
getSeparatorPosition(event, 0, 1, 'first')
|
|
59
59
|
getSeparatorPosition(event, 1, 2, 'second')
|
|
60
60
|
}
|
|
61
|
-
const onMouseUp = () => {
|
|
61
|
+
const onMouseUp = (): void => {
|
|
62
62
|
sectionSelected.value = false
|
|
63
63
|
}
|
|
64
64
|
const getSeparatorPosition = (
|
|
@@ -66,7 +66,7 @@ const getSeparatorPosition = (
|
|
|
66
66
|
firstBlock: number,
|
|
67
67
|
secondBlock: number,
|
|
68
68
|
separator: string
|
|
69
|
-
) => {
|
|
69
|
+
): void => {
|
|
70
70
|
if (sectionSelected.value && sectionSelectedName.value === separator) {
|
|
71
71
|
const blockWidth0 =
|
|
72
72
|
props.blocksWidth[firstBlock] - (positionOnDown.value - event.x)
|
|
@@ -1,66 +1,91 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="title-block" :style="blockWidth">
|
|
3
|
-
<div class="title-block__container" :style="blockWidth">
|
|
4
|
-
<div
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
</
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div class="title-block" :style="blockWidth">
|
|
3
|
+
<div class="title-block__container" :style="blockWidth">
|
|
4
|
+
<div
|
|
5
|
+
class="title-block__title pointer"
|
|
6
|
+
:style="blockTitleWidth"
|
|
7
|
+
@click="emits('sort')"
|
|
8
|
+
>
|
|
9
|
+
<b>{{ props.title }}</b>
|
|
10
|
+
<atoms-the-icon
|
|
11
|
+
v-show="props.sorting[0]"
|
|
12
|
+
:class="['sort-arrow', { down: !props.sorting[1] }]"
|
|
13
|
+
width="14px"
|
|
14
|
+
height="14px"
|
|
15
|
+
name="sort-arrow"
|
|
16
|
+
/>
|
|
17
|
+
</div>
|
|
18
|
+
<div class="title-block__body">
|
|
19
|
+
<slot name="content"></slot>
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
</template>
|
|
24
|
+
|
|
25
|
+
<script setup lang="ts">
|
|
26
|
+
const props = withDefaults(
|
|
27
|
+
defineProps<{
|
|
28
|
+
title: string
|
|
29
|
+
width: number
|
|
30
|
+
sorting?: [boolean, boolean]
|
|
31
|
+
}>(),
|
|
32
|
+
{
|
|
33
|
+
sorting: () => [false, false],
|
|
34
|
+
}
|
|
35
|
+
)
|
|
36
|
+
const emits = defineEmits<{
|
|
37
|
+
(event: 'sort'): void
|
|
38
|
+
}>()
|
|
39
|
+
|
|
40
|
+
const blockWidth = computed(() => ({ width: `${props.width}px` }))
|
|
41
|
+
const blockTitleWidth = computed(() => ({ width: `${props.width - 2}px` }))
|
|
42
|
+
</script>
|
|
43
|
+
|
|
44
|
+
<style scoped lang="scss">
|
|
45
|
+
.title-block {
|
|
46
|
+
width: 100%;
|
|
47
|
+
min-height: 400px;
|
|
48
|
+
position: relative;
|
|
49
|
+
|
|
50
|
+
&__container {
|
|
51
|
+
position: absolute;
|
|
52
|
+
top: 0;
|
|
53
|
+
left: 0;
|
|
54
|
+
display: flex;
|
|
55
|
+
flex-direction: column;
|
|
56
|
+
height: 400px;
|
|
57
|
+
border-width: 1px;
|
|
58
|
+
border-style: solid;
|
|
59
|
+
border-image: initial;
|
|
60
|
+
background: var(--block-view-bg-color5);
|
|
61
|
+
border-color: var(--block-border-color2);
|
|
62
|
+
}
|
|
63
|
+
&__title {
|
|
64
|
+
display: inline-block;
|
|
65
|
+
flex: 0 0 auto;
|
|
66
|
+
background-color: var(--block-view-bg-color6);
|
|
67
|
+
border-bottom: 1px solid var(--block-border-color2);
|
|
68
|
+
padding: 8px;
|
|
69
|
+
white-space: nowrap;
|
|
70
|
+
overflow: hidden !important;
|
|
71
|
+
text-overflow: ellipsis;
|
|
72
|
+
|
|
73
|
+
b {
|
|
74
|
+
font-family: Metropolis, Avenir Next, Helvetica Neue, Arial, sans-serif;
|
|
75
|
+
font-size: 13px;
|
|
76
|
+
color: var(--global-font-color9);
|
|
77
|
+
font-weight: bolder;
|
|
78
|
+
letter-spacing: normal;
|
|
79
|
+
}
|
|
80
|
+
.sort-arrow {
|
|
81
|
+
&.down {
|
|
82
|
+
transform: rotate(180deg);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
&__body {
|
|
87
|
+
flex: 1 1 auto;
|
|
88
|
+
overflow-y: auto;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
</style>
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<span>{{ props.title }}:</span>
|
|
4
|
-
<span>{{ formattedDateString }}</span>
|
|
5
|
-
</div>
|
|
6
|
-
</template>
|
|
7
|
-
|
|
8
|
-
<script setup lang="ts">
|
|
9
|
-
import { format } from 'date-fns'
|
|
10
|
-
const props = defineProps<{
|
|
11
|
-
title: string
|
|
12
|
-
value: number
|
|
13
|
-
}>()
|
|
14
|
-
|
|
15
|
-
const getDateString = (dateAlias: number) =>
|
|
16
|
-
format(new Date(dateAlias), 'MM/dd/yyyy HH:mm:ss a')
|
|
17
|
-
|
|
18
|
-
const formattedDateString = computed(() => getDateString(props.value))
|
|
19
|
-
</script>
|
|
20
|
-
|
|
21
|
-
<style scoped lang="scss"></style>
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<span>{{ props.title }}:</span>
|
|
4
|
+
<span>{{ formattedDateString }}</span>
|
|
5
|
+
</div>
|
|
6
|
+
</template>
|
|
7
|
+
|
|
8
|
+
<script setup lang="ts">
|
|
9
|
+
import { format } from 'date-fns'
|
|
10
|
+
const props = defineProps<{
|
|
11
|
+
title: string
|
|
12
|
+
value: number
|
|
13
|
+
}>()
|
|
14
|
+
|
|
15
|
+
const getDateString = (dateAlias: number): string =>
|
|
16
|
+
format(new Date(dateAlias), 'MM/dd/yyyy HH:mm:ss a')
|
|
17
|
+
|
|
18
|
+
const formattedDateString = computed<string>(() => getDateString(props.value))
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<style scoped lang="scss"></style>
|