diff --git a/src/components/Side.vue b/src/components/Side.vue
index 577b4dd..4d6a335 100644
--- a/src/components/Side.vue
+++ b/src/components/Side.vue
@@ -1,48 +1,50 @@
-
-
-
-
- 名字:{{ props.row.name}}
- 链接:Link
- 语言:{{props.row.language}}
- 页数:{{props.row.pages}}
- 文件大小:{{props.row.fileSize}}
- 分辨率:{{props.row.resolution}}
- 任务创建时间:{{props.row.createTimeDisplay}}
- 标签:{{props.row.tag === '' ? '无': props.row.tag}}
-
- downloader:{{props.row.downloader}}
+
+
+
+
+ {{adjustGalleryName(gallery.name, 95)}}
+ 页数:{{gallery.pages}}
+ 语言:{{gallery.language}}
+
+ 下载进度: {{gallery.progress}}
-
- 下载
- 删除
- 分享
- {{props.row.isCollect ? '取消收藏' : '收藏'}}
- 在线看
- 预览封面
- 编辑标签
- 更新本子
-
-
-
-
-
-
- {{galleryNameType === 'shortName' ? scoped.row.shortName: scoped.row.name}}
-
-
-
-
-
-
- {{ scoped.row.progress }}
-
-
-
+
+
+
+
+
+ 三
+
+
+
+
+
+
+ 搜索
+
+
+
+
+ 清空tag
+
+
+
+
+
+ {{store.state.tags.get(tid).tag}}
+
@@ -86,7 +88,6 @@
-
@@ -104,6 +105,43 @@
+
+
+
+ {{adjustGalleryName(currentGallery.name, 150)}}
+
+
+ 页数:{{currentGallery.pages}}
+ 语言:{{currentGallery.language}}
+ 下载时间:{{currentGallery.createTimeDisplay}}
+ 大小:{{currentGallery.fileSize}}
+ 分辨率:{{currentGallery.resolution}}
+ 链接:
link
+ 标签:{{currentGallery.tag === '' ? '无': currentGallery.tag}}
+
+ downloader:{{currentGallery.downloader}}
+
+
+
+ 下载
+ 删除
+ 分享
+ {{currentGallery.isCollect ? '取消收藏' : '收藏'}}
+ 在线看
+ 编辑标签
+ 更新本子
+
+
+
@@ -124,6 +162,8 @@ let isEditingPage = ref(false)
let isEditingTag = ref(false)
//是否预览本子
let isOnlineReading = ref(false)
+//是否查看详情
+let isViewing = ref(false)
//临时变量
let galleryForTag = ref({})
@@ -133,6 +173,13 @@ let galleryNameType = ref("shortName") // shortName name
let sortType = ref("shortName") // shortName name createTime
let targetPage = ref(1) // 当前页数
+
+//查询相关
+let type = ref("keyword")
+let param = ref("")
+let paramForTags = ref([]) //tidS
+
+
let onlineReadingScrollbar = ref(null)
let loadComplete = computed(() => {
@@ -143,9 +190,6 @@ let currentTasks = computed(() => {
return store.getters.currentTasks ? store.getters.currentTasks: null
})
-let isOpenHistoryPanel = computed(() => {
- return store.state.isShowHistory
-})
//标签
let tags = computed(() => {
return store.state.tags
@@ -242,12 +286,10 @@ function querySimilarTag(keyWord, cb){
skip = false
for(let id of galleryForTag.value.tags)
if(id === key) {
- if(!hit && tag.tag === keyWord) //是否命中标签
+ if (!hit && tag.tag === keyWord) //是否命中标签
hit = true
skip = true
break
- }else{
- console.log("id:", id, key)
}
if(skip)
continue
@@ -275,6 +317,58 @@ function handleTagSelect(data){
tagInput.value.blur()
}
+function generateQueryTag(keyWord, cb){
+ let result = []
+ let hit = false //用于检测是否有重复标签
+ let skip //用于过滤已经有了的标签
+ for(const [key, tag] of store.state.tags){
+ skip = false
+ if(paramForTags.value.length !== 0) {
+ for (let id of paramForTags.value)
+ if (id === key) {
+ if (!hit && tag.tag === keyWord) //是否命中标签
+ hit = true
+ skip = true
+ break
+ }
+ if(skip)
+ continue
+ }
+ if(tag.tag.includes(keyWord))
+ result.push({value: tag.tag, tag:tag})
+ }
+ cb(result)
+}
+function removeQueryTag(tid){
+ for (let i=0; i
{document.querySelector(".preview > img").click()}, 1)
+
+function adjustGalleryName(name, length) {
+ let truncated = '';
+ let bytesCount = 0;
+
+ for (const char of name) {
+ const charCode = char.charCodeAt(0);
+ const byteLength = charCode < 0x80 ? 1 : charCode < 0x800 ? 2 : 3;
+
+ if (bytesCount + byteLength <= length) {
+ truncated += char;
+ bytesCount += byteLength;
+ } else {
+ truncated += "..."
+ break;
+ }
}
+ return truncated;
}
-//移动端
-function closeHistoryPanel(){
- store.commit("_closeHistoryPanel")
+function isDark(){
+ return document.querySelector('html').classList.contains('dark')
}