Przeglądaj źródła

Работа над ExternalLibs

Book Pauk 4 lat temu
rodzic
commit
9fb7892bfe

+ 24 - 6
client/components/ExternalLibs/ExternalLibs.vue

@@ -5,6 +5,10 @@
         </template>
         </template>
 
 
         <template slot="buttons">
         <template slot="buttons">
+            <span class="full-screen-button row justify-center items-center" @mousedown.stop @click="showHelp">
+                <q-icon name="la la-question-circle" size="16px"/>
+                <q-tooltip :delay="1500" anchor="bottom middle" content-style="font-size: 80%">Справка</q-tooltip>
+            </span>
             <span class="full-screen-button row justify-center items-center" @mousedown.stop @click="fullScreenToggle">
             <span class="full-screen-button row justify-center items-center" @mousedown.stop @click="fullScreenToggle">
                 <q-icon :name="(fullScreenActive ? 'la la-compress-arrows-alt': 'la la-expand-arrows-alt')" size="16px"/>
                 <q-icon :name="(fullScreenActive ? 'la la-compress-arrows-alt': 'la la-expand-arrows-alt')" size="16px"/>
                 <q-tooltip :delay="1500" anchor="bottom middle" content-style="font-size: 80%">На весь экран</q-tooltip>
                 <q-tooltip :delay="1500" anchor="bottom middle" content-style="font-size: 80%">На весь экран</q-tooltip>
@@ -114,7 +118,6 @@
                 <div class="q-mx-md column">
                 <div class="q-mx-md column">
                     <q-checkbox v-model="closeAfterSubmit" size="36px" label="Закрыть окно при отправке ссылки в читалку" />
                     <q-checkbox v-model="closeAfterSubmit" size="36px" label="Закрыть окно при отправке ссылки в читалку" />
                     <q-checkbox v-model="openInFrameOnEnter" size="36px" label="Открывать ссылку во фрейме при нажатии 'Enter'" />
                     <q-checkbox v-model="openInFrameOnEnter" size="36px" label="Открывать ссылку во фрейме при нажатии 'Enter'" />
-                    <q-checkbox v-model="openFullscreen" size="36px" label="Открывать окно на весь экран" />                    
                 </div>
                 </div>
 
 
                 <template slot="footer">
                 <template slot="footer">
