fix: button showProduct
This commit is contained in:
@@ -3,7 +3,8 @@
|
||||
<p class="cursor-pointer" @click="backFromProduct()">Back to products</p>
|
||||
<div class="container my-10 mx-auto ">
|
||||
<div
|
||||
class="flex items-end justify-between gap-4 mb-6 bg-(--second-light) dark:bg-(--main-dark) border border-(--border-light) dark:border-(--border-dark) p-4 rounded-md">
|
||||
class=" gap-4 mb-6 bg-(--second-light) dark:bg-(--main-dark) border border-(--border-light) dark:border-(--border-dark) p-4 rounded-md">
|
||||
<div v-if="!isShowProductView" class="flex items-end justify-between">
|
||||
<div class="flex items-center gap-3" v-if="!isTranslations">
|
||||
<p class="text-red-500 text-md whitespace-nowrap">Translate from Polish to</p>
|
||||
<USelect v-model="toLangId" :items="availableLangs" value-key="id" label-key="name"
|
||||
@@ -19,6 +20,34 @@
|
||||
</template>
|
||||
</USelect>
|
||||
</div>
|
||||
|
||||
<div class="flex gap-3 items-end justify-end">
|
||||
<UButton @click="() => {
|
||||
fetchForLanguage(toLangId)
|
||||
isShowProductView = true
|
||||
}" color="primary" v-if="isTranslations === false"
|
||||
class="text-white bg-(--accent-blue-light) dark:bg-(--accent-blue-dark) px-12!">
|
||||
Show product
|
||||
</UButton>
|
||||
<UButton @click="translateToSelectedLanguage" color="primary" :loading="translating"
|
||||
v-if="isTranslations === false"
|
||||
class="text-white bg-(--accent-blue-light) dark:bg-(--accent-blue-dark) px-12!">
|
||||
Translate
|
||||
</UButton>
|
||||
<div v-else class="flex gap-3 items-end justify-end">
|
||||
<UButton @click="() => {
|
||||
toLangId = settingStore.shopDefaultLanguage
|
||||
isTranslations = false
|
||||
}" color="primary" class="text-white bg-(--accent-blue-light) dark:bg-(--accent-blue-dark) px-12!">
|
||||
Cancel
|
||||
</UButton>
|
||||
<UButton color="primary" @click="saveDescription"
|
||||
class="text-white bg-(--accent-blue-light) dark:bg-(--accent-blue-dark) px-12!">
|
||||
Save
|
||||
</UButton>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<UButton @click="isShowProductView = false" color="primary"
|
||||
class="text-white bg-(--accent-blue-light) dark:bg-(--accent-blue-dark) px-12!">
|
||||
|
||||
Reference in New Issue
Block a user