Moved 36 inline style assignments from notification-history.ts to CSS classes in styles.css following the mcp-* naming pattern. This improves maintainability and separates presentation from logic. Changes: - Created CSS classes for all static styles (mcp-history-filters, mcp-history-count, mcp-history-list, mcp-history-empty, mcp-history-entry, mcp-history-entry-header, mcp-history-entry-header-meta, mcp-history-entry-args, mcp-history-entry-error, mcp-history-actions) - Created dynamic state classes for conditional styling (mcp-history-entry-border, mcp-history-entry-title-success, mcp-history-entry-title-error) - Updated notification-history.ts to use CSS classes via addClass() instead of inline style assignments - Retained only truly dynamic styles (borderBottom conditional, color conditional) as class toggles All tests pass (716/716), build succeeds.
236 lines
4.0 KiB
CSS
236 lines
4.0 KiB
CSS
/* MCP Server Plugin Styles */
|
|
|
|
.mcp-status-bar {
|
|
cursor: pointer;
|
|
padding: 0 8px;
|
|
}
|
|
|
|
.mcp-server-status {
|
|
margin: 1em 0;
|
|
padding: 1em;
|
|
background-color: var(--background-secondary);
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.mcp-button-container {
|
|
display: flex;
|
|
gap: 8px;
|
|
margin: 1em 0;
|
|
}
|
|
|
|
.mcp-button-container button {
|
|
padding: 8px 16px;
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
background-color: var(--interactive-accent);
|
|
color: var(--text-on-accent);
|
|
border: none;
|
|
}
|
|
|
|
.mcp-button-container button:hover {
|
|
background-color: var(--interactive-accent-hover);
|
|
}
|
|
|
|
.mcp-connection-info {
|
|
margin: 1em 0;
|
|
padding: 1em;
|
|
background-color: var(--background-secondary);
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.mcp-connection-info code {
|
|
display: block;
|
|
margin: 0.5em 0 1em 0;
|
|
padding: 8px;
|
|
background-color: var(--background-primary);
|
|
border-radius: 4px;
|
|
font-family: var(--font-monospace);
|
|
}
|
|
|
|
.mcp-connection-info p {
|
|
margin: 0.5em 0 0.25em 0;
|
|
font-weight: 600;
|
|
}
|
|
|
|
/* Authentication section */
|
|
.mcp-auth-section { margin-bottom: 20px; }
|
|
.mcp-auth-summary {
|
|
font-size: 1.17em;
|
|
font-weight: bold;
|
|
margin-bottom: 12px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
/* API key display */
|
|
.mcp-key-display {
|
|
padding: 12px;
|
|
background-color: var(--background-secondary);
|
|
border-radius: 4px;
|
|
font-family: monospace;
|
|
font-size: 0.9em;
|
|
word-break: break-all;
|
|
user-select: all;
|
|
cursor: text;
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
/* Tab navigation */
|
|
.mcp-config-tabs {
|
|
display: flex;
|
|
gap: 8px;
|
|
margin-bottom: 16px;
|
|
border-bottom: 1px solid var(--background-modifier-border);
|
|
}
|
|
|
|
.mcp-tab {
|
|
padding: 8px 16px;
|
|
border: none;
|
|
background: none;
|
|
cursor: pointer;
|
|
border-bottom: 2px solid transparent;
|
|
}
|
|
|
|
.mcp-tab-active {
|
|
border-bottom-color: var(--interactive-accent);
|
|
font-weight: bold;
|
|
}
|
|
|
|
/* Config display */
|
|
.mcp-config-display {
|
|
padding: 12px;
|
|
background-color: var(--background-secondary);
|
|
border-radius: 4px;
|
|
font-size: 0.85em;
|
|
overflow-x: auto;
|
|
user-select: text;
|
|
cursor: text;
|
|
margin-bottom: 12px;
|
|
}
|
|
|
|
/* Helper text */
|
|
.mcp-file-path {
|
|
padding: 8px;
|
|
background-color: var(--background-secondary);
|
|
border-radius: 4px;
|
|
font-family: monospace;
|
|
font-size: 0.9em;
|
|
margin-bottom: 12px;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.mcp-usage-note {
|
|
font-size: 0.9em;
|
|
color: var(--text-muted);
|
|
font-style: italic;
|
|
}
|
|
|
|
/* Additional utility classes */
|
|
.mcp-heading {
|
|
margin-top: 24px;
|
|
margin-bottom: 12px;
|
|
}
|
|
|
|
.mcp-container { margin-bottom: 20px; }
|
|
|
|
.mcp-button-group {
|
|
display: flex;
|
|
gap: 8px;
|
|
margin-bottom: 12px;
|
|
}
|
|
|
|
.mcp-label {
|
|
margin-bottom: 4px;
|
|
font-size: 0.9em;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.mcp-config-content {
|
|
margin-top: 16px;
|
|
}
|
|
|
|
.mcp-config-button {
|
|
margin-bottom: 12px;
|
|
}
|
|
|
|
/* Notification History Modal */
|
|
.mcp-notification-history-modal {
|
|
/* Base modal styling handled by Obsidian */
|
|
}
|
|
|
|
.mcp-history-filters {
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.mcp-history-count {
|
|
margin-top: 8px;
|
|
font-size: 0.9em;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.mcp-history-list {
|
|
max-height: 400px;
|
|
overflow-y: auto;
|
|
margin-bottom: 16px;
|
|
border: 1px solid var(--background-modifier-border);
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.mcp-history-empty {
|
|
padding: 24px;
|
|
text-align: center;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.mcp-history-entry {
|
|
padding: 12px;
|
|
}
|
|
|
|
.mcp-history-entry-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
.mcp-history-entry-header-meta {
|
|
font-size: 0.85em;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.mcp-history-entry-args {
|
|
font-size: 0.85em;
|
|
font-family: monospace;
|
|
background-color: var(--background-secondary);
|
|
padding: 8px;
|
|
border-radius: 4px;
|
|
margin-bottom: 8px;
|
|
overflow-x: auto;
|
|
}
|
|
|
|
.mcp-history-entry-error {
|
|
font-size: 0.85em;
|
|
color: var(--text-error);
|
|
background-color: var(--background-secondary);
|
|
padding: 8px;
|
|
border-radius: 4px;
|
|
font-family: monospace;
|
|
}
|
|
|
|
.mcp-history-actions {
|
|
display: flex;
|
|
gap: 8px;
|
|
justify-content: flex-end;
|
|
}
|
|
|
|
/* Dynamic state classes */
|
|
.mcp-history-entry-border {
|
|
border-bottom: 1px solid var(--background-modifier-border);
|
|
}
|
|
|
|
.mcp-history-entry-title-success {
|
|
color: var(--text-success);
|
|
}
|
|
|
|
.mcp-history-entry-title-error {
|
|
color: var(--text-error);
|
|
}
|