feat: settings panel
This commit is contained in:
381
src/renderer/components/SettingsView/SettingsView.css
Normal file
381
src/renderer/components/SettingsView/SettingsView.css
Normal file
@@ -0,0 +1,381 @@
|
||||
.settings-view {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
background-color: var(--vscode-editor-background);
|
||||
color: var(--vscode-foreground);
|
||||
}
|
||||
|
||||
/* Header with search */
|
||||
.settings-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 16px;
|
||||
padding: 12px 20px;
|
||||
border-bottom: 1px solid var(--vscode-panel-border);
|
||||
background-color: var(--vscode-editor-background);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.settings-header h2 {
|
||||
margin: 0;
|
||||
font-size: 18px;
|
||||
font-weight: 400;
|
||||
color: var(--vscode-foreground);
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.settings-search {
|
||||
position: relative;
|
||||
flex: 1;
|
||||
max-width: 400px;
|
||||
}
|
||||
|
||||
.settings-search-icon {
|
||||
position: absolute;
|
||||
left: 8px;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
color: var(--vscode-input-placeholderForeground);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.settings-search input {
|
||||
width: 100%;
|
||||
padding: 6px 28px 6px 30px;
|
||||
font-size: 13px;
|
||||
background-color: var(--vscode-input-background);
|
||||
border: 1px solid var(--vscode-input-border);
|
||||
color: var(--vscode-input-foreground);
|
||||
border-radius: 4px;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.settings-search input::placeholder {
|
||||
color: var(--vscode-input-placeholderForeground);
|
||||
}
|
||||
|
||||
.settings-search input:focus {
|
||||
border-color: var(--vscode-focusBorder);
|
||||
}
|
||||
|
||||
.settings-search-clear {
|
||||
position: absolute;
|
||||
right: 6px;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
background: transparent;
|
||||
border: none;
|
||||
color: var(--vscode-descriptionForeground);
|
||||
cursor: pointer;
|
||||
font-size: 11px;
|
||||
padding: 2px 4px;
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
.settings-search-clear:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
/* Body layout */
|
||||
.settings-body {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* Category navigation */
|
||||
.settings-nav {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 180px;
|
||||
min-width: 180px;
|
||||
padding: 12px 0;
|
||||
border-right: 1px solid var(--vscode-panel-border);
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.settings-nav-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 8px 16px;
|
||||
background: transparent;
|
||||
border: none;
|
||||
border-left: 2px solid transparent;
|
||||
color: var(--vscode-foreground);
|
||||
font-size: 13px;
|
||||
cursor: pointer;
|
||||
text-align: left;
|
||||
transition: background-color 0.1s;
|
||||
}
|
||||
|
||||
.settings-nav-item:hover {
|
||||
background-color: var(--vscode-list-hoverBackground);
|
||||
}
|
||||
|
||||
.settings-nav-item.active {
|
||||
background-color: var(--vscode-list-activeSelectionBackground);
|
||||
border-left-color: var(--vscode-focusBorder);
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.settings-nav-icon {
|
||||
font-size: 16px;
|
||||
width: 20px;
|
||||
text-align: center;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.settings-nav-label {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
/* Settings content area */
|
||||
.settings-content {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
padding: 16px 24px 40px;
|
||||
}
|
||||
|
||||
/* Setting section */
|
||||
.setting-section {
|
||||
margin-bottom: 32px;
|
||||
}
|
||||
|
||||
.setting-section-header {
|
||||
margin-bottom: 16px;
|
||||
padding-bottom: 8px;
|
||||
border-bottom: 1px solid var(--vscode-panel-border);
|
||||
}
|
||||
|
||||
.setting-section-header h3 {
|
||||
margin: 0;
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
color: var(--vscode-foreground);
|
||||
}
|
||||
|
||||
.setting-section-description {
|
||||
margin: 4px 0 0;
|
||||
font-size: 12px;
|
||||
color: var(--vscode-descriptionForeground);
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.setting-section-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
/* Individual setting row */
|
||||
.setting-row {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
padding: 12px 16px;
|
||||
border-radius: 4px;
|
||||
transition: background-color 0.15s;
|
||||
}
|
||||
|
||||
.setting-row:hover {
|
||||
background-color: var(--vscode-list-hoverBackground);
|
||||
}
|
||||
|
||||
.setting-info {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 2px;
|
||||
}
|
||||
|
||||
.setting-label {
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
color: var(--vscode-foreground);
|
||||
}
|
||||
|
||||
.setting-description {
|
||||
margin: 0;
|
||||
font-size: 12px;
|
||||
color: var(--vscode-descriptionForeground);
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.setting-control {
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
.setting-control input[type="text"],
|
||||
.setting-control input[type="password"] {
|
||||
width: 100%;
|
||||
max-width: 400px;
|
||||
padding: 6px 10px;
|
||||
font-size: 13px;
|
||||
background-color: var(--vscode-input-background);
|
||||
border: 1px solid var(--vscode-input-border);
|
||||
color: var(--vscode-input-foreground);
|
||||
border-radius: 4px;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.setting-control input:focus {
|
||||
border-color: var(--vscode-focusBorder);
|
||||
}
|
||||
|
||||
.setting-control input::placeholder {
|
||||
color: var(--vscode-input-placeholderForeground);
|
||||
}
|
||||
|
||||
.setting-control select {
|
||||
padding: 6px 10px;
|
||||
font-size: 13px;
|
||||
background-color: var(--vscode-dropdown-background);
|
||||
border: 1px solid var(--vscode-dropdown-border);
|
||||
color: var(--vscode-dropdown-foreground);
|
||||
border-radius: 4px;
|
||||
outline: none;
|
||||
cursor: pointer;
|
||||
min-width: 240px;
|
||||
}
|
||||
|
||||
.setting-control select:focus {
|
||||
border-color: var(--vscode-focusBorder);
|
||||
}
|
||||
|
||||
/* Input group with button */
|
||||
.setting-input-group {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
max-width: 400px;
|
||||
}
|
||||
|
||||
.setting-input-group input {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.setting-toggle-visibility {
|
||||
background: transparent;
|
||||
border: none;
|
||||
padding: 4px 6px;
|
||||
cursor: pointer;
|
||||
font-size: 16px;
|
||||
opacity: 0.6;
|
||||
transition: opacity 0.15s;
|
||||
color: var(--vscode-foreground);
|
||||
}
|
||||
|
||||
.setting-toggle-visibility:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
/* Action buttons */
|
||||
.setting-actions {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
padding: 12px 16px 4px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.setting-actions button {
|
||||
padding: 6px 14px;
|
||||
font-size: 12px;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
font-weight: 500;
|
||||
transition: background-color 0.15s;
|
||||
}
|
||||
|
||||
.setting-actions button.primary {
|
||||
background-color: var(--vscode-button-background);
|
||||
color: var(--vscode-button-foreground);
|
||||
}
|
||||
|
||||
.setting-actions button.primary:hover {
|
||||
background-color: var(--vscode-button-hoverBackground);
|
||||
}
|
||||
|
||||
.setting-actions button.secondary {
|
||||
background-color: var(--vscode-button-secondaryBackground);
|
||||
color: var(--vscode-button-secondaryForeground);
|
||||
}
|
||||
|
||||
.setting-actions button.secondary:hover {
|
||||
background-color: var(--vscode-button-secondaryHoverBackground);
|
||||
}
|
||||
|
||||
.setting-actions button.danger {
|
||||
color: var(--vscode-errorForeground, #f48771);
|
||||
}
|
||||
|
||||
.setting-actions button.danger:hover {
|
||||
background-color: rgba(244, 135, 113, 0.1);
|
||||
}
|
||||
|
||||
/* Status indicators */
|
||||
.setting-status {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
padding: 8px 16px;
|
||||
margin-top: 4px;
|
||||
font-size: 12px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.setting-status.success {
|
||||
color: var(--vscode-testing-iconPassed, #73c991);
|
||||
background-color: rgba(115, 201, 145, 0.08);
|
||||
}
|
||||
|
||||
.setting-status .status-icon {
|
||||
font-size: 14px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.setting-status .status-detail {
|
||||
color: var(--vscode-descriptionForeground);
|
||||
}
|
||||
|
||||
/* Setting row button styling */
|
||||
.setting-row .setting-control button {
|
||||
padding: 6px 14px;
|
||||
font-size: 12px;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
background-color: var(--vscode-button-secondaryBackground);
|
||||
color: var(--vscode-button-secondaryForeground);
|
||||
transition: background-color 0.15s;
|
||||
}
|
||||
|
||||
.setting-row .setting-control button:hover {
|
||||
background-color: var(--vscode-button-secondaryHoverBackground);
|
||||
}
|
||||
|
||||
/* Responsive - narrow sidebar */
|
||||
@media (max-width: 600px) {
|
||||
.settings-nav {
|
||||
width: 48px;
|
||||
min-width: 48px;
|
||||
}
|
||||
|
||||
.settings-nav-label {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.settings-nav-item {
|
||||
justify-content: center;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.settings-nav-icon {
|
||||
width: auto;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user