rds_ssm_connect 1.7.13 → 1.7.14

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.
@@ -6,6 +6,7 @@ const {
6
6
  savedConnections = [],
7
7
  activeConnections = [],
8
8
  projects = [],
9
+ connectingId = null,
9
10
  onConnect,
10
11
  onDisconnect,
11
12
  onDelete,
@@ -85,7 +86,8 @@ function handleHeaderKeydown(e, activeConn, connectionId) {
85
86
  <div class="connections-list">
86
87
  {#each savedConnections as connection (connection.id)}
87
88
  {@const activeConn = getActiveConnection(connection)}
88
- <div class="connection-item" class:active={activeConn} class:expanded={expandedId === connection.id}>
89
+ {@const isConnecting = connectingId === connection.id}
90
+ <div class="connection-item" class:active={activeConn} class:connecting={isConnecting} class:expanded={expandedId === connection.id}>
89
91
  <div
90
92
  class="connection-header"
91
93
  role="button"
@@ -93,7 +95,11 @@ function handleHeaderKeydown(e, activeConn, connectionId) {
93
95
  onclick={() => activeConn && toggleExpand(connection.id)}
94
96
  onkeydown={(e) => handleHeaderKeydown(e, activeConn, connection.id)}
95
97
  >
96
- {#if activeConn}
98
+ {#if isConnecting}
99
+ <div class="connection-status">
100
+ <span class="connecting-spinner"></span>
101
+ </div>
102
+ {:else if activeConn}
97
103
  <div class="connection-status">
98
104
  <span class="status-dot"></span>
99
105
  </div>
@@ -105,19 +111,24 @@ function handleHeaderKeydown(e, activeConn, connectionId) {
105
111
  <span class="connection-port">:{activeConn.localPort}</span>
106
112
  {/if}
107
113
  </div>
108
- <span class="connection-meta">
109
- {getProjectName(connection.projectKey)} / {connection.profile}
110
- </span>
111
- {#if !activeConn}
112
- <span class="connection-last-used">
113
- Last used: {formatLastUsed(connection.lastUsedAt)}
114
+ {#if isConnecting}
115
+ <span class="connecting-text">Connecting...</span>
116
+ {:else}
117
+ <span class="connection-meta">
118
+ {getProjectName(connection.projectKey)} / {connection.profile}
114
119
  </span>
120
+ {#if !activeConn}
121
+ <span class="connection-last-used">
122
+ Last used: {formatLastUsed(connection.lastUsedAt)}
123
+ </span>
124
+ {/if}
115
125
  {/if}
116
126
  </div>
117
127
  <div class="connection-actions">
118
128
  {#if activeConn}
119
129
  <button
120
130
  class="btn-expand"
131
+ disabled={!!connectingId}
121
132
  aria-label={expandedId === connection.id ? 'Collapse credentials' : 'Show credentials'}
122
133
  >
123
134
  <svg width="16" height="16" viewBox="0 0 16 16" fill="none" class:rotated={expandedId === connection.id}>
@@ -126,6 +137,7 @@ function handleHeaderKeydown(e, activeConn, connectionId) {
126
137
  </button>
127
138
  <button
128
139
  class="btn-disconnect"
140
+ disabled={!!connectingId}
129
141
  onclick={(e) => { e.stopPropagation(); handleDisconnect(activeConn); }}
130
142
  aria-label="Disconnect {connection.name}"
131
143
  >
@@ -136,15 +148,21 @@ function handleHeaderKeydown(e, activeConn, connectionId) {
136
148
  {:else}
137
149
  <button
138
150
  class="btn-connect"
151
+ disabled={!!connectingId}
139
152
  onclick={(e) => { e.stopPropagation(); handleConnect(connection); }}
140
153
  aria-label="Connect to {connection.name}"
141
154
  >
142
- <svg width="16" height="16" viewBox="0 0 16 16" fill="none">
143
- <path d="M5 3l8 5-8 5V3z" fill="currentColor"/>
144
- </svg>
155
+ {#if isConnecting}
156
+ <span class="btn-spinner"></span>
157
+ {:else}
158
+ <svg width="16" height="16" viewBox="0 0 16 16" fill="none">
159
+ <path d="M5 3l8 5-8 5V3z" fill="currentColor"/>
160
+ </svg>
161
+ {/if}
145
162
  </button>
146
163
  <button
147
164
  class="btn-delete"
165
+ disabled={!!connectingId}
148
166
  onclick={(e) => { e.stopPropagation(); handleDelete(connection); }}
149
167
  aria-label="Delete {connection.name}"
150
168
  >
@@ -255,6 +273,10 @@ function handleHeaderKeydown(e, activeConn, connectionId) {
255
273
  border: 1px solid rgba(52, 211, 153, 0.2);
256
274
  }
257
275
 
276
+ .connection-item.connecting {
277
+ border: 1px solid rgba(99, 102, 241, 0.3);
278
+ }
279
+
258
280
  .connection-header {
259
281
  display: flex;
260
282
  align-items: center;
@@ -398,6 +420,49 @@ function handleHeaderKeydown(e, activeConn, connectionId) {
398
420
  transform: rotate(180deg);
399
421
  }
400
422
 
423
+ .btn-connect:disabled, .btn-delete:disabled, .btn-disconnect:disabled, .btn-expand:disabled {
424
+ opacity: 0.4;
425
+ cursor: not-allowed;
426
+ pointer-events: none;
427
+ }
428
+
429
+ .connecting-spinner {
430
+ display: block;
431
+ width: 8px;
432
+ height: 8px;
433
+ border: 1.5px solid rgba(99, 102, 241, 0.3);
434
+ border-top-color: #6366f1;
435
+ border-radius: 50%;
436
+ animation: spin 0.8s linear infinite;
437
+ will-change: transform;
438
+ }
439
+
440
+ .connecting-text {
441
+ font-size: 0.75rem;
442
+ color: #a5b4fc;
443
+ animation: fadeIn 0.3s ease-out;
444
+ }
445
+
446
+ .btn-spinner {
447
+ display: inline-block;
448
+ width: 12px;
449
+ height: 12px;
450
+ border: 1.5px solid rgba(52, 211, 153, 0.3);
451
+ border-top-color: #34d399;
452
+ border-radius: 50%;
453
+ animation: spin 0.8s linear infinite;
454
+ will-change: transform;
455
+ }
456
+
457
+ @keyframes spin {
458
+ to { transform: rotate(360deg); }
459
+ }
460
+
461
+ @keyframes fadeIn {
462
+ from { opacity: 0; }
463
+ to { opacity: 1; }
464
+ }
465
+
401
466
  .connection-details {
402
467
  padding: 0 16px 16px;
403
468
  animation: slideDown 0.2s ease-out;