diff --git a/package.json b/package.json index 513250b..4261da7 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "handy-uploader", - "version": "1.1.3", + "version": "1.1.4", "description": "Complete and simple file uploader with image compressor in Vue.js. Choice Theme : Thumbnail, Simple, Table, Add custom fields, Image compressor, Manage files count, Manage files size, Multi language support , ...", "author": "ali jahanpak", "license": "MIT", diff --git a/src/App.vue b/src/App.vue index d178940..3747c99 100755 --- a/src/App.vue +++ b/src/App.vue @@ -12,8 +12,8 @@ :changeFileName="true" :addFileDescription="true" :addFileTag="true" - :lang= "'en'" - :tags= "['Tag 1', 'Tag 2', 'Tag 3', 'Tag 4']" + :lang="'en'" + :tags="['Tag 1', 'Tag 2', 'Tag 3', 'Tag 4']" > @@ -32,39 +32,38 @@ export default { data: () => ({ registryDocFile: [], - customLang : { - custom : { - insertFile: 'Insert File1', - insertNewFile: 'Insert New File1', - add: 'Add', - delete: 'Delete', + customLang: { + custom: { + insertFile: "Insert File1", + insertNewFile: "Insert New File1", + add: "Add", + delete: "Delete", deleteDialog: { - message: 'Are you sure you want to delete the file?', - cancel: 'cancel', + message: "Are you sure you want to delete the file?", + cancel: "cancel" }, table: { - thumb: 'Thumb', - name: 'Name', - size: 'Size', - tags: 'tags', + thumb: "Thumb", + name: "Name", + size: "Size", + tags: "tags", action: { - action: 'Action', - deleteTooltip: 'Delete' + action: "Action", + deleteTooltip: "Delete" } }, size: { - kb: 'KB', - mb: 'MB', + kb: "KB", + mb: "MB" }, - maxFileSizeAlert: 'Max file Size is', - maxFileCountAlert: 'Max file Count is', - fileName: 'File Name', - fileDescription: 'File Description', - fileTags: 'File Tags', + maxFileSizeAlert: "Max file Size is", + maxFileCountAlert: "Max file Count is", + fileName: "File Name", + fileDescription: "File Description", + fileTags: "File Tags" } - }, + } }), - methods: { - } + methods: {} }; diff --git a/src/components/handyUploader.vue b/src/components/handyUploader.vue index 57f422a..2e16a08 100755 --- a/src/components/handyUploader.vue +++ b/src/components/handyUploader.vue @@ -5,123 +5,379 @@ - {{selectedLang[lang].insertFile}} + + {{ selectedLang[lang].insertFile }} + - {{selectedLang[lang].insertFile}} + + {{ selectedLang[lang].insertFile }} + - {{selectedLang[lang].insertFile}} + + {{ selectedLang[lang].insertFile }} + - + - {{attachment.file.name}} - - - {{ Number((attachment.file.size / 1000).toFixed(1)) +' '+ selectedLang[lang].size.kb}} + {{ + attachment.file.name + }} + + + {{ + Number((attachment.file.size / 1000).toFixed(1)) + + " " + + selectedLang[lang].size.kb + }} mdi-harddisk - - - {{ Number(((attachment.file.size / 1000) / 1024 ).toFixed(1)) +' '+ selectedLang[lang].size.mb}} + + + {{ + Number( + (attachment.file.size / 1000 / 1024).toFixed(1) + ) + + " " + + selectedLang[lang].size.mb + }} mdi-harddisk - - + + - mdi-file-image-outline + mdi-file-image-outline - mdi-file-pdf-outline - mdi-file-word-outline - mdi-file-image-outline - mdi-file-excel-outline - mdi-file-powerpoint-outline - mdi-file-video-outline - mdi-file-cad - mdi-folder-zip-outline - mdi-script-text-outline - mdi-file-question-outline + mdi-file-pdf-outline + mdi-file-word-outline + mdi-file-image-outline + mdi-file-excel-outline + mdi-file-powerpoint-outline + mdi-file-video-outline + mdi-file-cad + mdi-folder-zip-outline + mdi-script-text-outline + mdi-file-question-outline - + - mdi-trash-can-outline + mdi-trash-can-outline - {{selectedLang[lang].delete}} + {{ selectedLang[lang].delete }} - mdi-pencil-outline + mdi-pencil-outline - {{selectedLang[lang].edit}} + {{ selectedLang[lang].edit }} - {{ attachment.file.showDetailState ? 'mdi-chevron-up' : 'mdi-chevron-down' }} + {{ + attachment.file.showDetailState + ? "mdi-chevron-up" + : "mdi-chevron-down" + }} - + - - {{tag}} + + {{ tag }} - - {{attachment.file.description}} + + {{ attachment.file.description }} @@ -130,69 +386,244 @@ - + - + - mdi-file-pdf-outline - mdi-file-word-outline - mdi-file-excel-outline - mdi-file-powerpoint-outline - mdi-file-video-outline - mdi-file-cad - mdi-folder-zip-outline - mdi-script-text-outline - mdi-file-question-outline + mdi-file-pdf-outline + mdi-file-word-outline + mdi-file-excel-outline + mdi-file-powerpoint-outline + mdi-file-video-outline + mdi-file-cad + mdi-folder-zip-outline + mdi-script-text-outline + mdi-file-question-outline - {{attachment.file.name}} + {{ attachment.file.name }} - - - {{ Number((attachment.file.size / 1000).toFixed(1)) +' '+ selectedLang[lang].size.kb}} + + + {{ + Number((attachment.file.size / 1000).toFixed(1)) + + " " + + selectedLang[lang].size.kb + }} mdi-harddisk - - - {{ Number(((attachment.file.size / 1000) / 1024 ).toFixed(1)) +' '+ selectedLang[lang].size.mb}} + + + {{ + Number((attachment.file.size / 1000 / 1024).toFixed(1)) + + " " + + selectedLang[lang].size.mb + }} mdi-harddisk - + - + mdi-close - - + + - + - {{attachment.name}} + {{ + attachment.name + }} - + - + - mdi-file-pdf-outline - mdi-file-word-outline - mdi-file-image-outline - mdi-file-excel-outline - mdi-file-powerpoint-outline - mdi-file-video-outline - mdi-file-cad - mdi-folder-zip-outline - mdi-script-text-outline - mdi-file-question-outline + mdi-file-pdf-outline + mdi-file-word-outline + mdi-file-image-outline + mdi-file-excel-outline + mdi-file-powerpoint-outline + mdi-file-video-outline + mdi-file-cad + mdi-folder-zip-outline + mdi-script-text-outline + mdi-file-question-outline - - + + - mdi-file-pdf-outline - mdi-file-word-outline - mdi-file-image-outline - mdi-file-excel-outline - mdi-file-powerpoint-outline - mdi-file-video-outline - mdi-file-cad - mdi-folder-zip-outline - mdi-script-text-outline - mdi-file-question-outline - {{attachment.name}}.{{attachment.format}} + mdi-file-pdf-outline + mdi-file-word-outline + mdi-file-image-outline + mdi-file-excel-outline + mdi-file-powerpoint-outline + mdi-file-video-outline + mdi-file-cad + mdi-folder-zip-outline + mdi-script-text-outline + mdi-file-question-outline + {{ attachment.name }}.{{ attachment.format }} @@ -427,7 +1319,14 @@ - {{selectedLang[lang].add}} + {{ selectedLang[lang].add }} @@ -435,64 +1334,197 @@ - + mdi-close - + - + - mdi-file-pdf-outline - mdi-file-word-outline - mdi-file-image-outline - mdi-file-excel-outline - mdi-file-powerpoint-outline - mdi-file-video-outline - mdi-file-cad - mdi-folder-zip-outline - mdi-script-text-outline - mdi-file-question-outline + mdi-file-pdf-outline + mdi-file-word-outline + mdi-file-image-outline + mdi-file-excel-outline + mdi-file-powerpoint-outline + mdi-file-video-outline + mdi-file-cad + mdi-folder-zip-outline + mdi-script-text-outline + mdi-file-question-outline - {{selectedLang[lang].edit}} + {{ selectedLang[lang].edit }} @@ -500,19 +1532,16 @@ - - {{fileUploaderSnackText}} - + {{ fileUploaderSnackText }} + mdi-close @@ -525,12 +1554,25 @@ - {{selectedLang[lang].deleteDialog.message}} + {{ selectedLang[lang].deleteDialog.message }} - {{selectedLang[lang].deleteDialog.cancel}} - {{selectedLang[lang].delete}} + {{ selectedLang[lang].deleteDialog.cancel }} + {{ selectedLang[lang].delete }} + @@ -540,418 +1582,426 @@ diff --git a/src/components/language.js b/src/components/language.js index a69fccc..5f5f5e1 100755 --- a/src/components/language.js +++ b/src/components/language.js @@ -1,148 +1,148 @@ -export default{ - en:{ - insertFile: 'Insert File', - insertNewFile: 'Insert New File', - add: 'Add', - delete: 'Delete', - edit: 'Edit', - deleteDialog:{ - message: 'Are you sure you want to delete the file?', - cancel: 'cancel', +export default { + en: { + insertFile: "Insert File", + insertNewFile: "Insert New File", + add: "Add", + delete: "Delete", + edit: "Edit", + deleteDialog: { + message: "Are you sure you want to delete the file?", + cancel: "cancel" }, - table:{ - thumb: 'Thumb', - name: 'Name', - size: 'Size', - tags: 'tags', - action:{ - action: 'Action', - deleteTooltip: 'Delete' + table: { + thumb: "Thumb", + name: "Name", + size: "Size", + tags: "tags", + action: { + action: "Action", + deleteTooltip: "Delete" } }, - size:{ - kb: 'KB', - mb: 'MB', + size: { + kb: "KB", + mb: "MB" }, - maxFileSizeAlert: 'Max file Size is', - maxFileCountAlert: 'Max file Count is', - fileName: 'File Name', - fileDescription: 'File Description', - fileTags: 'File Tags', + maxFileSizeAlert: "Max file Size is", + maxFileCountAlert: "Max file Count is", + fileName: "File Name", + fileDescription: "File Description", + fileTags: "File Tags" }, - fa:{ - insertFile: 'افزودن فایل', - insertNewFile: 'افزودن فایل جدید', - add: 'افزودن', - delete: 'حذف', - edit: 'ویرایش', - deleteDialog:{ - message: 'آیا برای حذف فایل اطمینان دارید؟', - cancel: 'لغو', + fa: { + insertFile: "افزودن فایل", + insertNewFile: "افزودن فایل جدید", + add: "افزودن", + delete: "حذف", + edit: "ویرایش", + deleteDialog: { + message: "آیا برای حذف فایل اطمینان دارید؟", + cancel: "لغو" }, - table:{ - thumb: 'پیش نمایش', - name: 'نام', - size: 'حجم', - action:{ - action: 'عملیات', - deleteTooltip: 'حذف' + table: { + thumb: "پیش نمایش", + name: "نام", + size: "حجم", + action: { + action: "عملیات", + deleteTooltip: "حذف" } }, - size:{ - kb: 'کیلو بایت', - mb: 'مگابایت' + size: { + kb: "کیلو بایت", + mb: "مگابایت" }, - maxSizeAlert: 'حداکثر حجم فایل انتحابی ', - maxFileCountAlert: 'حداکثر تعداد فایل انتخابی', - fileName: 'نام فایل', - fileDescription: 'توضیحات فایل', - fileTags: 'برچسب فایل', + maxSizeAlert: "حداکثر حجم فایل انتحابی ", + maxFileCountAlert: "حداکثر تعداد فایل انتخابی", + fileName: "نام فایل", + fileDescription: "توضیحات فایل", + fileTags: "برچسب فایل" }, - fr:{ - insertFile: 'Insérer un fichier', - insertNewFile: 'Insérer un nouveau fichier', - add: 'Ajouter', - delete: 'Supprimer', - edit: 'Éditer', - deleteDialog:{ - message: 'Voulez-vous vraiment supprimer le fichier?', - cancel: 'Annuler', + fr: { + insertFile: "Insérer un fichier", + insertNewFile: "Insérer un nouveau fichier", + add: "Ajouter", + delete: "Supprimer", + edit: "Éditer", + deleteDialog: { + message: "Voulez-vous vraiment supprimer le fichier?", + cancel: "Annuler" }, - table:{ - thumb: 'la vignette', - name: 'Nom', - size: 'Taille', - action:{ - action: 'Action', - deleteTooltip: 'Supprimer' + table: { + thumb: "la vignette", + name: "Nom", + size: "Taille", + action: { + action: "Action", + deleteTooltip: "Supprimer" } }, - size:{ - kb: 'KB', - mb: 'MB', + size: { + kb: "KB", + mb: "MB" }, - maxSizeAlert: 'La taille maximale du fichier est', - maxFileCountAlert: 'Le nombre maximal de fichiers est', - fileName: 'Nom de fichier', - fileDescription: 'description du fichier', - fileTags: 'Balises de fichier', + maxSizeAlert: "La taille maximale du fichier est", + maxFileCountAlert: "Le nombre maximal de fichiers est", + fileName: "Nom de fichier", + fileDescription: "description du fichier", + fileTags: "Balises de fichier" }, - ch:{ - insertFile: '插入档案', - insertNewFile: '插入新文件', - add: '加', - delete: '删除', - edit: '编辑', - deleteDialog:{ - message: '您确定要删除文件吗?', - cancel: '取消', + ch: { + insertFile: "插入档案", + insertNewFile: "插入新文件", + add: "加", + delete: "删除", + edit: "编辑", + deleteDialog: { + message: "您确定要删除文件吗?", + cancel: "取消" }, - table:{ - thumb: '缩图', - name: '名称', - size: '尺寸', - action:{ - action: '行动', - deleteTooltip: '删除' + table: { + thumb: "缩图", + name: "名称", + size: "尺寸", + action: { + action: "行动", + deleteTooltip: "删除" } }, - size:{ - kb: 'KB', - mb: 'MB', + size: { + kb: "KB", + mb: "MB" }, - maxSizeAlert: '档案大小上限为', - maxFileCountAlert: '现“最大文件数”为', - fileName: '文档名称', - fileDescription: '文件描述', - fileTags: '文件标签', + maxSizeAlert: "档案大小上限为", + maxFileCountAlert: "现“最大文件数”为", + fileName: "文档名称", + fileDescription: "文件描述", + fileTags: "文件标签" }, - ar:{ - insertFile: 'إدراج ملف', - insertNewFile: 'إدراج ملف جديد', - add: 'أضف', - delete: 'حذف', - edit: 'تعديل', - deleteDialog:{ - message: 'هل أنت متأكد أنك تريد حذف الملف؟', - cancel: 'إلغاء', + ar: { + insertFile: "إدراج ملف", + insertNewFile: "إدراج ملف جديد", + add: "أضف", + delete: "حذف", + edit: "تعديل", + deleteDialog: { + message: "هل أنت متأكد أنك تريد حذف الملف؟", + cancel: "إلغاء" }, - table:{ - thumb: 'ظفري', - name: 'اسم', - size: 'بحجم', - action:{ - action: 'عمل', - deleteTooltip: 'حذف' + table: { + thumb: "ظفري", + name: "اسم", + size: "بحجم", + action: { + action: "عمل", + deleteTooltip: "حذف" } }, - size:{ - kb: 'کیلو بایت', - mb: 'ميغا بايت' + size: { + kb: "کیلو بایت", + mb: "ميغا بايت" }, - maxSizeAlert: 'الحجم الأقصى للملف هو', - maxFileCountAlert: 'الحد الأقصى لعدد الملفات هو', - fileName: 'اسم الملف', - fileDescription: 'وصف الملف', - fileTags: 'علامات الملف', - }, -} + maxSizeAlert: "الحجم الأقصى للملف هو", + maxFileCountAlert: "الحد الأقصى لعدد الملفات هو", + fileName: "اسم الملف", + fileDescription: "وصف الملف", + fileTags: "علامات الملف" + } +};