@xen-orchestra/web-core 0.4.0 → 0.5.0
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/lib/assets/css/_colors.pcss +56 -24
- package/lib/assets/css/_context.pcss +9 -9
- package/lib/assets/css/base.pcss +6 -6
- package/lib/components/backup-item/VtsBackupItem.vue +47 -0
- package/lib/components/backup-state/{BackupState.vue → VtsBackupState.vue} +4 -4
- package/lib/components/{button/ButtonGroup.vue → button-group/VtsButtonGroup.vue} +7 -6
- package/lib/components/cell-object/{CellObject.vue → VtsCellObject.vue} +14 -14
- package/lib/components/cell-text/{CellText.vue → VtsCellText.vue} +11 -11
- package/lib/components/console/{RemoteConsole.vue → VtsRemoteConsole.vue} +12 -18
- package/lib/components/donut-chart-with-legend/{DonutChartWithLegend.vue → VtsDonutChartWithLegend.vue} +6 -6
- package/lib/components/dropdown/DropdownItem.vue +8 -14
- package/lib/components/dropdown/DropdownTitle.vue +3 -3
- package/lib/components/icon/VtsIcon.vue +38 -42
- package/lib/components/layout/{LayoutSidebar.vue → VtsLayoutSidebar.vue} +31 -30
- package/lib/components/legend-group/VtsLegendGroup.vue +44 -0
- package/lib/components/{legend/LegendList.vue → legend-list/VtsLegendList.vue} +2 -2
- package/lib/components/menu/MenuTrigger.vue +2 -2
- package/lib/components/stacked-bar-with-legend/{StackedBarWithLegend.vue → VtsStackedBarWithLegend.vue} +14 -14
- package/lib/components/state-hero/VtsComingSoonHero.vue +13 -0
- package/lib/components/state-hero/VtsLoadingHero.vue +15 -0
- package/lib/components/state-hero/VtsNoDataHero.vue +11 -0
- package/lib/components/state-hero/VtsObjectNotFoundHero.vue +13 -0
- package/lib/components/state-hero/{StateHero.vue → VtsStateHero.vue} +42 -35
- package/lib/components/tab/TabItem.vue +6 -6
- package/lib/components/table/ColumnTitle.vue +7 -7
- package/lib/components/table/{UiTable.vue → VtsTable.vue} +7 -3
- package/lib/components/task/{QuickTaskButton.vue → VtsQuickTaskButton.vue} +8 -7
- package/lib/components/task/{QuickTaskList.vue → VtsQuickTaskList.vue} +10 -11
- package/lib/components/task/{QuickTaskTabBar.vue → VtsQuickTaskTabBar.vue} +9 -13
- package/lib/components/{tooltip/TooltipList.vue → tooltip-list/VtsTooltipList.vue} +2 -3
- package/lib/components/tree/{TreeItem.vue → VtsTreeItem.vue} +3 -4
- package/lib/components/tree/VtsTreeItemError.vue +18 -0
- package/lib/components/tree/{TreeLine.vue → VtsTreeLine.vue} +9 -11
- package/lib/components/tree/{TreeList.vue → VtsTreeList.vue} +5 -2
- package/lib/components/tree/VtsTreeLoadingItem.vue +61 -0
- package/lib/components/ui/account-menu-button/UiAccountMenuButton.vue +64 -0
- package/lib/components/ui/actions-title/UiActionsTitle.vue +2 -2
- package/lib/components/ui/button/UiButton.vue +532 -0
- package/lib/components/ui/button-icon/UiButtonIcon.vue +248 -0
- package/lib/components/{UiCard.vue → ui/card/UiCard.vue} +8 -6
- package/lib/components/ui/card-numbers/UiCardNumbers.vue +103 -0
- package/lib/components/ui/card-subtitle/UiCardSubtitle.vue +24 -0
- package/lib/components/ui/card-title/UiCardTitle.vue +56 -0
- package/lib/components/ui/checkbox/UiCheckbox.vue +410 -0
- package/lib/components/ui/checkbox-group/UiCheckboxGroup.vue +57 -0
- package/lib/components/ui/chip/ChipIcon.vue +21 -0
- package/lib/components/ui/chip/ChipRemoveIcon.vue +13 -0
- package/lib/components/ui/chip/UiChip.vue +135 -0
- package/lib/components/{icon/ComplexIcon.vue → ui/complex-icon/UiComplexIcon.vue} +21 -27
- package/lib/components/ui/counter/UiCounter.vue +134 -0
- package/lib/components/{donut-chart/DonutChart.vue → ui/donut-chart/UiDonutChart.vue} +28 -30
- package/lib/components/{head-bar/HeadBar.vue → ui/head-bar/UiHeadBar.vue} +31 -31
- package/lib/components/{info/VtsInfo.vue → ui/info/UiInfo.vue} +13 -11
- package/lib/components/{input → ui/input}/UiInput.vue +9 -7
- package/lib/components/ui/input/UiTextarea.vue +120 -0
- package/lib/components/{input/VtsLabel.vue → ui/label/UiLabel.vue} +25 -25
- package/lib/components/ui/legend/UiLegend.vue +98 -0
- package/lib/components/{LegendTitle.vue → ui/legend-title/UiLegendTitle.vue} +4 -4
- package/lib/components/{UiSpinner.vue → ui/loader/UiLoader.vue} +3 -3
- package/lib/components/{icon/ObjectIcon.vue → ui/object-icon/UiObjectIcon.vue} +44 -36
- package/lib/components/ui/object-link/UiObjectLink.vue +83 -0
- package/lib/components/ui/panel/UiPanel.vue +57 -0
- package/lib/components/{query-search-bar/QuerySearchBar.vue → ui/query-search-bar/UiQuerySearchBar.vue} +16 -16
- package/lib/components/{task/QuickTaskItem.vue → ui/quick-task-item/UiQuickTaskItem.vue} +46 -34
- package/lib/components/{task/QuickTaskPanel.vue → ui/quick-task-panel/UiQuickTaskPanel.vue} +8 -7
- package/lib/components/ui/radio-button/UiRadioButton.vue +196 -0
- package/lib/components/ui/radio-button-group/UiRadioButtonGroup.vue +56 -0
- package/lib/components/{stacked-bar → ui/stacked-bar}/StackedBarSegment.vue +23 -26
- package/lib/components/{stacked-bar/StackedBar.vue → ui/stacked-bar/UiStackedBar.vue} +6 -6
- package/lib/components/ui/table-actions/UiTableActions.vue +46 -0
- package/lib/components/ui/tag/UiTag.vue +118 -0
- package/lib/components/ui/title/UiTitle.vue +2 -2
- package/lib/components/ui/toaster/UiToaster.vue +100 -0
- package/lib/components/ui/toggle/UiToggle.vue +117 -0
- package/lib/components/{tooltip/TooltipItem.vue → ui/tooltip/UiTooltip.vue} +15 -15
- package/lib/components/ui/top-bottom-table/UiTopBottomTable.vue +64 -0
- package/lib/components/{tree/TreeItemLabel.vue → ui/tree-item-label/UiTreeItemLabel.vue} +60 -59
- package/lib/components/ui/user-link/UiUserLink.vue +76 -0
- package/lib/components/ui/user-logo/UiUserLogo.vue +50 -0
- package/lib/composables/route-query.composable.md +136 -0
- package/lib/composables/table.composable.md +159 -0
- package/lib/composables/tree/define-tree.ts +1 -1
- package/lib/composables/tree/tree-node-base.ts +6 -6
- package/lib/composables/tree.composable.md +536 -0
- package/lib/layouts/CoreLayout.vue +8 -6
- package/lib/locales/de.json +2 -2
- package/lib/locales/en.json +6 -3
- package/lib/locales/fa.json +2 -2
- package/lib/locales/fr.json +6 -3
- package/lib/types/color.type.ts +0 -2
- package/lib/types/subscribable-store.type.ts +2 -2
- package/lib/utils/create-subscribable-store-context.util.ts +1 -1
- package/lib/utils/if-else.utils.md +23 -0
- package/lib/utils/if-else.utils.ts +2 -2
- package/lib/utils/to-variants.util.md +62 -0
- package/package.json +7 -7
- package/lib/components/CardNumbers.vue +0 -101
- package/lib/components/PowerStateIcon.vue +0 -46
- package/lib/components/UiTag.vue +0 -101
- package/lib/components/backup-item/BackupItem.vue +0 -40
- package/lib/components/button/ButtonIcon.vue +0 -220
- package/lib/components/button/UiButton.vue +0 -470
- package/lib/components/card/CardSubtitle.vue +0 -24
- package/lib/components/card/CardTitle.vue +0 -57
- package/lib/components/chip/ChipIcon.vue +0 -30
- package/lib/components/chip/ChipRemoveIcon.vue +0 -13
- package/lib/components/chip/UiChip.vue +0 -137
- package/lib/components/counter/VtsCounter.vue +0 -147
- package/lib/components/legend/LegendGroup.vue +0 -44
- package/lib/components/legend/LegendItem.vue +0 -86
- package/lib/components/object-link/ObjectLink.vue +0 -87
- package/lib/components/state-hero/ComingSoonHero.vue +0 -13
- package/lib/components/state-hero/LoadingHero.vue +0 -15
- package/lib/components/state-hero/NoDataHero.vue +0 -11
- package/lib/components/state-hero/ObjectNotFoundHero.vue +0 -13
- package/lib/components/tree/TreeItemError.vue +0 -13
- package/lib/components/tree/TreeLoadingItem.vue +0 -60
- package/lib/components/user/UserLink.vue +0 -72
- package/lib/components/user/UserLogo.vue +0 -57
- package/lib/types/backup.type.ts +0 -11
- package/lib/types/size.type.ts +0 -1
- package/lib/types/task.type.ts +0 -13
- /package/lib/components/backdrop/{Backdrop.vue → VtsBackdrop.vue} +0 -0
- /package/lib/components/divider/{Divider.vue → VtsDivider.vue} +0 -0
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
<!-- v3 -->
|
|
2
|
+
<template>
|
|
3
|
+
<li :class="classNames" class="ui-legend">
|
|
4
|
+
<VtsIcon :icon="faCircle" accent="brand" class="circle-icon" />
|
|
5
|
+
<span class="label typo p3-regular"><slot /></span>
|
|
6
|
+
<VtsIcon v-if="tooltip" v-tooltip="tooltip" :icon="faCircleInfo" class="tooltip-icon" accent="info" />
|
|
7
|
+
<span v-if="valueLabel" class="value-and-unit typo c3-semi-bold">{{ valueLabel }}</span>
|
|
8
|
+
</li>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<script lang="ts" setup>
|
|
12
|
+
import VtsIcon from '@core/components/icon/VtsIcon.vue'
|
|
13
|
+
import { vTooltip } from '@core/directives/tooltip.directive'
|
|
14
|
+
import { toVariants } from '@core/utils/to-variants.util'
|
|
15
|
+
import { faCircle, faCircleInfo } from '@fortawesome/free-solid-svg-icons'
|
|
16
|
+
import { computed } from 'vue'
|
|
17
|
+
|
|
18
|
+
export type LegendItemAccent = 'neutral' | 'info' | 'success' | 'warning' | 'danger' | 'muted'
|
|
19
|
+
|
|
20
|
+
export type LegendItemProps = {
|
|
21
|
+
accent: LegendItemAccent
|
|
22
|
+
value?: number
|
|
23
|
+
unit?: string
|
|
24
|
+
tooltip?: string
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const props = defineProps<LegendItemProps>()
|
|
28
|
+
|
|
29
|
+
defineSlots<{
|
|
30
|
+
default(): void
|
|
31
|
+
}>()
|
|
32
|
+
|
|
33
|
+
const valueLabel = computed(() => [props.value, props.unit].join(' ').trim())
|
|
34
|
+
|
|
35
|
+
const classNames = computed(() => toVariants({ accent: props.accent }))
|
|
36
|
+
</script>
|
|
37
|
+
|
|
38
|
+
<style lang="postcss" scoped>
|
|
39
|
+
.ui-legend {
|
|
40
|
+
display: flex;
|
|
41
|
+
align-items: center;
|
|
42
|
+
gap: 0.8rem;
|
|
43
|
+
|
|
44
|
+
.circle-icon {
|
|
45
|
+
font-size: 0.8rem;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.tooltip-icon {
|
|
49
|
+
font-size: 1.2rem;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.label {
|
|
53
|
+
color: var(--color-neutral-txt-primary);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.value-and-unit {
|
|
57
|
+
color: var(--color-neutral-txt-secondary);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/* COLORS VARIANTS */
|
|
61
|
+
|
|
62
|
+
&.accent--neutral {
|
|
63
|
+
.circle-icon {
|
|
64
|
+
color: var(--color-neutral-txt-primary);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
&.accent--info {
|
|
69
|
+
.circle-icon {
|
|
70
|
+
color: var(--color-info-item-base);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
&.accent--success {
|
|
75
|
+
.circle-icon {
|
|
76
|
+
color: var(--color-success-item-base);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
&.accent--warning {
|
|
81
|
+
.circle-icon {
|
|
82
|
+
color: var(--color-warning-item-base);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
&.accent--danger {
|
|
87
|
+
.circle-icon {
|
|
88
|
+
color: var(--color-danger-item-base);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
&.accent--muted {
|
|
93
|
+
.circle-icon {
|
|
94
|
+
color: var(--color-neutral-background-disabled);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
</style>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
<!--
|
|
1
|
+
<!-- v3 -->
|
|
2
2
|
<template>
|
|
3
|
-
<div class="legend-title typo c3-semi-bold">
|
|
3
|
+
<div class="ui-legend-title typo c3-semi-bold">
|
|
4
4
|
<slot />
|
|
5
|
-
<VtsIcon v-tooltip="iconTooltip ?? false" :icon accent="
|
|
5
|
+
<VtsIcon v-tooltip="iconTooltip ?? false" :icon accent="info" />
|
|
6
6
|
</div>
|
|
7
7
|
</template>
|
|
8
8
|
|
|
@@ -24,7 +24,7 @@ defineSlots<{
|
|
|
24
24
|
</script>
|
|
25
25
|
|
|
26
26
|
<style lang="postcss" scoped>
|
|
27
|
-
.legend-title {
|
|
27
|
+
.ui-legend-title {
|
|
28
28
|
color: var(--color-neutral-txt-secondary);
|
|
29
29
|
display: flex;
|
|
30
30
|
gap: 0.8rem;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<!-- Adapted from https://www.benmvp.com/blog/how-to-create-circle-svg-gradient-loading-spinner/ -->
|
|
2
2
|
|
|
3
|
-
<!--
|
|
3
|
+
<!-- v2 -->
|
|
4
4
|
<template>
|
|
5
|
-
<svg class="ui-
|
|
5
|
+
<svg class="ui-loader" fill="none" viewBox="0 0 400 400" xmlns="http://www.w3.org/2000/svg">
|
|
6
6
|
<defs>
|
|
7
7
|
<linearGradient :id="secondHalfId">
|
|
8
8
|
<stop offset="0%" stop-color="currentColor" stop-opacity="0" />
|
|
@@ -30,7 +30,7 @@ const secondHalfId = uniqueId('spinner-second-half-')
|
|
|
30
30
|
</script>
|
|
31
31
|
|
|
32
32
|
<style lang="postcss" scoped>
|
|
33
|
-
.ui-
|
|
33
|
+
.ui-loader {
|
|
34
34
|
width: 1.2em;
|
|
35
35
|
height: 1.2em;
|
|
36
36
|
animation: rotate 1s linear infinite;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
<!-- VM
|
|
2
|
-
<!-- Host
|
|
3
|
-
<!-- SR
|
|
4
|
-
<!-- Backup Repository
|
|
5
|
-
<!-- Network
|
|
1
|
+
<!-- VM v2 -->
|
|
2
|
+
<!-- Host v2 -->
|
|
3
|
+
<!-- SR v2 -->
|
|
4
|
+
<!-- Backup Repository v2 -->
|
|
5
|
+
<!-- Network v2 -->
|
|
6
6
|
<template>
|
|
7
|
-
<FontAwesomeLayers :class="[size, {
|
|
7
|
+
<FontAwesomeLayers :class="[toVariants({ size }), { muted: stateConfig === undefined }]" class="ui-object-icon">
|
|
8
8
|
<VtsIcon :icon="mainIcon" accent="current" />
|
|
9
9
|
<VtsIcon :icon="stateIcon" accent="current" :style="stateIconStyle" class="state" />
|
|
10
10
|
</FontAwesomeLayers>
|
|
@@ -12,7 +12,8 @@
|
|
|
12
12
|
|
|
13
13
|
<script generic="TType extends SupportedType" lang="ts" setup>
|
|
14
14
|
import VtsIcon from '@core/components/icon/VtsIcon.vue'
|
|
15
|
-
import type { ObjectIconConfig,
|
|
15
|
+
import type { ObjectIconConfig, SupportedState, SupportedType } from '@core/types/object-icon.type'
|
|
16
|
+
import { toVariants } from '@core/utils/to-variants.util'
|
|
16
17
|
import {
|
|
17
18
|
faCheckCircle,
|
|
18
19
|
faCircleMinus,
|
|
@@ -31,13 +32,15 @@ import {
|
|
|
31
32
|
import { FontAwesomeLayers } from '@fortawesome/vue-fontawesome'
|
|
32
33
|
import { computed } from 'vue'
|
|
33
34
|
|
|
35
|
+
export type ObjectIconSize = 'small' | 'medium' | 'large'
|
|
36
|
+
|
|
34
37
|
const props = withDefaults(
|
|
35
38
|
defineProps<{
|
|
36
39
|
type: TType
|
|
40
|
+
size: ObjectIconSize
|
|
37
41
|
state?: SupportedState<TType> | 'disabled'
|
|
38
|
-
size?: ObjectIconSize
|
|
39
42
|
}>(),
|
|
40
|
-
{
|
|
43
|
+
{ state: 'disabled' }
|
|
41
44
|
)
|
|
42
45
|
|
|
43
46
|
const config: ObjectIconConfig = {
|
|
@@ -62,7 +65,7 @@ const config: ObjectIconConfig = {
|
|
|
62
65
|
},
|
|
63
66
|
suspended: {
|
|
64
67
|
icon: faMoon,
|
|
65
|
-
color: '--color-
|
|
68
|
+
color: '--color-info-item-base',
|
|
66
69
|
translate: {
|
|
67
70
|
x: [88, 130, 140],
|
|
68
71
|
y: [65, 75, 90],
|
|
@@ -70,7 +73,7 @@ const config: ObjectIconConfig = {
|
|
|
70
73
|
},
|
|
71
74
|
paused: {
|
|
72
75
|
icon: faPause,
|
|
73
|
-
color: '--color-
|
|
76
|
+
color: '--color-info-item-active',
|
|
74
77
|
translate: {
|
|
75
78
|
x: [110, 154, 170],
|
|
76
79
|
y: [65, 75, 90],
|
|
@@ -191,16 +194,16 @@ const stateIconStyle = computed(() => {
|
|
|
191
194
|
|
|
192
195
|
let translateIndex: number
|
|
193
196
|
|
|
194
|
-
if (props.size === '
|
|
197
|
+
if (props.size === 'small') {
|
|
195
198
|
translateIndex = 0
|
|
196
|
-
} else if (props.size === '
|
|
199
|
+
} else if (props.size === 'large') {
|
|
197
200
|
translateIndex = 2
|
|
198
201
|
} else {
|
|
199
202
|
translateIndex = 1
|
|
200
203
|
}
|
|
201
204
|
|
|
202
205
|
return {
|
|
203
|
-
|
|
206
|
+
color: `var(${stateConfig.value.color})`,
|
|
204
207
|
'--state-icon-translate-x': `${stateConfig.value.translate.x[translateIndex]}%`,
|
|
205
208
|
'--state-icon-translate-y': `${stateConfig.value.translate.y[translateIndex]}%`,
|
|
206
209
|
}
|
|
@@ -208,36 +211,41 @@ const stateIconStyle = computed(() => {
|
|
|
208
211
|
</script>
|
|
209
212
|
|
|
210
213
|
<style lang="postcss" scoped>
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
--
|
|
214
|
+
.ui-object-icon {
|
|
215
|
+
flex-shrink: 0;
|
|
216
|
+
|
|
217
|
+
&.muted {
|
|
218
|
+
color: var(--color-neutral-txt-secondary);
|
|
216
219
|
}
|
|
217
220
|
|
|
218
|
-
|
|
219
|
-
--
|
|
220
|
-
--state-icon-font-size: 0.625em;
|
|
221
|
+
.state {
|
|
222
|
+
transform: translate(var(--state-icon-translate-x), var(--state-icon-translate-y));
|
|
221
223
|
}
|
|
222
224
|
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
225
|
+
/* SIZE VARIANTS */
|
|
226
|
+
|
|
227
|
+
&.size--small {
|
|
228
|
+
font-size: 0.8rem;
|
|
229
|
+
|
|
230
|
+
.state {
|
|
231
|
+
font-size: 0.75em;
|
|
232
|
+
}
|
|
226
233
|
}
|
|
227
|
-
}
|
|
228
234
|
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
flex-shrink: 0;
|
|
232
|
-
font-size: var(--font-size);
|
|
235
|
+
&.size--medium {
|
|
236
|
+
font-size: 1.6rem;
|
|
233
237
|
|
|
234
|
-
|
|
235
|
-
|
|
238
|
+
.state {
|
|
239
|
+
font-size: 0.625em;
|
|
240
|
+
}
|
|
236
241
|
}
|
|
237
|
-
}
|
|
238
242
|
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
243
|
+
&.size--large {
|
|
244
|
+
font-size: 2.4rem;
|
|
245
|
+
|
|
246
|
+
.state {
|
|
247
|
+
font-size: 0.5em;
|
|
248
|
+
}
|
|
249
|
+
}
|
|
242
250
|
}
|
|
243
251
|
</style>
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
<!-- v3 -->
|
|
2
|
+
<template>
|
|
3
|
+
<RouterLink v-if="route && !disabled" :to="route" class="ui-object-link is-link typo p3-regular-underline">
|
|
4
|
+
<span class="icon">
|
|
5
|
+
<slot name="icon">
|
|
6
|
+
<UiIcon :icon accent="current" />
|
|
7
|
+
</slot>
|
|
8
|
+
</span>
|
|
9
|
+
<span v-tooltip class="content text-ellipsis">
|
|
10
|
+
<slot />
|
|
11
|
+
</span>
|
|
12
|
+
</RouterLink>
|
|
13
|
+
<span v-else :class="{ disabled }" class="ui-object-link typo p3-regular-underline">
|
|
14
|
+
<span class="icon">
|
|
15
|
+
<slot name="icon">
|
|
16
|
+
<UiIcon :icon accent="current" />
|
|
17
|
+
</slot>
|
|
18
|
+
</span>
|
|
19
|
+
<slot />
|
|
20
|
+
</span>
|
|
21
|
+
</template>
|
|
22
|
+
|
|
23
|
+
<script lang="ts" setup>
|
|
24
|
+
import UiIcon from '@core/components/icon/VtsIcon.vue'
|
|
25
|
+
import { vTooltip } from '@core/directives/tooltip.directive'
|
|
26
|
+
import type { IconDefinition } from '@fortawesome/fontawesome-common-types'
|
|
27
|
+
import { type RouteLocationRaw } from 'vue-router'
|
|
28
|
+
|
|
29
|
+
defineProps<{
|
|
30
|
+
route?: RouteLocationRaw
|
|
31
|
+
disabled?: boolean
|
|
32
|
+
icon?: IconDefinition
|
|
33
|
+
}>()
|
|
34
|
+
|
|
35
|
+
defineSlots<{
|
|
36
|
+
default(): any
|
|
37
|
+
icon(): any
|
|
38
|
+
}>()
|
|
39
|
+
</script>
|
|
40
|
+
|
|
41
|
+
<style lang="postcss" scoped>
|
|
42
|
+
.ui-object-link {
|
|
43
|
+
display: flex;
|
|
44
|
+
min-width: 0;
|
|
45
|
+
align-items: center;
|
|
46
|
+
color: var(--color-info-txt-base);
|
|
47
|
+
gap: 1rem;
|
|
48
|
+
|
|
49
|
+
&.disabled {
|
|
50
|
+
color: var(--color-neutral-txt-secondary);
|
|
51
|
+
cursor: not-allowed;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.icon {
|
|
55
|
+
color: var(--color-neutral-txt-primary);
|
|
56
|
+
font-size: 0.8rem;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/* INTERACTION VARIANTS */
|
|
60
|
+
|
|
61
|
+
&.is-link {
|
|
62
|
+
&:hover {
|
|
63
|
+
color: var(--color-info-txt-hover);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
&:active {
|
|
67
|
+
color: var(--color-info-txt-active);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
&:focus-visible {
|
|
71
|
+
outline: none;
|
|
72
|
+
|
|
73
|
+
&::before {
|
|
74
|
+
content: '';
|
|
75
|
+
position: absolute;
|
|
76
|
+
inset: -0.6rem;
|
|
77
|
+
border: 0.2rem solid var(--color-info-txt-base);
|
|
78
|
+
border-radius: 0.4rem;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
</style>
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
<!-- wip -->
|
|
2
|
+
<template>
|
|
3
|
+
<div class="ui-panel" :class="{ error }">
|
|
4
|
+
<div v-if="slots.header" class="header">
|
|
5
|
+
<slot name="header" />
|
|
6
|
+
</div>
|
|
7
|
+
<div class="content">
|
|
8
|
+
<slot />
|
|
9
|
+
</div>
|
|
10
|
+
</div>
|
|
11
|
+
</template>
|
|
12
|
+
|
|
13
|
+
<script setup lang="ts">
|
|
14
|
+
defineProps<{
|
|
15
|
+
error?: boolean
|
|
16
|
+
}>()
|
|
17
|
+
|
|
18
|
+
const slots = defineSlots<{
|
|
19
|
+
default(): any
|
|
20
|
+
header?(): any
|
|
21
|
+
}>()
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
<style scoped lang="postcss">
|
|
25
|
+
.ui-panel {
|
|
26
|
+
height: 100%;
|
|
27
|
+
display: flex;
|
|
28
|
+
flex-direction: column;
|
|
29
|
+
border: 0.1rem solid var(--color-neutral-border);
|
|
30
|
+
background-color: var(--color-neutral-background-secondary);
|
|
31
|
+
|
|
32
|
+
.header {
|
|
33
|
+
border-bottom: 0.1rem solid var(--color-neutral-border);
|
|
34
|
+
background-color: var(--color-neutral-background-primary);
|
|
35
|
+
display: flex;
|
|
36
|
+
justify-content: flex-end;
|
|
37
|
+
align-items: center;
|
|
38
|
+
gap: 1.6rem;
|
|
39
|
+
padding: 0.4rem 1.6rem;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.content {
|
|
43
|
+
display: flex;
|
|
44
|
+
flex-direction: column;
|
|
45
|
+
padding: 0.8rem;
|
|
46
|
+
gap: 0.8rem;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&.error {
|
|
50
|
+
background-color: var(--color-danger-background-selected);
|
|
51
|
+
|
|
52
|
+
.content {
|
|
53
|
+
padding-top: 15rem;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
</style>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
<!--
|
|
1
|
+
<!-- v3 -->
|
|
2
2
|
<template>
|
|
3
|
-
<form class="search-bar" @submit.prevent="emit('search', value)">
|
|
3
|
+
<form class="ui-query-search-bar" @submit.prevent="emit('search', value)">
|
|
4
4
|
<label v-if="uiStore.isDesktop" :for="id" class="typo p2-regular label">
|
|
5
5
|
{{ $t('core.query-search-bar.label') }}
|
|
6
6
|
</label>
|
|
@@ -12,13 +12,13 @@
|
|
|
12
12
|
:placeholder="$t('core.query-search-bar.placeholder')"
|
|
13
13
|
/>
|
|
14
14
|
<template v-if="uiStore.isDesktop">
|
|
15
|
-
<UiButton size="medium"
|
|
16
|
-
<
|
|
15
|
+
<UiButton size="medium" accent="info" variant="primary" type="submit">{{ $t('core.search') }}</UiButton>
|
|
16
|
+
<VtsDivider type="stretch" />
|
|
17
17
|
<UiButton
|
|
18
18
|
v-tooltip="$t('coming-soon')"
|
|
19
19
|
size="medium"
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
accent="info"
|
|
21
|
+
variant="secondary"
|
|
22
22
|
:left-icon="faFilter"
|
|
23
23
|
disabled
|
|
24
24
|
>
|
|
@@ -26,17 +26,17 @@
|
|
|
26
26
|
</UiButton>
|
|
27
27
|
</template>
|
|
28
28
|
<template v-else>
|
|
29
|
-
<
|
|
30
|
-
<
|
|
29
|
+
<UiButtonIcon accent="info" size="medium" type="submit" :icon="faMagnifyingGlass" />
|
|
30
|
+
<UiButtonIcon accent="info" size="medium" disabled :icon="faFilter" />
|
|
31
31
|
</template>
|
|
32
32
|
</form>
|
|
33
33
|
</template>
|
|
34
34
|
|
|
35
35
|
<script lang="ts" setup>
|
|
36
|
-
import
|
|
37
|
-
import UiButton from '@core/components/button/UiButton.vue'
|
|
38
|
-
import
|
|
39
|
-
import UiInput from '@core/components/input/UiInput.vue'
|
|
36
|
+
import VtsDivider from '@core/components/divider/VtsDivider.vue'
|
|
37
|
+
import UiButton from '@core/components/ui/button/UiButton.vue'
|
|
38
|
+
import UiButtonIcon from '@core/components/ui/button-icon/UiButtonIcon.vue'
|
|
39
|
+
import UiInput from '@core/components/ui/input/UiInput.vue'
|
|
40
40
|
import { vTooltip } from '@core/directives/tooltip.directive'
|
|
41
41
|
import { useUiStore } from '@core/stores/ui.store'
|
|
42
42
|
import { uniqueId } from '@core/utils/unique-id.util'
|
|
@@ -55,13 +55,13 @@ const value = ref<string>('')
|
|
|
55
55
|
</script>
|
|
56
56
|
|
|
57
57
|
<style lang="postcss" scoped>
|
|
58
|
-
.search-bar {
|
|
58
|
+
.ui-query-search-bar {
|
|
59
59
|
display: flex;
|
|
60
60
|
gap: 1.6rem;
|
|
61
61
|
align-items: center;
|
|
62
|
-
}
|
|
63
62
|
|
|
64
|
-
.label {
|
|
65
|
-
|
|
63
|
+
.label {
|
|
64
|
+
color: var(--color-neutral-txt-secondary);
|
|
65
|
+
}
|
|
66
66
|
}
|
|
67
67
|
</style>
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
<!-- WIP -->
|
|
1
2
|
<template>
|
|
2
|
-
<li class="
|
|
3
|
+
<li class="ui-quick-task-item">
|
|
3
4
|
<div v-if="hasSubTasks" class="toggle" @click="toggleExpand()">
|
|
4
|
-
<
|
|
5
|
+
<UiButtonIcon accent="info" :icon="isExpanded ? faAngleDown : faAngleRight" size="small" />
|
|
5
6
|
</div>
|
|
6
7
|
<div class="content">
|
|
7
8
|
<div class="typo p1-medium">
|
|
@@ -9,7 +10,7 @@
|
|
|
9
10
|
</div>
|
|
10
11
|
<div class="informations">
|
|
11
12
|
<div class="line-1">
|
|
12
|
-
<UiTag v-if="task.tag"
|
|
13
|
+
<UiTag v-if="task.tag" accent="neutral" variant="primary">{{ task.tag }}</UiTag>
|
|
13
14
|
<div v-if="hasSubTasks" class="subtasks">
|
|
14
15
|
<VtsIcon :icon="faCircleNotch" accent="current" />
|
|
15
16
|
<span class="typo p4-medium">{{ $t('tasks.n-subtasks', { n: subTasksCount }) }}</span>
|
|
@@ -23,21 +24,32 @@
|
|
|
23
24
|
</template>
|
|
24
25
|
</div>
|
|
25
26
|
</div>
|
|
26
|
-
<
|
|
27
|
+
<VtsQuickTaskList v-if="hasSubTasks && isExpanded" :tasks="subTasks" sublist />
|
|
27
28
|
</div>
|
|
28
29
|
</li>
|
|
29
30
|
</template>
|
|
30
31
|
|
|
31
32
|
<script lang="ts" setup>
|
|
32
|
-
import ButtonIcon from '@core/components/button/ButtonIcon.vue'
|
|
33
33
|
import VtsIcon from '@core/components/icon/VtsIcon.vue'
|
|
34
|
-
import
|
|
35
|
-
import
|
|
36
|
-
import
|
|
34
|
+
import VtsQuickTaskList from '@core/components/task/VtsQuickTaskList.vue'
|
|
35
|
+
import UiButtonIcon from '@core/components/ui/button-icon/UiButtonIcon.vue'
|
|
36
|
+
import UiTag from '@core/components/ui/tag/UiTag.vue'
|
|
37
37
|
import { faAngleDown, faAngleRight, faArrowRight, faCircleNotch } from '@fortawesome/free-solid-svg-icons'
|
|
38
38
|
import { useToggle } from '@vueuse/core'
|
|
39
39
|
import { computed } from 'vue'
|
|
40
40
|
|
|
41
|
+
export type TaskStatus = 'pending' | 'success' | 'failure'
|
|
42
|
+
|
|
43
|
+
export type Task = {
|
|
44
|
+
id: string | number
|
|
45
|
+
name: string
|
|
46
|
+
status: TaskStatus
|
|
47
|
+
tag?: string
|
|
48
|
+
start?: number
|
|
49
|
+
end?: number
|
|
50
|
+
subtasks?: Task[]
|
|
51
|
+
}
|
|
52
|
+
|
|
41
53
|
const props = defineProps<{
|
|
42
54
|
task: Task
|
|
43
55
|
}>()
|
|
@@ -50,42 +62,42 @@ const hasSubTasks = computed(() => subTasksCount.value > 0)
|
|
|
50
62
|
</script>
|
|
51
63
|
|
|
52
64
|
<style lang="postcss" scoped>
|
|
53
|
-
.
|
|
65
|
+
.ui-quick-task-item {
|
|
54
66
|
display: flex;
|
|
55
67
|
|
|
56
68
|
&:not(:last-child) {
|
|
57
69
|
border-bottom: 0.1rem solid var(--color-neutral-border);
|
|
58
70
|
}
|
|
59
|
-
}
|
|
60
71
|
|
|
61
|
-
.toggle {
|
|
62
|
-
|
|
63
|
-
}
|
|
72
|
+
.toggle {
|
|
73
|
+
padding: 0.4rem 0;
|
|
74
|
+
}
|
|
64
75
|
|
|
65
|
-
.content {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}
|
|
76
|
+
.content {
|
|
77
|
+
flex: 1;
|
|
78
|
+
padding: 0.4rem 0.4rem 0.4rem 0.8rem;
|
|
79
|
+
}
|
|
69
80
|
|
|
70
|
-
.informations {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
}
|
|
81
|
+
.informations {
|
|
82
|
+
display: flex;
|
|
83
|
+
flex-direction: column;
|
|
84
|
+
gap: 0.4rem;
|
|
85
|
+
}
|
|
75
86
|
|
|
76
|
-
.line-1 {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
}
|
|
87
|
+
.line-1 {
|
|
88
|
+
display: flex;
|
|
89
|
+
align-items: center;
|
|
90
|
+
gap: 0.2rem 0.8rem;
|
|
91
|
+
}
|
|
81
92
|
|
|
82
|
-
.line-2 {
|
|
83
|
-
|
|
84
|
-
}
|
|
93
|
+
.line-2 {
|
|
94
|
+
color: var(--color-neutral-txt-secondary);
|
|
95
|
+
}
|
|
85
96
|
|
|
86
|
-
.subtasks {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
97
|
+
.subtasks {
|
|
98
|
+
display: flex;
|
|
99
|
+
align-items: center;
|
|
100
|
+
gap: 0.4rem;
|
|
101
|
+
}
|
|
90
102
|
}
|
|
91
103
|
</style>
|
|
@@ -1,21 +1,22 @@
|
|
|
1
|
+
<!-- WIP -->
|
|
1
2
|
<template>
|
|
2
|
-
<div :class="{ mobile: isMobile }" class="
|
|
3
|
-
<
|
|
3
|
+
<div :class="{ mobile: isMobile }" class="ui-quick-task-panel">
|
|
4
|
+
<VtsQuickTaskTabBar
|
|
4
5
|
v-model="currentTab"
|
|
5
6
|
:failure-count="failureTasks.length"
|
|
6
7
|
:loading
|
|
7
8
|
:pending-count="pendingTasks.length"
|
|
8
9
|
:success-count="successTasks.length"
|
|
9
10
|
/>
|
|
10
|
-
<
|
|
11
|
+
<VtsQuickTaskList :loading :tasks="currentTasks" />
|
|
11
12
|
</div>
|
|
12
13
|
</template>
|
|
13
14
|
|
|
14
15
|
<script lang="ts" setup>
|
|
15
|
-
import
|
|
16
|
-
import
|
|
16
|
+
import VtsQuickTaskList from '@core/components/task/VtsQuickTaskList.vue'
|
|
17
|
+
import VtsQuickTaskTabBar, { type TaskTab } from '@core/components/task/VtsQuickTaskTabBar.vue'
|
|
18
|
+
import type { Task } from '@core/components/ui/quick-task-item/UiQuickTaskItem.vue'
|
|
17
19
|
import { useUiStore } from '@core/stores/ui.store'
|
|
18
|
-
import type { Task, TaskTab } from '@core/types/task.type'
|
|
19
20
|
import { computed, ref } from 'vue'
|
|
20
21
|
|
|
21
22
|
const props = defineProps<{
|
|
@@ -48,7 +49,7 @@ const currentTasks = computed(() => {
|
|
|
48
49
|
</script>
|
|
49
50
|
|
|
50
51
|
<style lang="postcss" scoped>
|
|
51
|
-
.
|
|
52
|
+
.ui-quick-task-panel {
|
|
52
53
|
width: fit-content;
|
|
53
54
|
min-width: 65rem;
|
|
54
55
|
border-radius: 0.8rem;
|