Merge remote-tracking branch 'origin/product-procedures' into front-styles

This commit is contained in:
2026-04-03 09:41:17 +02:00
6 changed files with 40 additions and 84 deletions

View File

@@ -35,6 +35,10 @@
</div>
<div v-if="toLangId !== settingStore.shopDefaultLanguage && !isTranslations" class="flex gap-7">
<UButton color="info" variant="outline" v-if="!isEditing" @click="isTranslations = true">
<p>Change Text</p>
<UIcon name="material-symbols-light:stylus-note-sharp" class="text-7.5" />
</UButton>
<UButton @click="translateToSelectedLanguage" color="info" :loading="translating">
Translate from Polish to {{langs.find(l => l.id === toLangId)?.name}}
</UButton>
@@ -60,13 +64,13 @@
<p class="text-red-500">{{ productStore.error }}</p>
</div>
<div v-else-if="productStore.productDescription" class="space-y-">
<div class="flex gap-6 h-full">
<div v-else-if="productStore.productDescription" class="space-y-7.5">
<div class="flex gap-6 h-full w-full">
<div
class="min-w-96 min-h-96 border border-(--border-light) dark:bg-gray-700 rounded-lg flex items-center justify-center">
<span class="text-gray-500 dark:text-gray-400">Product Image</span>
</div>
<div class="flex flex-col justify-between min-h-full">
<div class="flex flex-col justify-between min-h-full w-full">
<div>
<div>
<p v-if="!isTranslations" class="text-[25px] font-bold text-black dark:text-white">
@@ -75,7 +79,7 @@
<div class="" v-if="isTranslations">
<p>Title:</p>
<UEditor v-slot="{ editor }" v-model="productStore.productDescription.name" content-type="html"
:ui="{ base: 'p-8 sm:px-16' }" class="w-full border rounded-md border-(--border-light)"
:ui="{ base: 'p-8 sm:px-16', root : 'pt-2' }" class="min-w-full border rounded-md border-(--border-light)"
placeholder="Write there ...">
<UEditorToolbar :editor="editor" :items="toolbarItems" class="sm:px-8">
<template #link>
@@ -128,7 +132,7 @@
root: 'items-start!'
}">
<template #description>
<div v-if="!isTranslations" class="flex justify-end items-center gap-3 mb-4">
<!-- <div v-if="!isTranslations" class="flex justify-end items-center gap-3 mb-4">
<UButton v-if="!isEditing" @click="activeTab === 'usage' ? enableEdit() : enableDescriptionEdit()"
class="flex items-center gap-2 m-2 cursor-pointer bg-(--accent-blue-light)! dark:bg-(--accent-blue-dark)!">
<p class="text-white">Change Text</p>
@@ -142,7 +146,7 @@
color="neutral" variant="outline" class="p-2.5 cursor-pointer">
Cancel
</UButton>
</div>
</div> -->
<UEditor v-if="isTranslations" v-slot="{ editor }" v-model="productStore.productDescription.description"
content-type="html" :ui="{ base: 'p-8 sm:px-16' }" class="w-full min-h-74" placeholder="Write there ...">
<UEditorToolbar :editor="editor" :items="toolbarItems" class="sm:px-8">
@@ -160,7 +164,8 @@
<UButton v-if="!isEditing" @click="enableEdit"
class="flex items-center gap-2 m-2 cursor-pointer bg-(--accent-blue-light)! dark:bg-(--accent-blue-dark)!">
<p class="text-(--text-sky-light) dark:text-(--text-sky-dark)">Change Text</p>
<UIcon name="material-symbols-light:stylus-note-sharp" class="text-[30px] text-(--text-sky-light) dark:text-(--text-sky-dark)" />
<UIcon name="material-symbols-light:stylus-note-sharp"
class="text-[30px] text-(--text-sky-light) dark:text-(--text-sky-dark)" />
</UButton>
<UButton v-if="isEditing" @click="saveText" color="neutral" variant="outline"

View File

@@ -39,7 +39,7 @@ function adaptMenu(menu: NavigationMenuItem[]) {
adaptMenu(item.children);
item.children.unshift({
label: item.label, icon: 'i-lucide-book-open', popover: item.label, to: {
name: 'customer-products-category', params: {
name: 'admin-products-category', params: {
category_id: item.params.category_id,
link_rewrite: item.params.link_rewrite
}
@@ -47,7 +47,7 @@ function adaptMenu(menu: NavigationMenuItem[]) {
})
} else {
item.to = {
name: 'customer-products-category', params: {
name: 'admin-products-category', params: {
category_id: item.params.category_id,
link_rewrite: item.params.link_rewrite
}

View File

@@ -6,8 +6,8 @@
<span class="text-xs text-gray-400">
Country/Currency
</span>
<span class="font-medium dark:text-white text-black">
{{ country?.name }} / {{ country?.ps_currency.iso_code }}
<span v-if="country" class="font-medium dark:text-white text-black">
{{ country?.name }} / {{ country?.ps_currency }}
</span>
</div>
</template>

View File

@@ -151,7 +151,7 @@ function getItems(state: 'collapsed' | 'expanded') {
] satisfies NavigationMenuItem[]
}
// zsdasdad
//
import { useRouter } from 'vue-router'
import { currentLang } from '@/router/langs'
import { useFetchJson } from '@/composable/useFetchJson'
@@ -182,7 +182,7 @@ const menuItems = computed(() => {
if (!menu.value?.length) return []
return transformMenu(
menu.value[0]?.children || [],
menu.value || [],
currentLang.value?.iso_code
)
})