Update files
This commit is contained in:
parent
02d7b1a958
commit
4d4601ecb5
|
|
@ -371,40 +371,42 @@ export default function Search({ user }) {
|
||||||
<span>Используйте e621 и gelbooru</span>
|
<span>Используйте e621 и gelbooru</span>
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<div className="results-grid">
|
<>
|
||||||
{results.map((item, index) => {
|
<div className="results-grid">
|
||||||
const imageId = `${item.source}-${item.id}`
|
{results.map((item, index) => {
|
||||||
const isSelected = selectedImages.includes(imageId)
|
const imageId = `${item.source}-${item.id}`
|
||||||
|
const isSelected = selectedImages.includes(imageId)
|
||||||
return (
|
|
||||||
<div
|
return (
|
||||||
key={imageId}
|
<div
|
||||||
className={`result-item card ${isSelected ? 'selected' : ''}`}
|
key={imageId}
|
||||||
onClick={() => openViewer(index)}
|
className={`result-item card ${isSelected ? 'selected' : ''}`}
|
||||||
>
|
onClick={() => openViewer(index)}
|
||||||
<img src={item.preview} alt={`Result ${index}`} />
|
>
|
||||||
<div className="result-overlay">
|
<img src={item.preview} alt={`Result ${index}`} />
|
||||||
<span className="result-source">{item.source}</span>
|
<div className="result-overlay">
|
||||||
<span className="result-rating">{item.rating}</span>
|
<span className="result-source">{item.source}</span>
|
||||||
</div>
|
<span className="result-rating">{item.rating}</span>
|
||||||
{selectionMode && (
|
|
||||||
<div className="selection-checkbox">
|
|
||||||
{isSelected && <span>✓</span>}
|
|
||||||
</div>
|
</div>
|
||||||
)}
|
{selectionMode && (
|
||||||
</div>
|
<div className="selection-checkbox">
|
||||||
)
|
{isSelected && <span>✓</span>}
|
||||||
})}
|
</div>
|
||||||
</div>
|
)}
|
||||||
|
</div>
|
||||||
{/* Кнопка отправки выбранных */}
|
)
|
||||||
{selectionMode && selectedImages.length > 0 && (
|
})}
|
||||||
<div className="send-selected-bar">
|
|
||||||
<button className="send-selected-btn" onClick={handleSendSelected}>
|
|
||||||
Отправить в Telegram ({selectedImages.length})
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
)}
|
|
||||||
|
{/* Кнопка отправки выбранных */}
|
||||||
|
{selectionMode && selectedImages.length > 0 && (
|
||||||
|
<div className="send-selected-bar">
|
||||||
|
<button className="send-selected-btn" onClick={handleSendSelected}>
|
||||||
|
Отправить в Telegram ({selectedImages.length})
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,35 @@
|
||||||
|
╔═══════════════════════════════════════════════════════════════════════╗
|
||||||
|
║ ║
|
||||||
|
║ 🔧 ИСПРАВЛЕНА СИНТАКСИЧЕСКАЯ ОШИБКА 🔧 ║
|
||||||
|
║ ║
|
||||||
|
╚═══════════════════════════════════════════════════════════════════════╝
|
||||||
|
|
||||||
|
|
||||||
|
ПРОБЛЕМА:
|
||||||
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||||
|
|
||||||
|
Expected ")" but found "{"
|
||||||
|
→ Не хватало React Fragment (<>) для нескольких элементов
|
||||||
|
|
||||||
|
|
||||||
|
ИСПРАВЛЕНО:
|
||||||
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||||
|
|
||||||
|
Обернул в <> ... </> два элемента:
|
||||||
|
• results-grid
|
||||||
|
• send-selected-bar
|
||||||
|
|
||||||
|
|
||||||
|
ОБНОВИТЬ (1 файл):
|
||||||
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||||
|
|
||||||
|
cd /Users/glpshchn/Desktop/nakama
|
||||||
|
|
||||||
|
scp frontend/src/pages/Search.jsx root@ваш_IP:/var/www/nakama/frontend/src/pages/
|
||||||
|
|
||||||
|
|
||||||
|
ssh root@ваш_IP "cd /var/www/nakama/frontend && npm run build"
|
||||||
|
|
||||||
|
|
||||||
|
30 секунд
|
||||||
|
|
||||||
Loading…
Reference in New Issue