diff --git a/client/components/Reader/LoaderPage/LoaderPage.vue b/client/components/Reader/LoaderPage/LoaderPage.vue index 3ad229fe..ca5d97d3 100644 --- a/client/components/Reader/LoaderPage/LoaderPage.vue +++ b/client/components/Reader/LoaderPage/LoaderPage.vue @@ -1,13 +1,16 @@ @@ -20,13 +23,40 @@ import Component from 'vue-class-component'; export default @Component({ }) class LoaderPage extends Vue { + bookUrl = null; + created() { + this.commit = this.$store.commit; + this.dispatch = this.$store.dispatch; + this.config = this.$store.state.config; } + mounted() { + //недостатки сторонних ui + this.$refs.input.$refs.input.addEventListener('keyup', (event) => { + if (event.key == 'Enter') + this.submitUrl(); + }); + } + + activated() { + this.$refs.input.focus(); + } + + get title() { + if (this.config.mode == 'omnireader') + return 'Omni Reader - браузерная онлайн-читалка.'; + return 'Универсальная читалка книг и ресурсов интернета.'; + + } + + submitUrl() { + if (this.bookUrl) + //loadUrl() + ; + } } //----------------------------------------------------------------------------- -// justify-content: space-between; - \ No newline at end of file diff --git a/client/components/Reader/Reader.vue b/client/components/Reader/Reader.vue index 2178099b..13ac53ce 100644 --- a/client/components/Reader/Reader.vue +++ b/client/components/Reader/Reader.vue @@ -94,6 +94,9 @@ class Reader extends Vue { get componentActive() { let result = ''; + if (this.loaderActive) + result = 'LoaderPage'; + if (!result) { this.commit('reader/setLoaderActive', true); result = 'LoaderPage'; diff --git a/client/element.js b/client/element.js index 6ba0faea..18b63e8d 100644 --- a/client/element.js +++ b/client/element.js @@ -47,12 +47,16 @@ import './theme/header.css'; import ElMain from 'element-ui/lib/main'; import './theme/main.css'; +import ElInput from 'element-ui/lib/input'; +import './theme/input.css'; + const ElNotification = () => import('element-ui/lib/notification'); import './theme/notification.css'; const components = { ElMenu, ElMenuItem, ElButton, ElCheckbox, ElTabs, ElTabPane, ElTooltip, ElContainer, ElAside, ElMain, ElHeader, + ElInput, ElNotification };