Enhance theme handling and color selection for logos; add utility functions for theme-based color retrieval and improve debug logging across components.

This commit is contained in:
sha
2025-04-29 18:02:07 +03:00
parent 28e72b7af0
commit e5482c549e
8 changed files with 131 additions and 48 deletions
+6
View File
@@ -71,6 +71,11 @@
return matchesSearch && matchesTags;
});
// Compute the effective theme for children
$: effectiveTheme = theme === 'system'
? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light')
: theme;
function setGridView() {
console.log('Setting view mode to: grid');
viewMode = 'grid';
@@ -257,6 +262,7 @@
logos={filteredLogos}
onCopy={copyUrl}
onDownload={downloadLogo}
theme={effectiveTheme}
/>
{:else}
<LogoList