Skip to content

Commit 638c70c

Browse files
committed
fix: add data-command attributes to action buttons and chevron open CSS
1 parent 3c5d378 commit 638c70c

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

src/webview/homescreenView.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,9 @@ export class HomescreenViewProvider implements vscode.WebviewViewProvider {
356356
flex-shrink: 0;
357357
color: var(--vscode-descriptionForeground);
358358
opacity: 0.4;
359+
transition: transform 0.2s;
359360
}
361+
.hs-chevron--open { transform: rotate(90deg); }
360362
361363
.hs-section-divider {
362364
height: 1px;
@@ -674,12 +676,12 @@ export class HomescreenViewProvider implements vscode.WebviewViewProvider {
674676
<div class="hs-setup-banner">
675677
<span class="hs-setup-banner-icon">⚠</span>
676678
<span class="hs-setup-banner-text">Add your API credentials to connect</span>
677-
<button id="hs-btn-configure" class="hs-setup-banner-btn">Configure</button>
679+
<button id="hs-btn-configure" class="hs-setup-banner-btn" data-command="openGlobalConfig">Configure</button>
678680
</div>
679681
` : ""}
680682
681683
<div class="hs-actions">
682-
<button id="hs-btn-library" class="hs-action">
684+
<button id="hs-btn-library" class="hs-action" data-command="showLibrary">
683685
<span class="hs-action-icon hs-action-icon--blue" aria-hidden="true">
684686
<svg width="15" height="15" viewBox="0 0 16 16" fill="currentColor"><path d="M1 2.828c.885-.37 2.154-.769 3.388-.893 1.33-.134 2.458.063 3.112.752v9.746c-.935-.53-2.12-.603-3.213-.493-1.18.12-2.37.461-3.287.811V2.828zm7.5-.141c.654-.689 1.782-.886 3.112-.752 1.234.124 2.503.523 3.388.893v9.923c-.918-.35-2.107-.692-3.287-.81-1.094-.111-2.278-.039-3.213.492V2.687zM8 1.783C7.015.936 5.587.81 4.287.94c-1.514.153-3.042.672-3.994 1.105A.5.5 0 0 0 0 2.5v11a.5.5 0 0 0 .707.455c.882-.4 2.303-.881 3.68-1.02 1.409-.142 2.59.087 3.223.877a.5.5 0 0 0 .78 0c.633-.79 1.814-1.019 3.222-.877 1.378.139 2.8.62 3.681 1.02A.5.5 0 0 0 16 13.5v-11a.5.5 0 0 0-.293-.455c-.952-.433-2.48-.952-3.994-1.105C10.413.809 8.985.936 8 1.783z"/></svg>
685687
</span>
@@ -690,7 +692,7 @@ export class HomescreenViewProvider implements vscode.WebviewViewProvider {
690692
<svg class="hs-chevron" width="12" height="12" viewBox="0 0 12 12" fill="none" aria-hidden="true"><path d="M4.5 3L7.5 6L4.5 9" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>
691693
</button>
692694
693-
<button id="hs-btn-upload" class="hs-action">
695+
<button id="hs-btn-upload" class="hs-action" data-command="openUploadWidget">
694696
<span class="hs-action-icon hs-action-icon--green" aria-hidden="true">
695697
<svg width="15" height="15" viewBox="0 0 16 16" fill="currentColor"><path fill-rule="evenodd" d="M7.646 1.146a.5.5 0 0 1 .708 0l3 3a.5.5 0 0 1-.708.708L8.5 2.707V11.5a.5.5 0 0 1-1 0V2.707L5.354 4.854a.5.5 0 1 1-.708-.708l3-3zM1.5 14.5a.5.5 0 0 1 0-1h13a.5.5 0 0 1 0 1h-13z"/></svg>
696698
</span>
@@ -766,7 +768,7 @@ export class HomescreenViewProvider implements vscode.WebviewViewProvider {
766768
</div>
767769
768770
<div class="hs-footer">
769-
<button id="hs-link-welcome" class="hs-footer-link">
771+
<button id="hs-link-welcome" class="hs-footer-link" data-command="openWelcomeScreen">
770772
<svg width="11" height="11" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path d="M1 2.828c.885-.37 2.154-.769 3.388-.893 1.33-.134 2.458.063 3.112.752v9.746c-.935-.53-2.12-.603-3.213-.493-1.18.12-2.37.461-3.287.811V2.828zm7.5-.141c.654-.689 1.782-.886 3.112-.752 1.234.124 2.503.523 3.388.893v9.923c-.918-.35-2.107-.692-3.287-.81-1.094-.111-2.278-.039-3.213.492V2.687zM8 1.783C7.015.936 5.587.81 4.287.94c-1.514.153-3.042.672-3.994 1.105A.5.5 0 0 0 0 2.5v11a.5.5 0 0 0 .707.455c.882-.4 2.303-.881 3.68-1.02 1.409-.142 2.59.087 3.223.877a.5.5 0 0 0 .78 0c.633-.79 1.814-1.019 3.222-.877 1.378.139 2.8.62 3.681 1.02A.5.5 0 0 0 16 13.5v-11a.5.5 0 0 0-.293-.455c-.952-.433-2.48-.952-3.994-1.105C10.413.809 8.985.936 8 1.783z"/></svg>
771773
Welcome Guide
772774
</button>

0 commit comments

Comments
 (0)