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