mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-31 17:55:01 +00:00
style: Style active leaderboard mode button with JS, remove CSS rule
This commit is contained in:
parent
a6c35305ed
commit
95edae9bd1
1 changed files with 13 additions and 5 deletions
|
@ -197,11 +197,6 @@ Aider works best with high-scoring models, though it [can connect to almost any
|
||||||
.mode-button {
|
.mode-button {
|
||||||
transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
|
transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
|
||||||
}
|
}
|
||||||
.mode-button.active {
|
|
||||||
background-color: #0d6efd; /* Bootstrap primary blue */
|
|
||||||
color: white;
|
|
||||||
cursor: default; /* Indicate it's the active state */
|
|
||||||
}
|
|
||||||
.mode-button:not(.active) {
|
.mode-button:not(.active) {
|
||||||
background-color: #f8f9fa; /* Light grey background */
|
background-color: #f8f9fa; /* Light grey background */
|
||||||
color: #495057; /* Dark grey text */
|
color: #495057; /* Dark grey text */
|
||||||
|
@ -281,6 +276,19 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||||
function updateTableView(mode) {
|
function updateTableView(mode) {
|
||||||
currentMode = mode; // Update global state ('view' or 'select')
|
currentMode = mode; // Update global state ('view' or 'select')
|
||||||
|
|
||||||
|
// Update button styles first
|
||||||
|
modeButtons.forEach(btn => {
|
||||||
|
btn.classList.remove('active');
|
||||||
|
// Reset specific styles potentially added by .active
|
||||||
|
btn.style.backgroundColor = '';
|
||||||
|
btn.style.color = '';
|
||||||
|
});
|
||||||
|
const activeButton = mode === 'view' ? modeViewButton : modeSelectButton;
|
||||||
|
activeButton.classList.add('active');
|
||||||
|
activeButton.style.backgroundColor = '#e7f3ff'; // Use selected row highlight blue
|
||||||
|
activeButton.style.color = '#495057'; // Use dark text for contrast on light blue
|
||||||
|
|
||||||
|
|
||||||
// Show/hide header checkbox based on mode
|
// Show/hide header checkbox based on mode
|
||||||
selectAllCheckbox.style.display = mode === 'select' ? 'inline-block' : 'none';
|
selectAllCheckbox.style.display = mode === 'select' ? 'inline-block' : 'none';
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue