feat(webui): display creation and last modified date on book page

Closes: #1547
This commit is contained in:
Gauthier Roebroeck 2025-01-21 10:45:34 +08:00
parent f5f36b3d2f
commit da35e012d4
3 changed files with 48 additions and 1 deletions

View file

@ -168,6 +168,8 @@
},
"browse_book": {
"comment": "COMMENT",
"date_created": "CREATED",
"date_modified": "LAST MODIFIED",
"download_file": "Download file",
"file": "FILE",
"format": "FORMAT",

View file

@ -410,6 +410,28 @@
<v-col class="py-1" cols="8" sm="9" md="10" xl="11">{{ book.url }}</v-col>
</v-row>
<v-row class="align-center text-caption">
<v-col class="py-1 text-uppercase" cols="4" sm="3" md="2" xl="1">{{ $t('browse_book.date_created') }}</v-col>
<v-col class="py-1" cols="8" sm="9" md="10" xl="11">{{
new Intl.DateTimeFormat($i18n.locale, {
dateStyle: 'long',
timeStyle: 'short'
}).format(new Date(book.created))
}}
</v-col>
</v-row>
<v-row class="align-center text-caption">
<v-col class="py-1 text-uppercase" cols="4" sm="3" md="2" xl="1">{{ $t('browse_book.date_modified') }}</v-col>
<v-col class="py-1" cols="8" sm="9" md="10" xl="11">{{
new Intl.DateTimeFormat($i18n.locale, {
dateStyle: 'long',
timeStyle: 'short'
}).format(new Date(book.lastModified))
}}
</v-col>
</v-row>
</v-container>
</div>

View file

@ -496,6 +496,28 @@
<v-col class="py-1" cols="8" sm="9" md="10" xl="11">{{ book.url }}</v-col>
</v-row>
<v-row class="align-center text-caption">
<v-col class="py-1 text-uppercase" cols="4" sm="3" md="2" xl="1">{{ $t('browse_book.date_created') }}</v-col>
<v-col class="py-1" cols="8" sm="9" md="10" xl="11">{{
new Intl.DateTimeFormat($i18n.locale, {
dateStyle: 'long',
timeStyle: 'short'
}).format(new Date(book.created))
}}
</v-col>
</v-row>
<v-row class="align-center text-caption">
<v-col class="py-1 text-uppercase" cols="4" sm="3" md="2" xl="1">{{ $t('browse_book.date_modified') }}</v-col>
<v-col class="py-1" cols="8" sm="9" md="10" xl="11">{{
new Intl.DateTimeFormat($i18n.locale, {
dateStyle: 'long',
timeStyle: 'short'
}).format(new Date(book.lastModified))
}}
</v-col>
</v-row>
</v-container>
</div>
@ -552,7 +574,8 @@ import {
SearchConditionAgeRating,
SearchConditionGenre,
SearchConditionLanguage,
SearchConditionPublisher, SearchConditionSeriesId,
SearchConditionPublisher,
SearchConditionSeriesId,
SearchConditionTag,
SearchOperatorIs,
} from '@/types/komga-search'