SettingsPage.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717
  1. <template>
  2. <Window ref="window" height="95%" width="600px" @close="close">
  3. <template #header>
  4. Настройки
  5. </template>
  6. <div class="col row">
  7. <div class="full-height">
  8. <q-tabs
  9. ref="tabs"
  10. v-model="selectedTab"
  11. class="bg-grey-3 text-black"
  12. left-icon="la la-caret-up"
  13. right-icon="la la-caret-down"
  14. active-color="white"
  15. active-bg-color="primary"
  16. indicator-color="black"
  17. vertical
  18. no-caps
  19. stretch
  20. inline-label
  21. >
  22. <div v-show="tabsScrollable" class="q-pt-lg" />
  23. <q-tab class="tab" name="profiles" icon="la la-users" label="Профили" />
  24. <q-tab class="tab" name="view" icon="la la-eye" label="Вид" />
  25. <q-tab class="tab" name="buttons" icon="la la-grip-horizontal" label="Кнопки" />
  26. <q-tab class="tab" name="keys" icon="la la-gamepad" label="Управление" />
  27. <q-tab class="tab" name="pagemove" icon="la la-school" label="Листание" />
  28. <q-tab class="tab" name="convert" icon="la la-magic" label="Конвертир." />
  29. <q-tab class="tab" name="others" icon="la la-list-ul" label="Прочее" />
  30. <q-tab class="tab" name="reset" icon="la la-broom" label="Сброс" />
  31. <div v-show="tabsScrollable" class="q-pt-lg" />
  32. </q-tabs>
  33. </div>
  34. <div class="col fit">
  35. <!-- Профили --------------------------------------------------------------------->
  36. <div v-if="selectedTab == 'profiles'" class="fit tab-panel">
  37. @@include('./include/ProfilesTab.inc');
  38. </div>
  39. <!-- Вид ------------------------------------------------------------------------->
  40. <div v-if="selectedTab == 'view'" class="fit column">
  41. @@include('./include/ViewTab.inc');
  42. </div>
  43. <!-- Кнопки ---------------------------------------------------------------------->
  44. <div v-if="selectedTab == 'buttons'" class="fit tab-panel">
  45. @@include('./include/ButtonsTab.inc');
  46. </div>
  47. <!-- Управление ------------------------------------------------------------------>
  48. <div v-if="selectedTab == 'keys'" class="fit column">
  49. @@include('./include/KeysTab.inc');
  50. </div>
  51. <!-- Листание -------------------------------------------------------------------->
  52. <div v-if="selectedTab == 'pagemove'" class="fit tab-panel">
  53. @@include('./include/PageMoveTab.inc');
  54. </div>
  55. <!-- Конвертирование ------------------------------------------------------------->
  56. <div v-if="selectedTab == 'convert'" class="fit tab-panel">
  57. @@include('./include/ConvertTab.inc');
  58. </div>
  59. <!-- Прочее ---------------------------------------------------------------------->
  60. <div v-if="selectedTab == 'others'" class="fit tab-panel">
  61. @@include('./include/OthersTab.inc');
  62. </div>
  63. <!-- Сброс ----------------------------------------------------------------------->
  64. <div v-if="selectedTab == 'reset'" class="fit tab-panel">
  65. @@include('./include/ResetTab.inc');
  66. </div>
  67. </div>
  68. </div>
  69. </Window>
  70. </template>
  71. <script>
  72. //-----------------------------------------------------------------------------
  73. import { ref, watch } from 'vue';
  74. import vueComponent from '../../vueComponent.js';
  75. import _ from 'lodash';
  76. import * as utils from '../../../share/utils';
  77. import * as cryptoUtils from '../../../share/cryptoUtils';
  78. import Window from '../../share/Window.vue';
  79. import NumInput from '../../share/NumInput.vue';
  80. import UserHotKeys from './UserHotKeys/UserHotKeys.vue';
  81. import wallpaperStorage from '../share/wallpaperStorage';
  82. import rstore from '../../../store/modules/reader';
  83. import defPalette from './defPalette';
  84. const hex = /^#[0-9a-fA-F]{3}([0-9a-fA-F]{3})?$/;
  85. const componentOptions = {
  86. components: {
  87. Window,
  88. NumInput,
  89. UserHotKeys,
  90. },
  91. data: function() {
  92. return Object.assign({}, rstore.settingDefaults);
  93. },
  94. watch: {
  95. settings: function() {
  96. this.settingsChanged();
  97. },
  98. form: function(newValue) {
  99. if (this.inited) {
  100. this.commit('reader/setSettings', _.cloneDeep(newValue));
  101. }
  102. },
  103. fontBold: function(newValue) {
  104. this.fontWeight = (newValue ? 'bold' : '');
  105. },
  106. fontItalic: function(newValue) {
  107. this.fontStyle = (newValue ? 'italic' : '');
  108. },
  109. vertShift: function(newValue) {
  110. const font = (this.webFontName ? this.webFontName : this.fontName);
  111. if (this.fontShifts[font] != newValue || this.fontVertShift != newValue) {
  112. this.fontShifts = Object.assign({}, this.fontShifts, {[font]: newValue});
  113. this.fontVertShift = newValue;
  114. }
  115. },
  116. fontName: function(newValue) {
  117. const font = (this.webFontName ? this.webFontName : newValue);
  118. this.vertShift = this.fontShifts[font] || 0;
  119. },
  120. webFontName: function(newValue) {
  121. const font = (newValue ? newValue : this.fontName);
  122. this.vertShift = this.fontShifts[font] || 0;
  123. },
  124. wallpaper: function(newValue) {
  125. if (newValue != '' && this.pageChangeAnimation == 'flip')
  126. this.pageChangeAnimation = '';
  127. },
  128. dualPageMode(newValue) {
  129. if (newValue && this.pageChangeAnimation == 'flip' || this.pageChangeAnimation == 'rightShift')
  130. this.pageChangeAnimation = '';
  131. },
  132. textColor: function(newValue) {
  133. this.textColorFiltered = newValue;
  134. },
  135. textColorFiltered: function(newValue) {
  136. if (hex.test(newValue))
  137. this.textColor = newValue;
  138. },
  139. backgroundColor: function(newValue) {
  140. this.bgColorFiltered = newValue;
  141. },
  142. bgColorFiltered: function(newValue) {
  143. if (hex.test(newValue))
  144. this.backgroundColor = newValue;
  145. },
  146. dualDivColor(newValue) {
  147. this.dualDivColorFiltered = newValue;
  148. },
  149. dualDivColorFiltered(newValue) {
  150. if (hex.test(newValue))
  151. this.dualDivColor = newValue;
  152. },
  153. statusBarColor(newValue) {
  154. this.statusBarColorFiltered = newValue;
  155. },
  156. statusBarColorFiltered(newValue) {
  157. if (hex.test(newValue))
  158. this.statusBarColor = newValue;
  159. },
  160. },
  161. };
  162. class SettingsPage {
  163. _options = componentOptions;
  164. selectedTab = 'profiles';
  165. selectedViewTab = 'mode';
  166. selectedKeysTab = 'mouse';
  167. fontBold = false;
  168. fontItalic = false;
  169. vertShift = 0;
  170. tabsScrollable = false;
  171. textColorFiltered = '';
  172. bgColorFiltered = '';
  173. dualDivColorFiltered = '';
  174. webFonts = [];
  175. fonts = [];
  176. serverStorageKeyVisible = false;
  177. toolButtons = [];
  178. rstore = {};
  179. setup() {
  180. const settingsProps = { form: ref({}) };
  181. for (let prop in rstore.settingDefaults) {
  182. settingsProps[prop] = ref(_.cloneDeep(rstore.settingDefaults[prop]));
  183. watch(settingsProps[prop], (newValue) => {
  184. settingsProps.form.value = Object.assign({}, settingsProps.form.value, {[prop]: newValue});
  185. }, {deep: true});
  186. }
  187. return settingsProps;
  188. }
  189. created() {
  190. this.commit = this.$store.commit;
  191. this.reader = this.$store.state.reader;
  192. this.form = {};
  193. this.rstore = rstore;
  194. this.toolButtons = rstore.toolButtons;
  195. this.settingsChanged();
  196. }
  197. mounted() {
  198. this.$watch(
  199. '$refs.tabs.scrollable',
  200. (newValue) => {
  201. this.tabsScrollable = newValue && !this.$root.isMobileDevice;
  202. }
  203. );
  204. }
  205. init() {
  206. this.$refs.window.init();
  207. this.inited = true;
  208. }
  209. settingsChanged() {
  210. if (_.isEqual(this.form, this.settings))
  211. return;
  212. this.form = Object.assign({}, this.settings);
  213. for (const prop in rstore.settingDefaults) {
  214. this[prop] = _.cloneDeep(this.form[prop]);
  215. }
  216. this.fontBold = (this.fontWeight == 'bold');
  217. this.fontItalic = (this.fontStyle == 'italic');
  218. this.fonts = rstore.fonts;
  219. this.webFonts = rstore.webFonts;
  220. const font = (this.webFontName ? this.webFontName : this.fontName);
  221. this.vertShift = this.fontShifts[font] || 0;
  222. this.textColorFiltered = this.textColor;
  223. this.bgColorFiltered = this.backgroundColor;
  224. this.dualDivColorFiltered = this.dualDivColor;
  225. this.statusBarColorFiltered = this.statusBarColor;
  226. }
  227. get mode() {
  228. return this.$store.state.config.mode;
  229. }
  230. get isExternalConverter() {
  231. return this.$store.state.config.useExternalBookConverter;
  232. }
  233. get settings() {
  234. return this.$store.state.reader.settings;
  235. }
  236. get serverSyncEnabled() {
  237. return this.$store.state.reader.serverSyncEnabled;
  238. }
  239. set serverSyncEnabled(newValue) {
  240. this.commit('reader/setServerSyncEnabled', newValue);
  241. }
  242. get profiles() {
  243. return this.$store.state.reader.profiles;
  244. }
  245. get currentProfileOptions() {
  246. const profNames = Object.keys(this.profiles)
  247. profNames.sort();
  248. let result = [{label: 'Нет', value: ''}];
  249. profNames.forEach(name => {
  250. result.push({label: name, value: name});
  251. });
  252. return result;
  253. }
  254. get wallpaperOptions() {
  255. let result = [{label: 'Нет', value: ''}];
  256. const userWallpapers = _.cloneDeep(this.userWallpapers);
  257. userWallpapers.sort((a, b) => a.label.localeCompare(b.label));
  258. for (const wp of userWallpapers) {
  259. if (wallpaperStorage.keyExists(wp.cssClass))
  260. result.push({label: wp.label, value: wp.cssClass});
  261. }
  262. for (let i = 1; i <= 17; i++) {
  263. result.push({label: i, value: `paper${i}`});
  264. }
  265. return result;
  266. }
  267. get fontsOptions() {
  268. let result = [];
  269. this.fonts.forEach(font => {
  270. result.push({label: (font.label ? font.label : font.name), value: font.name});
  271. });
  272. return result;
  273. }
  274. get webFontsOptions() {
  275. let result = [{label: 'Нет', value: ''}];
  276. this.webFonts.forEach(font => {
  277. result.push({label: font.name, value: font.name});
  278. });
  279. return result;
  280. }
  281. get pageChangeAnimationOptions() {
  282. let result = [
  283. {label: 'Нет', value: ''},
  284. {label: 'Вверх-вниз', value: 'downShift'},
  285. (!this.dualPageMode ? {label: 'Вправо-влево', value: 'rightShift'} : null),
  286. {label: 'Протаивание', value: 'thaw'},
  287. {label: 'Мерцание', value: 'blink'},
  288. {label: 'Вращение', value: 'rotate'},
  289. (this.wallpaper == '' && !this.dualPageMode ? {label: 'Листание', value: 'flip'} : null),
  290. ];
  291. result = result.filter(v => v);
  292. return result;
  293. }
  294. get currentProfile() {
  295. return this.$store.state.reader.currentProfile;
  296. }
  297. set currentProfile(newValue) {
  298. this.commit('reader/setCurrentProfile', newValue);
  299. }
  300. get partialStorageKey() {
  301. return this.serverStorageKey.substr(0, 7) + '***';
  302. }
  303. get serverStorageKey() {
  304. return this.$store.state.reader.serverStorageKey;
  305. }
  306. get setStorageKeyLink() {
  307. return `https://${window.location.host}/#/reader?setStorageAccessKey=${utils.toBase58(this.serverStorageKey)}`;
  308. }
  309. get predefineTextColors() {
  310. return defPalette.concat([
  311. '#ffffff',
  312. '#000000',
  313. '#202020',
  314. '#323232',
  315. '#aaaaaa',
  316. '#00c0c0',
  317. '#ebe2c9',
  318. '#cfdc99',
  319. '#478355',
  320. '#909080',
  321. ]);
  322. }
  323. get predefineBackgroundColors() {
  324. return defPalette.concat([
  325. '#ffffff',
  326. '#000000',
  327. '#202020',
  328. '#ebe2c9',
  329. '#cfdc99',
  330. '#478355',
  331. '#a6caf0',
  332. '#909080',
  333. '#808080',
  334. '#c8c8c8',
  335. ]);
  336. }
  337. colorPanStyle(type) {
  338. let result = 'width: 30px; height: 30px; border: 1px solid black; border-radius: 4px;';
  339. switch (type) {
  340. case 'text':
  341. result += `background-color: ${this.textColor};`
  342. break;
  343. case 'bg':
  344. result += `background-color: ${this.backgroundColor};`
  345. break;
  346. case 'div':
  347. result += `background-color: ${this.dualDivColor};`
  348. break;
  349. case 'statusbar':
  350. result += `background-color: ${this.statusBarColor};`
  351. break;
  352. }
  353. return result;
  354. }
  355. needReload() {
  356. this.$root.notify.warning('Необходимо обновить страницу (F5), чтобы изменения возымели эффект');
  357. }
  358. needTextReload() {
  359. this.$root.notify.warning('Необходимо обновить книгу в обход кэша, чтобы изменения возымели эффект');
  360. }
  361. close() {
  362. this.$emit('do-action', {action: 'settings'});
  363. }
  364. async setDefaults() {
  365. try {
  366. if (await this.$root.stdDialog.confirm('Подтвердите установку настроек по умолчанию:', ' ')) {
  367. this.form = Object.assign({}, rstore.settingDefaults);
  368. for (let prop in rstore.settingDefaults) {
  369. this[prop] = this.form[prop];
  370. }
  371. }
  372. } catch (e) {
  373. //
  374. }
  375. }
  376. async addProfile() {
  377. try {
  378. if (Object.keys(this.profiles).length >= 100) {
  379. this.$root.stdDialog.alert('Достигнут предел количества профилей', 'Ошибка');
  380. return;
  381. }
  382. const result = await this.$root.stdDialog.prompt('Введите произвольное название для профиля устройства:', ' ', {
  383. inputValidator: (str) => { if (!str) return 'Название не должно быть пустым'; else if (str.length > 50) return 'Слишком длинное название'; else return true; },
  384. });
  385. if (result && result.value) {
  386. if (this.profiles[result.value]) {
  387. this.$root.stdDialog.alert('Такой профиль уже существует', 'Ошибка');
  388. } else {
  389. const newProfiles = Object.assign({}, this.profiles, {[result.value]: 1});
  390. this.commit('reader/setAllowProfilesSave', true);
  391. await this.$nextTick();//ждем обработчики watch
  392. this.commit('reader/setProfiles', newProfiles);
  393. await this.$nextTick();//ждем обработчики watch
  394. this.commit('reader/setAllowProfilesSave', false);
  395. this.currentProfile = result.value;
  396. }
  397. }
  398. } catch (e) {
  399. //
  400. }
  401. }
  402. async delProfile() {
  403. if (!this.currentProfile)
  404. return;
  405. try {
  406. const result = await this.$root.stdDialog.prompt(`<b>Предупреждение!</b> Удаление профиля '${this.$root.sanitize(this.currentProfile)}' необратимо.` +
  407. `<br>Все настройки профиля будут потеряны, однако список читаемых книг сохранится.` +
  408. `<br><br>Введите 'да' для подтверждения удаления:`, ' ', {
  409. inputValidator: (str) => { if (str && str.toLowerCase() === 'да') return true; else return 'Удаление не подтверждено'; },
  410. });
  411. if (result && result.value && result.value.toLowerCase() == 'да') {
  412. if (this.profiles[this.currentProfile]) {
  413. const newProfiles = Object.assign({}, this.profiles);
  414. delete newProfiles[this.currentProfile];
  415. this.commit('reader/setAllowProfilesSave', true);
  416. await this.$nextTick();//ждем обработчики watch
  417. this.commit('reader/setProfiles', newProfiles);
  418. await this.$nextTick();//ждем обработчики watch
  419. this.commit('reader/setAllowProfilesSave', false);
  420. this.currentProfile = '';
  421. }
  422. }
  423. } catch (e) {
  424. //
  425. }
  426. }
  427. async delAllProfiles() {
  428. if (!Object.keys(this.profiles).length)
  429. return;
  430. try {
  431. const result = await this.$root.stdDialog.prompt(`<b>Предупреждение!</b> Удаление ВСЕХ профилей с настройками необратимо.` +
  432. `<br><br>Введите 'да' для подтверждения удаления:`, ' ', {
  433. inputValidator: (str) => { if (str && str.toLowerCase() === 'да') return true; else return 'Удаление не подтверждено'; },
  434. });
  435. if (result && result.value && result.value.toLowerCase() == 'да') {
  436. this.commit('reader/setAllowProfilesSave', true);
  437. await this.$nextTick();//ждем обработчики watch
  438. this.commit('reader/setProfiles', {});
  439. await this.$nextTick();//ждем обработчики watch
  440. this.commit('reader/setAllowProfilesSave', false);
  441. this.currentProfile = '';
  442. }
  443. } catch (e) {
  444. //
  445. }
  446. }
  447. async copyToClip(text, prefix) {
  448. const result = await utils.copyTextToClipboard(text);
  449. const suf = (prefix.substr(-1) == 'а' ? 'а' : '');
  450. const msg = (result ? `${prefix} успешно скопирован${suf} в буфер обмена` : 'Копирование не удалось');
  451. if (result)
  452. this.$root.notify.success(msg);
  453. else
  454. this.$root.notify.error(msg);
  455. }
  456. async showServerStorageKey() {
  457. this.serverStorageKeyVisible = !this.serverStorageKeyVisible;
  458. }
  459. async enterServerStorageKey(key) {
  460. try {
  461. const result = await this.$root.stdDialog.prompt(`<b>Предупреждение!</b> Изменение ключа доступа приведет к замене всех профилей и читаемых книг в читалке.` +
  462. `<br><br>Введите новый ключ доступа:`, ' ', {
  463. inputValidator: (str) => {
  464. try {
  465. if (str && utils.fromBase58(str).length == 32) {
  466. return true;
  467. }
  468. } catch (e) {
  469. //
  470. }
  471. return 'Неверный формат ключа';
  472. },
  473. inputValue: (key && _.isString(key) ? key : null),
  474. });
  475. if (result && result.value && utils.fromBase58(result.value).length == 32) {
  476. this.commit('reader/setServerStorageKey', result.value);
  477. }
  478. } catch (e) {
  479. //
  480. }
  481. }
  482. async generateServerStorageKey() {
  483. try {
  484. const result = await this.$root.stdDialog.prompt(`<b>Предупреждение!</b> Генерация нового ключа доступа приведет к удалению всех профилей и читаемых книг в читалке.` +
  485. `<br><br>Введите 'да' для подтверждения генерации нового ключа:`, ' ', {
  486. inputValidator: (str) => { if (str && str.toLowerCase() === 'да') return true; else return 'Генерация не подтверждена'; },
  487. });
  488. if (result && result.value && result.value.toLowerCase() == 'да') {
  489. if (this.$root.generateNewServerStorageKey)
  490. this.$root.generateNewServerStorageKey();
  491. }
  492. } catch (e) {
  493. //
  494. }
  495. }
  496. loadWallpaperFileClick() {
  497. this.$refs.file.click();
  498. }
  499. loadWallpaperFile() {
  500. const file = this.$refs.file.files[0];
  501. if (file.size > 10*1024*1024) {
  502. this.$root.stdDialog.alert('Файл обоев не должен превышать в размере 10Mb', 'Ошибка');
  503. return;
  504. }
  505. if (file.type != 'image/png' && file.type != 'image/jpeg') {
  506. this.$root.stdDialog.alert('Файл обоев должен иметь тип PNG или JPEG', 'Ошибка');
  507. return;
  508. }
  509. if (this.userWallpapers.length >= 100) {
  510. this.$root.stdDialog.alert('Превышено максимальное количество пользовательских обоев.', 'Ошибка');
  511. return;
  512. }
  513. this.$refs.file.value = '';
  514. if (file) {
  515. const reader = new FileReader();
  516. reader.onload = (e) => {
  517. (async() => {
  518. const data = e.target.result;
  519. const key = utils.toHex(cryptoUtils.sha256(data));
  520. const label = `#${key.substring(0, 4)}`;
  521. const cssClass = `user-paper${key}`;
  522. const newUserWallpapers = _.cloneDeep(this.userWallpapers);
  523. const index = _.findIndex(newUserWallpapers, (item) => (item.cssClass == cssClass));
  524. if (index < 0)
  525. newUserWallpapers.push({label, cssClass});
  526. if (!wallpaperStorage.keyExists(cssClass))
  527. await wallpaperStorage.setData(cssClass, data);
  528. this.userWallpapers = newUserWallpapers;
  529. this.wallpaper = cssClass;
  530. })();
  531. }
  532. reader.readAsDataURL(file);
  533. }
  534. }
  535. async delWallpaper() {
  536. if (this.wallpaper.indexOf('user-paper') == 0) {
  537. const newUserWallpapers = [];
  538. for (const wp of this.userWallpapers) {
  539. if (wp.cssClass != this.wallpaper) {
  540. newUserWallpapers.push(wp);
  541. }
  542. }
  543. await wallpaperStorage.removeData(this.wallpaper);
  544. this.userWallpapers = newUserWallpapers;
  545. this.wallpaper = '';
  546. }
  547. }
  548. keyHook(event) {
  549. if (!this.$root.stdDialog.active && event.type == 'keydown' && event.key == 'Escape') {
  550. this.close();
  551. }
  552. return true;
  553. }
  554. }
  555. export default vueComponent(SettingsPage);
  556. //-----------------------------------------------------------------------------
  557. </script>
  558. <style scoped>
  559. .tab {
  560. justify-content: initial;
  561. }
  562. .tab-panel {
  563. overflow-x: hidden;
  564. overflow-y: auto;
  565. font-size: 90%;
  566. padding: 0 10px 15px 10px;
  567. }
  568. .part-header {
  569. border-top: 2px solid #bbbbbb;
  570. font-weight: bold;
  571. font-size: 110%;
  572. margin-top: 15px;
  573. margin-bottom: 5px;
  574. }
  575. .item {
  576. width: 100%;
  577. margin-top: 5px;
  578. margin-bottom: 5px;
  579. }
  580. .label-1, .label-7 {
  581. width: 75px;
  582. }
  583. .label-2, .label-3, .label-4, .label-5 {
  584. width: 110px;
  585. }
  586. .label-6 {
  587. width: 100px;
  588. }
  589. .label-1, .label-2, .label-3, .label-4, .label-5, .label-6, .label-7 {
  590. display: flex;
  591. flex-direction: column;
  592. justify-content: center;
  593. text-align: right;
  594. margin-right: 10px;
  595. overflow: hidden;
  596. }
  597. .text {
  598. font-size: 90%;
  599. line-height: 130%;
  600. }
  601. .button {
  602. margin: 3px 15px 3px 0;
  603. padding: 0 5px 0 5px;
  604. }
  605. .copy-icon {
  606. margin-left: 5px;
  607. cursor: pointer;
  608. font-size: 120%;
  609. color: blue;
  610. }
  611. .input {
  612. max-width: 150px;
  613. }
  614. .no-mp {
  615. margin: 0;
  616. padding: 0;
  617. }
  618. .col-left {
  619. width: 150px;
  620. }
  621. </style>