@rancher/shell 0.3.26 → 0.3.28
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/assets/translations/en-us.yaml +8 -23
- package/assets/translations/zh-hans.yaml +2 -26
- package/chart/gatekeeper.vue +2 -11
- package/chart/istio.vue +1 -10
- package/chart/logging/index.vue +2 -11
- package/chart/monitoring/index.vue +1 -9
- package/chart/rancher-backup/index.vue +1 -9
- package/components/AlertTable.vue +8 -6
- package/components/Carousel.vue +2 -1
- package/components/EmberPage.vue +2 -2
- package/components/EtcdInfoBanner.vue +12 -2
- package/components/GlobalRoleBindings.vue +10 -0
- package/components/GrafanaDashboard.vue +8 -3
- package/components/Wizard.vue +17 -1
- package/components/auth/RoleDetailEdit.vue +17 -1
- package/components/form/ArrayList.vue +20 -11
- package/components/form/__tests__/ArrayList.test.ts +44 -0
- package/components/formatter/ClusterProvider.vue +1 -18
- package/components/nav/Header.vue +5 -4
- package/components/nav/TopLevelMenu.vue +38 -15
- package/components/nav/WindowManager/ContainerLogs.vue +22 -19
- package/components/nav/__tests__/TopLevelMenu.test.ts +120 -0
- package/components/nav/__tests__/Type.test.ts +139 -0
- package/config/private-label.js +1 -1
- package/config/product/manager.js +0 -13
- package/config/settings.ts +0 -2
- package/config/types.js +0 -4
- package/core/types.ts +11 -4
- package/edit/management.cattle.io.project.vue +1 -52
- package/edit/management.cattle.io.setting.vue +31 -2
- package/edit/provisioning.cattle.io.cluster/Basics.vue +19 -107
- package/edit/provisioning.cattle.io.cluster/CustomCommand.vue +1 -1
- package/edit/provisioning.cattle.io.cluster/__tests__/Basics.tests.ts +0 -3
- package/edit/provisioning.cattle.io.cluster/rke2.vue +3 -128
- package/edit/workload/mixins/workload.js +14 -4
- package/middleware/authenticated.js +4 -2
- package/models/__tests__/management.cattle.io.cluster.test.ts +19 -0
- package/models/__tests__/provisioning.cattle.io.cluster.test.ts +90 -0
- package/models/cluster.x-k8s.io.machine.js +1 -1
- package/models/fleet.cattle.io.cluster.js +11 -1
- package/models/management.cattle.io.cluster.js +4 -0
- package/models/management.cattle.io.project.js +0 -36
- package/models/management.cattle.io.setting.js +11 -7
- package/models/provisioning.cattle.io.cluster.js +16 -4
- package/package.json +1 -1
- package/pages/auth/setup.vue +38 -1
- package/pages/c/_cluster/apps/charts/__tests__/install.helper.test.ts +2 -17
- package/pages/c/_cluster/apps/charts/index.vue +0 -15
- package/pages/c/_cluster/apps/charts/install.helpers.js +2 -13
- package/pages/c/_cluster/apps/charts/install.vue +1 -1
- package/pages/c/_cluster/auth/roles/index.vue +11 -1
- package/pages/c/_cluster/explorer/index.vue +7 -49
- package/pages/c/_cluster/manager/pages/_page.vue +4 -5
- package/pages/c/_cluster/monitoring/index.vue +26 -39
- package/pages/support/index.vue +1 -8
- package/promptRemove/management.cattle.io.project.vue +6 -9
- package/rancher-components/BadgeState/BadgeState.vue +1 -5
- package/rancher-components/Banner/Banner.test.ts +1 -51
- package/rancher-components/Banner/Banner.vue +53 -134
- package/rancher-components/Card/Card.vue +7 -24
- package/rancher-components/Form/Checkbox/Checkbox.test.ts +29 -20
- package/rancher-components/Form/Checkbox/Checkbox.vue +20 -45
- package/rancher-components/Form/LabeledInput/LabeledInput.test.ts +8 -2
- package/rancher-components/Form/LabeledInput/LabeledInput.vue +10 -22
- package/rancher-components/Form/Radio/RadioButton.vue +13 -30
- package/rancher-components/Form/Radio/RadioGroup.vue +7 -26
- package/rancher-components/Form/TextArea/TextAreaAutoGrow.vue +6 -7
- package/rancher-components/Form/ToggleSwitch/ToggleSwitch.test.ts +38 -25
- package/rancher-components/Form/ToggleSwitch/ToggleSwitch.vue +11 -23
- package/rancher-components/LabeledTooltip/LabeledTooltip.vue +5 -19
- package/rancher-components/StringList/StringList.test.ts +49 -453
- package/rancher-components/StringList/StringList.vue +58 -92
- package/rancher-components/components/Form/Radio/RadioGroup.test.ts +30 -0
- package/rancher-components/components/Form/Radio/RadioGroup.vue +4 -0
- package/rancher-components/components/StringList/StringList.test.ts +270 -0
- package/rancher-components/components/StringList/StringList.vue +57 -18
- package/store/features.js +1 -0
- package/store/prefs.js +0 -3
- package/types/shell/index.d.ts +26 -17
- package/utils/__tests__/object.test.ts +67 -1
- package/utils/__tests__/version.test.ts +13 -23
- package/utils/cluster.js +1 -1
- package/utils/custom-validators.js +0 -2
- package/utils/error.js +16 -1
- package/utils/grafana.js +1 -2
- package/utils/monitoring.js +25 -1
- package/utils/object.js +4 -3
- package/utils/sort.js +1 -1
- package/utils/validators/formRules/__tests__/index.test.ts +49 -4
- package/utils/validators/formRules/index.ts +13 -10
- package/utils/validators/role-template.js +1 -1
- package/utils/validators/setting.js +6 -10
- package/utils/version.js +0 -13
- package/components/ChartPsp.vue +0 -76
- package/components/__tests__/ChartPsp.test.ts +0 -75
- package/components/formatter/__tests__/ClusterProvider.test.ts +0 -28
- package/rancher-components/Card/Card.test.ts +0 -37
- package/rancher-components/Form/Radio/RadioButton.test.ts +0 -31
- package/yarn-error.log +0 -200
|
@@ -12,25 +12,25 @@ export default Vue.extend({
|
|
|
12
12
|
default: ''
|
|
13
13
|
},
|
|
14
14
|
|
|
15
|
-
/**
|
|
15
|
+
/**
|
|
16
16
|
* The value for this option.
|
|
17
|
-
*/
|
|
17
|
+
*/
|
|
18
18
|
val: {
|
|
19
19
|
required: true,
|
|
20
|
-
validator:
|
|
20
|
+
validator: x => true
|
|
21
21
|
},
|
|
22
22
|
|
|
23
|
-
/**
|
|
23
|
+
/**
|
|
24
24
|
* The selected value.
|
|
25
|
-
*/
|
|
25
|
+
*/
|
|
26
26
|
value: {
|
|
27
27
|
required: true,
|
|
28
|
-
validator:
|
|
28
|
+
validator: x => true
|
|
29
29
|
},
|
|
30
30
|
|
|
31
31
|
/**
|
|
32
32
|
* The label shown next to the radio.
|
|
33
|
-
*/
|
|
33
|
+
*/
|
|
34
34
|
label: {
|
|
35
35
|
type: String,
|
|
36
36
|
default: ''
|
|
@@ -96,10 +96,6 @@ export default Vue.extend({
|
|
|
96
96
|
hasDescriptionSlot(): boolean {
|
|
97
97
|
return !!this.$slots.description;
|
|
98
98
|
},
|
|
99
|
-
|
|
100
|
-
hasLabelSlot(): boolean {
|
|
101
|
-
return !!this.$slots.label || !!this.$scopedSlots.label;
|
|
102
|
-
}
|
|
103
99
|
},
|
|
104
100
|
|
|
105
101
|
watch: {
|
|
@@ -142,7 +138,7 @@ export default Vue.extend({
|
|
|
142
138
|
type="radio"
|
|
143
139
|
:tabindex="-1"
|
|
144
140
|
@click.stop.prevent
|
|
145
|
-
|
|
141
|
+
/>
|
|
146
142
|
<span
|
|
147
143
|
ref="custom"
|
|
148
144
|
:class="[ isDisabled ? 'text-muted' : '', 'radio-custom']"
|
|
@@ -153,28 +149,15 @@ export default Vue.extend({
|
|
|
153
149
|
/>
|
|
154
150
|
<div class="labeling">
|
|
155
151
|
<label
|
|
152
|
+
v-if="label"
|
|
156
153
|
:class="[ muteLabel ? 'text-muted' : '', 'radio-label', 'm-0']"
|
|
157
154
|
:for="name"
|
|
155
|
+
v-html="label"
|
|
158
156
|
>
|
|
159
|
-
<slot
|
|
160
|
-
v-if="hasLabelSlot"
|
|
161
|
-
name="label"
|
|
162
|
-
>
|
|
163
|
-
<!-- slot content -->
|
|
164
|
-
</slot>
|
|
165
|
-
<span
|
|
166
|
-
v-else-if="label"
|
|
167
|
-
v-clean-html="label"
|
|
168
|
-
/>
|
|
157
|
+
<slot name="label">{{ label }}</slot>
|
|
169
158
|
</label>
|
|
170
|
-
<div
|
|
171
|
-
v-if="descriptionKey
|
|
172
|
-
class="radio-button-outer-container-description"
|
|
173
|
-
>
|
|
174
|
-
<t
|
|
175
|
-
v-if="descriptionKey"
|
|
176
|
-
:k="descriptionKey"
|
|
177
|
-
/>
|
|
159
|
+
<div v-if="descriptionKey || description" class="radio-button-outer-container-description">
|
|
160
|
+
<t v-if="descriptionKey" :k="descriptionKey" />
|
|
178
161
|
<template v-else-if="description">
|
|
179
162
|
{{ description }}
|
|
180
163
|
</template>
|
|
@@ -28,7 +28,7 @@ export default Vue.extend({
|
|
|
28
28
|
},
|
|
29
29
|
|
|
30
30
|
/**
|
|
31
|
-
* If options are just values, then labels can be a corresponding display
|
|
31
|
+
* If options are just values, then labels can be a corresponding display
|
|
32
32
|
* value.
|
|
33
33
|
*/
|
|
34
34
|
labels: {
|
|
@@ -152,7 +152,7 @@ export default Vue.extend({
|
|
|
152
152
|
*/
|
|
153
153
|
clickNext(direction: number): void {
|
|
154
154
|
const opts = this.normalizedOptions;
|
|
155
|
-
const selected = opts.find(
|
|
155
|
+
const selected = opts.find(x => x.value === this.value);
|
|
156
156
|
let newIndex = (selected ? opts.indexOf(selected) : -1) + direction;
|
|
157
157
|
|
|
158
158
|
if (newIndex >= opts.length) {
|
|
@@ -169,29 +169,15 @@ export default Vue.extend({
|
|
|
169
169
|
|
|
170
170
|
<template>
|
|
171
171
|
<div>
|
|
172
|
-
<div
|
|
173
|
-
v-if="label || labelKey || tooltip || tooltipKey || $slots.label"
|
|
174
|
-
class="radio-group label"
|
|
175
|
-
>
|
|
172
|
+
<div v-if="label || labelKey || tooltip || tooltipKey || $slots.label" class="radio-group label">
|
|
176
173
|
<slot name="label">
|
|
177
174
|
<h3>
|
|
178
|
-
<t
|
|
179
|
-
v-if="labelKey"
|
|
180
|
-
:k="labelKey"
|
|
181
|
-
/>
|
|
175
|
+
<t v-if="labelKey" :k="labelKey" />
|
|
182
176
|
<template v-else-if="label">
|
|
183
177
|
{{ label }}
|
|
184
178
|
</template>
|
|
185
|
-
<i
|
|
186
|
-
|
|
187
|
-
v-clean-tooltip="t(tooltipKey)"
|
|
188
|
-
class="icon icon-info icon-lg"
|
|
189
|
-
/>
|
|
190
|
-
<i
|
|
191
|
-
v-else-if="tooltip"
|
|
192
|
-
v-clean-tooltip="tooltip"
|
|
193
|
-
class="icon icon-info icon-lg"
|
|
194
|
-
/>
|
|
179
|
+
<i v-if="tooltipKey" v-tooltip="t(tooltipKey)" class="icon icon-info icon-lg" />
|
|
180
|
+
<i v-else-if="tooltip" v-tooltip="tooltip" class="icon icon-info icon-lg" />
|
|
195
181
|
</h3>
|
|
196
182
|
</slot>
|
|
197
183
|
</div>
|
|
@@ -206,12 +192,7 @@ export default Vue.extend({
|
|
|
206
192
|
v-for="(option, i) in normalizedOptions"
|
|
207
193
|
:key="name+'-'+i"
|
|
208
194
|
>
|
|
209
|
-
<slot
|
|
210
|
-
:listeners="$listeners"
|
|
211
|
-
:option="option"
|
|
212
|
-
:is-disabled="isDisabled"
|
|
213
|
-
:name="i"
|
|
214
|
-
>
|
|
195
|
+
<slot :listeners="$listeners" :option="option" :name="i">
|
|
215
196
|
<RadioButton
|
|
216
197
|
:key="name+'-'+i"
|
|
217
198
|
:name="name"
|
|
@@ -24,14 +24,14 @@ export default Vue.extend({
|
|
|
24
24
|
},
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
|
-
* Sets the Minimum height for Text Area. Prevents the height from becoming
|
|
27
|
+
* Sets the Minimum height for Text Area. Prevents the height from becoming
|
|
28
28
|
* smaller than the value specified in minHeight.
|
|
29
29
|
*/
|
|
30
30
|
minHeight: {
|
|
31
31
|
type: Number,
|
|
32
32
|
default: 25
|
|
33
33
|
},
|
|
34
|
-
|
|
34
|
+
|
|
35
35
|
/**
|
|
36
36
|
* Sets the maximum height for Text Area. Prevents the height from becoming
|
|
37
37
|
* larger than the value specified in maxHeight.
|
|
@@ -50,7 +50,7 @@ export default Vue.extend({
|
|
|
50
50
|
},
|
|
51
51
|
|
|
52
52
|
/**
|
|
53
|
-
* Specifies whether Text Area is subject to spell checking by the
|
|
53
|
+
* Specifies whether Text Area is subject to spell checking by the
|
|
54
54
|
* underlying browser/OS.
|
|
55
55
|
*/
|
|
56
56
|
spellcheck: {
|
|
@@ -83,7 +83,7 @@ export default Vue.extend({
|
|
|
83
83
|
},
|
|
84
84
|
|
|
85
85
|
/**
|
|
86
|
-
* Sets the height to one-line for SSR pageload so that it's already right
|
|
86
|
+
* Sets the height to one-line for SSR pageload so that it's already right
|
|
87
87
|
* (unless the input is long)
|
|
88
88
|
*/
|
|
89
89
|
style(): string {
|
|
@@ -112,7 +112,7 @@ export default Vue.extend({
|
|
|
112
112
|
},
|
|
113
113
|
|
|
114
114
|
methods: {
|
|
115
|
-
/**
|
|
115
|
+
/**
|
|
116
116
|
* Emits the input event and resizes the Text Area.
|
|
117
117
|
*/
|
|
118
118
|
onInput(val: string): void {
|
|
@@ -128,7 +128,7 @@ export default Vue.extend({
|
|
|
128
128
|
},
|
|
129
129
|
|
|
130
130
|
/**
|
|
131
|
-
* Sets the overflowY and height of the Text Area based on the content
|
|
131
|
+
* Sets the overflowY and height of the Text Area based on the content
|
|
132
132
|
* entered (calculated via scroll height).
|
|
133
133
|
*/
|
|
134
134
|
autoSize(): void {
|
|
@@ -155,7 +155,6 @@ export default Vue.extend({
|
|
|
155
155
|
<template>
|
|
156
156
|
<textarea
|
|
157
157
|
ref="ta"
|
|
158
|
-
data-testid="text-area-auto-grow"
|
|
159
158
|
:disabled="isDisabled"
|
|
160
159
|
:style="style"
|
|
161
160
|
:placeholder="placeholder"
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { shallowMount
|
|
1
|
+
import { shallowMount } from '@vue/test-utils';
|
|
2
2
|
import { ToggleSwitch } from './index';
|
|
3
3
|
|
|
4
|
-
describe('
|
|
4
|
+
describe('ToggleSwitch.vue', () => {
|
|
5
5
|
it('renders falsy by default', () => {
|
|
6
6
|
const wrapper = shallowMount(ToggleSwitch);
|
|
7
7
|
|
|
8
|
-
const toggleInput = wrapper.find('input[type="checkbox"]').element as HTMLInputElement
|
|
8
|
+
const toggleInput = wrapper.find('input[type="checkbox"]').element as HTMLInputElement
|
|
9
9
|
|
|
10
10
|
expect(toggleInput.checked).toBeFalsy();
|
|
11
11
|
});
|
|
@@ -13,58 +13,71 @@ describe('toggleSwitch.vue', () => {
|
|
|
13
13
|
it('renders a true value', () => {
|
|
14
14
|
const wrapper = shallowMount(
|
|
15
15
|
ToggleSwitch,
|
|
16
|
-
{
|
|
16
|
+
{
|
|
17
|
+
propsData: {
|
|
18
|
+
value: true
|
|
19
|
+
}
|
|
20
|
+
});
|
|
17
21
|
|
|
18
|
-
const toggleInput = wrapper.find('input[type="checkbox"]').element as HTMLInputElement
|
|
22
|
+
const toggleInput = wrapper.find('input[type="checkbox"]').element as HTMLInputElement
|
|
19
23
|
|
|
20
24
|
expect(toggleInput.checked).toBe(true);
|
|
21
25
|
});
|
|
22
26
|
|
|
23
|
-
it('updates from falsy to truthy when props change', async() => {
|
|
27
|
+
it('updates from falsy to truthy when props change', async () => {
|
|
24
28
|
const wrapper = shallowMount(ToggleSwitch);
|
|
25
|
-
|
|
26
|
-
const toggleInput = wrapper.find('input[type="checkbox"]').element as HTMLInputElement
|
|
29
|
+
|
|
30
|
+
const toggleInput = wrapper.find('input[type="checkbox"]').element as HTMLInputElement
|
|
27
31
|
|
|
28
32
|
expect(toggleInput.checked).toBe(false);
|
|
29
33
|
|
|
30
34
|
await wrapper.setProps({ value: true });
|
|
31
|
-
|
|
35
|
+
|
|
32
36
|
expect(toggleInput.checked).toBe(true);
|
|
33
37
|
});
|
|
34
38
|
|
|
35
|
-
it('emits an input event with a true value', async() => {
|
|
36
|
-
const wrapper
|
|
39
|
+
it('emits an input event with a true value', async () => {
|
|
40
|
+
const wrapper = shallowMount(ToggleSwitch);
|
|
37
41
|
|
|
38
|
-
wrapper.vm.toggle(true);
|
|
42
|
+
(wrapper.vm as any).toggle(true);
|
|
39
43
|
|
|
40
44
|
await wrapper.vm.$nextTick();
|
|
41
45
|
|
|
42
46
|
expect(wrapper.emitted().input?.length).toBe(1);
|
|
43
47
|
expect(wrapper.emitted().input?.[0][0]).toBe(true);
|
|
48
|
+
|
|
44
49
|
});
|
|
45
50
|
|
|
46
|
-
it('emits an input event with a false value', async() => {
|
|
47
|
-
const wrapper
|
|
51
|
+
it('emits an input event with a false value', async () => {
|
|
52
|
+
const wrapper = shallowMount(
|
|
48
53
|
ToggleSwitch,
|
|
49
|
-
{
|
|
54
|
+
{
|
|
55
|
+
propsData: {
|
|
56
|
+
value: true
|
|
57
|
+
}
|
|
58
|
+
}
|
|
50
59
|
);
|
|
51
60
|
|
|
52
|
-
wrapper.vm.toggle(false);
|
|
61
|
+
(wrapper.vm as any).toggle(false);
|
|
53
62
|
|
|
54
63
|
await wrapper.vm.$nextTick();
|
|
55
64
|
|
|
56
65
|
expect(wrapper.emitted().input?.length).toBe(1);
|
|
57
66
|
expect(wrapper.emitted().input?.[0][0]).toBe(false);
|
|
58
|
-
})
|
|
67
|
+
})
|
|
59
68
|
|
|
60
|
-
it('emits an input event with a custom onValue', async() => {
|
|
69
|
+
it('emits an input event with a custom onValue', async () => {
|
|
61
70
|
const onValue = 'THE TRUTH';
|
|
62
71
|
|
|
63
|
-
const wrapper
|
|
72
|
+
const wrapper = shallowMount(
|
|
64
73
|
ToggleSwitch,
|
|
65
|
-
{
|
|
74
|
+
{
|
|
75
|
+
propsData: {
|
|
76
|
+
onValue,
|
|
77
|
+
}
|
|
78
|
+
});
|
|
66
79
|
|
|
67
|
-
wrapper.vm.toggle(true);
|
|
80
|
+
(wrapper.vm as any).toggle(true);
|
|
68
81
|
|
|
69
82
|
await wrapper.vm.$nextTick();
|
|
70
83
|
|
|
@@ -72,10 +85,10 @@ describe('toggleSwitch.vue', () => {
|
|
|
72
85
|
expect(wrapper.emitted().input?.[0][0]).toBe(onValue);
|
|
73
86
|
});
|
|
74
87
|
|
|
75
|
-
it('emits an input event with a custom offValue', async() => {
|
|
88
|
+
it('emits an input event with a custom offValue', async () => {
|
|
76
89
|
const offValue = 'NOT THE TRUTH';
|
|
77
90
|
|
|
78
|
-
const wrapper
|
|
91
|
+
const wrapper = shallowMount(
|
|
79
92
|
ToggleSwitch,
|
|
80
93
|
{
|
|
81
94
|
propsData: {
|
|
@@ -84,11 +97,11 @@ describe('toggleSwitch.vue', () => {
|
|
|
84
97
|
}
|
|
85
98
|
});
|
|
86
99
|
|
|
87
|
-
wrapper.vm.toggle(false);
|
|
100
|
+
(wrapper.vm as any).toggle(false);
|
|
88
101
|
|
|
89
102
|
await wrapper.vm.$nextTick();
|
|
90
103
|
|
|
91
104
|
expect(wrapper.emitted().input?.length).toBe(1);
|
|
92
105
|
expect(wrapper.emitted().input?.[0][0]).toBe(offValue);
|
|
93
|
-
})
|
|
106
|
+
})
|
|
94
107
|
});
|
|
@@ -31,6 +31,13 @@ export default Vue.extend({
|
|
|
31
31
|
return { state: false as boolean | string | number };
|
|
32
32
|
},
|
|
33
33
|
|
|
34
|
+
methods: {
|
|
35
|
+
toggle(neu: boolean | string | number) {
|
|
36
|
+
this.state = neu === null ? !this.state : neu;
|
|
37
|
+
this.$emit('input', this.state ? this.onValue : this.offValue);
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
|
|
34
41
|
watch: {
|
|
35
42
|
value: {
|
|
36
43
|
handler() {
|
|
@@ -38,37 +45,18 @@ export default Vue.extend({
|
|
|
38
45
|
},
|
|
39
46
|
immediate: true
|
|
40
47
|
}
|
|
41
|
-
},
|
|
42
|
-
|
|
43
|
-
methods: {
|
|
44
|
-
toggle(neu: boolean | string | number) {
|
|
45
|
-
this.state = neu === null ? !this.state : neu;
|
|
46
|
-
this.$emit('input', this.state ? this.onValue : this.offValue);
|
|
47
|
-
}
|
|
48
48
|
}
|
|
49
49
|
});
|
|
50
50
|
</script>
|
|
51
51
|
|
|
52
52
|
<template>
|
|
53
53
|
<span class="toggle-container">
|
|
54
|
-
<span
|
|
55
|
-
class="label no-select hand"
|
|
56
|
-
:class="{ active: !state}"
|
|
57
|
-
@click="toggle(false)"
|
|
58
|
-
>{{ offLabel }}</span>
|
|
54
|
+
<span class="label no-select hand" :class="{ active: !state}" @click="toggle(false)">{{ offLabel }}</span>
|
|
59
55
|
<label class="switch hand">
|
|
60
|
-
<input
|
|
61
|
-
|
|
62
|
-
:checked="state"
|
|
63
|
-
@input="toggle(null)"
|
|
64
|
-
>
|
|
65
|
-
<span class="slider round" />
|
|
56
|
+
<input type="checkbox" :checked="state" @input="toggle(null)">
|
|
57
|
+
<span class="slider round"></span>
|
|
66
58
|
</label>
|
|
67
|
-
<span
|
|
68
|
-
class="label no-select hand"
|
|
69
|
-
:class="{ active: state}"
|
|
70
|
-
@click="toggle(true)"
|
|
71
|
-
>{{ onLabel }}</span>
|
|
59
|
+
<span class="label no-select hand" :class="{ active: state}" @click="toggle(true)">{{ onLabel }}</span>
|
|
72
60
|
</span>
|
|
73
61
|
</template>
|
|
74
62
|
|
|
@@ -37,28 +37,13 @@ export default Vue.extend({
|
|
|
37
37
|
</script>
|
|
38
38
|
|
|
39
39
|
<template>
|
|
40
|
-
<div
|
|
41
|
-
ref="container"
|
|
42
|
-
class="labeled-tooltip"
|
|
43
|
-
:class="{[status]: true, hoverable: hover}"
|
|
44
|
-
>
|
|
40
|
+
<div ref="container" class="labeled-tooltip" :class="{[status]: true, hoverable: hover}">
|
|
45
41
|
<template v-if="hover">
|
|
46
|
-
<i
|
|
47
|
-
v-clean-tooltip="value.content ? { ...{content: value.content, classes: [`tooltip-${status}`]}, ...value } : value"
|
|
48
|
-
:class="{'hover':!value, [iconClass]: true}"
|
|
49
|
-
class="icon status-icon"
|
|
50
|
-
/>
|
|
42
|
+
<i v-tooltip="value.content ? { ...{content: value.content, classes: [`tooltip-${status}`]}, ...value } : value" :class="{'hover':!value, [iconClass]: true}" class="icon status-icon" />
|
|
51
43
|
</template>
|
|
52
44
|
<template v-else>
|
|
53
|
-
<i
|
|
54
|
-
|
|
55
|
-
class="icon status-icon"
|
|
56
|
-
/>
|
|
57
|
-
<div
|
|
58
|
-
v-if="value"
|
|
59
|
-
class="tooltip"
|
|
60
|
-
x-placement="bottom"
|
|
61
|
-
>
|
|
45
|
+
<i :class="{'hover':!value}" class="icon status-icon" />
|
|
46
|
+
<div v-if="value" class="tooltip" x-placement="bottom">
|
|
62
47
|
<div class="tooltip-arrow" />
|
|
63
48
|
<div class="tooltip-inner">
|
|
64
49
|
{{ value }}
|
|
@@ -84,6 +69,7 @@ export default Vue.extend({
|
|
|
84
69
|
position: absolute;
|
|
85
70
|
right: 30px;
|
|
86
71
|
top: $input-padding-lg;
|
|
72
|
+
font-size: 20px;
|
|
87
73
|
z-index: z-index(hoverOverContent);
|
|
88
74
|
}
|
|
89
75
|
|