Reader.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704
  1. <template>
  2. <el-container>
  3. <el-header v-show="toolBarActive" height='50px'>
  4. <div class="header">
  5. <el-tooltip content="Загрузить книгу" :open-delay="1000" effect="light">
  6. <el-button ref="loader" class="tool-button" :class="buttonActiveClass('loader')" @click="buttonClick('loader')"><i class="el-icon-back"></i></el-button>
  7. </el-tooltip>
  8. <div>
  9. <el-tooltip content="Действие назад" :open-delay="1000" effect="light">
  10. <el-button ref="undoAction" class="tool-button" :class="buttonActiveClass('undoAction')" @click="buttonClick('undoAction')" ><i class="el-icon-arrow-left"></i></el-button>
  11. </el-tooltip>
  12. <el-tooltip content="Действие вперед" :open-delay="1000" effect="light">
  13. <el-button ref="redoAction" class="tool-button" :class="buttonActiveClass('redoAction')" @click="buttonClick('redoAction')" ><i class="el-icon-arrow-right"></i></el-button>
  14. </el-tooltip>
  15. <div class="space"></div>
  16. <el-tooltip content="На весь экран" :open-delay="1000" effect="light">
  17. <el-button ref="fullScreen" class="tool-button" :class="buttonActiveClass('fullScreen')" @click="buttonClick('fullScreen')"><i class="el-icon-rank"></i></el-button>
  18. </el-tooltip>
  19. <el-tooltip content="Плавный скроллинг" :open-delay="1000" effect="light">
  20. <el-button ref="scrolling" class="tool-button" :class="buttonActiveClass('scrolling')" @click="buttonClick('scrolling')"><i class="el-icon-sort"></i></el-button>
  21. </el-tooltip>
  22. <el-tooltip content="Прокрутка книги" :open-delay="1000" effect="light">
  23. <el-button ref="setPosition" class="tool-button" :class="buttonActiveClass('setPosition')" @click="buttonClick('setPosition')"><i class="el-icon-d-arrow-right"></i></el-button>
  24. </el-tooltip>
  25. <el-tooltip content="Найти в тексте" :open-delay="1000" effect="light">
  26. <el-button ref="search" class="tool-button" :class="buttonActiveClass('search')" @click="buttonClick('search')"><i class="el-icon-search"></i></el-button>
  27. </el-tooltip>
  28. <el-tooltip content="Скопировать текст со страницы" :open-delay="1000" effect="light">
  29. <el-button ref="copyText" class="tool-button" :class="buttonActiveClass('copyText')" @click="buttonClick('copyText')"><i class="el-icon-edit-outline"></i></el-button>
  30. </el-tooltip>
  31. <el-tooltip content="Принудительно обновить книгу в обход кеша" :open-delay="1000" effect="light">
  32. <el-button ref="refresh" class="tool-button" :class="buttonActiveClass('refresh')" @click="buttonClick('refresh')">
  33. <i class="el-icon-refresh" :class="{clear: !showRefreshIcon}"></i>
  34. </el-button>
  35. </el-tooltip>
  36. <div class="space"></div>
  37. <el-tooltip content="Открыть недавние" :open-delay="1000" effect="light">
  38. <el-button ref="history" class="tool-button" :class="buttonActiveClass('history')" @click="buttonClick('history')"><i class="el-icon-document"></i></el-button>
  39. </el-tooltip>
  40. </div>
  41. <el-tooltip content="Настроить" :open-delay="1000" effect="light">
  42. <el-button ref="settings" class="tool-button" :class="buttonActiveClass('settings')" @click="buttonClick('settings')"><i class="el-icon-setting"></i></el-button>
  43. </el-tooltip>
  44. </div>
  45. </el-header>
  46. <el-main>
  47. <keep-alive>
  48. <component ref="page" :is="activePage"
  49. @load-book="loadBook"
  50. @book-pos-changed="bookPosChanged"
  51. @tool-bar-toggle="toolBarToggle"
  52. @full-screen-toogle="fullScreenToggle"
  53. @stop-scrolling="stopScrolling"
  54. @scrolling-toggle="scrollingToggle"
  55. ></component>
  56. </keep-alive>
  57. <SetPositionPage v-if="setPositionActive" ref="setPositionPage" @set-position-toggle="setPositionToggle" @book-pos-changed="bookPosChanged"></SetPositionPage>
  58. <SearchPage v-show="searchActive" ref="searchPage" @search-toggle="searchToggle" @book-pos-changed="bookPosChanged"></SearchPage>
  59. <HistoryPage v-if="historyActive" ref="historyPage" @load-book="loadBook" @history-toggle="historyToggle"></HistoryPage>
  60. <SettingsPage v-if="settingsActive" ref="settingsPage" @settings-toggle="settingsToggle"></SettingsPage>
  61. </el-main>
  62. </el-container>
  63. </template>
  64. <script>
  65. //-----------------------------------------------------------------------------
  66. import Vue from 'vue';
  67. import Component from 'vue-class-component';
  68. import LoaderPage from './LoaderPage/LoaderPage.vue';
  69. import TextPage from './TextPage/TextPage.vue';
  70. import ProgressPage from './ProgressPage/ProgressPage.vue';
  71. import SetPositionPage from './SetPositionPage/SetPositionPage.vue';
  72. import SearchPage from './SearchPage/SearchPage.vue';
  73. import HistoryPage from './HistoryPage/HistoryPage.vue';
  74. import SettingsPage from './SettingsPage/SettingsPage.vue';
  75. import bookManager from './share/bookManager';
  76. import readerApi from '../../api/reader';
  77. import _ from 'lodash';
  78. import {sleep} from '../../share/utils';
  79. export default @Component({
  80. components: {
  81. LoaderPage,
  82. TextPage,
  83. ProgressPage,
  84. SetPositionPage,
  85. SearchPage,
  86. HistoryPage,
  87. SettingsPage,
  88. },
  89. watch: {
  90. bookPos: function(newValue) {
  91. if (newValue !== undefined && this.activePage == 'TextPage') {
  92. const textPage = this.$refs.page;
  93. if (textPage.bookPos != newValue) {
  94. textPage.bookPos = newValue;
  95. }
  96. this.debouncedCommitOpenedBook(newValue);
  97. }
  98. },
  99. routeParamPos: function(newValue) {
  100. if (newValue !== undefined && newValue != this.bookPos) {
  101. this.bookPos = newValue;
  102. }
  103. },
  104. routeParamUrl: function(newValue) {
  105. if (newValue !== '' && newValue !== this.lastOpenedBook.url) {
  106. this.loadBook({url: newValue, bookPos: this.routeParamPos});
  107. }
  108. },
  109. settings: function(newValue) {
  110. this.allowUrlParamBookPos = newValue.allowUrlParamBookPos;
  111. this.updateRoute();
  112. },
  113. },
  114. })
  115. class Reader extends Vue {
  116. loaderActive = false;
  117. progressActive = false;
  118. fullScreenActive = false;
  119. scrollingActive = false;
  120. setPositionActive = false;
  121. searchActive = false;
  122. copyTextActive = false;
  123. historyActive = false;
  124. settingsActive = false;
  125. bookPos = null;
  126. allowUrlParamBookPos = false;
  127. showRefreshIcon = true;
  128. created() {
  129. this.commit = this.$store.commit;
  130. this.dispatch = this.$store.dispatch;
  131. this.reader = this.$store.state.reader;
  132. this.$root.addKeyHook(this.keyHook);
  133. this.lastActivePage = false;
  134. this.debouncedUpdateRoute = _.debounce(() => {
  135. this.updateRoute();
  136. }, 1000);
  137. this.debouncedCommitOpenedBook = _.debounce((newValue) => {
  138. if (this.lastOpenedBook && this.lastOpenedBook.bookPos != newValue) {
  139. this.commit('reader/setOpenedBook', Object.assign({}, this.lastOpenedBook, {bookPos: newValue, bookPosSeen: this.bookPosSeen}));
  140. }
  141. }, 500);
  142. document.addEventListener('fullscreenchange', () => {
  143. this.fullScreenActive = (document.fullscreenElement !== null);
  144. });
  145. this.allowUrlParamBookPos = this.settings.allowUrlParamBookPos;
  146. }
  147. mounted() {
  148. /*while (this.lastOpenedBook) {
  149. this.commit('reader/delOpenedBook', this.lastOpenedBook);
  150. }*/
  151. if (this.$root.rootRoute == '/reader') {
  152. if (this.routeParamUrl) {
  153. this.loadBook({url: this.routeParamUrl, bookPos: this.routeParamPos});
  154. } else if (this.lastOpenedBook) {
  155. this.loadBook({url: this.lastOpenedBook.url});
  156. } else {
  157. this.loaderActive = true;
  158. }
  159. }
  160. }
  161. get routeParamPos() {
  162. let result = undefined;
  163. const q = this.$route.query;
  164. if (q['__p']) {
  165. result = q['__p'];
  166. if (Array.isArray(result))
  167. result = result[0];
  168. }
  169. return (result ? parseInt(result, 10) || 0 : result);
  170. }
  171. updateRoute(isNewRoute) {
  172. const pos = (this.bookPos != undefined && this.allowUrlParamBookPos ? `__p=${this.bookPos}&` : '');
  173. if (isNewRoute)
  174. this.$router.push(`/reader?${pos}url=${this.lastOpenedBook.url}`);
  175. else
  176. this.$router.replace(`/reader?${pos}url=${this.lastOpenedBook.url}`);
  177. }
  178. get routeParamUrl() {
  179. let result = '';
  180. const path = this.$route.fullPath;
  181. const i = path.indexOf('url=');
  182. if (i >= 0) {
  183. result = path.substr(i + 4);
  184. }
  185. return decodeURIComponent(result);
  186. }
  187. bookPosChanged(event) {
  188. if (event.bookPosSeen !== undefined)
  189. this.bookPosSeen = event.bookPosSeen;
  190. this.bookPos = event.bookPos;
  191. this.debouncedUpdateRoute();
  192. }
  193. get toolBarActive() {
  194. return this.reader.toolBarActive;
  195. }
  196. get lastOpenedBook() {
  197. const result = this.$store.getters['reader/lastOpenedBook'];
  198. if (!result)
  199. this.closeAllTextPages();
  200. return result;
  201. }
  202. get settings() {
  203. return this.$store.state.reader.settings;
  204. }
  205. toolBarToggle() {
  206. this.commit('reader/setToolBarActive', !this.toolBarActive);
  207. this.$root.$emit('resize');
  208. }
  209. fullScreenToggle() {
  210. this.fullScreenActive = !this.fullScreenActive;
  211. if (this.fullScreenActive) {
  212. const element = document.documentElement;
  213. if (element.requestFullscreen) {
  214. element.requestFullscreen();
  215. } else if (element.webkitrequestFullscreen) {
  216. element.webkitRequestFullscreen();
  217. } else if (element.mozRequestFullscreen) {
  218. element.mozRequestFullScreen();
  219. }
  220. } else {
  221. if (document.cancelFullScreen) {
  222. document.cancelFullScreen();
  223. } else if (document.mozCancelFullScreen) {
  224. document.mozCancelFullScreen();
  225. } else if (document.webkitCancelFullScreen) {
  226. document.webkitCancelFullScreen();
  227. }
  228. }
  229. }
  230. closeAllTextPages() {
  231. this.setPositionActive = false;
  232. this.searchActive = false;
  233. this.historyActive = false;
  234. this.settingsActive = false;
  235. this.stopScrolling();
  236. }
  237. loaderToggle() {
  238. this.loaderActive = !this.loaderActive;
  239. if (this.loaderActive) {
  240. this.closeAllTextPages();
  241. }
  242. }
  243. setPositionToggle() {
  244. this.setPositionActive = !this.setPositionActive;
  245. if (this.setPositionActive && this.activePage == 'TextPage' && this.lastOpenedBook) {
  246. this.closeAllTextPages();
  247. this.setPositionActive = true;
  248. this.$nextTick(() => {
  249. this.$refs.setPositionPage.sliderMax = this.lastOpenedBook.textLength - 1;
  250. this.$refs.setPositionPage.sliderValue = this.lastOpenedBook.bookPos;
  251. });
  252. } else {
  253. this.setPositionActive = false;
  254. }
  255. }
  256. stopScrolling() {
  257. if (this.scrollingActive)
  258. this.scrollingToggle();
  259. }
  260. scrollingToggle() {
  261. this.scrollingActive = !this.scrollingActive;
  262. if (this.activePage == 'TextPage') {
  263. const page = this.$refs.page;
  264. if (this.scrollingActive) {
  265. page.startTextScrolling();
  266. } else {
  267. page.stopTextScrolling();
  268. }
  269. }
  270. }
  271. searchToggle() {
  272. this.searchActive = !this.searchActive;
  273. const page = this.$refs.page;
  274. if (this.searchActive && this.activePage == 'TextPage' && page.parsed && this.lastOpenedBook) {
  275. this.closeAllTextPages();
  276. this.searchActive = true;
  277. this.$nextTick(() => {
  278. this.$refs.searchPage.init(page.parsed);
  279. });
  280. } else {
  281. this.searchActive = false;
  282. }
  283. }
  284. historyToggle() {
  285. this.historyActive = !this.historyActive;
  286. if (this.historyActive) {
  287. this.closeAllTextPages();
  288. this.historyActive = true;
  289. } else {
  290. this.historyActive = false;
  291. }
  292. }
  293. settingsToggle() {
  294. this.settingsActive = !this.settingsActive;
  295. if (this.settingsActive) {
  296. this.closeAllTextPages();
  297. this.settingsActive = true;
  298. } else {
  299. this.settingsActive = false;
  300. }
  301. }
  302. buttonClick(button) {
  303. switch (button) {
  304. case 'loader':
  305. this.loaderToggle();
  306. break;
  307. case 'fullScreen':
  308. this.fullScreenToggle();
  309. break;
  310. case 'setPosition':
  311. this.setPositionToggle();
  312. break;
  313. case 'scrolling':
  314. this.scrollingToggle();
  315. break;
  316. case 'search':
  317. this.searchToggle();
  318. break;
  319. case 'history':
  320. this.historyToggle();
  321. break;
  322. case 'refresh':
  323. if (this.lastOpenedBook) {
  324. this.loadBook({url: this.lastOpenedBook.url, force: true});
  325. }
  326. break;
  327. case 'settings':
  328. this.settingsToggle();
  329. break;
  330. }
  331. this.$refs[button].$el.blur();
  332. }
  333. buttonActiveClass(button) {
  334. const classActive = { 'tool-button-active': true, 'tool-button-active:hover': true };
  335. const classDisabled = { 'tool-button-disabled': true, 'tool-button-disabled:hover': true };
  336. let classResult = {};
  337. switch (button) {
  338. case 'loader':
  339. case 'fullScreen':
  340. case 'setPosition':
  341. case 'scrolling':
  342. case 'search':
  343. case 'copyText':
  344. case 'history':
  345. case 'settings':
  346. if (this[`${button}Active`])
  347. classResult = classActive;
  348. break;
  349. }
  350. if (this.activePage == 'LoaderPage' || !this.lastOpenedBook) {
  351. switch (button) {
  352. case 'undoAction':
  353. case 'redoAction':
  354. case 'setPosition':
  355. case 'scrolling':
  356. case 'search':
  357. case 'copyText':
  358. classResult = classDisabled;
  359. break;
  360. case 'history':
  361. case 'refresh':
  362. if (!this.lastOpenedBook)
  363. classResult = classDisabled;
  364. break;
  365. }
  366. }
  367. return classResult;
  368. }
  369. get activePage() {
  370. let result = '';
  371. if (this.progressActive)
  372. result = 'ProgressPage';
  373. else if (this.loaderActive)
  374. result = 'LoaderPage';
  375. else if (this.lastOpenedBook)
  376. result = 'TextPage';
  377. if (!result) {
  378. this.loaderActive = true;
  379. result = 'LoaderPage';
  380. }
  381. if (result != 'TextPage') {
  382. this.$root.$emit('set-app-title');
  383. }
  384. if (this.lastActivePage != result && result == 'TextPage') {
  385. //акивируем страницу с текстом
  386. this.$nextTick(async() => {
  387. const last = this.lastOpenedBook;
  388. const isParsed = await bookManager.hasBookParsed(last);
  389. if (!isParsed) {
  390. this.$root.$emit('set-app-title');
  391. return;
  392. }
  393. this.updateRoute();
  394. const textPage = this.$refs.page;
  395. if (textPage.showBook) {
  396. textPage.lastBook = last;
  397. textPage.bookPos = (last.bookPos !== undefined ? last.bookPos : 0);
  398. textPage.showBook();
  399. }
  400. });
  401. }
  402. this.lastActivePage = result;
  403. return result;
  404. }
  405. loadBook(opts) {
  406. this.closeAllTextPages();
  407. this.progressActive = true;
  408. this.$nextTick(async() => {
  409. const progress = this.$refs.page;
  410. try {
  411. progress.show();
  412. progress.setState({state: 'parse'});
  413. // есть ли среди истории OpenedBook
  414. const key = bookManager.keyFromUrl(opts.url);
  415. let wasOpened = this.reader.openedBook[key];
  416. wasOpened = (wasOpened ? wasOpened : {});
  417. const bookPos = (opts.bookPos !== undefined ? opts.bookPos : wasOpened.bookPos);
  418. const bookPosSeen = (opts.bookPos !== undefined ? opts.bookPos : wasOpened.bookPosSeen);
  419. let book = null;
  420. if (!opts.force) {
  421. // пытаемся загрузить и распарсить книгу в менеджере из локального кеша
  422. const bookParsed = await bookManager.getBook({url: opts.url}, (prog) => {
  423. progress.setState({progress: prog});
  424. });
  425. // если есть в локальном кеше
  426. if (bookParsed) {
  427. this.commit('reader/setOpenedBook', Object.assign({bookPos, bookPosSeen}, bookManager.metaOnly(bookParsed)));
  428. this.loaderActive = false;
  429. progress.hide(); this.progressActive = false;
  430. this.blinkCachedLoadMessage();
  431. return;
  432. }
  433. // иначе идем на сервер
  434. // пытаемся загрузить готовый файл с сервера
  435. if (wasOpened.path) {
  436. try {
  437. const resp = await readerApi.loadCachedBook(wasOpened.path, (state) => {
  438. progress.setState(state);
  439. });
  440. book = Object.assign({}, wasOpened, {data: resp.data});
  441. } catch (e) {
  442. //молчим
  443. }
  444. }
  445. }
  446. progress.setState({totalSteps: 5});
  447. // не удалось, скачиваем книгу полностью с конвертацией
  448. let loadCached = true;
  449. if (!book) {
  450. book = await readerApi.loadBook(opts.url, (state) => {
  451. progress.setState(state);
  452. });
  453. loadCached = false;
  454. }
  455. // добавляем в bookManager
  456. progress.setState({state: 'parse', step: 5});
  457. const addedBook = await bookManager.addBook(book, (prog) => {
  458. progress.setState({progress: prog});
  459. });
  460. // добавляем в историю
  461. this.commit('reader/setOpenedBook', Object.assign({bookPos, bookPosSeen}, bookManager.metaOnly(addedBook)));
  462. this.updateRoute(true);
  463. this.loaderActive = false;
  464. progress.hide(); this.progressActive = false;
  465. if (loadCached) {
  466. this.blinkCachedLoadMessage();
  467. } else
  468. this.stopBlink = true;
  469. } catch (e) {
  470. progress.hide(); this.progressActive = false;
  471. this.loaderActive = true;
  472. this.$alert(e.message, 'Ошибка', {type: 'error'});
  473. }
  474. });
  475. }
  476. blinkCachedLoadMessage() {
  477. this.blinkCount = 30;
  478. if (!this.inBlink) {
  479. this.inBlink = true;
  480. this.stopBlink = false;
  481. this.$nextTick(async() => {
  482. let page = this.$refs.page;
  483. while (this.blinkCount) {
  484. this.showRefreshIcon = !this.showRefreshIcon;
  485. if (page.blinkCachedLoadMessage)
  486. page.blinkCachedLoadMessage(this.showRefreshIcon);
  487. await sleep(500);
  488. if (this.stopBlink)
  489. break;
  490. this.blinkCount--;
  491. page = this.$refs.page;
  492. }
  493. this.showRefreshIcon = true;
  494. this.inBlink = false;
  495. if (page.blinkCachedLoadMessage)
  496. page.blinkCachedLoadMessage('finish');
  497. });
  498. }
  499. }
  500. keyHook(event) {
  501. if (this.$root.rootRoute == '/reader') {
  502. let handled = false;
  503. if (!handled && this.settingsActive)
  504. handled = this.$refs.settingsPage.keyHook(event);
  505. if (!handled && this.historyActive)
  506. handled = this.$refs.historyPage.keyHook(event);
  507. if (!handled && this.setPositionActive)
  508. handled = this.$refs.setPositionPage.keyHook(event);
  509. if (!handled && this.searchActive)
  510. handled = this.$refs.searchPage.keyHook(event);
  511. if (!handled && this.$refs.page && this.$refs.page.keyHook)
  512. handled = this.$refs.page.keyHook(event);
  513. if (!handled && event.type == 'keydown') {
  514. if (event.code == 'Escape')
  515. this.loaderToggle();
  516. if (this.activePage == 'TextPage') {
  517. switch (event.code) {
  518. case 'KeyP':
  519. this.setPositionToggle();
  520. break;
  521. case 'KeyF':
  522. if (event.ctrlKey) {
  523. this.searchToggle();
  524. event.preventDefault();
  525. event.stopPropagation();
  526. }
  527. break;
  528. case 'KeyZ':
  529. this.scrollingToggle();
  530. break;
  531. case 'KeyH':
  532. this.historyToggle();
  533. break;
  534. case 'KeyS':
  535. this.settingsToggle();
  536. break;
  537. }
  538. }
  539. }
  540. }
  541. }
  542. }
  543. //-----------------------------------------------------------------------------
  544. </script>
  545. <style scoped>
  546. .el-container {
  547. padding: 0;
  548. margin: 0;
  549. height: 100%;
  550. }
  551. .el-header {
  552. padding-left: 5px;
  553. padding-right: 5px;
  554. background-color: #1B695F;
  555. color: #000;
  556. overflow-x: auto;
  557. overflow-y: hidden;
  558. }
  559. .header {
  560. display: flex;
  561. justify-content: space-between;
  562. min-width: 550px;
  563. }
  564. .el-main {
  565. position: relative;
  566. display: flex;
  567. padding: 0;
  568. margin: 0;
  569. background-color: #EBE2C9;
  570. color: #000;
  571. }
  572. .tool-button {
  573. margin: 0 2px 0 2px;
  574. padding: 0;
  575. color: #3E843E;
  576. background-color: #E6EDF4;
  577. margin-top: 5px;
  578. height: 38px;
  579. width: 38px;
  580. border: 0;
  581. box-shadow: 3px 3px 5px black;
  582. }
  583. .tool-button:hover {
  584. background-color: white;
  585. }
  586. .tool-button-active {
  587. box-shadow: 0 0 0;
  588. color: white;
  589. background-color: #8AB45F;
  590. position: relative;
  591. top: 1px;
  592. left: 1px;
  593. }
  594. .tool-button-active:hover {
  595. color: white;
  596. background-color: #81C581;
  597. }
  598. .tool-button-disabled {
  599. color: lightgray;
  600. background-color: gray;
  601. }
  602. .tool-button-disabled:hover {
  603. color: lightgray;
  604. background-color: gray;
  605. }
  606. i {
  607. font-size: 200%;
  608. }
  609. .space {
  610. width: 10px;
  611. display: inline-block;
  612. }
  613. .clear {
  614. color: rgba(0,0,0,0);
  615. }
  616. </style>