From a840fb7233d7a356555dd7e1b24d578f9b3e1816 Mon Sep 17 00:00:00 2001 From: Book Pauk Date: Thu, 17 Nov 2022 17:08:06 +0700 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=BE=D0=BF=D1=80=D0=B0=D0=B2=D0=BA?= =?UTF-8?q?=D0=B0=20=D0=BE=D1=82=D0=BE=D0=B1=D1=80=D0=B0=D0=B6=D0=B5=D0=BD?= =?UTF-8?q?=D0=B8=D1=8F=20Inpx=20=D0=B8=D0=BD=D1=84=D0=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/Search/BookInfoDialog/BookInfoDialog.vue | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/client/components/Search/BookInfoDialog/BookInfoDialog.vue b/client/components/Search/BookInfoDialog/BookInfoDialog.vue index ee8b9bc..f20e3f6 100644 --- a/client/components/Search/BookInfoDialog/BookInfoDialog.vue +++ b/client/components/Search/BookInfoDialog/BookInfoDialog.vue @@ -174,7 +174,6 @@ class BookInfoDialog { {name: 'fileInfo', label: 'Информация о файле', value: [ {name: 'folder', label: 'Папка'}, {name: 'file', label: 'Файл'}, - {name: 'ext', label: 'Тип'}, {name: 'size', label: 'Размер'}, {name: 'date', label: 'Добавлен'}, {name: 'del', label: 'Удален'}, @@ -193,7 +192,10 @@ class BookInfoDialog { ]}, ]; - const valueToString = (value, nodePath) => {//eslint-disable-line no-unused-vars + const valueToString = (value, nodePath, b) => {//eslint-disable-line no-unused-vars + if (nodePath == 'fileInfo/file') + return `${value}.${b.ext}`; + if (nodePath == 'fileInfo/size') return `${this.formatSize(value)} (${value.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g, '$1 ')} Bytes)`; @@ -230,7 +232,7 @@ class BookInfoDialog { const subItemOut = { name: subItem.name, label: subItem.label, - value: valueToString(book[subItem.name], `${item.name}/${subItem.name}`) + value: valueToString(book[subItem.name], `${item.name}/${subItem.name}`, book) }; if (subItemOut.value) itemOut.value.push(subItemOut);