@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
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
<!-- v1.0 -->
|
|
2
1
|
<template>
|
|
3
2
|
<div
|
|
4
3
|
:class="{ locked: sidebar.isLocked && !ui.isMobile, expanded: sidebar.isExpanded, mobile: ui.isMobile }"
|
|
5
|
-
class="layout-sidebar"
|
|
4
|
+
class="vts-layout-sidebar"
|
|
6
5
|
>
|
|
7
6
|
<div v-if="!ui.isMobile" class="lock">
|
|
8
7
|
<UiButtonIcon
|
|
@@ -10,17 +9,19 @@
|
|
|
10
9
|
content: sidebar.isLocked ? $t('core.sidebar.unlock') : $t('core.sidebar.lock'),
|
|
11
10
|
placement: 'right',
|
|
12
11
|
}"
|
|
12
|
+
accent="info"
|
|
13
|
+
size="medium"
|
|
13
14
|
:icon="sidebar.isLocked ? faLock : faLockOpen"
|
|
14
15
|
@click="sidebar.toggleLock()"
|
|
15
16
|
/>
|
|
16
17
|
</div>
|
|
17
|
-
<div v-if="
|
|
18
|
+
<div v-if="slots.header">
|
|
18
19
|
<slot name="header" />
|
|
19
20
|
</div>
|
|
20
21
|
<div class="content">
|
|
21
22
|
<slot />
|
|
22
23
|
</div>
|
|
23
|
-
<div v-if="
|
|
24
|
+
<div v-if="slots.footer">
|
|
24
25
|
<slot name="footer" />
|
|
25
26
|
</div>
|
|
26
27
|
<div
|
|
@@ -33,16 +34,16 @@
|
|
|
33
34
|
</template>
|
|
34
35
|
|
|
35
36
|
<script lang="ts" setup>
|
|
36
|
-
import UiButtonIcon from '@core/components/button/
|
|
37
|
+
import UiButtonIcon from '@core/components/ui/button-icon/UiButtonIcon.vue'
|
|
37
38
|
import { vTooltip } from '@core/directives/tooltip.directive'
|
|
38
39
|
import { useSidebarStore } from '@core/stores/sidebar.store'
|
|
39
40
|
import { useUiStore } from '@core/stores/ui.store'
|
|
40
41
|
import { faLock, faLockOpen } from '@fortawesome/free-solid-svg-icons'
|
|
41
42
|
|
|
42
|
-
defineSlots<{
|
|
43
|
-
header(): any
|
|
43
|
+
const slots = defineSlots<{
|
|
44
44
|
default(): any
|
|
45
|
-
|
|
45
|
+
header?(): any
|
|
46
|
+
footer?(): any
|
|
46
47
|
}>()
|
|
47
48
|
|
|
48
49
|
const sidebar = useSidebarStore()
|
|
@@ -50,7 +51,7 @@ const ui = useUiStore()
|
|
|
50
51
|
</script>
|
|
51
52
|
|
|
52
53
|
<style lang="postcss" scoped>
|
|
53
|
-
.layout-sidebar {
|
|
54
|
+
.vts-layout-sidebar {
|
|
54
55
|
display: flex;
|
|
55
56
|
flex-direction: column;
|
|
56
57
|
height: 100%;
|
|
@@ -70,31 +71,31 @@ const ui = useUiStore()
|
|
|
70
71
|
position: absolute;
|
|
71
72
|
transform: translateX(v-bind('sidebar.cssOffset'));
|
|
72
73
|
}
|
|
73
|
-
}
|
|
74
74
|
|
|
75
|
-
.lock {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
}
|
|
75
|
+
.lock {
|
|
76
|
+
text-align: right;
|
|
77
|
+
padding: 0.8rem;
|
|
78
|
+
}
|
|
79
79
|
|
|
80
|
-
.content {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
}
|
|
80
|
+
.content {
|
|
81
|
+
flex: 1;
|
|
82
|
+
overflow: auto;
|
|
83
|
+
}
|
|
84
84
|
|
|
85
|
-
.resize-handle {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
85
|
+
.resize-handle {
|
|
86
|
+
position: absolute;
|
|
87
|
+
inset: 0 0 0 auto;
|
|
88
|
+
width: 0.8rem;
|
|
89
|
+
background-color: transparent;
|
|
90
|
+
cursor: col-resize;
|
|
91
|
+
transition: background-color 0.4s;
|
|
92
|
+
user-select: none;
|
|
93
93
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
94
|
+
&:hover,
|
|
95
|
+
&.active {
|
|
96
|
+
background-color: var(--color-neutral-border);
|
|
97
|
+
transition: background-color 0.05s;
|
|
98
|
+
}
|
|
98
99
|
}
|
|
99
100
|
}
|
|
100
101
|
</style>
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="vts-legend-group">
|
|
3
|
+
<UiLegendTitle v-if="title" :icon="title.icon" :icon-tooltip="title.iconTooltip">
|
|
4
|
+
{{ title.label }}
|
|
5
|
+
</UiLegendTitle>
|
|
6
|
+
<VtsLegendList class="list">
|
|
7
|
+
<UiLegend
|
|
8
|
+
v-for="item in items"
|
|
9
|
+
:key="item.label"
|
|
10
|
+
:accent="item.accent"
|
|
11
|
+
:tooltip="item.tooltip"
|
|
12
|
+
:unit="item.unit"
|
|
13
|
+
:value="item.value"
|
|
14
|
+
>
|
|
15
|
+
{{ item.label }}
|
|
16
|
+
</UiLegend>
|
|
17
|
+
</VtsLegendList>
|
|
18
|
+
</div>
|
|
19
|
+
</template>
|
|
20
|
+
|
|
21
|
+
<script lang="ts" setup>
|
|
22
|
+
import VtsLegendList from '@core/components/legend-list/VtsLegendList.vue'
|
|
23
|
+
import UiLegend, { type LegendItemProps } from '@core/components/ui/legend/UiLegend.vue'
|
|
24
|
+
import UiLegendTitle, { type LegendTitleProps } from '@core/components/ui/legend-title/UiLegendTitle.vue'
|
|
25
|
+
|
|
26
|
+
export type LegendGroupProps = {
|
|
27
|
+
items: (LegendItemProps & { label: string })[]
|
|
28
|
+
title?: LegendTitleProps & { label: string }
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
defineProps<LegendGroupProps>()
|
|
32
|
+
</script>
|
|
33
|
+
|
|
34
|
+
<style lang="postcss" scoped>
|
|
35
|
+
.vts-legend-group {
|
|
36
|
+
display: flex;
|
|
37
|
+
flex-direction: column;
|
|
38
|
+
gap: 0.8rem;
|
|
39
|
+
|
|
40
|
+
.list {
|
|
41
|
+
padding-left: 1.6rem;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
</style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<ul class="legend-list" :class="{ horizontal }">
|
|
2
|
+
<ul class="vts-legend-list" :class="{ horizontal }">
|
|
3
3
|
<slot />
|
|
4
4
|
</ul>
|
|
5
5
|
</template>
|
|
@@ -15,7 +15,7 @@ defineSlots<{
|
|
|
15
15
|
</script>
|
|
16
16
|
|
|
17
17
|
<style lang="postcss" scoped>
|
|
18
|
-
.legend-list {
|
|
18
|
+
.vts-legend-list {
|
|
19
19
|
display: flex;
|
|
20
20
|
flex-direction: column;
|
|
21
21
|
gap: 0.4rem;
|
|
@@ -40,12 +40,12 @@ defineProps<{
|
|
|
40
40
|
cursor: pointer;
|
|
41
41
|
|
|
42
42
|
&:hover {
|
|
43
|
-
background-color: var(--color-
|
|
43
|
+
background-color: var(--color-info-background-selected);
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
&:active,
|
|
47
47
|
&.active {
|
|
48
|
-
background-color: var(--color-
|
|
48
|
+
background-color: var(--color-info-background-hover);
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
}
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="stacked-bar-with-legend">
|
|
3
|
-
<
|
|
4
|
-
<
|
|
5
|
-
<
|
|
2
|
+
<div class="vts-stacked-bar-with-legend">
|
|
3
|
+
<UiStackedBar :segments :max-value="maxValue" />
|
|
4
|
+
<VtsLegendList class="list" :horizontal="uiStore.isDesktop">
|
|
5
|
+
<UiLegend
|
|
6
6
|
v-for="segment in segments"
|
|
7
7
|
:key="segment.label"
|
|
8
|
-
:
|
|
8
|
+
:accent="segment.accent"
|
|
9
9
|
:tooltip="segment.tooltip"
|
|
10
10
|
:unit="segment.unit"
|
|
11
11
|
:value="segment.value"
|
|
12
12
|
>
|
|
13
13
|
{{ segment.label }}
|
|
14
|
-
</
|
|
15
|
-
</
|
|
14
|
+
</UiLegend>
|
|
15
|
+
</VtsLegendList>
|
|
16
16
|
</div>
|
|
17
17
|
</template>
|
|
18
18
|
|
|
19
19
|
<script setup lang="ts">
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
20
|
+
import VtsLegendList from '@core/components/legend-list/VtsLegendList.vue'
|
|
21
|
+
import UiLegend, { type LegendItemProps } from '@core/components/ui/legend/UiLegend.vue'
|
|
22
|
+
import UiStackedBar, { type StackedBarProps } from '@core/components/ui/stacked-bar/UiStackedBar.vue'
|
|
23
23
|
import { useUiStore } from '@core/stores/ui.store'
|
|
24
24
|
|
|
25
25
|
type Segment = StackedBarProps['segments'][number] & LegendItemProps & { label: string }
|
|
@@ -35,13 +35,13 @@ const uiStore = useUiStore()
|
|
|
35
35
|
</script>
|
|
36
36
|
|
|
37
37
|
<style scoped lang="postcss">
|
|
38
|
-
.stacked-bar-with-legend {
|
|
38
|
+
.vts-stacked-bar-with-legend {
|
|
39
39
|
display: flex;
|
|
40
40
|
flex-direction: column;
|
|
41
41
|
gap: 0.4rem;
|
|
42
|
-
}
|
|
43
42
|
|
|
44
|
-
.list {
|
|
45
|
-
|
|
43
|
+
.list {
|
|
44
|
+
margin-inline-start: auto;
|
|
45
|
+
}
|
|
46
46
|
}
|
|
47
47
|
</style>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<VtsStateHero :type class="vts-coming-soon-hero" image="under-construction">
|
|
3
|
+
{{ $t('coming-soon') }}
|
|
4
|
+
</VtsStateHero>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script lang="ts" setup>
|
|
8
|
+
import VtsStateHero, { type StateHeroType } from '@core/components/state-hero/VtsStateHero.vue'
|
|
9
|
+
|
|
10
|
+
defineProps<{
|
|
11
|
+
type: StateHeroType
|
|
12
|
+
}>()
|
|
13
|
+
</script>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<VtsStateHero v-if="!disabled" :type busy class="vts-loading-hero">
|
|
3
|
+
{{ $t('loading-in-progress') }}
|
|
4
|
+
</VtsStateHero>
|
|
5
|
+
<slot v-else />
|
|
6
|
+
</template>
|
|
7
|
+
|
|
8
|
+
<script lang="ts" setup>
|
|
9
|
+
import VtsStateHero, { type StateHeroType } from '@core/components/state-hero/VtsStateHero.vue'
|
|
10
|
+
|
|
11
|
+
defineProps<{
|
|
12
|
+
type: StateHeroType
|
|
13
|
+
disabled?: boolean
|
|
14
|
+
}>()
|
|
15
|
+
</script>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<VtsStateHero class="vts-no-data-hero" image="no-data" :type>{{ $t('no-data') }}</VtsStateHero>
|
|
3
|
+
</template>
|
|
4
|
+
|
|
5
|
+
<script lang="ts" setup>
|
|
6
|
+
import VtsStateHero, { type StateHeroType } from '@core/components/state-hero/VtsStateHero.vue'
|
|
7
|
+
|
|
8
|
+
defineProps<{
|
|
9
|
+
type: StateHeroType
|
|
10
|
+
}>()
|
|
11
|
+
</script>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<VtsStateHero class="vts-object-not-found-hero" image="no-result" type="page">
|
|
3
|
+
{{ $t('object-not-found', { id }) }}
|
|
4
|
+
</VtsStateHero>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script lang="ts" setup>
|
|
8
|
+
import VtsStateHero from '@core/components/state-hero/VtsStateHero.vue'
|
|
9
|
+
|
|
10
|
+
defineProps<{
|
|
11
|
+
id: string
|
|
12
|
+
}>()
|
|
13
|
+
</script>
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div :class="type" class="state-hero">
|
|
3
|
-
<
|
|
2
|
+
<div :class="type" class="vts-state-hero">
|
|
3
|
+
<UiLoader v-if="busy" class="loader" />
|
|
4
4
|
<img v-else-if="imageSrc" :src="imageSrc" alt="" class="image" />
|
|
5
|
-
<p v-if="
|
|
5
|
+
<p v-if="slots.default" :class="typoClass" class="text">
|
|
6
6
|
<slot />
|
|
7
7
|
</p>
|
|
8
8
|
</div>
|
|
9
9
|
</template>
|
|
10
10
|
|
|
11
11
|
<script lang="ts" setup>
|
|
12
|
-
import
|
|
12
|
+
import UiLoader from '@core/components/ui/loader/UiLoader.vue'
|
|
13
13
|
import { computed } from 'vue'
|
|
14
14
|
|
|
15
15
|
export type StateHeroType = 'page' | 'card'
|
|
@@ -20,7 +20,11 @@ const props = defineProps<{
|
|
|
20
20
|
image?: 'no-result' | 'under-construction' | 'no-data' // TODO: 'offline' | 'not-found' | 'all-good' | 'all-done' | 'error'
|
|
21
21
|
}>()
|
|
22
22
|
|
|
23
|
-
const
|
|
23
|
+
const slots = defineSlots<{
|
|
24
|
+
default?(): any
|
|
25
|
+
}>()
|
|
26
|
+
|
|
27
|
+
const typoClass = computed(() => (props.type === 'page' ? 'typo h2-black' : 'typo h4-medium'))
|
|
24
28
|
|
|
25
29
|
const imageSrc = computed(() => {
|
|
26
30
|
if (!props.image) {
|
|
@@ -32,43 +36,46 @@ const imageSrc = computed(() => {
|
|
|
32
36
|
</script>
|
|
33
37
|
|
|
34
38
|
<style lang="postcss" scoped>
|
|
35
|
-
.state-hero {
|
|
36
|
-
&.page {
|
|
37
|
-
--image-width: 90%;
|
|
38
|
-
--image-max-height: none;
|
|
39
|
-
--spinner-size: 10rem;
|
|
40
|
-
--gap: 8.2rem;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
&.card {
|
|
44
|
-
--image-width: 70%;
|
|
45
|
-
--image-max-height: 20rem;
|
|
46
|
-
--spinner-size: 6rem;
|
|
47
|
-
--gap: 2rem;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.state-hero {
|
|
39
|
+
.vts-state-hero {
|
|
52
40
|
flex: 1;
|
|
53
41
|
display: flex;
|
|
54
42
|
flex-direction: column;
|
|
55
43
|
align-items: center;
|
|
56
44
|
justify-content: center;
|
|
57
|
-
gap: var(--gap);
|
|
58
|
-
}
|
|
59
45
|
|
|
60
|
-
.image {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
max-height: var(--image-max-height);
|
|
64
|
-
}
|
|
46
|
+
.image {
|
|
47
|
+
max-width: 55rem;
|
|
48
|
+
}
|
|
65
49
|
|
|
66
|
-
.
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
}
|
|
50
|
+
.loader,
|
|
51
|
+
.text {
|
|
52
|
+
color: var(--color-info-txt-base);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&.page {
|
|
56
|
+
gap: 8.2rem;
|
|
57
|
+
|
|
58
|
+
.image {
|
|
59
|
+
width: 90%;
|
|
60
|
+
max-height: none;
|
|
61
|
+
}
|
|
70
62
|
|
|
71
|
-
.
|
|
72
|
-
|
|
63
|
+
.loader {
|
|
64
|
+
font-size: 10rem;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
&.card {
|
|
69
|
+
gap: 2rem;
|
|
70
|
+
|
|
71
|
+
.image {
|
|
72
|
+
width: 70%;
|
|
73
|
+
max-height: 20rem;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.loader {
|
|
77
|
+
font-size: 6rem;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
73
80
|
}
|
|
74
81
|
</style>
|
|
@@ -47,20 +47,20 @@ const classNames = computed(() => {
|
|
|
47
47
|
|
|
48
48
|
&:is(:hover, .hover, :focus-visible) {
|
|
49
49
|
--color: var(--color-neutral-txt-primary);
|
|
50
|
-
--border-color: var(--color-
|
|
51
|
-
--background-color: var(--color-
|
|
50
|
+
--border-color: var(--color-info-item-hover);
|
|
51
|
+
--background-color: var(--color-info-background-hover);
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
&:is(:active, .pressed) {
|
|
55
55
|
--color: var(--color-neutral-txt-primary);
|
|
56
|
-
--border-color: var(--color-
|
|
57
|
-
--background-color: var(--color-
|
|
56
|
+
--border-color: var(--color-info-item-active);
|
|
57
|
+
--background-color: var(--color-info-background-active);
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
&:is(.active, .selected) {
|
|
61
61
|
--color: var(--color-neutral-txt-primary);
|
|
62
|
-
--border-color: var(--color-
|
|
63
|
-
--background-color: var(--color-
|
|
62
|
+
--border-color: var(--color-info-item-base);
|
|
63
|
+
--background-color: var(--color-info-background-selected);
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
&:is(:disabled, .disabled) {
|
|
@@ -95,22 +95,22 @@ const updateInteraction = (interaction: Interaction) => {
|
|
|
95
95
|
<style lang="postcss" scoped>
|
|
96
96
|
/* COLOR VARIANTS */
|
|
97
97
|
.column-header.interactive {
|
|
98
|
-
--color: var(--color-
|
|
98
|
+
--color: var(--color-info-txt-base);
|
|
99
99
|
--background-color: var(--color-neutral-background-primary);
|
|
100
100
|
|
|
101
101
|
&.focus {
|
|
102
|
-
--color: var(--color-
|
|
103
|
-
--background-color: var(--color-
|
|
102
|
+
--color: var(--color-info-txt-base);
|
|
103
|
+
--background-color: var(--color-info-background-selected);
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
&:hover {
|
|
107
|
-
--color: var(--color-
|
|
108
|
-
--background-color: var(--color-
|
|
107
|
+
--color: var(--color-info-txt-hover);
|
|
108
|
+
--background-color: var(--color-info-background-hover);
|
|
109
109
|
}
|
|
110
110
|
|
|
111
111
|
&:active {
|
|
112
|
-
--color: var(--color-
|
|
113
|
-
--background-color: var(--color-
|
|
112
|
+
--color: var(--color-info-txt-active);
|
|
113
|
+
--background-color: var(--color-info-background-active);
|
|
114
114
|
}
|
|
115
115
|
|
|
116
116
|
&.disabled {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<table :class="{ 'vertical-border': verticalBorder }" class="
|
|
2
|
+
<table :class="{ 'vertical-border': verticalBorder }" class="vts-table typo p2-regular">
|
|
3
3
|
<slot />
|
|
4
4
|
</table>
|
|
5
5
|
</template>
|
|
@@ -12,11 +12,15 @@ const props = defineProps<{
|
|
|
12
12
|
verticalBorder?: boolean
|
|
13
13
|
}>()
|
|
14
14
|
|
|
15
|
+
defineSlots<{
|
|
16
|
+
default(): any
|
|
17
|
+
}>()
|
|
18
|
+
|
|
15
19
|
provide('tableName', props.name)
|
|
16
20
|
</script>
|
|
17
21
|
|
|
18
22
|
<style lang="postcss" scoped>
|
|
19
|
-
.
|
|
23
|
+
.vts-table {
|
|
20
24
|
width: 100%;
|
|
21
25
|
border-spacing: 0;
|
|
22
26
|
background-color: var(--color-neutral-background-primary);
|
|
@@ -39,7 +43,7 @@ provide('tableName', props.name)
|
|
|
39
43
|
:deep(thead) {
|
|
40
44
|
th,
|
|
41
45
|
td {
|
|
42
|
-
color: var(--color-
|
|
46
|
+
color: var(--color-info-txt-base);
|
|
43
47
|
font-size: 1.4rem;
|
|
44
48
|
font-weight: 400;
|
|
45
49
|
text-transform: uppercase;
|
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<UiButtonIcon
|
|
3
3
|
ref="buttonRef"
|
|
4
4
|
v-tooltip="{ content: $t('tasks.quick-view'), placement: 'bottom-end' }"
|
|
5
|
+
accent="info"
|
|
5
6
|
:dot="hasNewTask"
|
|
6
7
|
:icon="faBarsProgress"
|
|
7
8
|
size="large"
|
|
8
9
|
@click="isPanelOpen = true"
|
|
9
10
|
/>
|
|
10
11
|
<Teleport v-if="isPanelOpen" to="body">
|
|
11
|
-
<
|
|
12
|
-
<
|
|
12
|
+
<VtsBackdrop @click="isPanelOpen = false" />
|
|
13
|
+
<UiQuickTaskPanel ref="panelRef" :loading :tasks />
|
|
13
14
|
</Teleport>
|
|
14
15
|
</template>
|
|
15
16
|
|
|
16
17
|
<script lang="ts" setup>
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
18
|
+
import VtsBackdrop from '@core/components/backdrop/VtsBackdrop.vue'
|
|
19
|
+
import UiButtonIcon from '@core/components/ui/button-icon/UiButtonIcon.vue'
|
|
20
|
+
import type { Task } from '@core/components/ui/quick-task-item/UiQuickTaskItem.vue'
|
|
21
|
+
import UiQuickTaskPanel from '@core/components/ui/quick-task-panel/UiQuickTaskPanel.vue'
|
|
20
22
|
import { vTooltip } from '@core/directives/tooltip.directive'
|
|
21
|
-
import type { Task } from '@core/types/task.type'
|
|
22
23
|
import { faBarsProgress } from '@fortawesome/free-solid-svg-icons'
|
|
23
24
|
import { unrefElement, watchArray, whenever } from '@vueuse/core'
|
|
24
25
|
import placementJs from 'placement.js'
|
|
@@ -2,21 +2,20 @@
|
|
|
2
2
|
<ul :class="{ sublist }" class="vts-quick-task-list">
|
|
3
3
|
<li v-if="loading">
|
|
4
4
|
<div class="loading">
|
|
5
|
-
<
|
|
5
|
+
<UiLoader />
|
|
6
6
|
<div>{{ $t('loading-in-progress') }}</div>
|
|
7
7
|
</div>
|
|
8
8
|
</li>
|
|
9
9
|
<template v-else>
|
|
10
10
|
<li v-if="tasks.length === 0" class="typo p1-medium">{{ $t('tasks.no-tasks') }}</li>
|
|
11
|
-
<
|
|
11
|
+
<UiQuickTaskItem v-for="task of tasks" :key="task.id" :task />
|
|
12
12
|
</template>
|
|
13
13
|
</ul>
|
|
14
14
|
</template>
|
|
15
15
|
|
|
16
16
|
<script lang="ts" setup>
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import type { Task } from '@core/types/task.type'
|
|
17
|
+
import UiLoader from '@core/components/ui/loader/UiLoader.vue'
|
|
18
|
+
import UiQuickTaskItem, { type Task } from '@core/components/ui/quick-task-item/UiQuickTaskItem.vue'
|
|
20
19
|
|
|
21
20
|
defineProps<{
|
|
22
21
|
tasks: Task[]
|
|
@@ -37,12 +36,12 @@ defineProps<{
|
|
|
37
36
|
max-height: 40rem;
|
|
38
37
|
overflow: auto;
|
|
39
38
|
}
|
|
40
|
-
}
|
|
41
39
|
|
|
42
|
-
.loading {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
40
|
+
.loading {
|
|
41
|
+
display: flex;
|
|
42
|
+
align-items: center;
|
|
43
|
+
justify-content: center;
|
|
44
|
+
gap: 1rem;
|
|
45
|
+
}
|
|
47
46
|
}
|
|
48
47
|
</style>
|
|
@@ -2,17 +2,11 @@
|
|
|
2
2
|
<TabList :disabled="loading">
|
|
3
3
|
<TabItem v-bind="tabs.pending.bindings">
|
|
4
4
|
{{ $t('tasks.quick-view.in-progress') }}
|
|
5
|
-
<
|
|
6
|
-
v-if="pendingCount !== undefined"
|
|
7
|
-
:value="pendingCount"
|
|
8
|
-
accent="brand"
|
|
9
|
-
variant="primary"
|
|
10
|
-
size="small"
|
|
11
|
-
/>
|
|
5
|
+
<UiCounter v-if="pendingCount !== undefined" :value="pendingCount" accent="info" variant="primary" size="small" />
|
|
12
6
|
</TabItem>
|
|
13
7
|
<TabItem v-bind="tabs.success.bindings">
|
|
14
8
|
{{ $t('tasks.quick-view.done') }}
|
|
15
|
-
<
|
|
9
|
+
<UiCounter
|
|
16
10
|
v-if="successCount !== undefined"
|
|
17
11
|
:value="successCount"
|
|
18
12
|
accent="success"
|
|
@@ -22,7 +16,7 @@
|
|
|
22
16
|
</TabItem>
|
|
23
17
|
<TabItem v-bind="tabs.failure.bindings">
|
|
24
18
|
{{ $t('tasks.quick-view.failed') }}
|
|
25
|
-
<
|
|
19
|
+
<UiCounter
|
|
26
20
|
v-if="failureCount !== undefined"
|
|
27
21
|
:value="failureCount"
|
|
28
22
|
accent="danger"
|
|
@@ -30,7 +24,7 @@
|
|
|
30
24
|
size="small"
|
|
31
25
|
/>
|
|
32
26
|
</TabItem>
|
|
33
|
-
<
|
|
27
|
+
<VtsDivider type="tab" />
|
|
34
28
|
<TabItem v-bind="tabs.all.bindings">
|
|
35
29
|
{{ $t('tasks.quick-view.all') }}
|
|
36
30
|
</TabItem>
|
|
@@ -44,12 +38,14 @@
|
|
|
44
38
|
</template>
|
|
45
39
|
|
|
46
40
|
<script lang="ts" setup>
|
|
47
|
-
import
|
|
48
|
-
import Divider from '@core/components/divider/Divider.vue'
|
|
41
|
+
import VtsDivider from '@core/components/divider/VtsDivider.vue'
|
|
49
42
|
import TabItem from '@core/components/tab/TabItem.vue'
|
|
50
43
|
import TabList from '@core/components/tab/TabList.vue'
|
|
44
|
+
import UiCounter from '@core/components/ui/counter/UiCounter.vue'
|
|
45
|
+
import type { TaskStatus } from '@core/components/ui/quick-task-item/UiQuickTaskItem.vue'
|
|
51
46
|
import { useTabList } from '@core/composables/tab-list.composable'
|
|
52
|
-
|
|
47
|
+
|
|
48
|
+
export type TaskTab = TaskStatus | 'all'
|
|
53
49
|
|
|
54
50
|
defineProps<{
|
|
55
51
|
loading?: boolean
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
<!-- v1.0 -->
|
|
2
1
|
<template>
|
|
3
|
-
<
|
|
2
|
+
<UiTooltip v-for="tooltip in tooltips" :key="tooltip.key" :options="tooltip.options" :target="tooltip.target" />
|
|
4
3
|
</template>
|
|
5
4
|
|
|
6
5
|
<script lang="ts" setup>
|
|
7
|
-
import
|
|
6
|
+
import UiTooltip from '@core/components/ui/tooltip/UiTooltip.vue'
|
|
8
7
|
import { useTooltipStore } from '@core/stores/tooltip.store'
|
|
9
8
|
import { storeToRefs } from 'pinia'
|
|
10
9
|
|