Rafael Lopez

obj done

...@@ -178,6 +178,10 @@ ...@@ -178,6 +178,10 @@
178 min-height: 2px; 178 min-height: 2px;
179 } 179 }
180 180
181 + :global(html.dark) .bar {
182 + background: rgba(107, 159, 212, 0.85);
183 + }
184 +
181 .bars:hover .bar { 185 .bars:hover .bar {
182 opacity: 0.35; 186 opacity: 0.35;
183 } 187 }
......
...@@ -11,6 +11,11 @@ ...@@ -11,6 +11,11 @@
11 navigateResults 11 navigateResults
12 } from '$lib/stores/searchStore'; 12 } from '$lib/stores/searchStore';
13 13
14 + let {
15 + preserveVista = false,
16 + vista = 'agregado'
17 + } = $props();
18 +
14 let searchInputRef = $state(null); 19 let searchInputRef = $state(null);
15 let searchVal = $state(''); 20 let searchVal = $state('');
16 let searchFocused = $state(false); 21 let searchFocused = $state(false);
...@@ -47,7 +52,10 @@ ...@@ -47,7 +52,10 @@
47 } 52 }
48 53
49 function handleSearchSelect(result) { 54 function handleSearchSelect(result) {
50 - goto(`/objeto/${result.codigo}`); 55 + const url = preserveVista && vista === 'comparar'
56 + ? `/objeto/${result.codigo}?vista=comparar`
57 + : `/objeto/${result.codigo}`;
58 + goto(url);
51 searchVal = ''; 59 searchVal = '';
52 clearSearch(); 60 clearSearch();
53 searchFocused = false; 61 searchFocused = false;
...@@ -116,7 +124,7 @@ ...@@ -116,7 +124,7 @@
116 display: flex; 124 display: flex;
117 align-items: center; 125 align-items: center;
118 gap: 0.5rem; 126 gap: 0.5rem;
119 - background: #f5f5f5; 127 + background: var(--search-bg, #f5f5f5);
120 border: none; 128 border: none;
121 border-radius: 8px; 129 border-radius: 8px;
122 padding: 0.625rem 1rem; 130 padding: 0.625rem 1rem;
...@@ -124,6 +132,10 @@ ...@@ -124,6 +132,10 @@
124 width: 100%; 132 width: 100%;
125 } 133 }
126 134
135 + :global(html.dark) .objeto-search {
136 + --search-bg: rgba(255, 255, 255, 0.08);
137 + }
138 +
127 .objeto-search.focused { 139 .objeto-search.focused {
128 border-color: #6B9FD4; 140 border-color: #6B9FD4;
129 box-shadow: 0 0 0 3px rgba(107, 159, 212, 0.15); 141 box-shadow: 0 0 0 3px rgba(107, 159, 212, 0.15);
......
...@@ -57,4 +57,14 @@ ...@@ -57,4 +57,14 @@
57 .vista-btn:active { 57 .vista-btn:active {
58 color: #555555; 58 color: #555555;
59 } 59 }
60 +
61 + :global(html.dark) .vista-btn {
62 + color: rgba(255, 255, 255, 0.6);
63 + text-decoration-color: rgba(255, 255, 255, 0.4);
64 + }
65 +
66 + :global(html.dark) .vista-btn:hover {
67 + color: rgba(255, 255, 255, 0.85);
68 + text-decoration-color: rgba(255, 255, 255, 0.5);
69 + }
60 </style> 70 </style>
......
This diff is collapsed. Click to expand it.