Не показываем ссылку на оригинал, если это файл с диска
This commit is contained in:
@@ -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');
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user