Browse Source

Не показываем ссылку на оригинал, если это файл с диска

Book Pauk 6 năm trước cách đây
mục cha
commit
10d1f180bd

+ 5 - 1
client/components/Reader/HistoryPage/HistoryPage.vue

@@ -65,7 +65,7 @@
                             min-width="100px"
                             min-width="100px"
                             >
                             >
                             <template slot-scope="scope">
                             <template slot-scope="scope">
-                                <a :href="scope.row.url" target="_blank">Оригинал</a><br>
+                                <a v-show="isUrl(scope.row.url)" :href="scope.row.url" target="_blank">Оригинал</a><br>
                                 <a :href="scope.row.path" :download="getFileNameFromPath(scope.row.path)">Скачать FB2</a>
                                 <a :href="scope.row.path" :download="getFileNameFromPath(scope.row.path)">Скачать FB2</a>
                             </template>
                             </template>
                         </el-table-column>
                         </el-table-column>
@@ -211,6 +211,10 @@ class HistoryPage extends Vue {
         this.close();
         this.close();
     }
     }
 
 
+    isUrl(url) {
+        return (url.indexOf('file://') != 0);
+    }
+
     close() {
     close() {
         this.$emit('history-toggle');
         this.$emit('history-toggle');
     }
     }