Merge remote-tracking branch 'origin/translate' into front-styles

This commit is contained in:
2026-04-15 13:54:24 +02:00
15 changed files with 474 additions and 309 deletions

View File

@@ -169,21 +169,21 @@ if (productData.colors.length > 0) {
const route = useRoute()
async function toggleFavorite() {
const url = `/api/v1/restricted/product/favorite/${route.params.product_id}`
// async function toggleFavorite() {
// const url = `/api/v1/restricted/product/favorite/${route.params.product_id}`
try {
if (!productData.is_favorite) {
await useFetchJson(url, { method: 'POST' })
} else {
await useFetchJson(url, { method: 'DELETE' })
}
// try {
// if (!productData.is_favorite) {
// await useFetchJson(url, { method: 'POST' })
// } else {
// await useFetchJson(url, { method: 'DELETE' })
// }
productData.is_favorite = !productData.is_favorite
} catch (e: unknown) {
console.error(e)
}
}
// productData.is_favorite = !productData.is_favorite
// } catch (e: unknown) {
// console.error(e)
// }
// }
</script>
<style scoped>