上线里站搜索,修复提交任务后看不到downloader的bug,修复提交任务后再次查询可以直接操作的bug(同步更新),修复部分对话框不能铺满的bug,优化授权码输入的布局
This commit is contained in:
parent
d60f230a56
commit
bb9b247aba
@ -18,8 +18,9 @@
|
||||
<el-button @click="queryLocalTask">当前页查询</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<br>
|
||||
<hr>
|
||||
<el-button @click="openPanel">打开面板</el-button>
|
||||
<el-button @click="isQuerying = true">里站搜索</el-button><br><br>
|
||||
<el-button @click="isAlterAuthCode = true">修改授权码</el-button>
|
||||
<el-button @click="deleteAuthCode">删除本地授权码</el-button>
|
||||
<br>
|
||||
@ -33,7 +34,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<el-dialog title="查询本子" v-model="chosenGallery" width="100">
|
||||
<el-dialog title="查询本子" v-model="chosenGallery" width="100%">
|
||||
<table>
|
||||
<tr>本子名字:{{chosenGallery.name}}</tr>
|
||||
<tr>本子页数:{{chosenGallery.pages}}</tr>
|
||||
@ -49,15 +50,45 @@
|
||||
</tr>
|
||||
</table>
|
||||
<el-button @click="postTask" v-if="chosenGallery.availableResolution">下载</el-button>
|
||||
<tr v-if="!chosenGallery.availableResolution">
|
||||
<tr v-if="chosenGallery.status === '下载完成'">
|
||||
<el-button @click="onlineGalleryReader(chosenGallery.gid)">在线预览</el-button>
|
||||
<el-button @click="showThumbnail(chosenGallery)">查看封面图</el-button>
|
||||
<el-button @click="deleteGallery">删除</el-button>
|
||||
</tr>
|
||||
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog title="修改授权码" v-model="isAlterAuthCode" width="100">
|
||||
|
||||
<el-dialog title="里站搜索" v-model="isQuerying" top="0" style="margin-bottom: 0" width="100%" class="el-dialogClass">
|
||||
<div style="text-align: center">
|
||||
<el-input v-model="keyword" style="width: 50vw"></el-input> <el-button @click="queryGalleries(null)">查询</el-button>
|
||||
</div>
|
||||
<el-scrollbar height="65vh">
|
||||
<div style="height: 20vh; width: 100%; background-color: #f5f5f5; border-radius: 5px" v-for="gallery in galleries">
|
||||
<el-image alt="picture" :preview-src-list="['http://downloader.lionwebsite.xyz/query/image?path=' + gallery.thumbnailUrl,]"
|
||||
:src="'http://downloader.lionwebsite.xyz/query/image?path=' + gallery.thumbnailUrl"
|
||||
style="height:20vh;width:35vw;float: left;"
|
||||
fit="contain"
|
||||
loading="lazy"
|
||||
/>
|
||||
<div style="font: bold 10px semi-condensed; margin-top: 1vh; padding-left: 40vw; padding-top: 2vw">
|
||||
<span>{{gallery.name}}</span><br>
|
||||
<span>上传时间:{{gallery.uploadTime}}</span><br>
|
||||
<span>页数:{{gallery.page}}</span><br>
|
||||
<span class="ct6">类型:{{gallery.type}}</span><br>
|
||||
<a :href="gallery.link">链接</a><br>
|
||||
<el-button style="position: relative; margin-left: 65%;" @click="param=gallery.link; queryRemoteTask()" type="primary">下载</el-button>
|
||||
</div>
|
||||
</div><br>
|
||||
</el-scrollbar>
|
||||
<div style="padding-top: 10px; text-align: center">
|
||||
<el-button @click="queryGalleries(queryPage.first)" :disabled="queryPage.first === undefined">首页</el-button>
|
||||
<el-button @click="queryGalleries(queryPage.previous)" :disabled="queryPage.previous === undefined">上一页</el-button>
|
||||
<el-button @click="queryGalleries(queryPage.next)" :disabled="queryPage.next === undefined">下一页</el-button>
|
||||
<el-button @click="queryGalleries(queryPage.last)" :disabled="queryPage.last === undefined">尾页</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog title="修改授权码" v-model="isAlterAuthCode" width="100%">
|
||||
<el-form>
|
||||
<el-form-item>
|
||||
<template #label>当前授权码</template>
|
||||
@ -83,17 +114,19 @@
|
||||
|
||||
|
||||
<div class="DashBoard" v-show="!loadComplete">
|
||||
<el-input v-model="AuthCode" class="validate" placeholder="请输入授权码">
|
||||
</el-input>
|
||||
<div class="validate">
|
||||
<el-input v-model="AuthCode" placeholder="请输入授权码" />
|
||||
<el-checkbox v-model="isRemember" >是否记住授权码</el-checkbox><br>
|
||||
<el-button @click="validate" type="primary" @keydown.enter="validate">验证</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import store from "../store";
|
||||
import {computed, ref, onMounted} from "vue";
|
||||
import {ElMessage} from "element-plus"
|
||||
import axios from "axios";
|
||||
|
||||
//授权码相关
|
||||
let AuthCode = ref("")
|
||||
@ -102,6 +135,11 @@ let isAlterAuthCode = ref(false)
|
||||
let newAuthCode = ref("")
|
||||
let tempAuthCode = ref("")
|
||||
|
||||
let isQuerying = ref(false)
|
||||
let keyword = ref("furry yaoi")
|
||||
let galleries = ref([])
|
||||
let queryPage = ref({})
|
||||
|
||||
//查询相关
|
||||
let type = ref("link")
|
||||
let param = ref("")
|
||||
@ -186,6 +224,30 @@ function resetLocalQuery(){
|
||||
store.commit("_searchLocalByTag", [''])
|
||||
param.value = ""
|
||||
}
|
||||
function queryGalleries(link){
|
||||
let tempParam
|
||||
if(link !== null) {
|
||||
let url = new URL(link)
|
||||
tempParam = url.search.replace("?f_search=", "")
|
||||
}else{
|
||||
tempParam = keyword.value
|
||||
}
|
||||
tempParam = tempParam.replace(" ", "+")
|
||||
|
||||
axios.get("http://downloader.lionwebsite.xyz/query?keyword=" + tempParam)
|
||||
.then((res) => {
|
||||
let tempGalleries = JSON.parse(res.data.data)
|
||||
queryPage.value.first = 'first' in res.data? res.data.first: undefined
|
||||
queryPage.value.previous = 'previous' in res.data? res.data.previous: undefined
|
||||
queryPage.value.next = 'next' in res.data? res.data.next: undefined
|
||||
queryPage.value.last = 'last' in res.data? res.data.last: undefined
|
||||
|
||||
galleries.value.splice(0)
|
||||
tempGalleries.forEach((gallery) => {
|
||||
galleries.value.push(gallery)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
//删除任务
|
||||
function deleteGallery(){
|
||||
@ -244,7 +306,7 @@ onMounted(() => {
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
<style>
|
||||
.DashBoard{
|
||||
width: auto;
|
||||
height: 90vh;
|
||||
@ -253,13 +315,18 @@ onMounted(() => {
|
||||
}
|
||||
|
||||
.validate{
|
||||
width: auto;
|
||||
width: 50vw;
|
||||
background-color: ghostwhite;
|
||||
display: block;
|
||||
padding-left: 100px;
|
||||
padding-top: 200px;
|
||||
padding-left: 20vw;
|
||||
text-align: center;
|
||||
}
|
||||
.el-input{
|
||||
width: 250px;
|
||||
width: 25vw;
|
||||
}
|
||||
.el-dialogClass .el-dialog__body{
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
</style>
|
||||
@ -104,7 +104,7 @@
|
||||
</el-footer>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog v-model="isOnlineReading" title="在线预览" @close="closeOnlineReading" width="90%" top="0">
|
||||
<el-dialog v-model="isOnlineReading" title="在线预览" @close="closeOnlineReading" width="100%" top="0">
|
||||
<el-scrollbar height="80vh" ref="onlineReadingScrollbar">
|
||||
<el-image v-for="(link, index) in currentLinks" :src="link" :style="{'width': 'auto', 'text-align': 'center', 'background-color': 'ghostwhite'}"
|
||||
:preview-src-list="currentLinks" :initial-index="index" loading="lazy"/>
|
||||
|
||||
@ -417,6 +417,8 @@ const mutations = {
|
||||
state.chosenGallery.fileSize = "等待下载完成后再查看"
|
||||
state.chosenGallery.createTimeDisplay = "等待下载完成后再查看"
|
||||
state.chosenGallery.progress = "已提交"
|
||||
state.chosenGallery.tag = ""
|
||||
state.chosenGallery.downloader = state.userId
|
||||
state.totalGalleryTask.push(state.chosenGallery)
|
||||
state.downloadGallery.push(state.chosenGallery)
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user