fix: sidebar height scroll, saveTransform bypassing flip config and api gto insert syntax parse
continuous-integration/webhook Deploy concluído (VPS4)
continuous-integration/webhook Deploy concluído (VPS4)
This commit is contained in:
@@ -1 +1 @@
|
||||
2.1.51
|
||||
2.1.53
|
||||
|
||||
@@ -64,6 +64,8 @@ body {
|
||||
================================================================ */
|
||||
.sidebar {
|
||||
width: var(--sidebar-width);
|
||||
height: 100vh;
|
||||
overflow-y: auto;
|
||||
background: var(--glass-bg);
|
||||
backdrop-filter: var(--glass-blur);
|
||||
-webkit-backdrop-filter: var(--glass-blur);
|
||||
|
||||
@@ -153,7 +153,7 @@ export default function ImageDetailsPage() {
|
||||
const totalRotation = ((baseRotation + fineTuneAngle) % 360 + 360) % 360;
|
||||
|
||||
const saveTransform = async () => {
|
||||
if (totalRotation === 0 && remark === (image.remark || '')) {
|
||||
if (totalRotation === 0 && !baseFlipH && !baseFlipV && remark === (image.remark || '')) {
|
||||
showToast('Nenhuma edição aplicada.', 'error');
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -169,16 +169,19 @@ router.post('/:id/images', async (req, res) => {
|
||||
const { image_id } = req.body;
|
||||
if (!image_id) return res.status(400).json({ error: 'image_id é obrigatório' });
|
||||
|
||||
const gId = parseInt(req.params.id, 10);
|
||||
const imgId = parseInt(image_id, 10);
|
||||
|
||||
// Verificar se já está vinculada
|
||||
const existing = await db.get(
|
||||
'SELECT id FROM gto_images WHERE gto_id = $1 AND image_id = $2',
|
||||
[req.params.id, image_id]
|
||||
[gId, imgId]
|
||||
);
|
||||
if (existing) return res.status(409).json({ error: 'Imagem já vinculada a esta GTO' });
|
||||
|
||||
await db.run(
|
||||
'INSERT INTO gto_images (gto_id, image_id) VALUES ($1, $2) RETURNING id',
|
||||
[req.params.id, image_id]
|
||||
[gId, imgId]
|
||||
);
|
||||
res.status(201).json({ success: true, message: 'Imagem vinculada à GTO' });
|
||||
} catch (err) {
|
||||
|
||||
Reference in New Issue
Block a user