Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TAS-1363] 🚸 Redirect to edit page with the latest version #455

Merged
merged 1 commit into from
Mar 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions components/IscnEditBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
v-if="isIscnOwner"
class="flex justify-center items-center gap-[4px] mr-[8px]"
>
<Button preset="plain" text="Edit ISCN" @click="handleEdit">
<Button preset="plain" :text="$t('IscnEditInfo.button.edit')" @click="handleEdit">
<template #prepend>
<IconEdit />
</template>
Expand Down Expand Up @@ -68,6 +68,7 @@

<script lang="ts">
import { Vue, Component, Prop } from 'vue-property-decorator'
import { extractIscnIdPrefix } from '~/utils/ui'

@Component
export default class IscnEditBar extends Vue {
Expand All @@ -87,7 +88,8 @@ export default class IscnEditBar extends Vue {
}

handleEdit() {
this.$emit('click-edit', this.iscnId)
const iscnIdPrefix = extractIscnIdPrefix(this.iscnId)
this.$emit('click-edit', iscnIdPrefix)
}

handleClickMintNFTBook() {
Expand Down
6 changes: 3 additions & 3 deletions components/IscnUploadedInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -226,12 +226,12 @@ export default class IscnUploadedInfo extends Vue {
window.open(`${NFT_BOOK_PRESS_URL}/mint-nft?iscn_id=${this.iscnId}`, '_blank', 'noopener');
}

handleEdit() {
logTrackerEvent(this, 'ISCNUploaded', 'ClickEdit', this.iscnId, 1)
handleEdit(iscnIdPrefix: string) {
logTrackerEvent(this, 'ISCNUploaded', 'ClickEdit', iscnIdPrefix, 1)
this.$router.replace(
this.localeLocation({
name: 'edit-iscnId',
params: { iscnId: this.iscnId },
params: { iscnId: iscnIdPrefix },
})!,
)
}
Expand Down
1 change: 1 addition & 0 deletions locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@
"IscnEditInfo.reUpload": "Re-upload files to update links",
"IscnEditInfo.updating": "Updating ISCN...",
"IscnEditInfo.button.confirm": "Update ISCN",
"IscnEditInfo.button.edit": "Edit ISCN",
"IscnRegisterForm.arweave.link": "ar://{arweaveId}",
"IscnRegisterForm.button.back": "Back",
"IscnRegisterForm.button.confirm": "Confirm",
Expand Down
6 changes: 3 additions & 3 deletions pages/view/_iscnId/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -913,12 +913,12 @@ export default class ViewIscnIdPage extends Vue {
}
}

handleEdit() {
logTrackerEvent(this, 'ISCNView', 'ClickEdit', this.iscnId, 1)
handleEdit(iscnIdPrefix: string) {
logTrackerEvent(this, 'ISCNView', 'ClickEdit', iscnIdPrefix, 1)
this.$router.replace(
this.localeLocation({
name: 'edit-iscnId',
params: { iscnId: this.iscnId },
params: { iscnId: iscnIdPrefix },
})!,
)
}
Expand Down
Loading