mirror of
https://github.com/shadoll/sLogos.git
synced 2026-08-28 19:43:17 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user