@rancher/shell 0.3.22 → 0.3.24

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.
Files changed (48) hide show
  1. package/assets/styles/base/_variables.scss +1 -0
  2. package/assets/styles/themes/_dark.scss +1 -0
  3. package/assets/styles/themes/_light.scss +6 -5
  4. package/assets/translations/en-us.yaml +15 -10
  5. package/assets/translations/zh-hans.yaml +1 -1
  6. package/babel.config.js +3 -0
  7. package/components/ClusterProviderIconMenu.vue +161 -0
  8. package/components/Loading.vue +1 -1
  9. package/components/SideNav.vue +1 -1
  10. package/components/SortableTable/paging.js +10 -0
  11. package/components/form/GitPicker.vue +16 -0
  12. package/components/form/SelectOrCreateAuthSecret.vue +16 -3
  13. package/components/nav/Group.vue +54 -24
  14. package/components/nav/Header.vue +1 -1
  15. package/components/nav/TopLevelMenu.vue +469 -294
  16. package/components/nav/Type.vue +31 -5
  17. package/creators/pkg/init +2 -2
  18. package/edit/fleet.cattle.io.gitrepo.vue +43 -15
  19. package/edit/logging.banzaicloud.io.output/index.vue +7 -0
  20. package/edit/provisioning.cattle.io.cluster/CustomCommand.vue +3 -8
  21. package/edit/provisioning.cattle.io.cluster/rke2.vue +108 -33
  22. package/edit/resources.cattle.io.backup.vue +3 -1
  23. package/edit/resources.cattle.io.restore.vue +3 -1
  24. package/edit/workload/storage/ContainerMountPaths.vue +7 -5
  25. package/initialize/App.js +2 -0
  26. package/initialize/client.js +63 -51
  27. package/initialize/index.js +2 -0
  28. package/layouts/default.vue +8 -0
  29. package/machine-config/amazonec2.vue +1 -0
  30. package/mixins/fetch.client.js +3 -3
  31. package/package.json +1 -1
  32. package/pages/__tests__/prefs.test.ts +1 -1
  33. package/pages/c/_cluster/explorer/ConfigBadge.vue +1 -0
  34. package/pages/prefs.vue +3 -13
  35. package/plugins/dashboard-store/resource-class.js +1 -1
  36. package/public/index.html +4 -2
  37. package/rancher-components/Form/LabeledInput/LabeledInput.vue +8 -0
  38. package/rancher-components/Form/Radio/RadioButton.test.ts +7 -3
  39. package/scripts/extension/parse-tag-name +0 -0
  40. package/store/prefs.js +3 -4
  41. package/store/type-map.js +2 -16
  42. package/types/shell/index.d.ts +10 -1
  43. package/utils/__tests__/formatter.test.ts +77 -0
  44. package/utils/__tests__/sort.test.ts +61 -0
  45. package/utils/formatter.js +11 -0
  46. package/utils/string.js +12 -0
  47. package/vue.config.js +7 -6
  48. package/yarn-error.log +16 -16
@@ -69,7 +69,7 @@ export default {
69
69
  if (overviewRoute && grp.overview) {
70
70
  const route = this.$router.resolve(overviewRoute || {});
71
71
 
72
- return this.$route.fullPath === route?.route?.fullPath;
72
+ return this.$route.fullPath.split('#')[0] === route?.route?.fullPath;
73
73
  }
74
74
  }
75
75
 
@@ -96,8 +96,14 @@ export default {
96
96
  // Don't auto-select first group entry if we're already expanded and contain the currently-selected nav item
97
97
  if (this.hasActiveRoute() && this.isExpanded) {
98
98
  return;
99
- }
99
+ } else {
100
+ // Remove all active class if click on group header and not active route
101
+ const headerEl = document.querySelectorAll('.header');
100
102
 
103
+ headerEl.forEach((el) => {
104
+ el.classList.remove('active');
105
+ });
106
+ }
101
107
  this.expandGroup();
102
108
 
103
109
  const items = this.group[this.childrenKey];
