@appscode/design-system 2.6.14 → 2.6.16-alpha
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/vue-components/styles/components/_accordion.scss +1 -1
- package/vue-components/types/cluster.ts +8 -0
- package/vue-components/v3/form-fields/AcSelect.vue +4 -1
- package/vue-components/v3/sidebar/ClusterSwitcher.vue +15 -6
- package/vue-components/v3/sidebar/SidebarItem.vue +1 -1
package/package.json
CHANGED
|
@@ -26,6 +26,7 @@ interface Props {
|
|
|
26
26
|
openDirection?: "top" | "bottom";
|
|
27
27
|
groupLabel?: string;
|
|
28
28
|
groupValues?: string;
|
|
29
|
+
htmlErrorMsg?: boolean;
|
|
29
30
|
groupSelect?: boolean;
|
|
30
31
|
onTagAdd?: Function;
|
|
31
32
|
}
|
|
@@ -51,6 +52,7 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
51
52
|
groupLabel: "",
|
|
52
53
|
groupValues: "",
|
|
53
54
|
groupSelect: false,
|
|
55
|
+
htmlErrorMsg: false,
|
|
54
56
|
taggable: false,
|
|
55
57
|
tagPlaceholder: "",
|
|
56
58
|
onTagAdd: () => "",
|
|
@@ -170,7 +172,8 @@ const onSelect = (selectedOption: unknown, id: string) => emit("select", selecte
|
|
|
170
172
|
<slot name="option" v-bind="props" />
|
|
171
173
|
</template>
|
|
172
174
|
</multiselect>
|
|
173
|
-
<
|
|
175
|
+
<div v-if="htmlErrorMsg" class="invalid-error is-danger" v-html="errorMsg" />
|
|
176
|
+
<p v-else v-show="errorMsg" class="is-danger">
|
|
174
177
|
{{ errorMsg }}
|
|
175
178
|
</p>
|
|
176
179
|
</div>
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { defineAsyncComponent, ref, watch } from "vue";
|
|
3
|
-
import type {
|
|
3
|
+
import type { SwitchCluster } from "../../types/cluster";
|
|
4
|
+
import Badge from "../badge-tags/Badge.vue";
|
|
4
5
|
|
|
5
6
|
const Multiselect = defineAsyncComponent(() => import("vue-multiselect"));
|
|
6
7
|
|
|
7
8
|
interface Props {
|
|
8
9
|
sidebarCollapsed?: boolean;
|
|
9
10
|
mouseHover?: boolean;
|
|
10
|
-
clusterOptions?: Array<
|
|
11
|
+
clusterOptions?: Array<SwitchCluster>;
|
|
11
12
|
modelValue?: string;
|
|
12
13
|
}
|
|
13
14
|
|
|
@@ -20,7 +21,7 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
20
21
|
|
|
21
22
|
const emit = defineEmits(["update:modelValue"]);
|
|
22
23
|
|
|
23
|
-
const selectedCluster = ref<
|
|
24
|
+
const selectedCluster = ref<SwitchCluster | null>(null);
|
|
24
25
|
const selectedClusterName = ref<null | string>(null);
|
|
25
26
|
|
|
26
27
|
const getProviderIcon = (provider: string) => {
|
|
@@ -100,15 +101,23 @@ watch(
|
|
|
100
101
|
</div>
|
|
101
102
|
</template>
|
|
102
103
|
<template #option="props">
|
|
103
|
-
<div class="is-flex is-align-items-center">
|
|
104
|
+
<div class="is-flex is-align-items-center is-fullwidth" :class="{ 'is-disabled': props.option?.$isDisabled }">
|
|
104
105
|
<img
|
|
105
106
|
class="mr-15"
|
|
106
107
|
:src="getProviderIcon(props.option.provider)"
|
|
107
108
|
onerror="this.onerror=null;this.src='https://cdn.appscode.com/images/cloud-provider-icons/Generic.png';"
|
|
108
109
|
alt="No cluster selected"
|
|
109
110
|
/>
|
|
110
|
-
<div>
|
|
111
|
-
<p
|
|
111
|
+
<div class="is-fullwidth">
|
|
112
|
+
<p class="is-flex is-justify-content-space-between is-fullwidth">
|
|
113
|
+
<span>{{ props.option.displayName }}</span>
|
|
114
|
+
<badge
|
|
115
|
+
v-if="props.option?.$isDisabled"
|
|
116
|
+
modifierClasses="is-warning is-outlined"
|
|
117
|
+
:label="props.option?.status || 'Not Available'"
|
|
118
|
+
>
|
|
119
|
+
</badge>
|
|
120
|
+
</p>
|
|
112
121
|
<p class="location">{{ props.option.location }}</p>
|
|
113
122
|
</div>
|
|
114
123
|
</div>
|
|
@@ -49,7 +49,7 @@ watch(
|
|
|
49
49
|
<img :src="icon" alt="icon" />
|
|
50
50
|
</span>
|
|
51
51
|
<strong>{{ title }}</strong>
|
|
52
|
-
<span v-if="id === 'claim'" class="badge is-primary whats-new-rel">NEW</span>
|
|
52
|
+
<span v-if="id === 'claim'" class="badge is-primary whats-new-rel ml-8">NEW</span>
|
|
53
53
|
</router-link>
|
|
54
54
|
</li>
|
|
55
55
|
</template>
|