diff --git a/src/components/ui/ChangePasswordForm.vue b/src/components/ui/ChangePasswordForm.vue
index e2af6236..cf132704 100644
--- a/src/components/ui/ChangePasswordForm.vue
+++ b/src/components/ui/ChangePasswordForm.vue
@@ -130,24 +130,28 @@ onMounted(async () => {
v-model="formData.newPassword"
:type="!showNewPwd ? 'password' : 'text'"
:label="t('newPassword')"
- >
+ >
+
+ />
+
+
+ >
+
+ />
+
+
+import { ref, inject } from 'vue';
+import { useI18n } from 'vue-i18n';
+
+import VnInput from 'src/components/common/VnInput.vue';
+
+import useNotify from 'src/composables/useNotify.js';
+
+const props = defineProps({
+ schema: {
+ type: String,
+ default: ''
+ },
+ imageName: {
+ type: String,
+ default: ''
+ }
+});
+
+const emit = defineEmits(['close']);
+
+const api = inject('api');
+const { t } = useI18n();
+const { notify } = useNotify();
+
+const inputFileRef = ref(null);
+
+const loading = ref(false);
+const name = ref(props.imageName ?? '');
+const file = ref(null);
+
+const onSubmit = async () => {
+ try {
+ loading.value = true;
+ const formData = new FormData();
+ formData.append('name', name.value);
+ formData.append('image', file.value);
+ formData.append('schema', props.schema);
+ formData.append('srv', 'json:image/upload');
+
+ await api({
+ method: 'post',
+ url: location.origin,
+ data: formData,
+ headers: {
+ 'Content-Type': 'multipart/form-data'
+ }
+ });
+ notify(t('imageAdded'), 'positive');
+ emit('close');
+ } catch (error) {
+ console.error('Error uploading image:', error);
+ } finally {
+ loading.value = false;
+ }
+};
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+en-US:
+ name: Name
+ file: File
+ send: Send
+es-ES:
+ name: Nombre
+ file: Archivo
+ send: Enviar
+ca-ES:
+ name: Nom
+ file: Arxiu
+ send: Enviar
+fr-FR:
+ name: Nom
+ file: Fichier
+ send: Envoyer
+pt-PT:
+ name: Nome
+ file: Arquivo
+ send: Enviar
+
diff --git a/src/components/ui/VnImg.vue b/src/components/ui/VnImg.vue
index 31197336..2d3f5758 100644
--- a/src/components/ui/VnImg.vue
+++ b/src/components/ui/VnImg.vue
@@ -2,6 +2,8 @@
import { ref, computed } from 'vue';
import { useAppStore } from 'stores/app';
+import ImageEditor from 'src/components/ui/ImageEditor.vue';
+
const props = defineProps({
baseURL: {
type: String,
@@ -27,23 +29,67 @@ const props = defineProps({
rounded: {
type: Boolean,
default: false
+ },
+ fullRounded: {
+ type: Boolean,
+ default: false
+ },
+ width: {
+ type: String,
+ default: '100%'
+ },
+ height: {
+ type: String,
+ default: '100%'
+ },
+ editable: {
+ type: Boolean,
+ default: false
+ },
+ editSchema: {
+ type: String,
+ default: ''
+ },
+ editImageName: {
+ type: String,
+ default: ''
}
});
+
const app = useAppStore();
-const show = ref(false);
+const showZoom = ref(false);
+const showEditForm = ref(false);
const url = computed(() => {
return `${props.baseURL ?? app.imageUrl}/${props.storage}/${props.size}/${props.id}`;
});
-
-
+
+
+
+
+
+
{
spinner-color="primary"
/>
+
+
+
-
-
+
+en-US:
+ noData: No data
+es-ES:
+ noData: Sin datos
+ca-ES:
+ noData: Sense dades
+fr-FR:
+ noData: Aucune donnée
+pt-PT:
+ noData: Sem dados
+
diff --git a/src/router/routes.js b/src/router/routes.js
index 21488827..93b97372 100644
--- a/src/router/routes.js
+++ b/src/router/routes.js
@@ -91,13 +91,13 @@ const routes = [
},
{
name: 'adminPhotos',
- path: 'admin/photos'
- // component: () => import('pages/Admin/PhotosView.vue')
+ path: 'admin/photos',
+ component: () => import('pages/Admin/PhotosView.vue')
},
{
name: 'adminItems',
- path: 'admin/items'
- // component: () => import('pages/Admin/ItemsView.vue')
+ path: 'admin/items',
+ component: () => import('pages/Admin/ItemsView.vue')
}
]
},