mirror of
https://github.com/gotson/komga.git
synced 2025-12-19 23:12:47 +01:00
fix(webui): duplicate pages show total size saving
This commit is contained in:
parent
388c4f5f30
commit
e9bf064cb2
4 changed files with 12 additions and 2 deletions
|
|
@ -534,7 +534,8 @@
|
|||
"action_ignore": "Ignore",
|
||||
"matches_n": "No matches | 1 match | {count} matches",
|
||||
"title": "Duplicate pages",
|
||||
"unknown_size": "Unknown size"
|
||||
"unknown_size": "Unknown size",
|
||||
"delete_to_save": "Delete to save {size}"
|
||||
},
|
||||
"duplicates": {
|
||||
"file_hash": "File hash",
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ export interface PageHashUnknownDto {
|
|||
mediaType: string,
|
||||
sizeBytes?: number,
|
||||
size?: string,
|
||||
totalSize?: string,
|
||||
matchCount: number,
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -31,14 +31,21 @@
|
|||
<v-card-text>
|
||||
<div>{{ element.mediaType }}</div>
|
||||
<div>{{ element.size || $t('duplicate_pages.unknown_size') }}</div>
|
||||
|
||||
<v-btn
|
||||
@click="showDialogMatches(element)"
|
||||
outlined
|
||||
rounded
|
||||
class="mt-2"
|
||||
class="my-4"
|
||||
>
|
||||
{{ $tc('duplicate_pages.matches_n', element.matchCount) }}
|
||||
</v-btn>
|
||||
|
||||
<div
|
||||
v-if="element.totalSize"
|
||||
style="max-width: 100px"
|
||||
>{{ $t('duplicate_pages.delete_to_save', {size: element.totalSize}) }}
|
||||
</div>
|
||||
</v-card-text>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ data class PageHashUnknownDto(
|
|||
val mediaType: String,
|
||||
val sizeBytes: Long?,
|
||||
val size: String? = sizeBytes?.let { BinaryByteUnit.format(it) },
|
||||
val totalSize: String ? = sizeBytes?.let { BinaryByteUnit.format(it * matchCount) },
|
||||
val matchCount: Int,
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue