@appscode/design-system 1.0.43-alpha.9 → 1.0.43-alpha.93
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/base/utilities/_default.scss +281 -20
- package/base/utilities/_derived-variables.scss +0 -13
- package/base/utilities/_initial-variables.scss +78 -56
- package/base/utilities/_mixin.scss +10 -17
- package/base/utilities/_typography.scss +23 -7
- package/base/utilities/dark-theme.scss +25 -0
- package/components/_ac-accordion.scss +1 -0
- package/components/_ac-alert-box.scss +18 -10
- package/components/_ac-card.scss +55 -20
- package/components/_ac-code-highlight.scss +7 -1
- package/components/_ac-content-layout.scss +4 -4
- package/components/_ac-drag.scss +6 -6
- package/components/_ac-input.scss +80 -39
- package/components/_ac-modal.scss +5 -4
- package/components/_ac-multi-select.scss +196 -14
- package/components/_ac-options.scss +30 -16
- package/components/_ac-select-box.scss +15 -5
- package/components/_ac-table.scss +42 -33
- package/components/_ac-tabs.scss +72 -23
- package/components/_ac-tags.scss +2 -2
- package/components/_ac-terminal.scss +248 -0
- package/components/_app-drawer.scss +6 -6
- package/components/_breadcumb.scss +7 -2
- package/components/_buttons.scss +56 -27
- package/components/_card-body-wrapper.scss +3 -3
- package/components/_dashboard-header.scss +1 -1
- package/components/_direct-deploy.scss +69 -0
- package/components/_go-to-top.scss +1 -1
- package/components/_graph.scss +45 -0
- package/components/_image-upload.scss +6 -4
- package/components/_left-sidebar-menu.scss +200 -46
- package/components/_monaco-editor.scss +1 -1
- package/components/_navbar.scss +103 -26
- package/components/_overview-info.scss +4 -4
- package/components/_overview-page.scss +1 -2
- package/components/_pagination.scss +10 -2
- package/components/_payment-card.scss +28 -12
- package/components/_preview-modal.scss +8 -8
- package/components/_pricing-table.scss +1 -1
- package/components/_progress-bar.scss +5 -5
- package/components/_subscription-card.scss +15 -8
- package/components/_table-of-content.scss +1 -1
- package/components/_tfa.scss +69 -0
- package/components/_widget-menu.scss +9 -9
- package/components/_wizard.scss +32 -20
- package/components/ac-toaster/_ac-toasted.scss +5 -5
- package/components/bbum/_card-team.scss +18 -10
- package/components/bbum/_information-center.scss +19 -5
- package/components/bbum/_mobile-desktop.scss +6 -6
- package/components/bbum/_post.scss +5 -4
- package/components/bbum/_sign-up-notification.scss +6 -6
- package/components/bbum/_single-post-preview.scss +9 -9
- package/components/bbum/_user-profile.scss +97 -90
- package/components/ui-builder/_ui-builder.scss +29 -10
- package/components/ui-builder/_vue-open-api.scss +98 -0
- package/layouts/_404.scss +2 -1
- package/layouts/_code-preview.scss +14 -7
- package/main.scss +4 -0
- package/package.json +2 -7
- package/plugins/theme.js +142 -0
- package/vue-components/v2/card/PaymentCards.vue +11 -2
- package/vue-components/v2/editor/Editor.vue +37 -17
- package/vue-components/v2/modal/Modal.vue +10 -1
- package/vue-components/v2/navbar/Appdrawer.vue +10 -9
- package/vue-components/v2/navbar/ThemeMode.vue +120 -0
- package/vue-components/v2/preloader/Preloader.vue +5 -5
- package/vue-components/v2/sidebar/ClusterSwitcher.vue +126 -0
- package/vue-components/v2/sidebar/SidebarItem.vue +23 -1
- package/vue-components/v2/table/TableRow.vue +1 -1
- package/vue-components/v2/table/table-cell/CellValue.vue +10 -1
- package/vue-components/v2/tabs/EditorTabs.vue +1 -1
- package/vue-components/v3/dropdown/DropdownMenu.vue +1 -1
- package/vue-components/v3/editor/Editor.vue +39 -19
- package/vue-components/v3/modal/Modal.vue +10 -1
- package/vue-components/v3/navbar/Appdrawer.vue +12 -7
- package/vue-components/v3/navbar/ThemeMode.vue +128 -0
- package/vue-components/v3/sidebar/ClusterSwitcher.vue +133 -0
- package/vue-components/v3/table/TableRow.vue +1 -1
- package/vue-components/v3/table/table-cell/CellValue.vue +9 -0
- package/vue-components/v3/tabs/EditorTabs.vue +1 -1
|
@@ -16,10 +16,12 @@
|
|
|
16
16
|
:language="language"
|
|
17
17
|
:options="{
|
|
18
18
|
minimap: {
|
|
19
|
-
enabled: calcShowMinimap
|
|
19
|
+
enabled: calcShowMinimap
|
|
20
20
|
},
|
|
21
|
+
theme: theme,
|
|
21
22
|
readOnly: readOnly,
|
|
22
|
-
|
|
23
|
+
wordWrap: wordWrap,
|
|
24
|
+
scrollBeyondLastLine: false
|
|
23
25
|
}"
|
|
24
26
|
/>
|
|
25
27
|
<monaco-editor
|
|
@@ -30,10 +32,12 @@
|
|
|
30
32
|
:language="language"
|
|
31
33
|
:options="{
|
|
32
34
|
minimap: {
|
|
33
|
-
enabled: calcShowMinimap
|
|
35
|
+
enabled: calcShowMinimap
|
|
34
36
|
},
|
|
37
|
+
theme: theme,
|
|
35
38
|
readOnly: true,
|
|
36
|
-
|
|
39
|
+
wordWrap: wordWrap,
|
|
40
|
+
scrollBeyondLastLine: false
|
|
37
41
|
}"
|
|
38
42
|
:original="originalEditorContent"
|
|
39
43
|
:diff-editor="true"
|
|
@@ -47,27 +51,35 @@ export default defineComponent({
|
|
|
47
51
|
props: {
|
|
48
52
|
value: {
|
|
49
53
|
type: String,
|
|
50
|
-
default: ""
|
|
54
|
+
default: ""
|
|
51
55
|
},
|
|
52
56
|
originalValue: {
|
|
53
57
|
type: String,
|
|
54
|
-
default: ""
|
|
58
|
+
default: ""
|
|
55
59
|
},
|
|
56
60
|
readOnly: {
|
|
57
61
|
type: Boolean,
|
|
58
|
-
default: false
|
|
62
|
+
default: false
|
|
59
63
|
},
|
|
60
64
|
language: {
|
|
61
65
|
type: String,
|
|
62
|
-
default: "yaml"
|
|
66
|
+
default: "yaml"
|
|
63
67
|
},
|
|
64
68
|
showMinimap: {
|
|
65
69
|
type: Boolean,
|
|
66
|
-
default: true
|
|
70
|
+
default: true
|
|
67
71
|
},
|
|
68
72
|
editorHeight: {
|
|
69
73
|
type: Number,
|
|
70
|
-
default: 40
|
|
74
|
+
default: 40
|
|
75
|
+
},
|
|
76
|
+
editorTheme: {
|
|
77
|
+
type: String,
|
|
78
|
+
default: ""
|
|
79
|
+
},
|
|
80
|
+
wordWrap: {
|
|
81
|
+
type: String,
|
|
82
|
+
default: "off"
|
|
71
83
|
},
|
|
72
84
|
},
|
|
73
85
|
|
|
@@ -75,23 +87,23 @@ export default defineComponent({
|
|
|
75
87
|
|
|
76
88
|
components: {
|
|
77
89
|
EditorTabs: defineAsyncComponent(() =>
|
|
78
|
-
import("../tabs/EditorTabs.vue").then(
|
|
90
|
+
import("../tabs/EditorTabs.vue").then(module => module.default)
|
|
79
91
|
),
|
|
80
92
|
MonacoEditor: defineAsyncComponent(() =>
|
|
81
93
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
82
94
|
// @ts-ignore
|
|
83
|
-
import("vue-monaco").then(
|
|
95
|
+
import("vue-monaco").then(module => {
|
|
84
96
|
module.default.render = () => h("div");
|
|
85
97
|
return module.default;
|
|
86
98
|
})
|
|
87
|
-
)
|
|
99
|
+
)
|
|
88
100
|
},
|
|
89
101
|
|
|
90
102
|
data() {
|
|
91
103
|
return {
|
|
92
104
|
activeTab: "edit",
|
|
93
105
|
editorContent: "",
|
|
94
|
-
originalEditorContent: ""
|
|
106
|
+
originalEditorContent: ""
|
|
95
107
|
};
|
|
96
108
|
},
|
|
97
109
|
|
|
@@ -100,6 +112,14 @@ export default defineComponent({
|
|
|
100
112
|
const noOfLines = this.editorContent.split("\n").length;
|
|
101
113
|
return this.showMinimap && noOfLines * 2 > this.editorHeight;
|
|
102
114
|
},
|
|
115
|
+
theme() {
|
|
116
|
+
return (
|
|
117
|
+
this.editorTheme ||
|
|
118
|
+
(document.documentElement.classList.contains("is-dark-theme")
|
|
119
|
+
? "vs-dark"
|
|
120
|
+
: "vs")
|
|
121
|
+
);
|
|
122
|
+
}
|
|
103
123
|
},
|
|
104
124
|
|
|
105
125
|
watch: {
|
|
@@ -109,7 +129,7 @@ export default defineComponent({
|
|
|
109
129
|
if (this.editorContent !== n) {
|
|
110
130
|
this.editorContent = n;
|
|
111
131
|
}
|
|
112
|
-
}
|
|
132
|
+
}
|
|
113
133
|
},
|
|
114
134
|
originalValue: {
|
|
115
135
|
immediate: true,
|
|
@@ -117,8 +137,8 @@ export default defineComponent({
|
|
|
117
137
|
if (this.originalEditorContent !== n) {
|
|
118
138
|
this.originalEditorContent = n;
|
|
119
139
|
}
|
|
120
|
-
}
|
|
121
|
-
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
122
142
|
},
|
|
123
143
|
|
|
124
144
|
methods: {
|
|
@@ -131,7 +151,7 @@ export default defineComponent({
|
|
|
131
151
|
editor.onDidBlurEditorText(() => {
|
|
132
152
|
this.$emit("update:modelValue", this.editorContent);
|
|
133
153
|
});
|
|
134
|
-
}
|
|
135
|
-
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
136
156
|
});
|
|
137
157
|
</script>
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
<header-item>
|
|
18
18
|
<ac-button
|
|
19
19
|
modifier-classes="is-square is-transparent"
|
|
20
|
+
:disabled="isCloseOptionDisabled"
|
|
20
21
|
:icon-image="crossIcon"
|
|
21
22
|
@click.stop="destroyModal"
|
|
22
23
|
/>
|
|
@@ -36,7 +37,10 @@
|
|
|
36
37
|
<!-- modal body end -->
|
|
37
38
|
|
|
38
39
|
<!-- modal footer start -->
|
|
39
|
-
<div class="ac-modal-footer action-footer">
|
|
40
|
+
<div class="ac-modal-footer action-footer is-flex is-align-items-center is-justify-content-space-between">
|
|
41
|
+
<div>
|
|
42
|
+
<slot name="modal-footer-left" />
|
|
43
|
+
</div>
|
|
40
44
|
<buttons class="has-text-right is-block">
|
|
41
45
|
<slot name="modal-footer-controls" />
|
|
42
46
|
</buttons>
|
|
@@ -64,6 +68,10 @@ export default defineComponent({
|
|
|
64
68
|
type: String,
|
|
65
69
|
default: "",
|
|
66
70
|
},
|
|
71
|
+
isCloseOptionDisabled: {
|
|
72
|
+
type: Boolean,
|
|
73
|
+
default: false,
|
|
74
|
+
}
|
|
67
75
|
},
|
|
68
76
|
emits: ["closemodal"],
|
|
69
77
|
|
|
@@ -116,6 +124,7 @@ export default defineComponent({
|
|
|
116
124
|
document.addEventListener("keydown", this.onKeyDown);
|
|
117
125
|
},
|
|
118
126
|
destroyModal() {
|
|
127
|
+
if (this.isCloseOptionDisabled) return;
|
|
119
128
|
this.showModal = false;
|
|
120
129
|
document.removeEventListener("keydown", this.onKeyDown);
|
|
121
130
|
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="app-drawer-wrapper">
|
|
3
|
-
<div
|
|
2
|
+
<div class="app-drawer-wrapper is-flex">
|
|
3
|
+
<div
|
|
4
|
+
class="drawer-icon is-flex is-justify-content-center is-align-items-center"
|
|
5
|
+
>
|
|
4
6
|
<svg
|
|
5
7
|
class="gb_We"
|
|
6
8
|
focusable="false"
|
|
7
9
|
viewBox="0 0 24 24"
|
|
10
|
+
style="width: 22px;margin-top: 2px;"
|
|
8
11
|
:style="{ fill: 'white' }"
|
|
9
12
|
>
|
|
10
13
|
<path
|
|
@@ -46,13 +49,15 @@ export default defineComponent({
|
|
|
46
49
|
props: {
|
|
47
50
|
apps: {
|
|
48
51
|
type: Array,
|
|
49
|
-
default: () => []
|
|
50
|
-
}
|
|
52
|
+
default: () => []
|
|
53
|
+
}
|
|
51
54
|
},
|
|
52
55
|
components: {
|
|
53
56
|
NavbarItemContent: defineAsyncComponent(() =>
|
|
54
|
-
import("../../v2/navbar/NavbarItemContent.vue").then(
|
|
55
|
-
|
|
56
|
-
|
|
57
|
+
import("../../v2/navbar/NavbarItemContent.vue").then(
|
|
58
|
+
module => module.default
|
|
59
|
+
)
|
|
60
|
+
)
|
|
61
|
+
}
|
|
57
62
|
});
|
|
58
63
|
</script>
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<button
|
|
4
|
+
v-if="themeMode"
|
|
5
|
+
class="button ac-nav-button"
|
|
6
|
+
@click="toggleTheme"
|
|
7
|
+
:title="themeModes[themeMode].displayName"
|
|
8
|
+
>
|
|
9
|
+
<i :class="`fa ${themeModes[themeMode].iconClass} width-15`" />
|
|
10
|
+
</button>
|
|
11
|
+
<div class="ac-menu-content theme-choice">
|
|
12
|
+
<ul class="is-flex is-flex-direction-row is-justify-content-space-around">
|
|
13
|
+
<li
|
|
14
|
+
v-for="theme of Object.keys(themeModes)"
|
|
15
|
+
:title="themeModes[theme].displayName"
|
|
16
|
+
@click="themeMode = theme"
|
|
17
|
+
:class="{'is-active': themeMode === theme}"
|
|
18
|
+
:key="theme"
|
|
19
|
+
>
|
|
20
|
+
<i :class="['fa', themeModes[theme].iconClass]" />
|
|
21
|
+
</li>
|
|
22
|
+
</ul>
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
25
|
+
</template>
|
|
26
|
+
<script>
|
|
27
|
+
import { defineComponent } from "vue";
|
|
28
|
+
|
|
29
|
+
export default defineComponent({
|
|
30
|
+
data() {
|
|
31
|
+
return {
|
|
32
|
+
themeMode: "",
|
|
33
|
+
themeModes: {
|
|
34
|
+
system: {
|
|
35
|
+
displayName: "System Theme",
|
|
36
|
+
iconClass: "fa-desktop",
|
|
37
|
+
},
|
|
38
|
+
light: {
|
|
39
|
+
displayName: "Light Theme",
|
|
40
|
+
iconClass: "fa-sun-o",
|
|
41
|
+
},
|
|
42
|
+
dark: {
|
|
43
|
+
displayName: "Dark Theme",
|
|
44
|
+
iconClass: "fa-moon-o",
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
},
|
|
49
|
+
|
|
50
|
+
emits: ['set:theme'],
|
|
51
|
+
|
|
52
|
+
mounted() {
|
|
53
|
+
// get theme mode from localStorage or set default one
|
|
54
|
+
this.themeMode = localStorage.getItem("themeMode") || "light";
|
|
55
|
+
},
|
|
56
|
+
|
|
57
|
+
destroyed() {
|
|
58
|
+
this.removeColorSchemeEventListener();
|
|
59
|
+
},
|
|
60
|
+
|
|
61
|
+
watch: {
|
|
62
|
+
themeMode: {
|
|
63
|
+
handler(n) {
|
|
64
|
+
this.onThemeModeChange(n);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
|
|
69
|
+
methods: {
|
|
70
|
+
// handle theme mode button click
|
|
71
|
+
toggleTheme() {
|
|
72
|
+
if(this.themeMode === "light")
|
|
73
|
+
this.themeMode = "dark";
|
|
74
|
+
else if(this.themeMode === "dark")
|
|
75
|
+
this.themeMode = "system";
|
|
76
|
+
else if(this.themeMode === "system")
|
|
77
|
+
this.themeMode = "light";
|
|
78
|
+
},
|
|
79
|
+
|
|
80
|
+
// triggered when theme mode is updated
|
|
81
|
+
onThemeModeChange(n) {
|
|
82
|
+
localStorage.setItem("themeMode", n);
|
|
83
|
+
|
|
84
|
+
let theme = n;
|
|
85
|
+
if(n === "system") {
|
|
86
|
+
const isDarkMode = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches;
|
|
87
|
+
this.addColorSchemeEventListener();
|
|
88
|
+
theme = isDarkMode ? "dark" : "light";
|
|
89
|
+
} else {
|
|
90
|
+
this.removeColorSchemeEventListener();
|
|
91
|
+
}
|
|
92
|
+
this.$emit("set:theme", theme);
|
|
93
|
+
this.handleDarkThemeClass(theme);
|
|
94
|
+
},
|
|
95
|
+
|
|
96
|
+
// add proper css class to update the ui theme
|
|
97
|
+
handleDarkThemeClass(currentTheme) {
|
|
98
|
+
if(currentTheme === "light") {
|
|
99
|
+
document.documentElement.classList.remove("is-dark-theme");
|
|
100
|
+
} else {
|
|
101
|
+
document.documentElement.classList.add("is-dark-theme");
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
|
|
105
|
+
// add system theme listener event
|
|
106
|
+
addColorSchemeEventListener() {
|
|
107
|
+
window
|
|
108
|
+
.matchMedia("(prefers-color-scheme: dark)")
|
|
109
|
+
.addEventListener(
|
|
110
|
+
"change", this.handleSystemThemeChange
|
|
111
|
+
);
|
|
112
|
+
},
|
|
113
|
+
|
|
114
|
+
// remove system theme listener event
|
|
115
|
+
removeColorSchemeEventListener() {
|
|
116
|
+
window
|
|
117
|
+
.matchMedia("(prefers-color-scheme: dark)")
|
|
118
|
+
.removeEventListener(
|
|
119
|
+
"change", this.handleSystemThemeChange
|
|
120
|
+
);
|
|
121
|
+
},
|
|
122
|
+
|
|
123
|
+
handleSystemThemeChange() {
|
|
124
|
+
this.onThemeModeChange(this.themeMode);
|
|
125
|
+
},
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
</script>
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div v-if="sidebarCollapsed" class="is-cluster-logo">
|
|
3
|
+
<img
|
|
4
|
+
width="40"
|
|
5
|
+
:src="getProviderIcon(selectedCluster && selectedCluster.provider)"
|
|
6
|
+
onerror="this.onerror=null;this.src='https://cdn.appscode.com/images/cloud-provider-icons/Generic.png';"
|
|
7
|
+
alt="provider-icon"
|
|
8
|
+
/>
|
|
9
|
+
</div>
|
|
10
|
+
<multiselect
|
|
11
|
+
v-else
|
|
12
|
+
v-model="selectedCluster"
|
|
13
|
+
placeholder="Selected Cluster"
|
|
14
|
+
label="name"
|
|
15
|
+
track-by="name"
|
|
16
|
+
:options="clusterOptions"
|
|
17
|
+
:allow-empty="false"
|
|
18
|
+
deselect-label=""
|
|
19
|
+
select-label=""
|
|
20
|
+
selected-label=""
|
|
21
|
+
>
|
|
22
|
+
<template #singleLabel="props">
|
|
23
|
+
<div class="is-flex is-align-items-center">
|
|
24
|
+
<img
|
|
25
|
+
:src="getProviderIcon(props.option.provider)"
|
|
26
|
+
onerror="this.onerror=null;this.src='https://cdn.appscode.com/images/cloud-provider-icons/Generic.png';"
|
|
27
|
+
alt="No cluster selected"
|
|
28
|
+
/><span
|
|
29
|
+
><span>{{ props.option.displayName }}</span></span
|
|
30
|
+
>
|
|
31
|
+
</div>
|
|
32
|
+
</template>
|
|
33
|
+
<template #option="props">
|
|
34
|
+
<div class="is-flex is-align-items-center">
|
|
35
|
+
<img
|
|
36
|
+
class="mr-15"
|
|
37
|
+
:src="getProviderIcon(props.option.provider)"
|
|
38
|
+
onerror="this.onerror=null;this.src='https://cdn.appscode.com/images/cloud-provider-icons/Generic.png';"
|
|
39
|
+
alt="No cluster selected"
|
|
40
|
+
/>
|
|
41
|
+
<div>
|
|
42
|
+
<p>{{ props.option.displayName }}</p>
|
|
43
|
+
<p class="location">{{ props.option.location }}</p>
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
</template>
|
|
47
|
+
</multiselect>
|
|
48
|
+
</template>
|
|
49
|
+
|
|
50
|
+
<script>
|
|
51
|
+
import { defineComponent, defineAsyncComponent } from 'vue'
|
|
52
|
+
export default defineComponent({
|
|
53
|
+
components: {
|
|
54
|
+
Multiselect: defineAsyncComponent(() =>
|
|
55
|
+
import('vue-multiselect').then((module) => module.default)
|
|
56
|
+
),
|
|
57
|
+
},
|
|
58
|
+
props: {
|
|
59
|
+
sidebarCollapsed: {
|
|
60
|
+
type: Boolean,
|
|
61
|
+
default: false,
|
|
62
|
+
},
|
|
63
|
+
mouseHover: {
|
|
64
|
+
type: Boolean,
|
|
65
|
+
default: false,
|
|
66
|
+
},
|
|
67
|
+
clusterOptions: {
|
|
68
|
+
type: Array,
|
|
69
|
+
default: () => [],
|
|
70
|
+
},
|
|
71
|
+
modelValue: {
|
|
72
|
+
type: String,
|
|
73
|
+
default: '',
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
|
|
77
|
+
emits: ['update:modelValue'],
|
|
78
|
+
|
|
79
|
+
data() {
|
|
80
|
+
return {
|
|
81
|
+
selectedCluster: null,
|
|
82
|
+
selectedClusterName: null,
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
|
|
86
|
+
watch: {
|
|
87
|
+
modelValue: {
|
|
88
|
+
immediate: true,
|
|
89
|
+
handler(n) {
|
|
90
|
+
this.selectedClusterName = n
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
selectedCluster: {
|
|
94
|
+
deep: true,
|
|
95
|
+
handler(n) {
|
|
96
|
+
if (this.selectedClusterName !== n.name) {
|
|
97
|
+
this.selectedClusterName = n.name
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
selectedClusterName(n) {
|
|
102
|
+
if (n !== this.selectedCluster.name) {
|
|
103
|
+
this.clusterOptions.forEach((item) => {
|
|
104
|
+
if (this.selectedClusterName === item.name) {
|
|
105
|
+
this.selectedCluster = item
|
|
106
|
+
}
|
|
107
|
+
})
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
this.$emit('update:modelValue', n)
|
|
111
|
+
},
|
|
112
|
+
clusterOptions: {
|
|
113
|
+
deep: true,
|
|
114
|
+
immediate: true,
|
|
115
|
+
async handler(list) {
|
|
116
|
+
if (list) {
|
|
117
|
+
list.forEach((item) => {
|
|
118
|
+
if (this.selectedClusterName === item.name) {
|
|
119
|
+
this.selectedCluster = item
|
|
120
|
+
}
|
|
121
|
+
})
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
|
+
|
|
127
|
+
methods: {
|
|
128
|
+
getProviderIcon(provider) {
|
|
129
|
+
return `https://cdn.appscode.com/images/cloud-provider-icons/${provider}.png`
|
|
130
|
+
},
|
|
131
|
+
},
|
|
132
|
+
})
|
|
133
|
+
</script>
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
:view-box="`0 0 ${computedCellWidth || 300} 10`"
|
|
5
5
|
:speed="2"
|
|
6
6
|
:key="computedCellWidth"
|
|
7
|
+
:primaryColor="primaryColor"
|
|
8
|
+
:secondaryColor="secondaryColor"
|
|
7
9
|
/>
|
|
8
10
|
</div>
|
|
9
11
|
<div v-else class="haha" ref="cellDiv">
|
|
@@ -29,6 +31,7 @@
|
|
|
29
31
|
|
|
30
32
|
<script>
|
|
31
33
|
import { defineComponent, defineAsyncComponent } from "vue";
|
|
34
|
+
import { loaderLightThemePrimaryColor, loaderDarkThemePrimaryColor, loaderLightThemeSecondaryColor, loaderDarkThemeSecondaryColor } from "@appscode/design-system/plugins/theme";
|
|
32
35
|
|
|
33
36
|
export default defineComponent({
|
|
34
37
|
props: {
|
|
@@ -67,6 +70,12 @@ export default defineComponent({
|
|
|
67
70
|
maxCharacterLength() {
|
|
68
71
|
return Math.ceil(this.computedCellWidth / 8);
|
|
69
72
|
},
|
|
73
|
+
primaryColor() {
|
|
74
|
+
return document.documentElement.classList.contains("is-dark-theme") ? loaderDarkThemePrimaryColor : loaderLightThemePrimaryColor;
|
|
75
|
+
},
|
|
76
|
+
secondaryColor() {
|
|
77
|
+
return document.documentElement.classList.contains("is-dark-theme") ? loaderDarkThemeSecondaryColor : loaderLightThemeSecondaryColor;
|
|
78
|
+
}
|
|
70
79
|
},
|
|
71
80
|
|
|
72
81
|
data() {
|