feat(FN-2667): improve login instruction device code handling
- Broaden device-code extraction to support contextual, enter/use, dashed, and short alphanumeric formats - Auto-copy the device code only when it first appears and keep manual copy feedback behavior - Move login instruction styles into a dedicated LoginInstructions.css file and remove duplicate SettingsModal styles - Add LoginInstructions component tests for extraction formats, auto-copy behavior, and copy button state
This commit is contained in:
@@ -659,56 +659,6 @@
|
||||
border-top: 1px solid var(--border);
|
||||
margin-top: 8px;
|
||||
}
|
||||
.auth-login-instructions {
|
||||
margin-top: var(--space-sm);
|
||||
margin-bottom: 0;
|
||||
padding: var(--space-sm) var(--space-md);
|
||||
border: 1px solid color-mix(in srgb, var(--color-info) 35%, var(--border));
|
||||
border-radius: var(--radius-md);
|
||||
background: color-mix(in srgb, var(--color-info) 8%, transparent);
|
||||
color: var(--text);
|
||||
line-height: 1.5;
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
.device-code-wrapper {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: var(--space-xs);
|
||||
margin: 0 2px;
|
||||
}
|
||||
|
||||
.device-code {
|
||||
font-family: var(--font-mono);
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
padding: 2px 6px;
|
||||
background: var(--card);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--radius-sm);
|
||||
color: var(--text);
|
||||
}
|
||||
|
||||
.device-code-copy-btn {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
padding: 0;
|
||||
background: var(--card);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--radius-sm);
|
||||
color: var(--text-muted);
|
||||
cursor: pointer;
|
||||
transition: color var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast);
|
||||
}
|
||||
|
||||
.device-code-copy-btn:hover {
|
||||
color: var(--text);
|
||||
background: var(--card-hover);
|
||||
border-color: var(--text-muted);
|
||||
}
|
||||
.auth-apikey-section {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
Reference in New Issue
Block a user