RecentBooksPage.vue 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799
  1. <template>
  2. <Window ref="window" width="600px" @close="close">
  3. <template #header>
  4. <span v-show="!loading">{{ header }}</span>
  5. <span v-if="loading"><q-spinner class="q-mr-sm" color="lime-12" size="20px" :thickness="7" />
  6. Список загружается
  7. </span>
  8. </template>
  9. <template #buttons>
  10. <div
  11. class="row justify-center items-center"
  12. :class="{'header-button': !archive, 'header-button-pressed': archive}"
  13. @mousedown.stop @click="archiveToggle"
  14. >
  15. <q-icon class="q-mr-xs" name="la la-archive" size="20px" />
  16. <span style="font-size: 90%">Архив</span>
  17. <q-tooltip :delay="1500" anchor="bottom middle" content-style="font-size: 80%">
  18. {{ (archive ? 'Скрыть архивные' : 'Показать архивные') }}
  19. </q-tooltip>
  20. </div>
  21. </template>
  22. <a ref="download" style="display: none;" target="_blank"></a>
  23. <div id="vs-container" ref="vsContainer" class="recent-books-scroll col">
  24. <div ref="header" class="scroll-header row bg-blue-2">
  25. <q-btn class="tool-button" round @click="showSameBookClick">
  26. <q-icon name="la la-caret-right" class="icon" :class="{'expanded-icon': showSameBook}" color="green-8" size="24px" />
  27. <q-tooltip :delay="1500" anchor="bottom middle" content-style="font-size: 80%">
  28. Показать/скрыть версии книг
  29. </q-tooltip>
  30. </q-btn>
  31. <q-btn class="tool-button" round @click="scrollToBegin">
  32. <q-icon name="la la-arrow-up" color="green-8" size="24px" />
  33. <q-tooltip :delay="1500" anchor="bottom middle" content-style="font-size: 80%">
  34. В начало списка
  35. </q-tooltip>
  36. </q-btn>
  37. <q-btn class="tool-button" round @click="scrollToEnd">
  38. <q-icon name="la la-arrow-down" color="green-8" size="24px" />
  39. <q-tooltip :delay="1500" anchor="bottom middle" content-style="font-size: 80%">
  40. В конец списка
  41. </q-tooltip>
  42. </q-btn>
  43. <q-btn class="tool-button" round @click="scrollToActiveBook">
  44. <q-icon name="la la-location-arrow" color="green-8" size="24px" />
  45. <q-tooltip :delay="1500" anchor="bottom middle" content-style="font-size: 80%">
  46. На текущую книгу
  47. </q-tooltip>
  48. </q-btn>
  49. <q-input
  50. ref="input"
  51. v-model="search"
  52. class="q-ml-sm q-mt-xs"
  53. outlined dense
  54. style="width: 185px"
  55. bg-color="white"
  56. placeholder="Найти"
  57. @click.stop
  58. >
  59. <template #append>
  60. <q-icon v-if="search !== ''" name="la la-times" class="cursor-pointer" @click.stop="resetSearch" />
  61. </template>
  62. </q-input>
  63. <q-select
  64. ref="sortMethod"
  65. v-model="sortMethod"
  66. class="q-ml-sm q-mt-xs"
  67. :options="sortMethodOptions"
  68. style="width: 180px"
  69. bg-color="white"
  70. dropdown-icon="la la-angle-down la-sm"
  71. outlined dense emit-value map-options display-value-sanitize options-sanitize
  72. options-html display-value-html
  73. @update:model-value="sortMethodSelected"
  74. >
  75. <q-tooltip :delay="1500" anchor="bottom middle" content-style="font-size: 80%">
  76. Метод сортировки
  77. </q-tooltip>
  78. <template #selected-item="scope">
  79. <div style="height: 28px; padding-top: 2px; overflow: hidden" v-html="scope.opt.label" />
  80. </template>
  81. </q-select>
  82. </div>
  83. <q-virtual-scroll
  84. ref="virtualScroll"
  85. v-slot="{ item, index }"
  86. :items="tableData"
  87. scroll-target="#vs-container"
  88. virtual-scroll-item-size="80"
  89. @virtual-scroll="onScroll"
  90. >
  91. <div class="table-row row" :class="{even: index % 2 > 0, 'active-book': item.active, 'active-parent-book': item.activeParent}">
  92. <div v-show="item.inGroup" class="row-part column justify-center items-center" style="width: 40px">
  93. <q-icon name="la la-code-branch" size="24px" style="color: green" />
  94. </div>
  95. <div class="row-part column justify-center items-stretch" style="width: 80px">
  96. <div class="col row justify-center items-center clickable" @click="loadBook(item)">
  97. <q-icon name="la la-book" size="40px" style="color: #dddddd" />
  98. </div>
  99. <div v-show="!showSameBook && item.group && item.group.length > 0" class="row justify-center" style="font-size: 70%">
  100. {{ (item.group ? item.group.length + 1 : 0) }} верси{{ wordEnding((item.group ? item.group.length + 1 : 0), 1) }}
  101. </div>
  102. </div>
  103. <div class="row-part column items-stretch clickable break-word" @click="loadBook(item)">
  104. <div
  105. class="col" style="border: 1px solid #cccccc; border-bottom: 0; padding: 4px; line-height: 140%;"
  106. :style="{ 'width': (380 - 40*(+item.inGroup)) + 'px' }"
  107. >
  108. <div class="text-green-10" style="font-size: 80%">
  109. {{ item.desc.author }}
  110. </div>
  111. <div style="font-size: 75%">
  112. {{ item.desc.title }}
  113. </div>
  114. </div>
  115. <div class="row" style="font-size: 10px">
  116. <div class="row justify-center items-center row-info-top" style="width: 60px">
  117. {{ item.desc.textLen }}
  118. </div>
  119. <div class="row items-center row-info-top" :style="`width: ${(260 - 40*(+item.inGroup))}px; padding: 1px`">
  120. <div class="read-bar" :style="`width: ${100*item.readPart}%`"></div>
  121. </div>
  122. <div class="row justify-center items-center row-info-top" style="width: 59px">
  123. {{ item.desc.perc }}
  124. </div>
  125. <div class="row-info-top" style="width: 1px">
  126. </div>
  127. </div>
  128. <div class="row" style="font-size: 10px" :style="{ 'width': (380 - 40*(+item.inGroup)) + 'px' }">
  129. <div class="row justify-center items-center row-info-bottom" style="width: 30px">
  130. {{ item.num }}
  131. </div>
  132. <div class="col row">
  133. <div class="row justify-center items-center row-info-bottom time-info" style="width: 50%">
  134. Загружен: {{ item.loadTime }}
  135. </div>
  136. <div class="row justify-center items-center row-info-bottom time-info" style="width: 50%">
  137. Читался: {{ item.touchTime }}
  138. </div>
  139. </div>
  140. <div class="row-info-bottom" style="width: 1px">
  141. </div>
  142. </div>
  143. </div>
  144. <div
  145. class="row-part column"
  146. style="width: 90px;"
  147. >
  148. <div
  149. class="col column justify-center"
  150. style="font-size: 75%; padding-left: 6px; border: 1px solid #cccccc; border-left: 0;"
  151. >
  152. <div :style="`margin-top: ${(archive ? 20 : 0)}px`">
  153. <a v-show="isUrl(item.url)" :href="item.url" target="_blank">Оригинал</a><br><br>
  154. <a :href="item.path" @click.prevent="downloadBook(item.path, item.fullTitle)">Скачать FB2</a>
  155. </div>
  156. </div>
  157. <div
  158. class="del-button self-end row justify-center items-center clickable"
  159. @click="handleDel(item.key)"
  160. >
  161. <q-icon class="la la-times" size="12px" />
  162. <q-tooltip :delay="1500" anchor="bottom middle" content-style="font-size: 80%">
  163. {{ (archive ? 'Удалить окончательно' : 'Перенести в архив') }}
  164. </q-tooltip>
  165. </div>
  166. <div
  167. v-show="archive"
  168. class="restore-button self-start row justify-center items-center clickable"
  169. @click="handleRestore(item.key)"
  170. >
  171. <q-icon class="la la-arrow-left" size="14px" />
  172. <q-tooltip :delay="1500" anchor="bottom middle" content-style="font-size: 80%">
  173. Восстановить из архива
  174. </q-tooltip>
  175. </div>
  176. </div>
  177. </div>
  178. </q-virtual-scroll>
  179. </div>
  180. </Window>
  181. </template>
  182. <script>
  183. //-----------------------------------------------------------------------------
  184. import vueComponent from '../../vueComponent.js';
  185. import path from 'path-browserify';
  186. import _ from 'lodash';
  187. import * as utils from '../../../share/utils';
  188. import LockQueue from '../../../share/LockQueue';
  189. import Window from '../../share/Window.vue';
  190. import bookManager from '../share/bookManager';
  191. import readerApi from '../../../api/reader';
  192. const componentOptions = {
  193. components: {
  194. Window,
  195. },
  196. watch: {
  197. search() {
  198. this.updateTableData();
  199. },
  200. sortMethod() {
  201. this.updateTableData();
  202. },
  203. settings() {
  204. this.loadSettings();
  205. },
  206. },
  207. };
  208. class RecentBooksPage {
  209. _options = componentOptions;
  210. loading = false;
  211. search = '';
  212. tableData = [];
  213. sortMethod = '';
  214. showSameBook = false;
  215. archive = false;
  216. created() {
  217. this.commit = this.$store.commit;
  218. this.lastScrollTop1 = 0;
  219. this.lastScrollTop2 = 0;
  220. this.lock = new LockQueue(100);
  221. this.loadSettings();
  222. }
  223. init() {
  224. this.$refs.window.init();
  225. this.$nextTick(() => {
  226. //this.$refs.input.focus();//плохо на планшетах
  227. });
  228. this.inited = true;
  229. (async() => {
  230. this.showBar();
  231. await this.updateTableData();
  232. await this.scrollToActiveBook();
  233. //await this.scrollRefresh();
  234. })();
  235. }
  236. loadSettings() {
  237. const settings = this.settings;
  238. this.showSameBook = settings.recentShowSameBook;
  239. this.sortMethod = settings.recentSortMethod || 'loadTimeDesc';
  240. }
  241. get settings() {
  242. return this.$store.state.reader.settings;
  243. }
  244. async updateTableData() {
  245. if (!this.inited)
  246. return;
  247. await this.lock.get();
  248. try {
  249. let result = [];
  250. const sorted = bookManager.getSortedRecent();
  251. const activeBook = bookManager.mostRecentBook();
  252. //подготовка полей
  253. for (const book of sorted) {
  254. if ((!this.archive && book.deleted) || (this.archive && book.deleted != 1))
  255. continue;
  256. let d = new Date();
  257. d.setTime(book.touchTime);
  258. const touchTime = utils.formatDate(d);
  259. const loadTimeRaw = (book.loadTime ? book.loadTime : 0);//book.addTime);
  260. d.setTime(loadTimeRaw);
  261. const loadTime = utils.formatDate(d);
  262. let readPart = 0;
  263. let perc = '';
  264. let textLen = '';
  265. const p = (book.bookPosSeen ? book.bookPosSeen : (book.bookPos ? book.bookPos : 0));
  266. if (book.textLength) {
  267. readPart = p/book.textLength;
  268. perc = `${(readPart*100).toFixed(2)}%`;
  269. textLen = `${Math.floor(readPart*book.textLength/1000)}/${Math.floor(book.textLength/1000)}`;
  270. }
  271. const bt = utils.getBookTitle(book.fb2);
  272. let title = bt.bookTitle;
  273. title = (title ? `"${title}"`: '');
  274. const author = (bt.author ? bt.author : (bt.bookTitle ? bt.bookTitle : (book.uploadFileName ? book.uploadFileName : book.url)));
  275. result.push({
  276. key: book.key,
  277. url: book.url,
  278. path: book.path,
  279. deleted: book.deleted,
  280. touchTime,
  281. loadTime,
  282. desc: {
  283. author,
  284. title,
  285. perc,
  286. textLen,
  287. },
  288. readPart,
  289. fullTitle: bt.fullTitle,
  290. sameBookKey: book.sameBookKey,
  291. active: (activeBook.key == book.key),
  292. activeParent: false,
  293. inGroup: false,
  294. //для сортировки
  295. loadTimeRaw,
  296. touchTimeRaw: book.touchTime,
  297. });
  298. }
  299. //нумерация
  300. result.sort((a, b) => b.loadTimeRaw - a.loadTimeRaw);
  301. let num = 0;
  302. for (let i = result.length - 1; i >= 0; i--) {
  303. num++;
  304. result[i].num = num;
  305. }
  306. //фильтрация
  307. const search = this.search;
  308. if (search) {
  309. result = result.filter(item => {
  310. return !search ||
  311. item.touchTime.includes(search) ||
  312. item.loadTime.includes(search) ||
  313. item.desc.title.toLowerCase().includes(search.toLowerCase()) ||
  314. item.desc.author.toLowerCase().includes(search.toLowerCase())
  315. });
  316. }
  317. //сортировка
  318. switch (this.sortMethod) {
  319. case 'loadTimeDesc':
  320. result.sort((a, b) => b.loadTimeRaw - a.loadTimeRaw);
  321. break;
  322. case 'loadTimeAsc':
  323. result.sort((a, b) => a.loadTimeRaw - b.loadTimeRaw);
  324. break;
  325. case 'touchTimeDesc':
  326. result.sort((a, b) => b.touchTimeRaw - a.touchTimeRaw);
  327. break;
  328. case 'touchTimeAsc':
  329. result.sort((a, b) => a.touchTimeRaw - b.touchTimeRaw);
  330. break;
  331. case 'authorDesc':
  332. result.sort((a, b) => b.desc.author.localeCompare(a.desc.author));
  333. break;
  334. case 'authorAsc':
  335. result.sort((a, b) => a.desc.author.localeCompare(b.desc.author));
  336. break;
  337. case 'titleDesc':
  338. result.sort((a, b) => b.desc.title.localeCompare(a.desc.title));
  339. break;
  340. case 'titleAsc':
  341. result.sort((a, b) => a.desc.title.localeCompare(b.desc.title));
  342. break;
  343. }
  344. //группировка
  345. const groups = {};
  346. const parents = {};
  347. let newResult = [];
  348. for (const book of result) {
  349. if (book.sameBookKey !== undefined) {
  350. if (!groups[book.sameBookKey]) {
  351. groups[book.sameBookKey] = [];
  352. parents[book.sameBookKey] = book;
  353. book.group = groups[book.sameBookKey];
  354. newResult.push(book);
  355. } else {
  356. book.inGroup = true;
  357. if (book.active)
  358. parents[book.sameBookKey].activeParent = true;
  359. groups[book.sameBookKey].push(book);
  360. }
  361. } else {
  362. newResult.push(book);
  363. }
  364. }
  365. result = newResult;
  366. //showSameBook
  367. if (this.showSameBook) {
  368. newResult = [];
  369. for (const book of result) {
  370. newResult.push(book);
  371. if (book.group) {
  372. for (const sameBook of book.group) {
  373. newResult.push(sameBook);
  374. }
  375. }
  376. }
  377. result = newResult;
  378. }
  379. //другие стадии
  380. //.....
  381. this.tableData = result;
  382. } finally {
  383. this.lock.ret();
  384. }
  385. }
  386. resetSearch() {
  387. this.search = '';
  388. this.$refs.input.focus();
  389. }
  390. wordEnding(num, type = 0) {
  391. const endings = [
  392. ['ов', '', 'а', 'а', 'а', 'ов', 'ов', 'ов', 'ов', 'ов'],
  393. ['й', 'я', 'и', 'и', 'и', 'й', 'й', 'й', 'й', 'й'],
  394. ['о', '', 'о', 'о', 'о', 'о', 'о', 'о', 'о', 'о']
  395. ];
  396. const deci = num % 100;
  397. if (deci > 10 && deci < 20) {
  398. return endings[type][0];
  399. } else {
  400. return endings[type][num % 10];
  401. }
  402. }
  403. get header() {
  404. const len = (this.tableData ? this.tableData.length : 0);
  405. return `${(this.search ? `Найден${this.wordEnding(len, 2)}` : 'Всего')} ${len} файл${this.wordEnding(len)}${this.archive ? ' в архиве' : ''}`;
  406. }
  407. async downloadBook(fb2path, fullTitle) {
  408. try {
  409. await readerApi.checkCachedBook(fb2path);
  410. const d = this.$refs.download;
  411. d.href = fb2path;
  412. try {
  413. const fn = utils.makeValidFilename(fullTitle);
  414. d.download = fn.substring(0, 100) + '.fb2';
  415. } catch(e) {
  416. d.download = path.basename(fb2path).substr(0, 10) + '.fb2';
  417. }
  418. d.click();
  419. } catch (e) {
  420. let errMes = e.message;
  421. if (errMes.indexOf('404') >= 0)
  422. errMes = 'Файл не найден на сервере (возможно был удален как устаревший)';
  423. this.$root.stdDialog.alert(errMes, 'Ошибка', {color: 'negative'});
  424. }
  425. }
  426. async handleDel(key) {
  427. if (!this.archive) {
  428. await bookManager.delRecentBook({key});
  429. this.$root.notify.info('Перенесено в архив');
  430. } else {
  431. if (await this.$root.stdDialog.confirm('Подтвердите удаление из архива:', ' ')) {
  432. await bookManager.delRecentBook({key}, 2);
  433. this.$root.notify.info('Удалено безвозвратно');
  434. }
  435. }
  436. }
  437. async handleRestore(key) {
  438. await bookManager.restoreRecentBook({key});
  439. this.$root.notify.info('Восстановлено из архива');
  440. }
  441. async loadBook(item) {
  442. //чтобы не обновлять лишний раз updateTableData
  443. this.inited = false;
  444. if (item.deleted)
  445. await this.handleRestore(item.key);
  446. this.$emit('load-book', {url: item.url, path: item.path});
  447. this.close();
  448. }
  449. isUrl(url) {
  450. if (url)
  451. return (url.indexOf('disk://') != 0);
  452. else
  453. return false;
  454. }
  455. showBar() {
  456. this.lastScrollTop1 = this.$refs.vsContainer.scrollTop;
  457. this.$refs.header.style.position = 'sticky';
  458. this.$refs.header.style.top = 0;
  459. }
  460. onScroll() {
  461. const curScrollTop = this.$refs.vsContainer.scrollTop;
  462. if (this.lockScroll) {
  463. this.lastScrollTop1 = curScrollTop;
  464. return;
  465. }
  466. if (curScrollTop - this.lastScrollTop1 > 100) {
  467. this.$refs.header.style.top = `-${this.$refs.header.offsetHeight}px`;
  468. this.$refs.header.style.transition = 'top 0.2s ease 0s';
  469. this.lastScrollTop1 = curScrollTop;
  470. } else if (curScrollTop - this.lastScrollTop2 < 0) {
  471. this.$refs.header.style.position = 'sticky';
  472. this.$refs.header.style.top = 0;
  473. this.lastScrollTop1 = curScrollTop;
  474. }
  475. this.lastScrollTop2 = curScrollTop;
  476. }
  477. showSameBookClick() {
  478. this.showSameBook = !this.showSameBook;
  479. const newSettings = _.cloneDeep(this.settings);
  480. newSettings.recentShowSameBook = this.showSameBook;
  481. this.commit('reader/setSettings', newSettings);
  482. this.updateTableData();
  483. }
  484. sortMethodSelected() {
  485. const newSettings = _.cloneDeep(this.settings);
  486. newSettings.recentSortMethod = this.sortMethod;
  487. this.commit('reader/setSettings', newSettings);
  488. }
  489. async scrollToActiveBook() {
  490. await this.$nextTick();
  491. this.lockScroll = true;
  492. try {
  493. let activeIndex = -1;
  494. let activeParentIndex = -1;
  495. for (let i = 0; i < this.tableData.length; i++) {
  496. const book = this.tableData[i];
  497. if (book.active)
  498. activeIndex = i;
  499. if (book.activeParent)
  500. activeParentIndex = i;
  501. if (activeIndex >= 0 && activeParentIndex >= 0)
  502. break;
  503. }
  504. const index = (activeIndex >= 0 ? activeIndex : activeParentIndex);
  505. if (index >= 0) {
  506. this.$refs.virtualScroll.scrollTo(index, 'center');
  507. }
  508. } finally {
  509. await utils.sleep(100);
  510. this.lockScroll = false;
  511. }
  512. }
  513. async scrollToBegin() {
  514. this.lockScroll = true;
  515. try {
  516. this.$refs.virtualScroll.scrollTo(0, 'center');
  517. } finally {
  518. await utils.sleep(100);
  519. this.lockScroll = false;
  520. }
  521. }
  522. async scrollToEnd() {
  523. this.lockScroll = true;
  524. try {
  525. this.$refs.virtualScroll.scrollTo(this.tableData.length, 'center');
  526. } finally {
  527. await utils.sleep(100);
  528. this.lockScroll = false;
  529. }
  530. }
  531. async scrollRefresh() {
  532. this.lockScroll = true;
  533. await utils.sleep(100);
  534. try {
  535. this.$refs.virtualScroll.refresh();
  536. } finally {
  537. await utils.sleep(100);
  538. this.lockScroll = false;
  539. }
  540. }
  541. get sortMethodOptions() {
  542. return [
  543. {label: '<span style="font-size: 150%">&uarr;</span> Время загрузки', value: 'loadTimeDesc'},
  544. {label: '<span style="font-size: 150%">&darr;</span> Время загрузки', value: 'loadTimeAsc'},
  545. {label: '<span style="font-size: 150%">&uarr;</span> Время чтения', value: 'touchTimeDesc'},
  546. {label: '<span style="font-size: 150%">&darr;</span> Время чтения', value: 'touchTimeAsc'},
  547. {label: '<span style="font-size: 150%">&uarr;</span> Автор', value: 'authorDesc'},
  548. {label: '<span style="font-size: 150%">&darr;</span> Автор', value: 'authorAsc'},
  549. {label: '<span style="font-size: 150%">&uarr;</span> Название', value: 'titleDesc'},
  550. {label: '<span style="font-size: 150%">&darr;</span> Название', value: 'titleAsc'},
  551. ];
  552. }
  553. archiveToggle() {
  554. this.archive = !this.archive;
  555. this.updateTableData();
  556. }
  557. close() {
  558. this.$emit('recent-books-close');
  559. }
  560. keyHook(event) {
  561. if (!this.$root.stdDialog.active && event.type == 'keydown' && event.key == 'Escape') {
  562. this.close();
  563. }
  564. return true;
  565. }
  566. }
  567. export default vueComponent(RecentBooksPage);
  568. //-----------------------------------------------------------------------------
  569. </script>
  570. <style scoped>
  571. .recent-books-scroll {
  572. width: 573px;
  573. overflow-y: auto;
  574. overflow-x: hidden;
  575. }
  576. .scroll-header {
  577. height: 50px;
  578. position: sticky;
  579. z-index: 1;
  580. top: 0;
  581. border-bottom: 2px solid #aaaaaa;
  582. padding-left: 5px;
  583. }
  584. .table-row {
  585. min-height: 80px;
  586. }
  587. .row-part {
  588. padding: 4px 0px 4px 0px;
  589. }
  590. .clickable {
  591. cursor: pointer;
  592. }
  593. .break-word {
  594. overflow-wrap: break-word;
  595. word-wrap: break-word;
  596. white-space: normal;
  597. }
  598. .even {
  599. background-color: #f2f2f2;
  600. }
  601. .active-book {
  602. background-color: #b0f0b0 !important;
  603. }
  604. .active-parent-book {
  605. background-color: #ffbbbb !important;
  606. }
  607. .icon {
  608. transition: transform 0.2s;
  609. }
  610. .expanded-icon {
  611. transform: rotate(90deg);
  612. }
  613. .tool-button {
  614. min-width: 30px;
  615. width: 30px;
  616. min-height: 30px;
  617. height: 30px;
  618. margin: 10px 6px 0px 3px;
  619. background-color: white;
  620. }
  621. .row-info-bottom {
  622. line-height: 110%;
  623. border-left: 1px solid #cccccc;
  624. border-bottom: 1px solid #cccccc;
  625. height: 12px;
  626. }
  627. .row-info-top {
  628. line-height: 110%;
  629. border: 1px solid #cccccc;
  630. border-right: 0;
  631. height: 12px;
  632. }
  633. .time-info, .row-info-top {
  634. color: #888888;
  635. }
  636. .read-bar {
  637. height: 4px;
  638. background-color: #bbbbbb;
  639. }
  640. .del-button {
  641. width: 25px;
  642. height: 20px;
  643. position: absolute;
  644. border-left: 1px solid #cccccc;
  645. border-bottom: 1px solid #cccccc;
  646. border-radius: 0 0 0 10px;
  647. margin: 1px;
  648. }
  649. .del-button:hover {
  650. color: white;
  651. background-color: #FF3030;
  652. }
  653. .restore-button {
  654. width: 25px;
  655. height: 20px;
  656. position: absolute;
  657. border-right: 1px solid #cccccc;
  658. border-bottom: 1px solid #cccccc;
  659. border-radius: 0 0 10px 0;
  660. margin: 1px;
  661. }
  662. .restore-button:hover {
  663. color: white;
  664. background-color: #00bb00;
  665. }
  666. .header-button, .header-button-pressed {
  667. width: 80px;
  668. height: 30px;
  669. cursor: pointer;
  670. color: #555555;
  671. }
  672. .header-button:hover {
  673. color: white;
  674. background-color: #39902F;
  675. }
  676. .header-button-pressed {
  677. color: black;
  678. background-color: yellow;
  679. }
  680. .header-button-pressed:hover {
  681. color: black;
  682. }
  683. </style>