mirror of
https://github.com/gotson/komga.git
synced 2026-05-09 05:10:19 +02:00
feat(webui): add summary for read list browsing and edit dialog
closes #558
This commit is contained in:
parent
1148e46d90
commit
883fed3940
4 changed files with 30 additions and 1 deletions
|
|
@ -7,11 +7,23 @@
|
||||||
|
|
||||||
<v-card-text>
|
<v-card-text>
|
||||||
<v-container fluid>
|
<v-container fluid>
|
||||||
|
<!-- Name -->
|
||||||
<v-row>
|
<v-row>
|
||||||
<v-col>
|
<v-col>
|
||||||
<v-text-field v-model="form.name"
|
<v-text-field v-model="form.name"
|
||||||
:label="$t('dialog.edit_readlist.field_name')"
|
:label="$t('dialog.edit_readlist.field_name')"
|
||||||
:error-messages="getErrorsName"
|
:error-messages="getErrorsName"
|
||||||
|
filled
|
||||||
|
/>
|
||||||
|
</v-col>
|
||||||
|
</v-row>
|
||||||
|
|
||||||
|
<!-- Summary -->
|
||||||
|
<v-row>
|
||||||
|
<v-col>
|
||||||
|
<v-textarea v-model="form.summary"
|
||||||
|
:label="$t('dialog.edit_readlist.field_summary')"
|
||||||
|
filled
|
||||||
/>
|
/>
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
|
|
@ -47,6 +59,7 @@ export default Vue.extend({
|
||||||
readLists: [] as ReadListDto[],
|
readLists: [] as ReadListDto[],
|
||||||
form: {
|
form: {
|
||||||
name: '',
|
name: '',
|
||||||
|
summary: '',
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -90,6 +103,7 @@ export default Vue.extend({
|
||||||
methods: {
|
methods: {
|
||||||
async dialogReset(readList: ReadListDto) {
|
async dialogReset(readList: ReadListDto) {
|
||||||
this.form.name = readList.name
|
this.form.name = readList.name
|
||||||
|
this.form.summary = readList.summary
|
||||||
},
|
},
|
||||||
dialogCancel() {
|
dialogCancel() {
|
||||||
this.$emit('input', false)
|
this.$emit('input', false)
|
||||||
|
|
@ -102,6 +116,7 @@ export default Vue.extend({
|
||||||
try {
|
try {
|
||||||
const update = {
|
const update = {
|
||||||
name: this.form.name,
|
name: this.form.name,
|
||||||
|
summary: this.form.summary,
|
||||||
} as ReadListUpdateDto
|
} as ReadListUpdateDto
|
||||||
|
|
||||||
await this.$komgaReadLists.patchReadList(this.readList.id, update)
|
await this.$komgaReadLists.patchReadList(this.readList.id, update)
|
||||||
|
|
|
||||||
|
|
@ -365,7 +365,8 @@
|
||||||
"button_cancel": "Cancel",
|
"button_cancel": "Cancel",
|
||||||
"button_confirm": "Save changes",
|
"button_confirm": "Save changes",
|
||||||
"dialog_title": "Edit read list",
|
"dialog_title": "Edit read list",
|
||||||
"field_name": "Name"
|
"field_name": "Name",
|
||||||
|
"field_summary": "Summary"
|
||||||
},
|
},
|
||||||
"edit_series": {
|
"edit_series": {
|
||||||
"button_cancel": "Cancel",
|
"button_cancel": "Cancel",
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
interface ReadListDto {
|
interface ReadListDto {
|
||||||
id: string,
|
id: string,
|
||||||
name: string,
|
name: string,
|
||||||
|
summary: string,
|
||||||
filtered: boolean,
|
filtered: boolean,
|
||||||
bookIds: string[],
|
bookIds: string[],
|
||||||
createdDate: string,
|
createdDate: string,
|
||||||
|
|
@ -9,11 +10,13 @@ interface ReadListDto {
|
||||||
|
|
||||||
interface ReadListCreationDto {
|
interface ReadListCreationDto {
|
||||||
name: string,
|
name: string,
|
||||||
|
summary?: string,
|
||||||
bookIds: string[]
|
bookIds: string[]
|
||||||
}
|
}
|
||||||
|
|
||||||
interface ReadListUpdateDto {
|
interface ReadListUpdateDto {
|
||||||
name?: string,
|
name?: string,
|
||||||
|
summary?: string,
|
||||||
bookIds?: string[]
|
bookIds?: string[]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -63,6 +63,14 @@
|
||||||
|
|
||||||
<v-container fluid>
|
<v-container fluid>
|
||||||
|
|
||||||
|
<v-row v-if="readList.summary" class="px-2">
|
||||||
|
<v-col>
|
||||||
|
<read-more>{{ readList.summary }}</read-more>
|
||||||
|
</v-col>
|
||||||
|
</v-row>
|
||||||
|
|
||||||
|
<v-divider v-if="readList.summary" class="my-3"/>
|
||||||
|
|
||||||
<item-browser
|
<item-browser
|
||||||
:items.sync="books"
|
:items.sync="books"
|
||||||
:selected.sync="selectedBooks"
|
:selected.sync="selectedBooks"
|
||||||
|
|
@ -94,6 +102,7 @@ import {BookDto, ReadProgressUpdateDto} from '@/types/komga-books'
|
||||||
import {ContextOrigin} from '@/types/context'
|
import {ContextOrigin} from '@/types/context'
|
||||||
import {BookSseDto, ReadListSseDto, ReadProgressSseDto} from '@/types/komga-sse'
|
import {BookSseDto, ReadListSseDto, ReadProgressSseDto} from '@/types/komga-sse'
|
||||||
import {throttle} from 'lodash'
|
import {throttle} from 'lodash'
|
||||||
|
import ReadMore from '@/components/ReadMore.vue'
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
name: 'BrowseReadList',
|
name: 'BrowseReadList',
|
||||||
|
|
@ -102,6 +111,7 @@ export default Vue.extend({
|
||||||
ItemBrowser,
|
ItemBrowser,
|
||||||
ReadListActionsMenu,
|
ReadListActionsMenu,
|
||||||
MultiSelectBar,
|
MultiSelectBar,
|
||||||
|
ReadMore,
|
||||||
},
|
},
|
||||||
data: () => {
|
data: () => {
|
||||||
return {
|
return {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue