fixed star colours
This commit is contained in:
Binary file not shown.
@@ -33,7 +33,9 @@
|
|||||||
--text-dark: #333333;
|
--text-dark: #333333;
|
||||||
--text-muted: #6c757d;
|
--text-muted: #6c757d;
|
||||||
--warning-color: #ffd700;
|
--warning-color: #ffd700;
|
||||||
|
--warning-opacity-15: rgba(255, 215, 0, 0.15);
|
||||||
--danger-color: #dc3545;
|
--danger-color: #dc3545;
|
||||||
|
--danger-opacity-15: rgba(220, 53, 69, 0.15);
|
||||||
--shadow-color: rgba(0, 0, 0, 0.1);
|
--shadow-color: rgba(0, 0, 0, 0.1);
|
||||||
--shadow-color-light: rgba(0, 0, 0, 0.25);
|
--shadow-color-light: rgba(0, 0, 0, 0.25);
|
||||||
--border-color: #dee2e6;
|
--border-color: #dee2e6;
|
||||||
|
|||||||
@@ -1210,9 +1210,9 @@ function toggleStar(filename, path) {
|
|||||||
// Get the current state from the button's title
|
// Get the current state from the button's title
|
||||||
const isStarred = starButton.title === 'Unstar';
|
const isStarred = starButton.title === 'Unstar';
|
||||||
|
|
||||||
// Update button appearance
|
// Update button appearance using CSS variables
|
||||||
starButton.style.backgroundColor = isStarred ? 'rgba(22,118,123,0.08)' : 'rgba(255,215,0,0.15)';
|
starButton.style.backgroundColor = isStarred ? 'var(--primary-opacity-8)' : 'var(--warning-opacity-15)';
|
||||||
starButton.style.color = isStarred ? '#16767b' : '#ffd700';
|
starButton.style.color = isStarred ? 'var(--primary-color)' : 'var(--warning-color)';
|
||||||
starButton.title = isStarred ? 'Star' : 'Unstar';
|
starButton.title = isStarred ? 'Star' : 'Unstar';
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1245,8 +1245,8 @@ function toggleStar(filename, path) {
|
|||||||
// Revert the button if the server request failed
|
// Revert the button if the server request failed
|
||||||
if (starButton) {
|
if (starButton) {
|
||||||
const isStarred = starButton.title === 'Unstar';
|
const isStarred = starButton.title === 'Unstar';
|
||||||
starButton.style.backgroundColor = isStarred ? 'rgba(22,118,123,0.08)' : 'rgba(255,215,0,0.15)';
|
starButton.style.backgroundColor = isStarred ? 'var(--primary-opacity-8)' : 'var(--warning-opacity-15)';
|
||||||
starButton.style.color = isStarred ? '#16767b' : '#ffd700';
|
starButton.style.color = isStarred ? 'var(--primary-color)' : 'var(--warning-color)';
|
||||||
starButton.title = isStarred ? 'Star' : 'Unstar';
|
starButton.title = isStarred ? 'Star' : 'Unstar';
|
||||||
}
|
}
|
||||||
console.error('Failed to toggle star:', data.error);
|
console.error('Failed to toggle star:', data.error);
|
||||||
@@ -1256,8 +1256,8 @@ function toggleStar(filename, path) {
|
|||||||
// Revert the button if there was an error
|
// Revert the button if there was an error
|
||||||
if (starButton) {
|
if (starButton) {
|
||||||
const isStarred = starButton.title === 'Unstar';
|
const isStarred = starButton.title === 'Unstar';
|
||||||
starButton.style.backgroundColor = isStarred ? 'rgba(22,118,123,0.08)' : 'rgba(255,215,0,0.15)';
|
starButton.style.backgroundColor = isStarred ? 'var(--primary-opacity-8)' : 'var(--warning-opacity-15)';
|
||||||
starButton.style.color = isStarred ? '#16767b' : '#ffd700';
|
starButton.style.color = isStarred ? 'var(--primary-color)' : 'var(--warning-color)';
|
||||||
starButton.title = isStarred ? 'Star' : 'Unstar';
|
starButton.title = isStarred ? 'Star' : 'Unstar';
|
||||||
}
|
}
|
||||||
console.error('Error toggling star:', error);
|
console.error('Error toggling star:', error);
|
||||||
|
|||||||
Reference in New Issue
Block a user