@@ -132,6 +138,11 @@ export default {
132
138
 
133
139
  // User clicked on the expander icon, so toggle the expansion so the user can see inside the group
134
140
  peek($event) {
141
+ // Add active class to the current header if click on chevron icon
142
+ $event.target.parentElement.classList.remove('active');
143
+ if (this.hasActiveRoute()) {
144
+ $event.target.parentElement.classList.add('active');
145
+ }
135
146
  this.isExpanded = !this.isExpanded;
136
147
  $event.stopPropagation();
137
148
  },
@@ -212,7 +223,7 @@ export default {
212
223
  <i
213
224
  v-if="!onlyHasOverview && canCollapse"
214
225
  class="icon toggle"
215
- :class="{'icon-chevron-down': !isExpanded, 'icon-chevron-up': isExpanded}"
226
+ :class="{'icon-chevron-right': !isExpanded, 'icon-chevron-down': isExpanded}"
216
227
  @click="peek($event, true)"
217
228
  />
218
229
  </div>
@@ -267,17 +278,18 @@ export default {
267
278
  position: relative;
268
279
  cursor: pointer;
269
280
  color: var(--body-text);
281
+ height: 33px;
270
282
 
271
- > H6 {
283
+ H6 {
272
284
  color: var(--body-text);
273
285
  user-select: none;
274
286
  text-transform: none;
275
- font-size: 14px;
287
+ font-size: 16px;
276
288
  }
277
289
 
278
290
  > A {
279
291
  display: block;
280
- padding-left: 10px;
292
+ padding-left: 16px;
281
293
  &:hover{
282
294
  text-decoration: none;
283
295
  }
@@ -285,20 +297,14 @@ export default {
285
297
  outline:none;
286
298
  }
287
299
  > H6 {
288
- font-size: 14px;
289
300
  text-transform: none;
290
301
  }
291
302
  }
292
-
293
303
  &.active {
294
304
  background-color: var(--nav-active);
295
305
  }
296
306
  }
297
307
 
298
- .body {
299
- margin-left: 10px;
300
- }
301
-
302
308
  .accordion {
303
309
  .header {
304
310
  &:hover:not(.noHover) {
@@ -323,18 +329,21 @@ export default {
323
329
  }
324
330
 
325
331
  > H6 {
326
- font-size: 14px;
327
332
  text-transform: none;
328
- padding-left: 10px;
333
+ padding-left: 16px;
329
334
  }
330
335
 
331
336
  > I {
332
337
  position: absolute;
333
338
  right: 0;
334
339
  top: 0;
335
- padding: 10px 7px 9px 7px;
340
+ padding: 10px 10px 9px 7px;
336
341
  user-select: none;
337
342
  }
343
+
344
+ &:has(> a.nuxt-link-active) {
345
+ background: var(--nav-active);
346
+ }
338
347
  }
339
348
 
340
349
  > .body {
@@ -344,20 +353,19 @@ export default {
344
353
 
345
354
  &.depth-1 {
346
355
  > .header {
356
+ padding-left: 20px;
347
357
  > H6 {
348
- font-size: 13px;
349
- line-height: 16px;
358
+ line-height: 18px;
350
359
  padding: 8px 0 7px 5px !important;
351
360
  }
352
361
  > I {
353
- padding: 9px 7px 8px 7px !important;
362
+ padding: 10px 7px 9px 7px !important;
354
363
  }
355
364
  }
356
365
  }
357
366
 
358
367
  &:not(.depth-0) {
359
368
  > .header {
360
- padding-left: 10px;
361
369
  > H6 {
362
370
  // Child groups that aren't linked themselves
363
371
  display: inline-block;
@@ -372,18 +380,29 @@ export default {
372
380
  }
373
381
  }
374
382
  }
383
+
384
+ &.expanded:has(> .active),
385
+ &.expanded:has(> ul li.nuxt-link-active) {
386
+ background: var(--nav-active);
387
+ }
388
+
389
+ &.expanded:has(> ul li.root) {
390
+ background: transparent;
391
+ }
375
392
  }
376
393
 
377
- .body ::v-deep > .child.nuxt-link-active,
378
- .header ::v-deep > .child.nuxt-link-exact-active {
394
+ .body ::v-deep > .child.nuxt-link-active,
395
+ .header ::v-deep > .child.nuxt-link-exact-active {
379
396
  padding: 0;
380
397
 
381
398
  A, A I {
382
- color: var(--body-text);
399
+ color: var(--primary-hover-text);
383
400
  }
384
401
 
385
402
  A {
386
- background-color: var(--nav-active);
403
+ color: var(--primary-hover-text);
404
+ background-color: var(--primary-hover-bg);
405
+ font-weight: bold;
387
406
  }
388
407
  }
389
408
 
@@ -391,11 +410,22 @@ export default {
391
410
  A {
392
411
  border-left: solid 5px transparent;
393
412
  line-height: 16px;
394
- font-size: 13px;
413
+ font-size: 14px;
414
+ padding-left: 24px;
415
+ display: flex;
416
+ justify-content: space-between;
395
417
  }
396
418
 
397
419
  A:focus {
398
420
  outline: none;
399
421
  }
422
+
423
+ &.root {
424
+ background: transparent;
425
+ A {
426
+ padding-left: 14px;
427
+ }
428
+ }
400
429
  }
430
+
401
431
  </style>
@@ -715,7 +715,7 @@ export default {
715
715
  }
716
716
 
717
717
  > .menu-spacer {
718
- flex: 0 0 calc(var(--header-height) + 10px);
718
+ flex: 0 0 15px;
719
719
 
720
720
  &.isSingleProduct {
721
721
  display: flex;