@@ -184,9 +187,6 @@ export default @Component({
         openInFrameOnEnter: function(newValue) {
         openInFrameOnEnter: function(newValue) {
             this.commitProp('openInFrameOnEnter', newValue);
             this.commitProp('openInFrameOnEnter', newValue);
         },
         },
-        openFullscreen: function(newValue) {
-            this.commitProp('openFullscreen', newValue);
-        },
     }    
     }    
 })
 })
 class ExternalLibs extends Vue {
 class ExternalLibs extends Vue {
@@ -212,10 +212,10 @@ class ExternalLibs extends Vue {
 
 
     closeAfterSubmit = false;
     closeAfterSubmit = false;
     openInFrameOnEnter = false;
     openInFrameOnEnter = false;
-    openFullscreen = false;
 
 
     created() {
     created() {
         this.oldStartLink = '';
         this.oldStartLink = '';
+        this.justOpened = true;
         this.$root.addKeyHook(this.keyHook);
         this.$root.addKeyHook(this.keyHook);
 
 
         document.addEventListener('fullscreenchange', () => {
         document.addEventListener('fullscreenchange', () => {
@@ -353,7 +353,6 @@ class ExternalLibs extends Vue {
         this.selectedLink = libs.startLink;
         this.selectedLink = libs.startLink;
         this.closeAfterSubmit = libs.closeAfterSubmit || false;
         this.closeAfterSubmit = libs.closeAfterSubmit || false;
         this.openInFrameOnEnter = libs.openInFrameOnEnter || false;
         this.openInFrameOnEnter = libs.openInFrameOnEnter || false;
-        this.openFullscreen = libs.openFullscreen || false;
 
 
         this.updateStartLink();
         this.updateStartLink();
     }
     }
@@ -703,6 +702,25 @@ class ExternalLibs extends Vue {
         this.bookmarkSettingsActive = false;
         this.bookmarkSettingsActive = false;
     }
     }
 
 
+    showHelp() {
+        this.$root.stdDialog.alert(`
+<p>Окно 'Библиотека' позволяет открывать ссылки в читалке без переключения между окнами,
+что особенно актуально для мобильных устройств.</p>
+
+<p>Имеется возможность управлять закладками
+на понравившиеся ресурсы, книги или страницы авторов. Открытие ссылок и навигация осуществляется во фрейме, но,
+к сожалению, в нем открываются не все страницы. 'Библиотека' также разрешает свободный доступ к сайту flibusta.is.
+</p>
+
+<p>Из-за проблем с безопасностью, навигация 'вперед-назад' во фрейме осуществляется с помощью контекстного меню правой кнопкой мыши.
+На мобильных устройствах для этого служит системная клавиша 'Назад (стрелка влево)' и опция 'Вперед (стрелка вправо)' в меню браузера. 
+</p>
+
+<p>Приятного пользования ;-)
+</p>
+            `, 'Справка', {iconName: 'la la-info-circle'});
+    }
+
     keyHook(event) {
     keyHook(event) {
         if (this.$root.rootRoute() == '/external-libs') {
         if (this.$root.rootRoute() == '/external-libs') {
             if (this.$root.stdDialog.active)
             if (this.$root.stdDialog.active)

+ 10 - 4
client/components/share/StdDialog.vue

@@ -6,7 +6,7 @@
         <div v-show="type == 'alert'" class="bg-white no-wrap">
         <div v-show="type == 'alert'" class="bg-white no-wrap">
             <div class="header row">
             <div class="header row">
                 <div class="caption col row items-center q-ml-md">
                 <div class="caption col row items-center q-ml-md">
-                    <q-icon v-show="caption" class="q-mr-sm" :class="iconColor" name="las la-exclamation-circle" size="28px"></q-icon>
+                    <q-icon v-show="caption" class="q-mr-sm" :class="iconColor" :name="iconName" size="28px"></q-icon>
                     <div v-html="caption"></div>
                     <div v-html="caption"></div>
                 </div>
                 </div>
                 <div class="close-icon column justify-center items-center">
                 <div class="close-icon column justify-center items-center">
@@ -29,7 +29,7 @@
         <div v-show="type == 'confirm'" class="bg-white no-wrap">
         <div v-show="type == 'confirm'" class="bg-white no-wrap">
             <div class="header row">
             <div class="header row">
                 <div class="caption col row items-center q-ml-md">
                 <div class="caption col row items-center q-ml-md">
-                    <q-icon v-show="caption" class="q-mr-sm" :class="iconColor" name="las la-exclamation-circle" size="28px"></q-icon>
+                    <q-icon v-show="caption" class="q-mr-sm" :class="iconColor" :name="iconName" size="28px"></q-icon>
                     <div v-html="caption"></div>
                     <div v-html="caption"></div>
                 </div>
                 </div>
                 <div class="close-icon column justify-center items-center">
                 <div class="close-icon column justify-center items-center">
@@ -53,7 +53,7 @@
         <div v-show="type == 'prompt'" class="bg-white no-wrap">
         <div v-show="type == 'prompt'" class="bg-white no-wrap">
             <div class="header row">
             <div class="header row">
                 <div class="caption col row items-center q-ml-md">
                 <div class="caption col row items-center q-ml-md">
-                    <q-icon v-show="caption" class="q-mr-sm" :class="iconColor" name="las la-exclamation-circle" size="28px"></q-icon>
+                    <q-icon v-show="caption" class="q-mr-sm" :class="iconColor" :name="iconName" size="28px"></q-icon>
                     <div v-html="caption"></div>
                     <div v-html="caption"></div>
                 </div>
                 </div>
                 <div class="close-icon column justify-center items-center">
                 <div class="close-icon column justify-center items-center">
@@ -79,7 +79,7 @@
         <div v-show="type == 'hotKey'" class="bg-white no-wrap">
         <div v-show="type == 'hotKey'" class="bg-white no-wrap">
             <div class="header row">
             <div class="header row">
                 <div class="caption col row items-center q-ml-md">
                 <div class="caption col row items-center q-ml-md">
-                    <q-icon v-show="caption" class="q-mr-sm" :class="iconColor" name="las la-exclamation-circle" size="28px"></q-icon>
+                    <q-icon v-show="caption" class="q-mr-sm" :class="iconColor" :name="iconName" size="28px"></q-icon>
                     <div v-html="caption"></div>
                     <div v-html="caption"></div>
                 </div>
                 </div>
                 <div class="close-icon column justify-center items-center">
                 <div class="close-icon column justify-center items-center">
@@ -127,6 +127,7 @@ class StdDialog extends Vue {
     inputValue = '';
     inputValue = '';
     error = '';
     error = '';
     iconColor = '';
     iconColor = '';
+    iconName = '';
     hotKeyCode = '';
     hotKeyCode = '';
 
 
     created() {
     created() {
@@ -151,6 +152,11 @@ class StdDialog extends Vue {
             this.iconColor = `text-${opts.color}`;
             this.iconColor = `text-${opts.color}`;
         }
         }
 
 
+        this.iconName = 'las la-exclamation-circle';
+        if (opts && opts.iconName) {
+            this.iconName = opts.iconName;
+        }
+
         this.hotKeyCode = '';
         this.hotKeyCode = '';
         if (opts && opts.hotKeyCode) {
         if (opts && opts.hotKeyCode) {
             this.hotKeyCode = opts.hotKeyCode;
             this.hotKeyCode = opts.hotKeyCode;

+ 0 - 1
client/store/modules/reader.js

@@ -282,7 +282,6 @@ const libsDefaults = {
     comment: 'Флибуста | Книжное братство',
     comment: 'Флибуста | Книжное братство',
     closeAfterSubmit: false,
     closeAfterSubmit: false,
     openInFrameOnEnter: false,
     openInFrameOnEnter: false,
-    openFullscreen: false,
     groups: [
     groups: [
         {r: 'http://flibusta.is', s: 'http://flibusta.is', list: [
         {r: 'http://flibusta.is', s: 'http://flibusta.is', list: [
             {l: 'http://flibusta.is', c: 'Флибуста | Книжное братство'},
             {l: 'http://flibusta.is', c: 'Флибуста | Книжное братство'},