Skip to content

Commit 50597f8

Browse files
committed
Merge branch 'release/1.5.0'
2 parents 0981a36 + b84e26f commit 50597f8

File tree

20 files changed

+417
-311
lines changed

20 files changed

+417
-311
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
1.5.0 / 2023-01-28
2+
------------------
3+
4+
- Настройки веб-интерфейса и опции командной строки "--lib-dir", "--inpx" вынесены в конфиг (#6)
5+
- Уменьшена длина имени файла при скачивании (#7)
6+
- OPDS: добавлен раздел "Жанры", в поиск добавлен раздел "Поиск книг в жанре" (#9)
7+
- Исправление проблем скроллинга панели инструментов (#12)
8+
- Улучшено отображение веб-интерфейса на мобильных устройствах
9+
110
1.4.1 / 2022-12-21
211
------------------
312

README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,14 @@ Options:
8080
При первом запуске в рабочей директории будет создан конфигурационный файл `config.json`:
8181
```js
8282
{
83+
// директория библиотеки (с zip-архивами), аналог параметра командной строки --lib-dir
84+
// пустая строка: использовать значение по умолчанию - директорию файла приложения
85+
"libDir": "",
86+
87+
// путь к файлу .inpx, аналог параметра командной строки --inpx
88+
// пустая строка: использовать значение по умолчанию - inpx-файл, что найдется в директории библиотеки
89+
"inpx": "",
90+
8391
// пароль для ограничения доступа к веб-интерфейсу сервера
8492
// пустое значение - доступ без ограничений
8593
"accessPassword": "",
@@ -164,6 +172,23 @@ Options:
164172
"user": "",
165173
"password": "",
166174
"root": "/opds"
175+
},
176+
177+
// настройки по умолчанию для веб-интерфейса
178+
// устанавливаются при первой загрузке страницы в браузере
179+
// дальнейшие изменения настроек с помощью веб-интерфейса уже сохраняются в самом браузере
180+
"uiDefaults": {
181+
"limit": 20, // результатов на странице
182+
"downloadAsZip": false, // скачивать книги в виде zip-архива
183+
"showCounts": true, // показывать количество
184+
"showRates": true, // показывать оценки
185+
"showInfo": true, // показывать кнопку (инфо)
186+
"showGenres": true, // показывать жанры
187+
"showDates": false, // показывать даты поступления
188+
"showDeleted": false, // показывать удаленные
189+
"abCacheEnabled": true, // кешировать запросы
190+
"langDefault": "", // язык по умолчанию (например "ru,en")
191+
"showJson": false // показывать JSON (в расширенном поиске)
167192
}
168193
}
169194
```

client/components/Search/BookInfoDialog/BookInfoDialog.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
<div class="row q-mt-sm no-wrap">
2020
<div class="poster-size">
21-
<div class="poster-size column justify-center items-center" :class="{poster: coverSrc}" @click.stop.prevent="posterClick">
21+
<div class="column justify-center items-center" :class="{'poster': coverSrc, 'no-poster': !coverSrc}" @click.stop.prevent="posterClick">
2222
<img v-if="coverSrc" :src="coverSrc" class="fit row justify-center items-center" style="object-fit: contain" @error="coverSrc = ''" />
2323
<div v-if="!coverSrc" class="fit row justify-center items-center text-grey-5" style="border: 1px solid #ccc; font-size: 300%">
2424
<i>{{ book.ext }}</i>
@@ -317,7 +317,7 @@ export default vueComponent(BookInfoDialog);
317317
min-width: 100px;
318318
}
319319
320-
.poster {
320+
.poster, .no-poster {
321321
width: 100%;
322322
height: 100%;
323323
}

client/components/Search/Search.vue

Lines changed: 291 additions & 272 deletions
Large diffs are not rendered by default.

client/components/Search/SelectExtSearchDialog/SelectExtSearchDialog.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
Расширенный поиск
77
</div>
88

9-
<DivBtn class="q-ml-md text-white bg-secondary" :size="30" :icon-size="24" icon="la la-question" round @click.stop.prevent="showSearchHelp">
9+
<DivBtn class="q-ml-sm text-grey-5 bg-yellow-1" :size="28" :icon-size="24" icon="la la-question" round @click.stop.prevent="showSearchHelp">
1010
<template #tooltip>
1111
<q-tooltip :delay="1500" anchor="bottom middle" content-style="font-size: 80%" max-width="400px">
1212
Памятка

client/components/share/DivBtn.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ class DivBtn {
3232
round: Boolean,
3333
imt: { type: Number, default: 0 },// icon margin top
3434
disabled: Boolean,
35+
noShadow: Boolean,
3536
};
3637
3738
pressed = false;
@@ -56,6 +57,9 @@ class DivBtn {
5657
style.borderRadius = `${this.size}px`;
5758
else
5859
style.borderRadius = `${this.size/10}px`;
60+
61+
if (!this.noShadow)
62+
style.boxShadow = '0.5px 1px 3px #333333';
5963
}
6064
6165
async clickEffect(event) {
@@ -77,7 +81,6 @@ export default vueComponent(DivBtn);
7781
<style scoped>
7882
.button {
7983
position: relative;
80-
box-shadow: 0.5px 1px 3px #333333;
8184
}
8285
8386
.button:hover {

client/store/root.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,13 @@ const state = {
44
settings: {
55
accessToken: '',
66
extendedParams: false,
7-
limit: 20,
87
expandedAuthor: [],
98
expandedSeries: [],
9+
10+
defaultsSet: false,
11+
12+
//uiDefaults
13+
limit: 20,
1014
downloadAsZip: false,
1115
showCounts: true,
1216
showRates: true,

package-lock.json

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "inpx-web",
3-
"version": "1.4.1",
3+
"version": "1.5.0",
44
"author": "Book Pauk <bookpauk@gmail.com>",
55
"license": "CC0-1.0",
66
"repository": "bookpauk/inpx-web",
@@ -61,7 +61,7 @@
6161
"fs-extra": "^10.1.0",
6262
"he": "^1.2.0",
6363
"iconv-lite": "^0.6.3",
64-
"jembadb": "^5.1.5",
64+
"jembadb": "^5.1.7",
6565
"localforage": "^1.10.0",
6666
"lodash": "^4.17.21",
6767
"minimist": "^1.2.7",

server/config/base.js

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ module.exports = {
99
name: pckg.name,
1010

1111
execDir,
12+
libDir: '',
13+
inpx: '',
1214

1315
accessPassword: '',
1416
accessTimeout: 0,
@@ -31,7 +33,7 @@ module.exports = {
3133
lowMemoryMode: false,
3234
fullOptimization: false,
3335

34-
webConfigParams: ['name', 'version', 'branch', 'bookReadLink', 'dbVersion', 'extendedSearch'],
36+
webConfigParams: ['name', 'version', 'branch', 'bookReadLink', 'dbVersion', 'extendedSearch', 'uiDefaults'],
3537

3638
allowRemoteLib: false,
3739
remoteLib: false,
@@ -55,5 +57,18 @@ module.exports = {
5557
password: '',
5658
root: '/opds',
5759
},
60+
uiDefaults: {
61+
limit: 20,
62+
downloadAsZip: false,
63+
showCounts: true,
64+
showRates: true,
65+
showInfo: true,
66+
showGenres: true,
67+
showDates: false,
68+
showDeleted: false,
69+
abCacheEnabled: true,
70+
langDefault: '',
71+
showJson: false,
72+
},
5873
};
5974

0 commit comments

Comments
 (0)