diff --git a/client/components/App.vue b/client/components/App.vue
index b36ba19..dc81796 100644
--- a/client/components/App.vue
+++ b/client/components/App.vue
@@ -133,6 +133,10 @@ body, html, #app {
animation: rotating 2s linear infinite;
}
+.q-dialog__inner--minimized > div {
+ max-width: 800px;
+}
+
@keyframes rotating {
from {
transform: rotate(0deg);
diff --git a/client/components/Search/BookInfoDialog/BookInfoDialog.vue b/client/components/Search/BookInfoDialog/BookInfoDialog.vue
index 2c3ce57..dc43230 100644
--- a/client/components/Search/BookInfoDialog/BookInfoDialog.vue
+++ b/client/components/Search/BookInfoDialog/BookInfoDialog.vue
@@ -8,7 +8,8 @@
-
+
@@ -24,6 +25,7 @@
import vueComponent from '../../vueComponent.js';
import Dialog from '../../share/Dialog.vue';
+import XmlParser from '../../../../server/core/xml/XmlParser';
const componentOptions = {
components: {
@@ -36,23 +38,50 @@ const componentOptions = {
dialogVisible(newValue) {
this.$emit('update:modelValue', newValue);
},
+ bookInfo() {
+ this.parseBookInfo();
+ }
}
};
class BookInfoDialog {
_options = componentOptions;
_props = {
modelValue: Boolean,
+ bookInfo: Object,
};
dialogVisible = false;
+ //info props
+ annotation = '';
+
created() {
this.commit = this.$store.commit;
+ this.parseBookInfo();
}
mounted() {
}
+ parseBookInfo() {
+ const bookInfo = this.bookInfo;
+ const xml = new XmlParser();
+
+ //defaults
+ this.annotation = '';
+
+ if (bookInfo.fb2) {
+ const desc = xml.navigator(bookInfo.fb2);
+
+ //annotation
+ const annObj = desc.v('description/title-info/annotation');
+ if (annObj) {
+ this.annotation = xml.fromObject(annObj).toString({noHeader: true});
+ this.annotation = this.annotation.replace(//g, `
`);
+ }
+ }
+ }
+
okClick() {
this.dialogVisible = false;
}
@@ -63,4 +92,13 @@ export default vueComponent(BookInfoDialog);
\ No newline at end of file
+
+
+
diff --git a/client/components/Search/Search.vue b/client/components/Search/Search.vue
index bed5d14..a07514d 100644
--- a/client/components/Search/Search.vue
+++ b/client/components/Search/Search.vue
@@ -250,7 +250,7 @@
-
+
diff --git a/server/core/xml/ObjectNavigator.js b/server/core/xml/ObjectNavigator.js
index aa39057..929422b 100644
--- a/server/core/xml/ObjectNavigator.js
+++ b/server/core/xml/ObjectNavigator.js
@@ -59,7 +59,7 @@ class ObjectNavigator {
return null;
raw = (Array.isArray(raw) ? raw : [raw]);
-
+
const result = [];
for (const r of raw)
result.push(new ObjectNavigator(r));
@@ -80,6 +80,11 @@ class ObjectNavigator {
return this.raw;
}
+ v(selector = '') {
+ const res = this.$(selector);
+ return (res ? res.value : null);
+ }
+
text(selector = '') {
const res = this.$(`${selector}/*TEXT`);
return (res ? res.value : null);