mirror of
https://github.com/gotson/komga.git
synced 2026-05-07 12:01:40 +02:00
feat(webui): display page size in book import dialog
This commit is contained in:
parent
432ed4e14c
commit
6f26c2c926
5 changed files with 24 additions and 13 deletions
|
|
@ -3,15 +3,17 @@
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>{{ $t('dialog.transient_book_details.pages_table.index') }}</th>
|
<th>{{ $t('dialog.transient_book_details.pages_table.index') }}</th>
|
||||||
<th>{{ $t('dialog.transient_book_details.pages_table.filename') }}</th>
|
<th :class="rightPages.length > 0 ? 'diff' : ''">{{ $t('dialog.transient_book_details.pages_table.filename') }}</th>
|
||||||
<th>{{ $t('dialog.transient_book_details.pages_table.media_type') }}</th>
|
<th :class="rightPages.length > 0 ? 'diff' : ''">{{ $t('dialog.transient_book_details.pages_table.media_type') }}</th>
|
||||||
<th>{{ $t('dialog.transient_book_details.pages_table.width') }}</th>
|
<th :class="rightPages.length > 0 ? 'diff' : ''">{{ $t('dialog.transient_book_details.pages_table.width') }}</th>
|
||||||
<th>{{ $t('dialog.transient_book_details.pages_table.height') }}</th>
|
<th :class="rightPages.length > 0 ? 'diff' : ''">{{ $t('dialog.transient_book_details.pages_table.height') }}</th>
|
||||||
|
<th :class="rightPages.length > 0 ? 'diff' : ''">{{ $t('dialog.transient_book_details.pages_table.size') }}</th>
|
||||||
<template v-if="rightPages.length > 0">
|
<template v-if="rightPages.length > 0">
|
||||||
<th>{{ $t('dialog.transient_book_details.pages_table.filename') }}</th>
|
<th>{{ $t('dialog.transient_book_details.pages_table.filename') }}</th>
|
||||||
<th>{{ $t('dialog.transient_book_details.pages_table.media_type') }}</th>
|
<th>{{ $t('dialog.transient_book_details.pages_table.media_type') }}</th>
|
||||||
<th>{{ $t('dialog.transient_book_details.pages_table.width') }}</th>
|
<th>{{ $t('dialog.transient_book_details.pages_table.width') }}</th>
|
||||||
<th>{{ $t('dialog.transient_book_details.pages_table.height') }}</th>
|
<th>{{ $t('dialog.transient_book_details.pages_table.height') }}</th>
|
||||||
|
<th>{{ $t('dialog.transient_book_details.pages_table.size') }}</th>
|
||||||
</template>
|
</template>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|
@ -21,15 +23,17 @@
|
||||||
:key="i"
|
:key="i"
|
||||||
>
|
>
|
||||||
<td>{{ n }}</td>
|
<td>{{ n }}</td>
|
||||||
<td>{{ $_.get(leftPages[n-1], 'fileName', '') }}</td>
|
<td :class="rightPages.length > 0 ? 'diff' : ''">{{ $_.get(leftPages[n-1], 'fileName', '') }}</td>
|
||||||
<td>{{ $_.get(leftPages[n-1], 'mediaType', '') }}</td>
|
<td :class="rightPages.length > 0 ? 'diff' : ''">{{ $_.get(leftPages[n-1], 'mediaType', '') }}</td>
|
||||||
<td>{{ $_.get(leftPages[n-1], 'width', '') }}</td>
|
<td :class="rightPages.length > 0 ? 'diff' : ''">{{ $_.get(leftPages[n-1], 'width', '') }}</td>
|
||||||
<td>{{ $_.get(leftPages[n-1], 'height', '') }}</td>
|
<td :class="rightPages.length > 0 ? 'diff' : ''">{{ $_.get(leftPages[n-1], 'height', '') }}</td>
|
||||||
|
<td :class="rightPages.length > 0 ? 'diff' : ''">{{ $_.get(leftPages[n-1], 'size', '') }}</td>
|
||||||
<template v-if="rightPages.length > 0">
|
<template v-if="rightPages.length > 0">
|
||||||
<td>{{ $_.get(rightPages[n-1], 'fileName', '') }}</td>
|
<td>{{ $_.get(rightPages[n-1], 'fileName', '') }}</td>
|
||||||
<td>{{ $_.get(rightPages[n-1], 'mediaType', '') }}</td>
|
<td>{{ $_.get(rightPages[n-1], 'mediaType', '') }}</td>
|
||||||
<td>{{ $_.get(rightPages[n-1], 'width', '') }}</td>
|
<td>{{ $_.get(rightPages[n-1], 'width', '') }}</td>
|
||||||
<td>{{ $_.get(rightPages[n-1], 'height', '') }}</td>
|
<td>{{ $_.get(rightPages[n-1], 'height', '') }}</td>
|
||||||
|
<td>{{ $_.get(rightPages[n-1], 'size', '') }}</td>
|
||||||
</template>
|
</template>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
|
||||||
|
|
@ -19,32 +19,32 @@
|
||||||
<thead v-if="rightBook">
|
<thead v-if="rightBook">
|
||||||
<tr>
|
<tr>
|
||||||
<th></th>
|
<th></th>
|
||||||
<th>{{ $t('dialog.transient_book_details.label_candidate') }}</th>
|
<th :class="rightBook ? 'diff' : ''">{{ $t('dialog.transient_book_details.label_candidate') }}</th>
|
||||||
<th>{{ $t('dialog.transient_book_details.label_existing') }}</th>
|
<th>{{ $t('dialog.transient_book_details.label_existing') }}</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="font-weight-medium">{{ $t('dialog.transient_book_details.label_name') }}</td>
|
<td class="font-weight-medium">{{ $t('dialog.transient_book_details.label_name') }}</td>
|
||||||
<td>{{ leftBook.name }}</td>
|
<td :class="rightBook ? 'diff' : ''">{{ leftBook.name }}</td>
|
||||||
<td v-if="rightBook">{{ rightBook.metadata.title }}</td>
|
<td v-if="rightBook">{{ rightBook.metadata.title }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td class="font-weight-medium">{{ $t('dialog.transient_book_details.label_size') }}</td>
|
<td class="font-weight-medium">{{ $t('dialog.transient_book_details.label_size') }}</td>
|
||||||
<td>{{ leftBook.size }}</td>
|
<td :class="rightBook ? 'diff' : ''">{{ leftBook.size }}</td>
|
||||||
<td v-if="rightBook">{{ rightBook.size }}</td>
|
<td v-if="rightBook">{{ rightBook.size }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td class="font-weight-medium">{{ $t('dialog.transient_book_details.label_format') }}</td>
|
<td class="font-weight-medium">{{ $t('dialog.transient_book_details.label_format') }}</td>
|
||||||
<td>{{ getBookFormatFromMediaType(leftBook.mediaType).type }}</td>
|
<td :class="rightBook ? 'diff' : ''">{{ getBookFormatFromMediaType(leftBook.mediaType).type }}</td>
|
||||||
<td v-if="rightBook">{{ getBookFormatFromMediaType(rightBook.media.mediaType).type }}</td>
|
<td v-if="rightBook">{{ getBookFormatFromMediaType(rightBook.media.mediaType).type }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td class="font-weight-medium">{{ $t('dialog.transient_book_details.label_pages') }}</td>
|
<td class="font-weight-medium">{{ $t('dialog.transient_book_details.label_pages') }}</td>
|
||||||
<td>{{ leftBook.pages.length }}</td>
|
<td :class="rightBook ? 'diff' : ''">{{ leftBook.pages.length }}</td>
|
||||||
<td v-if="rightBook">{{ rightBook.media.pagesCount }}</td>
|
<td v-if="rightBook">{{ rightBook.media.pagesCount }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -505,6 +505,7 @@
|
||||||
"height": "Height",
|
"height": "Height",
|
||||||
"index": "Index",
|
"index": "Index",
|
||||||
"media_type": "Media type",
|
"media_type": "Media type",
|
||||||
|
"size": "Size",
|
||||||
"width": "Width"
|
"width": "Width"
|
||||||
},
|
},
|
||||||
"title": "Book Details",
|
"title": "Book Details",
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,7 @@ export default new Vuetify({
|
||||||
accent: '#ff0335',
|
accent: '#ff0335',
|
||||||
'contrast-1': colors.grey.lighten4,
|
'contrast-1': colors.grey.lighten4,
|
||||||
'contrast-light-2': colors.grey.darken2,
|
'contrast-light-2': colors.grey.darken2,
|
||||||
|
'diff': colors.green.lighten4,
|
||||||
},
|
},
|
||||||
dark: {
|
dark: {
|
||||||
base: colors.shades.black,
|
base: colors.shades.black,
|
||||||
|
|
@ -42,6 +43,7 @@ export default new Vuetify({
|
||||||
accent: '#ff0335',
|
accent: '#ff0335',
|
||||||
'contrast-1': colors.grey.darken4,
|
'contrast-1': colors.grey.darken4,
|
||||||
'contrast-light-2': colors.grey.lighten2,
|
'contrast-light-2': colors.grey.lighten2,
|
||||||
|
'diff': colors.green.darken4,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,8 @@ export interface PageDto {
|
||||||
mediaType: string,
|
mediaType: string,
|
||||||
width?: number,
|
width?: number,
|
||||||
height?: number,
|
height?: number,
|
||||||
|
sizeBytes?: number,
|
||||||
|
size: string,
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface PageDtoWithUrl {
|
export interface PageDtoWithUrl {
|
||||||
|
|
@ -41,6 +43,8 @@ export interface PageDtoWithUrl {
|
||||||
mediaType: string,
|
mediaType: string,
|
||||||
width?: number,
|
width?: number,
|
||||||
height?: number,
|
height?: number,
|
||||||
|
sizeBytes?: number,
|
||||||
|
size: string,
|
||||||
url: string,
|
url: string,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue