+
+
+
diff --git a/locales/en.json b/locales/en.json
index e0df34b649..3af8e8f3dc 100644
--- a/locales/en.json
+++ b/locales/en.json
@@ -1358,6 +1358,7 @@
"message": "People will be able to buy your NFT."
}
},
+ "notRecommendedModify": "Please note that this value is not recommended to be modified as it may lead to misuse and confusion",
"progress": "In Progress",
"requiredDeposit": "A deposit of {0} is required to create a {1}. Please note, this initial deposit is refundable.",
"royalty": {
From 874e602a6dbb63066378e38fda4e80fdfa731600 Mon Sep 17 00:00:00 2001
From: Jarsen <31397967+Jarsen136@users.noreply.github.com>
Date: Mon, 2 Dec 2024 13:51:04 +0100
Subject: [PATCH 2/4] feat: undo edit nft
---
components/common/EditNftModal.vue | 22 ++++++++++---
.../common/NonRecommendFieldNotification.vue | 31 ++++++++++++++++---
locales/en.json | 2 +-
3 files changed, 45 insertions(+), 10 deletions(-)
diff --git a/components/common/EditNftModal.vue b/components/common/EditNftModal.vue
index a052b0218b..470521dfa7 100644
--- a/components/common/EditNftModal.vue
+++ b/components/common/EditNftModal.vue
@@ -16,7 +16,10 @@
:label="$t('mint.nft.art.label')"
required
>
-
+
-
+ ()
const imageUrl = ref()
const attributes = ref([])
+const originalImageUrl = computed(() => sanitizeIpfsUrl(props.metadata?.image))
+
const nameChanged = computed(() => props.metadata?.name !== name.value)
-const imageChanged = computed(() => Boolean(image.value))
+const imageChanged = computed(() => originalImageUrl.value !== imageUrl.value)
+
+const initImage = () => {
+ imageUrl.value = originalImageUrl.value
+ image.value = undefined
+}
const disabled = computed(() => {
const hasImage = Boolean(imageUrl.value)
@@ -122,8 +135,7 @@ const editCollection = async () => {
watch(isModalActive, (value) => {
if (value) {
- imageUrl.value = sanitizeIpfsUrl(props.metadata?.image)
- image.value = undefined
+ initImage()
name.value = props.metadata?.name
description.value = props.metadata?.description
attributes.value = structuredClone(toRaw(props.metadata?.attributes || []))
diff --git a/components/common/NonRecommendFieldNotification.vue b/components/common/NonRecommendFieldNotification.vue
index 206307ac4b..2490f88b90 100644
--- a/components/common/NonRecommendFieldNotification.vue
+++ b/components/common/NonRecommendFieldNotification.vue
@@ -10,17 +10,40 @@
class="text-yellow-500 flex-shrink-0"
size="small"
/>
-
- {{ $t('mint.notRecommendedModify') }}
-
+
+
+
+ {{ $t('mint.notRecommendedModify') }}
+
+
+
+
+ {{ $t('undo') }}
+
+
+
diff --git a/locales/en.json b/locales/en.json
index 3af8e8f3dc..40de2ad3ef 100644
--- a/locales/en.json
+++ b/locales/en.json
@@ -1358,7 +1358,7 @@
"message": "People will be able to buy your NFT."
}
},
- "notRecommendedModify": "Please note that this value is not recommended to be modified as it may lead to misuse and confusion",
+ "notRecommendedModify": "Please note that this field is not recommended to be modified as it may lead to misuse and confusion",
"progress": "In Progress",
"requiredDeposit": "A deposit of {0} is required to create a {1}. Please note, this initial deposit is refundable.",
"royalty": {
From 70ae8a6c9d5d6b77cb168eb96c61c4744a2e55f8 Mon Sep 17 00:00:00 2001
From: Jarsen <31397967+Jarsen136@users.noreply.github.com>
Date: Mon, 2 Dec 2024 13:58:06 +0100
Subject: [PATCH 3/4] chore: remove class
---
components/common/NonRecommendFieldNotification.vue | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/components/common/NonRecommendFieldNotification.vue b/components/common/NonRecommendFieldNotification.vue
index 2490f88b90..043a1710e8 100644
--- a/components/common/NonRecommendFieldNotification.vue
+++ b/components/common/NonRecommendFieldNotification.vue
@@ -7,11 +7,11 @@
>
-