dashboard-shell-shell 3.0.5-test.1 → 3.0.5-test.2
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.
|
@@ -154,21 +154,18 @@ export default {
|
|
|
154
154
|
return this.$store.getters['i18n/t'](`typeDescription."${ key.toLowerCase() }"`);
|
|
155
155
|
},
|
|
156
156
|
demoDisplay() {
|
|
157
|
+
|
|
158
|
+
const product = this.$store.getters['productId'];
|
|
159
|
+
const productId = this.$store.getters['type-map/groupForBasicType'](this.$store.getters['productId'], this._createLocation.params.resource);
|
|
160
|
+
const parts = productId?.split('::');
|
|
161
|
+
const newString = 'root';
|
|
162
|
+
|
|
157
163
|
// const product = this.$store.getters['productId'];
|
|
158
164
|
// const productId = this.$store.getters['type-map/groupForBasicType'](this.$store.getters['productId'], this._createLocation.params.resource);
|
|
159
165
|
|
|
160
166
|
// const parts = productId?.split('::') || [];
|
|
161
167
|
// const newString = 'root';
|
|
162
168
|
|
|
163
|
-
// if (!parts.includes(newString)) {
|
|
164
|
-
// parts.unshift(newString); // 将字符串添加到数组第一位
|
|
165
|
-
// }
|
|
166
|
-
|
|
167
|
-
// const partsEn = parts.map((item) => {
|
|
168
|
-
// return this.$store.getters['i18n/t'](`typeLabel."${ item.toLowerCase() }"`);
|
|
169
|
-
// });
|
|
170
|
-
|
|
171
|
-
// return partsEn;
|
|
172
169
|
|
|
173
170
|
const breadcrumbList = {
|
|
174
171
|
'harvesterhci.io.management.cluster': {
|
|
@@ -198,9 +195,19 @@ export default {
|
|
|
198
195
|
if (breadcrumbList[resourcePath] && Object.keys(breadcrumbList[resourcePath]).length > 0) {
|
|
199
196
|
breadcrumb.push(...breadcrumbList[resourcePath].bread)
|
|
200
197
|
this.description = breadcrumbList[resourcePath].description
|
|
198
|
+
return breadcrumb
|
|
199
|
+
} else {
|
|
200
|
+
if (!parts?.includes(newString)) {
|
|
201
|
+
parts?.unshift(newString); // 将字符串添加到数组第一位
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
const partsEn = parts?.map((item) => {
|
|
205
|
+
return this.$store.getters['i18n/t'](`typeLabel."${ item.toLowerCase() }"`);
|
|
206
|
+
});
|
|
207
|
+
|
|
208
|
+
return partsEn;
|
|
201
209
|
}
|
|
202
210
|
|
|
203
|
-
return breadcrumb
|
|
204
211
|
},
|
|
205
212
|
|
|
206
213
|
_isYamlCreatable() {
|
|
@@ -253,6 +260,9 @@ export default {
|
|
|
253
260
|
this.resizeObserver = new ResizeObserver((entries) => {
|
|
254
261
|
for (const entry of entries) {
|
|
255
262
|
const width = entry?.contentRect?.width && entry.contentRect.width > 0 ? entry.contentRect.width + 10 : 0
|
|
263
|
+
|
|
264
|
+
console.log(width, ' width----------------------------')
|
|
265
|
+
|
|
256
266
|
this.$store.commit('type-map/setActionsWidth', width)
|
|
257
267
|
}
|
|
258
268
|
})
|
|
@@ -265,7 +275,6 @@ export default {
|
|
|
265
275
|
</script>
|
|
266
276
|
|
|
267
277
|
<template>
|
|
268
|
-
<!-- 顶部 header,带有子标题(subheader)样式类 -->
|
|
269
278
|
<header class="with-subheader">
|
|
270
279
|
<div style="display: flex;width: 100%;">
|
|
271
280
|
<div style="flex: 1;">
|
|
@@ -354,7 +363,6 @@ export default {
|
|
|
354
363
|
</template>
|
|
355
364
|
|
|
356
365
|
<style lang="scss" scoped>
|
|
357
|
-
|
|
358
366
|
.title {
|
|
359
367
|
/* align-items: center;
|
|
360
368
|
display: flex; */
|
|
@@ -293,7 +293,7 @@ export default {
|
|
|
293
293
|
:aria-controls="tab.name"
|
|
294
294
|
:aria-selected="tab.active"
|
|
295
295
|
:aria-label="tab.labelDisplay || ''"
|
|
296
|
-
role="tab"
|
|
296
|
+
role="tab"
|
|
297
297
|
>
|
|
298
298
|
<span>{{ tab.labelDisplay }}</span>
|
|
299
299
|
<span
|
|
@@ -382,22 +382,14 @@ export default {
|
|
|
382
382
|
margin: 0;
|
|
383
383
|
padding: 0;
|
|
384
384
|
|
|
385
|
-
&:focus-visible {
|
|
386
|
-
outline: none;
|
|
387
|
-
|
|
388
|
-
.tab.active {
|
|
389
|
-
@include focus-outline;
|
|
390
|
-
outline-offset: -2px;
|
|
391
|
-
}
|
|
392
|
-
}
|
|
393
|
-
|
|
394
385
|
&.horizontal {
|
|
395
|
-
border
|
|
386
|
+
border: solid thin var(--border);
|
|
387
|
+
border-bottom: 0;
|
|
396
388
|
display: flex;
|
|
397
389
|
flex-direction: row;
|
|
398
390
|
|
|
399
391
|
+ .tab-container {
|
|
400
|
-
|
|
392
|
+
border: solid thin var(--border);
|
|
401
393
|
}
|
|
402
394
|
|
|
403
395
|
.tab.active {
|
|
@@ -405,13 +397,18 @@ export default {
|
|
|
405
397
|
}
|
|
406
398
|
}
|
|
407
399
|
|
|
408
|
-
&:focus
|
|
409
|
-
|
|
400
|
+
&:focus {
|
|
401
|
+
outline: none;
|
|
402
|
+
|
|
403
|
+
& .tab.active a span {
|
|
404
|
+
text-decoration: none;
|
|
405
|
+
}
|
|
410
406
|
}
|
|
411
407
|
|
|
412
408
|
.tab {
|
|
413
409
|
position: relative;
|
|
414
410
|
float: left;
|
|
411
|
+
padding: 0 8px 0 0;
|
|
415
412
|
cursor: pointer;
|
|
416
413
|
|
|
417
414
|
A {
|
|
@@ -422,7 +419,7 @@ export default {
|
|
|
422
419
|
&:hover {
|
|
423
420
|
text-decoration: none;
|
|
424
421
|
span {
|
|
425
|
-
text-decoration:
|
|
422
|
+
text-decoration: none;
|
|
426
423
|
}
|
|
427
424
|
}
|
|
428
425
|
}
|
|
@@ -461,7 +458,7 @@ export default {
|
|
|
461
458
|
}
|
|
462
459
|
|
|
463
460
|
.tab-container {
|
|
464
|
-
padding: 20px
|
|
461
|
+
padding: 20px;
|
|
465
462
|
|
|
466
463
|
&.no-content {
|
|
467
464
|
padding: 0 0 3px 0;
|
|
@@ -492,49 +489,71 @@ export default {
|
|
|
492
489
|
|
|
493
490
|
.side-tabs {
|
|
494
491
|
display: flex;
|
|
495
|
-
|
|
496
|
-
|
|
492
|
+
flex-direction: column;
|
|
493
|
+
/* box-shadow: 0 0 20px var(--shadow);
|
|
494
|
+
border-radius: calc(var(--border-radius) * 2);
|
|
495
|
+
background-color: var(--tabbed-sidebar-bg); */
|
|
496
|
+
margin: 0px -20px;
|
|
497
497
|
.tab-container {
|
|
498
498
|
padding: 20px;
|
|
499
499
|
}
|
|
500
500
|
|
|
501
501
|
& .tabs {
|
|
502
|
-
width: $sideways-tabs-width;
|
|
503
|
-
min-width: $sideways-tabs-width;
|
|
502
|
+
/* width: $sideways-tabs-width; */
|
|
503
|
+
/* min-width: $sideways-tabs-width; */
|
|
504
504
|
display: flex;
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
505
|
+
border-bottom:1px solid #d7d7d7;
|
|
506
|
+
padding: 0 0 0 20px;
|
|
507
|
+
/* flex: 1 0; */
|
|
508
|
+
/* flex-direction: column; */
|
|
508
509
|
|
|
509
510
|
// &.vertical {
|
|
510
511
|
// .tab.active {
|
|
511
512
|
// background-color: var(--tabbed-container-bg);
|
|
512
513
|
// }
|
|
513
514
|
// }
|
|
514
|
-
|
|
515
515
|
& .tab {
|
|
516
|
-
|
|
516
|
+
/* width: 100%; */
|
|
517
|
+
min-width: 120px;
|
|
518
|
+
height: 36px;
|
|
519
|
+
/* border-top: solid 5px transparent; */
|
|
520
|
+
display: flex;
|
|
521
|
+
justify-content: center;
|
|
522
|
+
padding: 8px 16px;
|
|
523
|
+
box-sizing: border-box;
|
|
524
|
+
border: 1px solid #d7d7d7;
|
|
525
|
+
border-bottom: 0px;
|
|
526
|
+
margin-right: 5px;
|
|
527
|
+
border-radius: 2px;
|
|
517
528
|
|
|
518
529
|
&.toggle A {
|
|
519
530
|
color: var(--primary);
|
|
531
|
+
padding: 0px;
|
|
520
532
|
}
|
|
521
533
|
|
|
522
534
|
A {
|
|
523
|
-
color: var(--
|
|
535
|
+
color: var(--input-label);
|
|
536
|
+
padding: 0px;
|
|
524
537
|
}
|
|
525
538
|
|
|
526
539
|
&.active {
|
|
527
|
-
background-color: var(--
|
|
540
|
+
background-color: var(--body-bg);
|
|
541
|
+
border-top: solid 2px var(--primary);
|
|
542
|
+
position: relative;
|
|
543
|
+
&.active::before{
|
|
544
|
+
position: absolute;
|
|
545
|
+
right: 0;
|
|
546
|
+
left: 0;
|
|
547
|
+
top: 34px;
|
|
548
|
+
border-bottom: 1px solid #fff;
|
|
549
|
+
content: '';
|
|
528
550
|
|
|
551
|
+
}
|
|
529
552
|
& A {
|
|
530
553
|
color: var(--primary);
|
|
531
554
|
}
|
|
532
555
|
}
|
|
533
556
|
|
|
534
|
-
:hover {
|
|
535
|
-
background-color: var(--nav-active);
|
|
536
|
-
}
|
|
537
|
-
|
|
538
557
|
&.disabled {
|
|
539
558
|
background-color: var(--disabled-bg);
|
|
540
559
|
|
|
@@ -575,7 +594,7 @@ export default {
|
|
|
575
594
|
&
|
|
576
595
|
|
|
577
596
|
.tab-container {
|
|
578
|
-
width: calc(100% - #{$sideways-tabs-width});
|
|
597
|
+
/* width: calc(100% - #{$sideways-tabs-width}); */
|
|
579
598
|
flex-grow: 1;
|
|
580
599
|
background-color: var(--body-bg);
|
|
581
600
|
}
|
|
@@ -360,7 +360,7 @@ export default {
|
|
|
360
360
|
|
|
361
361
|
colSpan() {
|
|
362
362
|
if (!this.horizontal) {
|
|
363
|
-
return `span-
|
|
363
|
+
return `span-6`;
|
|
364
364
|
}
|
|
365
365
|
// Name and namespace take up two columns.
|
|
366
366
|
// let cols = (this.nameNsHidden ? 0 : 2) + (this.descriptionHidden ? 0 : 1) + this.extraColumns.length;
|
|
@@ -439,8 +439,8 @@ export default {
|
|
|
439
439
|
<div
|
|
440
440
|
v-if="namespaced && !nameNsHidden && createNamespace"
|
|
441
441
|
:data-testid="componentTestid + '-namespace-create'"
|
|
442
|
-
class="col span-
|
|
443
|
-
:class=" isDialog? 'namespace-item-row mb-20': 'col span-
|
|
442
|
+
class="col span-6"
|
|
443
|
+
:class=" isDialog? 'namespace-item-row mb-20': 'col span-6'"
|
|
444
444
|
style="display: flex;"
|
|
445
445
|
>
|
|
446
446
|
|
|
@@ -473,7 +473,7 @@ export default {
|
|
|
473
473
|
<div
|
|
474
474
|
v-if="namespaced && !nameNsHidden && !createNamespace"
|
|
475
475
|
:data-testid="componentTestid + '-namespace'"
|
|
476
|
-
:class=" isDialog? 'namespace-item-row mb-20': 'col span-
|
|
476
|
+
:class=" isDialog? 'namespace-item-row mb-20': 'col span-6'"
|
|
477
477
|
>
|
|
478
478
|
<LabeledSelect
|
|
479
479
|
v-show="!createNamespace"
|
|
@@ -518,7 +518,7 @@ export default {
|
|
|
518
518
|
<!-- <div
|
|
519
519
|
v-show="!descriptionHidden"
|
|
520
520
|
:data-testid="componentTestid + '-description'"
|
|
521
|
-
:class="['col', extraColumns.length > 0 ? 'span-3' : 'span-
|
|
521
|
+
:class="['col', extraColumns.length > 0 ? 'span-3' : 'span-6']"
|
|
522
522
|
> -->
|
|
523
523
|
|
|
524
524
|
<!-- 额外的动态列 -->
|