@appscode/design-system 2.0.59 → 2.0.61
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/package.json +1 -1
- package/plugins/theme.js +2 -5
- package/plugins/time-convert.js +5 -9
- package/plugins/vue-toaster.js +2 -1
- package/vue-components/plugins/time-convert.js +2 -6
- package/vue-components/styles/base/utilities/_colors.scss +19 -25
- package/vue-components/styles/base/utilities/_generate-color-classes.scss +41 -233
- package/vue-components/styles/base/utilities/_global.scss +13 -14
- package/vue-components/styles/base/utilities/_layouts.scss +1 -2
- package/vue-components/styles/base/utilities/_mixin.scss +8 -46
- package/vue-components/styles/base/utilities/_root-variables.scss +1 -1
- package/vue-components/styles/base/utilities/_spacing.scss +1 -1
- package/vue-components/styles/base/utilities/_typography.scss +1 -1
- package/vue-components/styles/components/_ac-drag.scss +1 -1
- package/vue-components/styles/components/_accordion.scss +1 -1
- package/vue-components/styles/components/_badge-tags.scss +75 -0
- package/vue-components/styles/components/_card-body-wrapper.scss +1 -1
- package/vue-components/styles/components/_pagination.scss +2 -2
- package/vue-components/styles/components/_preview-modal.scss +3 -3
- package/vue-components/styles/components/_progress-bar.scss +3 -3
- package/vue-components/styles/components/_table.scss +3 -3
- package/vue-components/styles/components/_tabs.scss +2 -2
- package/vue-components/styles/components/_terminal.scss +3 -3
- package/vue-components/styles/components/_wizard.scss +3 -3
- package/vue-components/styles/components/ac-toaster/_ac-toasted.scss +10 -5
- package/vue-components/styles/components/alert/_alert.scss +2 -12
- package/vue-components/styles/components/alert/_toast.scss +1 -1
- package/vue-components/styles/components/bbum/_all.scss +1 -1
- package/vue-components/styles/components/bbum/_card-team.scss +1 -6
- package/vue-components/styles/components/bbum/_information-center.scss +4 -4
- package/vue-components/styles/components/bbum/_mobile-desktop.scss +10 -5
- package/vue-components/styles/components/bbum/_user-profile.scss +1 -1
- package/vue-components/styles/components/cards/_info.scss +1 -7
- package/vue-components/styles/components/editor/_filtered-file-editor.scss +3 -3
- package/vue-components/styles/components/editor/_monaco-editor.scss +1 -1
- package/vue-components/styles/components/form-fields/_input-card.scss +2 -2
- package/vue-components/styles/components/form-fields/_input.scss +3 -3
- package/vue-components/styles/components/navbar/_menu-content.scss +1 -2
- package/vue-components/styles/components/select-box/_ac-select-box.scss +2 -2
- package/vue-components/styles/components/select-box/_multi-select.scss +4 -9
- package/vue-components/styles/components/sidebar/_left-sidebar.scss +2 -2
- package/vue-components/styles/components/ui-builder/_ui-builder.scss +1 -1
- package/vue-components/styles/components/ui-builder/_vue-open-api.scss +5 -10
- package/vue-components/styles/layouts/_code-preview.scss +2 -2
- package/vue-components/v2/breadcrumbs/Breadcrumb.vue +14 -27
- package/vue-components/v2/button/Button.vue +2 -7
- package/vue-components/v2/button/DownloadBtn.vue +9 -9
- package/vue-components/v2/card/CardContent.vue +1 -1
- package/vue-components/v2/card/CardHeader.vue +2 -4
- package/vue-components/v2/card/PaymentCard.vue +1 -1
- package/vue-components/v2/card/PaymentCardOptionButtons.vue +1 -1
- package/vue-components/v2/card/PaymentCards.vue +15 -11
- package/vue-components/v2/content/ContentHeader.vue +6 -6
- package/vue-components/v2/editor/Editor.vue +2 -11
- package/vue-components/v2/editor/FilteredFileEditor.vue +5 -17
- package/vue-components/v2/editor/MonacoEditor.vue +5 -12
- package/vue-components/v2/editor/ResourceKeyValueEditor.vue +4 -14
- package/vue-components/v2/form/Form.vue +9 -12
- package/vue-components/v2/header/Header.vue +1 -4
- package/vue-components/v2/loaders/ResourceLoader.vue +5 -5
- package/vue-components/v2/loaders/SidebarLoader.vue +5 -5
- package/vue-components/v2/modal/Modal.vue +2 -7
- package/vue-components/v2/modals/DeleteConfirmationModal.vue +1 -6
- package/vue-components/v2/modals/JsonShowModal.vue +3 -15
- package/vue-components/v2/navbar/Appdrawer.vue +2 -10
- package/vue-components/v2/navbar/ThemeMode.vue +12 -18
- package/vue-components/v2/navbar/User.vue +19 -82
- package/vue-components/v2/notification/Notification.vue +3 -12
- package/vue-components/v2/notification/NotificationItem.vue +1 -3
- package/vue-components/v2/pagination/Pagination.vue +5 -26
- package/vue-components/v2/preloader/Preloader.vue +5 -5
- package/vue-components/v2/searchbars/SearchBar.vue +1 -7
- package/vue-components/v2/sidebar/ClusterSwitcher.vue +2 -2
- package/vue-components/v2/sidebar/SidebarItem.vue +2 -10
- package/vue-components/v2/sidebar/SidebarItemWithDropDown.vue +1 -2
- package/vue-components/v2/table/FakeTableCell.vue +1 -2
- package/vue-components/v2/table/InfoTable.vue +4 -10
- package/vue-components/v2/table/Table.vue +16 -64
- package/vue-components/v2/table/TableRow.vue +3 -15
- package/vue-components/v2/table/table-cell/ArrayCell.vue +3 -9
- package/vue-components/v2/table/table-cell/CellValue.vue +1 -2
- package/vue-components/v2/table/table-cell/GenericCell.vue +8 -8
- package/vue-components/v2/table/table-cell/ObjectCell.vue +2 -6
- package/vue-components/v2/table/table-cell/ValueWithModal.vue +1 -6
- package/vue-components/v3/accordion/Accordion.vue +6 -2
- package/vue-components/v3/alert/AlertMessage.vue +1 -5
- package/vue-components/v3/alert/Toast.vue +2 -5
- package/vue-components/v3/badge-tags/Badge.vue +24 -0
- package/vue-components/v3/badge-tags/Tag.vue +26 -0
- package/vue-components/v3/breadcrumbs/Breadcrumb.vue +6 -24
- package/vue-components/v3/button/Button.vue +2 -11
- package/vue-components/v3/cards/CardHeader.vue +1 -3
- package/vue-components/v3/cards/Cluster.vue +3 -9
- package/vue-components/v3/cards/Counter.vue +1 -4
- package/vue-components/v3/cards/FeatureCard.vue +1 -6
- package/vue-components/v3/cards/FeatureCards.vue +1 -5
- package/vue-components/v3/cards/InfoCard.vue +10 -30
- package/vue-components/v3/cards/Monitoring.vue +3 -15
- package/vue-components/v3/cards/OrgCard.vue +7 -26
- package/vue-components/v3/cards/OverviewCards.vue +1 -3
- package/vue-components/v3/cards/Payment.vue +1 -4
- package/vue-components/v3/content/ContentHeader.vue +1 -3
- package/vue-components/v3/content/ContentTable.vue +4 -16
- package/vue-components/v3/dropdown/DropdownAction.vue +1 -5
- package/vue-components/v3/editor/Editor.vue +33 -19
- package/vue-components/v3/editor/FilteredFileEditor.vue +29 -27
- package/vue-components/v3/editor/MonacoEditor.vue +7 -17
- package/vue-components/v3/editor/ResourceKeyValueEditor.vue +5 -17
- package/vue-components/v3/footer/Status.vue +5 -18
- package/vue-components/v3/footer/Usage.vue +1 -5
- package/vue-components/v3/form/Form.vue +1 -3
- package/vue-components/v3/form-fields/FileUpload.vue +3 -11
- package/vue-components/v3/form-fields/FileUploadSmall.vue +1 -3
- package/vue-components/v3/form-fields/Searchbar.vue +5 -21
- package/vue-components/v3/header/Header.vue +1 -4
- package/vue-components/v3/loaders/ClusterSwitcherLoader.vue +1 -6
- package/vue-components/v3/loaders/InfoCardLoader.vue +1 -6
- package/vue-components/v3/loaders/SingleInfoCardLoader.vue +1 -6
- package/vue-components/v3/messages/Message.vue +6 -4
- package/vue-components/v3/modal/Modal.vue +5 -19
- package/vue-components/v3/modals/DeleteConfirmationModal.vue +1 -6
- package/vue-components/v3/modals/JsonShowModal.vue +5 -17
- package/vue-components/v3/navbar/Appdrawer.vue +2 -10
- package/vue-components/v3/navbar/Navbar.vue +2 -10
- package/vue-components/v3/navbar/NavbarItem.vue +1 -5
- package/vue-components/v3/navbar/Notification.vue +7 -31
- package/vue-components/v3/navbar/ThemeMode.vue +5 -17
- package/vue-components/v3/navbar/User.vue +64 -67
- package/vue-components/v3/notification/AlertBox.vue +6 -20
- package/vue-components/v3/notification/Notification.vue +6 -25
- package/vue-components/v3/notification/NotificationItem.vue +3 -9
- package/vue-components/v3/pagination/Pagination.vue +7 -25
- package/vue-components/v3/searchbars/SearchBar.vue +3 -17
- package/vue-components/v3/sidebar/AccentColorPicker.vue +3 -12
- package/vue-components/v3/sidebar/SidebarFooter.vue +3 -17
- package/vue-components/v3/sidebar/SidebarHeader.vue +4 -28
- package/vue-components/v3/sidebar/SidebarItem.vue +3 -11
- package/vue-components/v3/sidebar/SidebarItemWithDropDown.vue +3 -7
- package/vue-components/v3/sidebar/Steps.vue +1 -2
- package/vue-components/v3/sidebar/sidebar-tabs/SidebarTabsLayout.vue +1 -4
- package/vue-components/v3/sidebar/sidebar-tabs/TabsContent.vue +34 -52
- package/vue-components/v3/steps/ColoredSteps.vue +75 -0
- package/vue-components/v3/table/InfoTable.vue +5 -17
- package/vue-components/v3/table/MultiInfoTable.vue +6 -20
- package/vue-components/v3/table/Table.vue +15 -63
- package/vue-components/v3/table/TableContainer.vue +1 -4
- package/vue-components/v3/table/TableRow.vue +5 -24
- package/vue-components/v3/table/table-cell/ArrayCell.vue +6 -20
- package/vue-components/v3/table/table-cell/CellValue.vue +3 -9
- package/vue-components/v3/table/table-cell/GenericCell.vue +2 -5
- package/vue-components/v3/table/table-cell/ObjectCell.vue +5 -17
- package/vue-components/v3/table/table-cell/ValueWithModal.vue +2 -9
- package/vue-components/styles/components/_ac-tags.scss +0 -116
- package/vue-components/v3/badge/Badge.vue +0 -3
|
@@ -18,19 +18,14 @@ const emit = defineEmits(["closemodal"]);
|
|
|
18
18
|
|
|
19
19
|
const Modal = defineAsyncComponent(() => import("./../modal/Modal.vue"));
|
|
20
20
|
const AcButton = defineAsyncComponent(() => import("./../button/Button.vue"));
|
|
21
|
-
const HeaderItem = defineAsyncComponent(
|
|
22
|
-
() => import("./../header/HeaderItem.vue")
|
|
23
|
-
);
|
|
21
|
+
const HeaderItem = defineAsyncComponent(() => import("./../header/HeaderItem.vue"));
|
|
24
22
|
|
|
25
|
-
const Preloader = defineAsyncComponent(
|
|
26
|
-
() => import("./../preloader/Preloader.vue")
|
|
27
|
-
);
|
|
23
|
+
const Preloader = defineAsyncComponent(() => import("./../preloader/Preloader.vue"));
|
|
28
24
|
|
|
29
25
|
const Banner = defineAsyncComponent(() => import("./../banner/Banner.vue"));
|
|
30
26
|
|
|
31
27
|
const Editor = defineAsyncComponent({
|
|
32
|
-
loader: () =>
|
|
33
|
-
import("./../editor/Editor.vue").then((module) => module.default),
|
|
28
|
+
loader: () => import("./../editor/Editor.vue").then((module) => module.default),
|
|
34
29
|
loadingComponent: Preloader,
|
|
35
30
|
delay: 200,
|
|
36
31
|
errorComponent: Banner,
|
|
@@ -61,20 +56,13 @@ const closeModal = () => {
|
|
|
61
56
|
</script>
|
|
62
57
|
|
|
63
58
|
<template>
|
|
64
|
-
<modal
|
|
65
|
-
:title="editorTitle"
|
|
66
|
-
:open="open"
|
|
67
|
-
@closemodal="closeModal"
|
|
68
|
-
modifier-classes="is-medium"
|
|
69
|
-
>
|
|
59
|
+
<modal :title="editorTitle" :open="open" @closemodal="closeModal" modifier-classes="is-medium">
|
|
70
60
|
<template #modal-header-controls>
|
|
71
61
|
<header-item>
|
|
72
62
|
<ac-button
|
|
73
63
|
modifier-classes="is-square is-primary"
|
|
74
64
|
icon-class="copy"
|
|
75
|
-
v-clipboard:copy="
|
|
76
|
-
`${editorTitle}: ${JSON.stringify(parsedContent, null, 4)}`
|
|
77
|
-
"
|
|
65
|
+
v-clipboard:copy="`${editorTitle}: ${JSON.stringify(parsedContent, null, 4)}`"
|
|
78
66
|
v-clipboard:success="onCopy"
|
|
79
67
|
v-clipboard:error="onError"
|
|
80
68
|
/>
|
|
@@ -16,21 +16,13 @@ withDefaults(defineProps<Props>(), {
|
|
|
16
16
|
});
|
|
17
17
|
|
|
18
18
|
const NavbarItem = defineAsyncComponent(() => import("./NavbarItem.vue"));
|
|
19
|
-
const NavbarItemContent = defineAsyncComponent(
|
|
20
|
-
() => import("./NavbarItemContent.vue")
|
|
21
|
-
);
|
|
19
|
+
const NavbarItemContent = defineAsyncComponent(() => import("./NavbarItemContent.vue"));
|
|
22
20
|
</script>
|
|
23
21
|
|
|
24
22
|
<template>
|
|
25
23
|
<navbar-item>
|
|
26
24
|
<template #navbar-item>
|
|
27
|
-
<svg
|
|
28
|
-
width="16"
|
|
29
|
-
height="16"
|
|
30
|
-
viewBox="0 0 16 16"
|
|
31
|
-
fill="none"
|
|
32
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
33
|
-
>
|
|
25
|
+
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
34
26
|
<path
|
|
35
27
|
d="M6.66667 2H2V6.66667H6.66667V2Z"
|
|
36
28
|
stroke="#061B2D"
|
|
@@ -15,20 +15,12 @@ withDefaults(defineProps<Props>(), {
|
|
|
15
15
|
</script>
|
|
16
16
|
|
|
17
17
|
<template>
|
|
18
|
-
<div
|
|
19
|
-
class="ac-navbar-area"
|
|
20
|
-
id="header"
|
|
21
|
-
:class="[modifierClasses, { 'is-full': fullWidth }]"
|
|
22
|
-
>
|
|
18
|
+
<div class="ac-navbar-area" id="header" :class="[modifierClasses, { 'is-full': fullWidth }]">
|
|
23
19
|
<div class="ac-navbar-inner" :class="{ container: container }">
|
|
24
20
|
<!-- navbar start -->
|
|
25
21
|
<nav class="ac-navbar">
|
|
26
22
|
<!-- navbar logo start -->
|
|
27
|
-
<div
|
|
28
|
-
class="ac-navbar-brand is-flex"
|
|
29
|
-
v-if="fullWidth"
|
|
30
|
-
:class="{ 'pl-0': container }"
|
|
31
|
-
>
|
|
23
|
+
<div class="ac-navbar-brand is-flex" v-if="fullWidth" :class="{ 'pl-0': container }">
|
|
32
24
|
<slot name="navbar-brand-logo" />
|
|
33
25
|
<span v-if="productName" class="brand-tag">{{ productName }}</span>
|
|
34
26
|
</div>
|
|
@@ -25,11 +25,7 @@ onClickOutside(navbarItem, () => (isActive.value = ""));
|
|
|
25
25
|
</script>
|
|
26
26
|
|
|
27
27
|
<template>
|
|
28
|
-
<div
|
|
29
|
-
ref="navbarItem"
|
|
30
|
-
class="ac-menu-item"
|
|
31
|
-
:class="modifierClasses + isActive"
|
|
32
|
-
>
|
|
28
|
+
<div ref="navbarItem" class="ac-menu-item" :class="modifierClasses + isActive">
|
|
33
29
|
<button class="button ac-nav-button" @click="clickEvent()">
|
|
34
30
|
<slot name="navbar-item" />
|
|
35
31
|
</button>
|
|
@@ -3,9 +3,7 @@ import { defineAsyncComponent } from "vue";
|
|
|
3
3
|
import TimeConvert from "../../plugins/time-convert";
|
|
4
4
|
import type { Notification } from "../../types/notification";
|
|
5
5
|
const NavbarItem = defineAsyncComponent(() => import("./NavbarItem.vue"));
|
|
6
|
-
const NavbarItemContent = defineAsyncComponent(
|
|
7
|
-
() => import("./NavbarItemContent.vue")
|
|
8
|
-
);
|
|
6
|
+
const NavbarItemContent = defineAsyncComponent(() => import("./NavbarItemContent.vue"));
|
|
9
7
|
withDefaults(
|
|
10
8
|
defineProps<{
|
|
11
9
|
notifications?: Array<Notification>;
|
|
@@ -24,13 +22,7 @@ function notificationTime(time: number) {
|
|
|
24
22
|
<template>
|
|
25
23
|
<navbar-item ref="notificationItem" @is-active="$emit('isActive', $event)">
|
|
26
24
|
<template #navbar-item>
|
|
27
|
-
<svg
|
|
28
|
-
width="16"
|
|
29
|
-
height="16"
|
|
30
|
-
viewBox="0 0 16 16"
|
|
31
|
-
fill="none"
|
|
32
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
33
|
-
>
|
|
25
|
+
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
34
26
|
<g clip-path="url(#clip0_534_14009)">
|
|
35
27
|
<path
|
|
36
28
|
d="M9.15331 14C9.03611 14.2021 8.86787 14.3698 8.66546 14.4864C8.46305 14.603 8.23357 14.6643 7.99998 14.6643C7.76639 14.6643 7.53691 14.603 7.3345 14.4864C7.13208 14.3698 6.96385 14.2021 6.84665 14M14.6666 11.3334H1.33331C1.86375 11.3334 2.37245 11.1227 2.74753 10.7476C3.1226 10.3725 3.33331 9.86381 3.33331 9.33337V6.00004C3.33331 4.76236 3.82498 3.57538 4.70015 2.70021C5.57532 1.82504 6.7623 1.33337 7.99998 1.33337C9.23766 1.33337 10.4246 1.82504 11.2998 2.70021C12.175 3.57538 12.6666 4.76236 12.6666 6.00004V9.33337C12.6666 9.86381 12.8774 10.3725 13.2524 10.7476C13.6275 11.1227 14.1362 11.3334 14.6666 11.3334Z"
|
|
@@ -47,19 +39,12 @@ function notificationTime(time: number) {
|
|
|
47
39
|
</defs>
|
|
48
40
|
</svg>
|
|
49
41
|
|
|
50
|
-
<span v-if="unreadNotification > 999" class="notification-count"
|
|
51
|
-
|
|
52
|
-
>
|
|
53
|
-
<span v-else-if="unreadNotification !== 0" class="notification-count">{{
|
|
54
|
-
unreadNotification
|
|
55
|
-
}}</span>
|
|
42
|
+
<span v-if="unreadNotification > 999" class="notification-count">999+</span>
|
|
43
|
+
<span v-else-if="unreadNotification !== 0" class="notification-count">{{ unreadNotification }}</span>
|
|
56
44
|
</template>
|
|
57
45
|
|
|
58
46
|
<template #navbar-content>
|
|
59
|
-
<navbar-item-content
|
|
60
|
-
class="navbar-dropdown-wrapper"
|
|
61
|
-
style="width: 320px; right: -30px"
|
|
62
|
-
>
|
|
47
|
+
<navbar-item-content class="navbar-dropdown-wrapper" style="width: 320px; right: -30px">
|
|
63
48
|
<div class="dropdown-inner">
|
|
64
49
|
<div class="notification-header">
|
|
65
50
|
<h5>Notification</h5>
|
|
@@ -67,12 +52,7 @@ function notificationTime(time: number) {
|
|
|
67
52
|
</div>
|
|
68
53
|
|
|
69
54
|
<div class="notification-body ac-scrollbar p-0">
|
|
70
|
-
<a
|
|
71
|
-
v-for="data in notifications"
|
|
72
|
-
href="#"
|
|
73
|
-
class="single-notification"
|
|
74
|
-
:key="data.id"
|
|
75
|
-
>
|
|
55
|
+
<a v-for="data in notifications" href="#" class="single-notification" :key="data.id">
|
|
76
56
|
<!-- <span class="round-icon">Z</span> -->
|
|
77
57
|
<div class="notification-content">
|
|
78
58
|
<h6>{{ data.msg }}</h6>
|
|
@@ -81,11 +61,7 @@ function notificationTime(time: number) {
|
|
|
81
61
|
<span>{{ notificationTime(data.time) }}</span>
|
|
82
62
|
</a>
|
|
83
63
|
|
|
84
|
-
<a
|
|
85
|
-
v-if="!notifications.length"
|
|
86
|
-
href="#"
|
|
87
|
-
class="single-notification"
|
|
88
|
-
>
|
|
64
|
+
<a v-if="!notifications.length" href="#" class="single-notification">
|
|
89
65
|
<!-- <span class="round-icon">Y</span> -->
|
|
90
66
|
<div class="notification-content">
|
|
91
67
|
<h6>No New Notification</h6>
|
|
@@ -43,9 +43,7 @@ const onThemeModeChange = (n: string) => {
|
|
|
43
43
|
|
|
44
44
|
let theme = n;
|
|
45
45
|
if (n === "system") {
|
|
46
|
-
const isDarkMode =
|
|
47
|
-
window.matchMedia &&
|
|
48
|
-
window.matchMedia("(prefers-color-scheme: dark)").matches;
|
|
46
|
+
const isDarkMode = window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches;
|
|
49
47
|
addColorSchemeEventListener();
|
|
50
48
|
theme = isDarkMode ? "dark" : "light";
|
|
51
49
|
} else {
|
|
@@ -64,9 +62,7 @@ const handleDarkThemeClass = (currentTheme: string) => {
|
|
|
64
62
|
};
|
|
65
63
|
|
|
66
64
|
const addColorSchemeEventListener = () => {
|
|
67
|
-
window
|
|
68
|
-
.matchMedia("(prefers-color-scheme: dark)")
|
|
69
|
-
.addEventListener("change", handleSystemThemeChange);
|
|
65
|
+
window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change", handleSystemThemeChange);
|
|
70
66
|
};
|
|
71
67
|
|
|
72
68
|
const handleSystemThemeChange = () => {
|
|
@@ -74,9 +70,7 @@ const handleSystemThemeChange = () => {
|
|
|
74
70
|
};
|
|
75
71
|
|
|
76
72
|
const removeColorSchemeEventListener = () => {
|
|
77
|
-
window
|
|
78
|
-
.matchMedia("(prefers-color-scheme: dark)")
|
|
79
|
-
.removeEventListener("change", handleSystemThemeChange);
|
|
73
|
+
window.matchMedia("(prefers-color-scheme: dark)").removeEventListener("change", handleSystemThemeChange);
|
|
80
74
|
};
|
|
81
75
|
|
|
82
76
|
watch(themeMode, (n) => {
|
|
@@ -91,16 +85,10 @@ watch(themeMode, (n) => {
|
|
|
91
85
|
:title="themeModes[theme as keyof ThemeModes].displayName"
|
|
92
86
|
@click="themeMode = theme"
|
|
93
87
|
class="is-flex-grow-1 has-text-centered"
|
|
94
|
-
:class="[
|
|
95
|
-
themeMode === theme ? 'is-active' : '',
|
|
96
|
-
theme === 'dark' ? 'b-l-1 b-r-1' : '',
|
|
97
|
-
]"
|
|
88
|
+
:class="[themeMode === theme ? 'is-active' : '', theme === 'dark' ? 'b-l-1 b-r-1' : '']"
|
|
98
89
|
:key="theme"
|
|
99
90
|
>
|
|
100
|
-
<span
|
|
101
|
-
class="icon"
|
|
102
|
-
v-html="themeModes[theme as keyof ThemeModes].iconClass"
|
|
103
|
-
></span>
|
|
91
|
+
<span class="icon" v-html="themeModes[theme as keyof ThemeModes].iconClass"></span>
|
|
104
92
|
</li>
|
|
105
93
|
</div>
|
|
106
94
|
</template>
|
|
@@ -36,12 +36,8 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
36
36
|
|
|
37
37
|
const emit = defineEmits(["set:theme", "on-logout", "activeorg$set"]);
|
|
38
38
|
|
|
39
|
-
const NavbarItem = defineAsyncComponent(
|
|
40
|
-
|
|
41
|
-
);
|
|
42
|
-
const NavbarItemContent = defineAsyncComponent(
|
|
43
|
-
() => import("../navbar/NavbarItemContent.vue")
|
|
44
|
-
);
|
|
39
|
+
const NavbarItem = defineAsyncComponent(() => import("../navbar/NavbarItem.vue"));
|
|
40
|
+
const NavbarItemContent = defineAsyncComponent(() => import("../navbar/NavbarItemContent.vue"));
|
|
45
41
|
|
|
46
42
|
const ThemeMode = defineAsyncComponent(() => import("../navbar/ThemeMode.vue"));
|
|
47
43
|
|
|
@@ -92,8 +88,7 @@ watch(dropDownStatus, (n) => {
|
|
|
92
88
|
if (n === "open") {
|
|
93
89
|
nextTick(() => {
|
|
94
90
|
const dropDownUl = dropdownItems.value;
|
|
95
|
-
if (dropDownUl)
|
|
96
|
-
dropDownSectionHeight.value = `${dropDownUl.$el.scrollHeight}px`;
|
|
91
|
+
if (dropDownUl) dropDownSectionHeight.value = `${dropDownUl.$el.scrollHeight}px`;
|
|
97
92
|
});
|
|
98
93
|
} else {
|
|
99
94
|
dropDownSectionHeight.value = null;
|
|
@@ -117,8 +112,12 @@ watch(dropDownStatus, (n) => {
|
|
|
117
112
|
<template #navbar-content>
|
|
118
113
|
<navbar-item-content class="navbar-dropdown-wrapper">
|
|
119
114
|
<div v-if="user.username" class="user-profile-wrapper">
|
|
120
|
-
<a
|
|
121
|
-
|
|
115
|
+
<a
|
|
116
|
+
:href="`${serverDomain}/${user.username}`"
|
|
117
|
+
:title="user.username.toUpperCase()"
|
|
118
|
+
data-testid="user-profile-link"
|
|
119
|
+
class="line-break-anywhere is-ellipsis-1 has-text-weight-medium"
|
|
120
|
+
>
|
|
122
121
|
<div class="profile-area">
|
|
123
122
|
<div class="profile-photo">
|
|
124
123
|
<img :src="user.avatar_url" alt="User Photo" class="width-32 height-32" />
|
|
@@ -127,27 +126,25 @@ watch(dropDownStatus, (n) => {
|
|
|
127
126
|
<div class="profile-info" style="width: calc(100% - 60px)">
|
|
128
127
|
<strong> {{ user.username }} </strong>
|
|
129
128
|
<p>
|
|
130
|
-
{{
|
|
131
|
-
user.isPersonalAccount || user.is_admin
|
|
132
|
-
? "Personal Account"
|
|
133
|
-
: "Organization"
|
|
134
|
-
}}
|
|
129
|
+
{{ user.isPersonalAccount || user.is_admin ? "Personal Account" : "Organization" }}
|
|
135
130
|
</p>
|
|
136
131
|
</div>
|
|
137
132
|
</div>
|
|
138
133
|
</a>
|
|
139
134
|
<transition-group name="list" tag="ul" class="list-items ac-scrollbar py-2">
|
|
140
135
|
<li key="settings" v-if="serverDomain !== locationOrigin || isDocsUi">
|
|
141
|
-
<a
|
|
136
|
+
<a
|
|
137
|
+
v-if="user.isPersonalAccount"
|
|
138
|
+
data-testid="user-settings-link"
|
|
139
|
+
:href="`${serverDomain}/user/settings/`"
|
|
140
|
+
>
|
|
142
141
|
<span class="icon">
|
|
143
142
|
<HeroiconsCog6Tooth />
|
|
144
143
|
</span>
|
|
145
144
|
<span>Settings</span>
|
|
146
145
|
</a>
|
|
147
146
|
<a v-else data-testid="user-settings-link" :href="`${serverDomain}/${user.username}/settings`">
|
|
148
|
-
<span class="icon">
|
|
149
|
-
<HeroiconsCog6Tooth />
|
|
150
|
-
</span><span>Settings</span>
|
|
147
|
+
<span class="icon"> <HeroiconsCog6Tooth /> </span><span>Settings</span>
|
|
151
148
|
</a>
|
|
152
149
|
</li>
|
|
153
150
|
<li key="settings-platform" v-else>
|
|
@@ -158,63 +155,63 @@ watch(dropDownStatus, (n) => {
|
|
|
158
155
|
<span>Settings</span>
|
|
159
156
|
</NuxtLink>
|
|
160
157
|
<NuxtLink v-else data-testid="user-settings-link" :to="`/${user.username}/settings`">
|
|
161
|
-
<span class="icon">
|
|
162
|
-
<HeroiconsCog6Tooth />
|
|
163
|
-
</span><span>Settings</span>
|
|
158
|
+
<span class="icon"> <HeroiconsCog6Tooth /> </span><span>Settings</span>
|
|
164
159
|
</NuxtLink>
|
|
165
160
|
</li>
|
|
166
161
|
|
|
167
162
|
<li v-if="showAccountSwitcher" :class="`is-${dropDownStatus}`" key="switcher">
|
|
168
|
-
<a
|
|
169
|
-
|
|
163
|
+
<a
|
|
164
|
+
class="ac-dropdown-button is-fullwidth is-flex is-justify-content-space-between is-align-items-center"
|
|
165
|
+
@click="toggleList()"
|
|
166
|
+
>
|
|
170
167
|
<div class="is-flex gap-8">
|
|
171
|
-
<span class="icon">
|
|
172
|
-
<HeroiconsUserGroup />
|
|
173
|
-
</span><span>Switch Account</span>
|
|
168
|
+
<span class="icon"> <HeroiconsUserGroup /> </span><span>Switch Account</span>
|
|
174
169
|
</div>
|
|
175
|
-
<span><i :class="`fa fa-angle-${dropDownStatus === 'open' ? 'up' : 'down'
|
|
176
|
-
}`"></i></span>
|
|
170
|
+
<span><i :class="`fa fa-angle-${dropDownStatus === 'open' ? 'up' : 'down'}`"></i></span>
|
|
177
171
|
</a>
|
|
178
|
-
<transition-group
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
<
|
|
186
|
-
<
|
|
187
|
-
<
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
: "
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
172
|
+
<transition-group
|
|
173
|
+
name="list"
|
|
174
|
+
tag="ul"
|
|
175
|
+
class="ac-vscrollbar"
|
|
176
|
+
ref="dropdownItems"
|
|
177
|
+
:style="{ maxHeight: dropDownSectionHeight }"
|
|
178
|
+
>
|
|
179
|
+
<li v-for="(org, idx) in formattedOrganizations" :key="org.username">
|
|
180
|
+
<a class="is-flex is-align-items-center" @click="onOrganizationClick(org.username)">
|
|
181
|
+
<div class="width-30 height-30 image">
|
|
182
|
+
<img :src="org.avatar_url" class="ac-user-profile is-rounded" alt="icon" />
|
|
183
|
+
</div>
|
|
184
|
+
<div class="is-flex is-align-items-center is-justify-content-space-between is-fullwidth ml-10">
|
|
185
|
+
<div class="org-info">
|
|
186
|
+
<strong :title="org.username" class="line-break-anywhere is-ellipsis-1">{{
|
|
187
|
+
org.username
|
|
188
|
+
}}</strong>
|
|
189
|
+
<p>
|
|
190
|
+
{{ org.isPersonalAccount ? "Personal Account" : "Organization" }}
|
|
191
|
+
</p>
|
|
192
|
+
</div>
|
|
193
|
+
<span v-if="idx === 0" class="material-icons font-size-18 ml-10 is-pulled-right">
|
|
194
|
+
<HeroiconsCheck />
|
|
195
|
+
</span>
|
|
196
|
+
</div>
|
|
197
|
+
</a>
|
|
198
|
+
</li>
|
|
199
|
+
</transition-group>
|
|
200
|
+
</li>
|
|
201
|
+
<li v-if="isLoggedinUserAdmin || user.is_admin" key="site-admin">
|
|
202
|
+
<a data-testid="site-admin-link" :href="`${accountsDomain}/admin`"
|
|
203
|
+
><span class="icon"> <HeroiconsWrenchScrewdriver /> </span><span>Site Administration</span></a
|
|
204
|
+
>
|
|
205
|
+
</li>
|
|
206
|
+
<li key="signout" @click="$emit('on-logout')">
|
|
207
|
+
<a data-testid="user-logout-link" :href="`${accountsDomain}/user/logout`">
|
|
208
|
+
<span class="icon">
|
|
209
|
+
<HeroiconsPower />
|
|
210
|
+
</span>
|
|
211
|
+
<span>Sign out</span>
|
|
200
212
|
</a>
|
|
201
213
|
</li>
|
|
202
|
-
|
|
203
|
-
</li>
|
|
204
|
-
<li v-if="isLoggedinUserAdmin || user.is_admin" key="site-admin">
|
|
205
|
-
<a data-testid="site-admin-link" :href="`${accountsDomain}/admin`"><span class="icon">
|
|
206
|
-
<HeroiconsWrenchScrewdriver />
|
|
207
|
-
</span><span>Site Administration</span></a>
|
|
208
|
-
</li>
|
|
209
|
-
<li key="signout" @click="$emit('on-logout')">
|
|
210
|
-
<a data-testid="user-logout-link" :href="`${accountsDomain}/user/logout`">
|
|
211
|
-
<span class="icon">
|
|
212
|
-
<HeroiconsPower />
|
|
213
|
-
</span>
|
|
214
|
-
<span>Sign out</span>
|
|
215
|
-
</a>
|
|
216
|
-
</li>
|
|
217
|
-
<!-- <li key="theme" v-if="showThemeMode">
|
|
214
|
+
<!-- <li key="theme" v-if="showThemeMode">
|
|
218
215
|
<theme-mode @set:theme="setTheme" />
|
|
219
216
|
</li> -->
|
|
220
217
|
</transition-group>
|
|
@@ -45,13 +45,9 @@ const getSanitizedHtml = (content: string) => {
|
|
|
45
45
|
<template>
|
|
46
46
|
<!-- alert-message area start -->
|
|
47
47
|
<!-- plsease, use this class name ('.is-info' 'is-success', 'is-danger', 'is-warning') -->
|
|
48
|
-
<div
|
|
49
|
-
class="ac-notification is-${notificationType} mb-15"
|
|
50
|
-
:class="backgroundColor"
|
|
51
|
-
>
|
|
48
|
+
<div class="ac-notification is-${notificationType} mb-15" :class="backgroundColor">
|
|
52
49
|
<p>
|
|
53
|
-
<i v-if="!hideIcon" :class="`fa ${iconClass} mr-5`"></i
|
|
54
|
-
><span v-html="getSanitizedHtml(content)"></span>
|
|
50
|
+
<i v-if="!hideIcon" :class="`fa ${iconClass} mr-5`"></i><span v-html="getSanitizedHtml(content)"></span>
|
|
55
51
|
<ac-button
|
|
56
52
|
v-if="actionButton?.show"
|
|
57
53
|
:title="actionButton?.title"
|
|
@@ -97,12 +93,7 @@ const getSanitizedHtml = (content: string) => {
|
|
|
97
93
|
color: $ac-primary;
|
|
98
94
|
|
|
99
95
|
&:hover {
|
|
100
|
-
color: hsla(
|
|
101
|
-
var(--hsl-hue),
|
|
102
|
-
var(--hsl-saturation),
|
|
103
|
-
calc(var(--hsl-lightness) - 10%),
|
|
104
|
-
1
|
|
105
|
-
);
|
|
96
|
+
color: hsla(var(--hsl-hue), var(--hsl-saturation), calc(var(--hsl-lightness) - 10%), 1);
|
|
106
97
|
}
|
|
107
98
|
}
|
|
108
99
|
}
|
|
@@ -144,12 +135,7 @@ const getSanitizedHtml = (content: string) => {
|
|
|
144
135
|
}
|
|
145
136
|
}
|
|
146
137
|
@mixin acPrimaryNotification() {
|
|
147
|
-
background-color: hsla(
|
|
148
|
-
var(--hsl-hue),
|
|
149
|
-
var(--hsl-saturation),
|
|
150
|
-
var(--hsl-lightness),
|
|
151
|
-
0.2
|
|
152
|
-
);
|
|
138
|
+
background-color: hsla(var(--hsl-hue), var(--hsl-saturation), var(--hsl-lightness), 0.2);
|
|
153
139
|
color: $white-100;
|
|
154
140
|
border-color: $ac-primary;
|
|
155
141
|
|
|
@@ -226,7 +212,7 @@ AC Toast
|
|
|
226
212
|
padding: 0 15px;
|
|
227
213
|
|
|
228
214
|
&:hover {
|
|
229
|
-
color: $
|
|
215
|
+
color: $gray-70;
|
|
230
216
|
}
|
|
231
217
|
}
|
|
232
218
|
|
|
@@ -282,7 +268,7 @@ AC Toast
|
|
|
282
268
|
// dark theme start
|
|
283
269
|
// .is-dark-theme {
|
|
284
270
|
// .ac-notification.is-danger {
|
|
285
|
-
// background-color: $
|
|
271
|
+
// background-color: $gray-80;
|
|
286
272
|
// }
|
|
287
273
|
// }
|
|
288
274
|
</style>
|
|
@@ -1,26 +1,16 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { StringCodec } from "nats.ws";
|
|
3
3
|
import type { NatsConnection, Subscription } from "nats.ws";
|
|
4
|
-
import {
|
|
5
|
-
computed,
|
|
6
|
-
defineAsyncComponent,
|
|
7
|
-
getCurrentInstance,
|
|
8
|
-
ref,
|
|
9
|
-
watch,
|
|
10
|
-
} from "vue";
|
|
4
|
+
import { computed, defineAsyncComponent, getCurrentInstance, ref, watch } from "vue";
|
|
11
5
|
import type { Ref } from "vue";
|
|
12
6
|
// import type { TaskLog } from "../../types/longRunningTasks";
|
|
13
7
|
import type { Notification } from "../../types/notification";
|
|
14
8
|
|
|
15
|
-
const NotificationItem = defineAsyncComponent(
|
|
16
|
-
() => import("./NotificationItem.vue")
|
|
17
|
-
);
|
|
9
|
+
const NotificationItem = defineAsyncComponent(() => import("./NotificationItem.vue"));
|
|
18
10
|
|
|
19
11
|
const notifications: Ref<Notification[]> = ref([]);
|
|
20
12
|
const notificationsRead = ref(0);
|
|
21
|
-
const unreadCount = computed(
|
|
22
|
-
() => notifications.value.length - notificationsRead.value
|
|
23
|
-
);
|
|
13
|
+
const unreadCount = computed(() => notifications.value.length - notificationsRead.value);
|
|
24
14
|
|
|
25
15
|
const notificationPanelOpen = ref(false);
|
|
26
16
|
watch(notificationPanelOpen, (n) => {
|
|
@@ -66,17 +56,10 @@ subscribeToNotifcations();
|
|
|
66
56
|
</script>
|
|
67
57
|
|
|
68
58
|
<template>
|
|
69
|
-
<div
|
|
70
|
-
@mouseenter="notificationPanelOpen = true"
|
|
71
|
-
@mouseleave="notificationPanelOpen = false"
|
|
72
|
-
>
|
|
59
|
+
<div @mouseenter="notificationPanelOpen = true" @mouseleave="notificationPanelOpen = false">
|
|
73
60
|
<button class="button ac-nav-button">
|
|
74
61
|
<span v-if="unreadCount">{{ unreadCount }}</span>
|
|
75
|
-
<i
|
|
76
|
-
class="fa fa-bell"
|
|
77
|
-
:class="{ 'ac-shake': unreadCount }"
|
|
78
|
-
aria-hidden="true"
|
|
79
|
-
></i>
|
|
62
|
+
<i class="fa fa-bell" :class="{ 'ac-shake': unreadCount }" aria-hidden="true"></i>
|
|
80
63
|
</button>
|
|
81
64
|
<div class="ac-menu-content is-notification">
|
|
82
65
|
<div class="notification-header">
|
|
@@ -95,9 +78,7 @@ subscribeToNotifcations();
|
|
|
95
78
|
:notification="notification"
|
|
96
79
|
/>
|
|
97
80
|
</transition-group>
|
|
98
|
-
<span v-else class="single-notification-item"
|
|
99
|
-
>No new notifications</span
|
|
100
|
-
>
|
|
81
|
+
<span v-else class="single-notification-item">No new notifications</span>
|
|
101
82
|
</div>
|
|
102
83
|
</div>
|
|
103
84
|
</div>
|
|
@@ -16,9 +16,7 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
16
16
|
});
|
|
17
17
|
|
|
18
18
|
const getDayDifferences = (options: { past: number }) => {
|
|
19
|
-
const past = moment(options.past).isValid()
|
|
20
|
-
? moment(options.past).valueOf() / 1000
|
|
21
|
-
: options.past;
|
|
19
|
+
const past = moment(options.past).isValid() ? moment(options.past).valueOf() / 1000 : options.past;
|
|
22
20
|
const now = Date.now() / 1000;
|
|
23
21
|
const diff = now - past;
|
|
24
22
|
if (options.past > 10) {
|
|
@@ -44,9 +42,7 @@ const getDayDifferences = (options: { past: number }) => {
|
|
|
44
42
|
};
|
|
45
43
|
|
|
46
44
|
const { notification } = toRefs(props);
|
|
47
|
-
const notificationTime = computed(() =>
|
|
48
|
-
getDayDifferences({ past: notification?.value?.time || 0 })
|
|
49
|
-
);
|
|
45
|
+
const notificationTime = computed(() => getDayDifferences({ past: notification?.value?.time || 0 }));
|
|
50
46
|
</script>
|
|
51
47
|
|
|
52
48
|
<template>
|
|
@@ -59,9 +55,7 @@ const notificationTime = computed(() =>
|
|
|
59
55
|
:class="{
|
|
60
56
|
'is-success': notification.status === 'Success',
|
|
61
57
|
'has-text-danger': notification.status === 'Failed',
|
|
62
|
-
'is-info':
|
|
63
|
-
notification.status === 'Started' ||
|
|
64
|
-
notification.status === 'Running',
|
|
58
|
+
'is-info': notification.status === 'Started' || notification.status === 'Running',
|
|
65
59
|
'is-warning': notification.status === 'Pending',
|
|
66
60
|
}"
|
|
67
61
|
>
|
|
@@ -66,10 +66,7 @@ const pages = computed(() => {
|
|
|
66
66
|
|
|
67
67
|
const itemsRange = computed(() => {
|
|
68
68
|
let start = (activePageNo.value - 1) * selectedItemCountPerPage.value;
|
|
69
|
-
let end = Math.min(
|
|
70
|
-
activePageNo.value * selectedItemCountPerPage.value,
|
|
71
|
-
props.totalNoOfItems
|
|
72
|
-
);
|
|
69
|
+
let end = Math.min(activePageNo.value * selectedItemCountPerPage.value, props.totalNoOfItems);
|
|
73
70
|
|
|
74
71
|
return { start, end };
|
|
75
72
|
});
|
|
@@ -105,16 +102,9 @@ watch(
|
|
|
105
102
|
<template>
|
|
106
103
|
<div class="level inner-table-pagination" v-show="showPagination">
|
|
107
104
|
<div class="pagination-filter level-left">
|
|
108
|
-
<div
|
|
109
|
-
class="level-item"
|
|
110
|
-
v-show="!hideRowsPerPageSelection && totalNoOfItems > itemsPerPage"
|
|
111
|
-
>
|
|
105
|
+
<div class="level-item" v-show="!hideRowsPerPageSelection && totalNoOfItems > itemsPerPage">
|
|
112
106
|
<label>Rows per page</label>
|
|
113
|
-
<select
|
|
114
|
-
v-model="selectedItemCountPerPage"
|
|
115
|
-
name="page"
|
|
116
|
-
data-testid="rows-per-page-selector"
|
|
117
|
-
>
|
|
107
|
+
<select v-model="selectedItemCountPerPage" name="page" data-testid="rows-per-page-selector">
|
|
118
108
|
<option :value="5">5</option>
|
|
119
109
|
<option :value="10" v-show="totalNoOfItems > 5">10</option>
|
|
120
110
|
<option :value="15" v-show="totalNoOfItems > 10">15</option>
|
|
@@ -136,11 +126,7 @@ watch(
|
|
|
136
126
|
|
|
137
127
|
<ul v-if="totalNoOfItems > selectedItemCountPerPage">
|
|
138
128
|
<li>
|
|
139
|
-
<a
|
|
140
|
-
class="previous"
|
|
141
|
-
@click.prevent="prevPage()"
|
|
142
|
-
data-testid="pagination-previous-page-button"
|
|
143
|
-
>
|
|
129
|
+
<a class="previous" @click.prevent="prevPage()" data-testid="pagination-previous-page-button">
|
|
144
130
|
<i class="fa fa-angle-left" aria-hidden="true"></i>
|
|
145
131
|
</a>
|
|
146
132
|
</li>
|
|
@@ -153,11 +139,7 @@ watch(
|
|
|
153
139
|
>
|
|
154
140
|
</li>
|
|
155
141
|
<li>
|
|
156
|
-
<a
|
|
157
|
-
class="next"
|
|
158
|
-
@click.prevent="nextPage()"
|
|
159
|
-
data-testid="pagination-next-page-button"
|
|
160
|
-
>
|
|
142
|
+
<a class="next" @click.prevent="nextPage()" data-testid="pagination-next-page-button">
|
|
161
143
|
<i class="fa fa-angle-right" aria-hidden="true"></i>
|
|
162
144
|
</a>
|
|
163
145
|
</li>
|
|
@@ -269,7 +251,7 @@ watch(
|
|
|
269
251
|
// }
|
|
270
252
|
|
|
271
253
|
// label {
|
|
272
|
-
// color: $
|
|
254
|
+
// color: $gray-40;
|
|
273
255
|
// padding-right: 5px;
|
|
274
256
|
// display: inline-block;
|
|
275
257
|
// font-size: 13px;
|
|
@@ -279,7 +261,7 @@ watch(
|
|
|
279
261
|
// .is-dark-theme {
|
|
280
262
|
// .pagination-filter {
|
|
281
263
|
// label {
|
|
282
|
-
// $
|
|
264
|
+
// $gray-40: $primary-20;
|
|
283
265
|
// }
|
|
284
266
|
// }
|
|
285
267
|
// }
|