odant-work 1.0.43 → 1.0.44

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.
@@ -11,9 +11,9 @@ export default {
11
11
  gap: 6px;
12
12
  }
13
13
  .item {
14
- scale: .8;
14
+ scale: .84;
15
15
  border: none;
16
- border-radius: 4px;
16
+ border-radius: 8px;
17
17
  }
18
18
  .service-wrap {
19
19
  @apply --horizontal-center;
@@ -24,18 +24,36 @@ export default {
24
24
  min-height: 28px;
25
25
  padding: 4px 12px;
26
26
  gap: 6px;
27
- font-size: 13px;
27
+ font-size: 12.5px;
28
28
  font-weight: 500;
29
- border-radius: var(--radius-xs, 4px);
30
- box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
29
+ border-radius: 8px;
30
+ border: 1px solid var(--subtle-border);
31
+ background: var(--content-background);
32
+ color: var(--content-color);
33
+ fill: var(--content-color);
34
+ box-shadow: var(--elevation-1);
31
35
  box-sizing: border-box;
36
+ transition: background-color var(--duration-fast) var(--easing),
37
+ border-color var(--duration-fast) var(--easing),
38
+ color var(--duration-fast) var(--easing),
39
+ box-shadow var(--duration-fast) var(--easing),
40
+ opacity var(--duration-fast) var(--easing);
32
41
  }
33
42
  oda-button.service-btn:hover:not([disabled]) {
43
+ background: var(--accent-soft);
34
44
  border-color: var(--accent-color);
45
+ color: var(--accent-color);
46
+ fill: var(--accent-color);
47
+ }
48
+ oda-button.service-btn[disabled] {
49
+ opacity: 0.45;
50
+ box-shadow: none;
51
+ background: transparent;
52
+ border-color: var(--subtle-border);
35
53
  }
36
54
  </style>
37
55
  <div class="service-wrap" ~show="showLabels && toolItems?.length">
38
- <oda-button class="service-btn" content border hoverable ~for="toolItems"
56
+ <oda-button class="service-btn" hoverable ~for="toolItems"
39
57
  :icon="$for.item?.icon || ''"
40
58
  :icon-size="18"
41
59
  :label="$for.item?.label || $for.item?.id"
@@ -1,6 +1,6 @@
1
1
  ODA({
2
2
  is: 'work-mcp-manager',
3
- imports: '@oda/icon, @oda/button',
3
+ imports: '@oda/icon, @oda/button, oda//tabs',
4
4
  template: /*html*/`
5
5
  <style>
6
6
  :host {
@@ -52,40 +52,7 @@ ODA({
52
52
  display: flex;
53
53
  align-items: center;
54
54
  gap: 8px;
55
- background: var(--subtle-background, #f8fafc);
56
- padding: 4px;
57
- border-radius: 9px;
58
- border: 1px solid var(--border-color, #e2e8f0);
59
- }
60
- .tab-btn {
61
- border: none;
62
- background: transparent;
63
- color: inherit;
64
- font-size: 13px;
65
- font-weight: 600;
66
- padding: 7px 14px;
67
- border-radius: 6px;
68
- cursor: pointer;
69
- display: inline-flex;
70
- align-items: center;
71
- gap: 6px;
72
- }
73
- .tab-btn[active] {
74
- background: var(--accent-color, #2563eb);
75
- color: #ffffff;
76
- }
77
- .badge {
78
- display: inline-flex;
79
- align-items: center;
80
- padding: 2px 8px;
81
- border-radius: 999px;
82
- font-size: 11px;
83
- font-weight: 600;
84
- background: rgba(100, 116, 139, 0.14);
85
- }
86
- .tab-btn[active] .badge {
87
- background: rgba(255, 255, 255, 0.22);
88
- color: #fff;
55
+ flex-wrap: wrap;
89
56
  }
90
57
  .info-banner {
91
58
  display: grid;
@@ -306,14 +273,7 @@ ODA({
306
273
  </div>
307
274
  </div>
308
275
  <div class="tabs-row">
309
- <button class="tab-btn" :active="activeTab === 'mcp'" @tap="setTab('mcp')">
310
- <span>🔌 MCP-серверы и Сервисы</span>
311
- <span class="badge">{{mcpServers.length}}</span>
312
- </button>
313
- <button class="tab-btn" :active="activeTab === 'skills'" @tap="setTab('skills')">
314
- <span>🧠 Навыки ИИ (Skills)</span>
315
- <span class="badge">{{skills.length}}</span>
316
- </button>
276
+ <oda-tabs variant="pills" :allow-list="false" :items="mcpTabItems" :focused-index="mcpTabIndex" @tab-select="onMcpTabSelect($event)"></oda-tabs>
317
277
  <button class="btn" @tap="reload" title="Обновить список">↻ Обновить</button>
318
278
  </div>
319
279
  </div>
@@ -632,6 +592,21 @@ ODA({
632
592
  attached() {
633
593
  this.reload();
634
594
  },
595
+ get mcpTabItems() {
596
+ return [
597
+ { id: 'mcp', label: 'MCP-серверы и Сервисы', icon: 'carbon:plug', count: this.mcpServers?.length || 0, showZeroCount: true },
598
+ { id: 'skills', label: 'Навыки ИИ (Skills)', icon: 'carbon:skill-level', count: this.skills?.length || 0, showZeroCount: true },
599
+ ];
600
+ },
601
+ get mcpTabIndex() {
602
+ const idx = this.mcpTabItems.findIndex(t => t.id === this.activeTab);
603
+ return idx >= 0 ? idx : 0;
604
+ },
605
+ onMcpTabSelect(e) {
606
+ const id = e?.detail?.item?.id;
607
+ if (id)
608
+ this.setTab(id);
609
+ },
635
610
  setTab(tab) {
636
611
  this.activeTab = tab;
637
612
  this.noticeText = '';
@@ -406,9 +406,12 @@ ODA({is: 'app-tabs',
406
406
  box-sizing: border-box;
407
407
  transition: background 140ms ease, transform 120ms ease, box-shadow 140ms ease;
408
408
  }
409
+ .nav-list oda-button:not([light]):hover {
410
+ background: color-mix(in oklch, var(--accent-back) 14%, transparent);
411
+ }
409
412
  .nav-list oda-button[light] {
410
413
  font-weight: 700;
411
- box-shadow: 0 2px 6px rgba(0, 0, 0, 0.22);
414
+ box-shadow: 0 2px 6px var(--shadow-color);
412
415
  }
413
416
  </style>
414
417
  <div class="nav-list" :horizontal="mobile">