Skip to content

Commit

Permalink
Show missing button with dialog, show missing indicator on covers
Browse files Browse the repository at this point in the history
  • Loading branch information
advplyr committed Jan 26, 2025
1 parent 0520cbd commit 23a80a6
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion components/cards/LazyBookCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
</div>

<!-- Error widget -->
<div v-if="showError" :style="{ height: 1.5 * sizeMultiplier + 'rem', width: 2.5 * sizeMultiplier + 'rem' }" class="bg-error rounded-r-full shadow-md flex items-center justify-end border-r border-b border-red-300">
<div v-if="showError" :style="{ height: 1.5 * sizeMultiplier + 'rem', width: 2.5 * sizeMultiplier + 'rem' }" class="bg-error rounded-r-full shadow-md flex items-center justify-end border-r border-b border-red-300 absolute bottom-4 left-0 z-10">
<span class="material-icons text-red-100 pr-1" :style="{ fontSize: 0.875 * sizeMultiplier + 'rem' }">priority_high</span>
</div>

Expand Down
11 changes: 11 additions & 0 deletions pages/item/_id/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@
<span class="material-icons">more_vert</span>
</ui-btn>
</div>
<ui-btn v-else-if="isMissing" color="error" :padding-x="4" small class="mt-4 flex items-center justify-center w-full" @click="clickMissingButton">
<span class="material-icons">error</span>
<span class="px-1 text-base">{{ $strings.LabelMissing }}</span>
</ui-btn>

<div v-if="!isPodcast && progressPercent > 0" class="px-4 py-2 bg-primary text-sm font-semibold rounded-md text-fg mt-4 text-center">
<p>{{ $strings.LabelYourProgress }}: {{ Math.round(progressPercent * 100) }}%</p>
Expand Down Expand Up @@ -486,6 +490,13 @@ export default {
}
},
methods: {
clickMissingButton() {
Dialog.alert({
title: this.$strings.LabelMissing,
message: this.$strings.MessageItemMissing,
cancelText: this.$strings.ButtonOk
})
},
async coverImageLoaded(fullCoverUrl) {
if (!fullCoverUrl) return
Expand Down
2 changes: 2 additions & 0 deletions strings/en-us.json
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@
"LabelLow": "Low",
"LabelMediaType": "Media Type",
"LabelMedium": "Medium",
"LabelMissing": "Missing",
"LabelMore": "More",
"LabelMoreInfo": "More Info",
"LabelName": "Name",
Expand Down Expand Up @@ -292,6 +293,7 @@
"MessageFetching": "Fetching...",
"MessageFollowTheProjectOnGithub": "Follow the project on Github",
"MessageItemDownloadCompleteFailedToCreate": "Item download complete but failed to create library item",
"MessageItemMissing": "Item is missing and must be fixed on the server. Typically an item is marked as missing because the file paths are not accessible.",
"MessageLoading": "Loading...",
"MessageLoadingServerData": "Loading server data...",
"MessageMarkAsFinished": "Mark as Finished",
Expand Down

0 comments on commit 23a80a6

Please sign in to comment.