Skip to content

Commit a3ebdc0

Browse files
authored
Merge pull request #9 from SchneeHertz/development
v1.3.7
2 parents 2b490a0 + b7c2a76 commit a3ebdc0

File tree

3 files changed

+28
-4
lines changed

3 files changed

+28
-4
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
- 漫画内容缩略图,进度定位与选择
2222
- 支持已解压漫画文件夹,zip,rar,7z压缩包
2323
- 多章节漫画的合集管理
24+
- 隐藏指定漫画
2425

2526
## TODO
2627
- 根据规则重命名和移动漫画文件

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "exhentai-manga-manager",
33
"private": true,
4-
"version": "1.3.6",
4+
"version": "1.3.7",
55
"scripts": {
66
"dev": "vite",
77
"build": "vite build",

src/App.vue

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
<el-select placeholder="排序" @change="handleSortChange" clearable v-model="sortValue">
1212
<el-option label="仅收藏" value="mark"></el-option>
1313
<el-option label="仅合集" value="collection"></el-option>
14+
<el-option label="仅隐藏" value="hidden"></el-option>
1415
<el-option label="添加时间正序" value="addAscend"></el-option>
1516
<el-option label="添加时间倒序" value="addDescend"></el-option>
1617
<el-option label="上传时间正序" value="postAscend"></el-option>
@@ -40,7 +41,8 @@
4041
:key="book.id"
4142
class="book-card-frame"
4243
>
43-
<div class="book-card" v-if="!book.collection && !book.hidden">
44+
<!-- show book card when book isn't a collection, book isn't hidden because collected, and book isn't hidden by user except sorting by onlyHiddenBook -->
45+
<div class="book-card" v-if="!book.collection && !book.hidden && (sortValue == 'hidden' || !book.hiddenBook)">
4446
<p class="book-title" :title="book.title_jpn ? book.title_jpn : book.title">{{book.title_jpn ? book.title_jpn : book.title}}</p>
4547
<img class="book-cover" :src="book.coverPath" @click="openBookDetail(book)"/>
4648
<el-icon :size="30" :color="book.mark ? '#E6A23C' : '#666666'" class="book-card-star" @click="switchMark(book)"><StarFilled /></el-icon>
@@ -142,6 +144,9 @@
142144
</el-row>
143145
<el-row class="book-detail-function">
144146
<el-button type="primary" plain @click="showFile(bookDetail.filepath)">打开漫画文件所在目录</el-button>
147+
<el-button type="primary" plain @click="triggerHiddenBook(bookDetail)">{{bookDetail.hiddenBook?'显示':'隐藏'}}漫画</el-button>
148+
</el-row>
149+
<el-row class="book-detail-function">
145150
<el-button type="primary" plain @click="triggerShowComment">{{showComment?'隐藏':'显示'}}评论</el-button>
146151
</el-row>
147152
</el-col>
@@ -607,6 +612,12 @@ export default defineComponent({
607612
.then(()=>{
608613
_.remove(this.bookList, {filepath: this.bookDetail.filepath})
609614
_.remove(this.displayBookList, {filepath: this.bookDetail.filepath})
615+
_.forIn(this.collectionList, collection=>{
616+
collection.list = _.filter(collection.list, id=>id != this.bookDetail.id)
617+
})
618+
this.openCollectionBookList = _.filter(this.openCollectionBookList, book=>book.id != this.bookDetail.id)
619+
this.saveBookList()
620+
this.saveCollection()
610621
this.dialogVisibleBookDetail = false
611622
this.chunkList()
612623
})
@@ -781,7 +792,7 @@ export default defineComponent({
781792
searchBook () {
782793
let searchStringArray = this.searchString ? this.searchString.split(/ (?=(?:[^"']*["'][^"']*["'])*[^"']*$)/) : []
783794
this.displayBookList = _.filter(this.bookList, (book)=>{
784-
let bookString = JSON.stringify(_.pick(book, ['title', 'title_jpn', 'tags', 'status', 'category'])).toLowerCase()
795+
let bookString = JSON.stringify(_.pick(book, ['title', 'title_jpn', 'tags', 'status', 'category', 'filepath'])).toLowerCase()
785796
return _.every(searchStringArray, (str)=>{
786797
if (_.startsWith(str, '-')) {
787798
return !bookString.includes(str.slice(1).replace(/["']/g, '').toLowerCase())
@@ -794,6 +805,7 @@ export default defineComponent({
794805
},
795806
searchFromTag (tag) {
796807
this.dialogVisibleBookDetail = false
808+
this.drawerVisibleCollection = false
797809
this.searchString = `"${tag}"`
798810
this.searchBook()
799811
},
@@ -886,6 +898,9 @@ export default defineComponent({
886898
loading.close()
887899
this.drawerVisibleViewer = true
888900
})
901+
.finally(()=>{
902+
loading.close()
903+
})
889904
},
890905
initResize (id) {
891906
if (this.imageStyleType == 'scroll') {
@@ -925,6 +940,10 @@ export default defineComponent({
925940
this.displayBookList = _.filter(this.bookList, 'collection')
926941
this.chunkList()
927942
break
943+
case 'hidden':
944+
this.displayBookList = _.filter(this.bookList, 'hiddenBook')
945+
this.chunkList()
946+
break
928947
case 'addAscend':
929948
this.displayBookList = _.reverse(this.bookList.sort(this.sortList('date')))
930949
this.chunkList()
@@ -1103,12 +1122,16 @@ export default defineComponent({
11031122
book.collected = true
11041123
}
11051124
},
1106-
openCollection(book) {
1125+
openCollection (book) {
11071126
this.drawerVisibleCollection = true
11081127
this.openCollectionBookList = _.compact(book.list.map(id=>{
11091128
return _.find(this.bookList, {id})
11101129
}))
11111130
this.openCollectionTitle = book.title
1131+
},
1132+
triggerHiddenBook (book) {
1133+
book.hiddenBook = !book.hiddenBook
1134+
this.saveBookList()
11121135
}
11131136
}
11141137
})

0 commit comments

Comments
 (0)