Update error icon on audio player cover to show progress sync alert dialog when tapped #1396

This commit is contained in:
advplyr 2025-01-18 14:46:12 -06:00
parent a35c94cf03
commit d5fa36b11a
3 changed files with 13 additions and 2 deletions

View file

@ -35,7 +35,7 @@
<covers-book-cover v-if="libraryItem || localLibraryItemCoverSrc" ref="cover" :library-item="libraryItem" :download-cover="localLibraryItemCoverSrc" :width="bookCoverWidth" :book-cover-aspect-ratio="bookCoverAspectRatio" raw @imageLoaded="coverImageLoaded" />
</div>
<div v-if="syncStatus === $constants.SyncStatus.FAILED" class="absolute top-0 left-0 w-full h-full flex items-center justify-center z-30">
<div v-if="syncStatus === $constants.SyncStatus.FAILED" class="absolute top-0 left-0 w-full h-full flex items-center justify-center z-30" @click.stop="showSyncsFailedDialog">
<span class="material-icons text-error text-3xl">error</span>
</div>
</div>
@ -107,6 +107,7 @@
<script>
import { Capacitor } from '@capacitor/core'
import { AbsAudioPlayer } from '@/plugins/capacitor'
import { Dialog } from '@capacitor/dialog'
import { FastAverageColor } from 'fast-average-color'
import WrappingMarquee from '@/assets/WrappingMarquee.js'
@ -390,6 +391,13 @@ export default {
}
},
methods: {
showSyncsFailedDialog() {
Dialog.alert({
title: this.$strings.HeaderProgressSyncFailed,
message: this.$strings.MessageProgressSyncFailed,
cancelText: this.$strings.ButtonOk
})
},
clickChaptersBtn() {
if (!this.chapters.length) return
this.showChapterModal = true

View file

@ -152,7 +152,7 @@ export default {
Dialog.alert({
title: 'Old Server Connection Warning',
message: this.$strings.MessageOldServerConnectionWarningHelp,
cancelText: 'OK'
cancelText: this.$strings.ButtonOk
})
},
checkIdUuid(userId) {

View file

@ -29,6 +29,7 @@
"ButtonManageLocalFiles": "Manage Local Files",
"ButtonNewFolder": "New Folder",
"ButtonNextEpisode": "Next Episode",
"ButtonOk": "Ok",
"ButtonOpenFeed": "Open Feed",
"ButtonOverride": "Override",
"ButtonPause": "Pause",
@ -75,6 +76,7 @@
"HeaderPlaybackSettings": "Playback Settings",
"HeaderPlaylist": "Playlist",
"HeaderPlaylistItems": "Playlist Items",
"HeaderProgressSyncFailed": "Progress Sync Failed",
"HeaderRSSFeed": "RSS Feed",
"HeaderRSSFeedGeneral": "RSS Details",
"HeaderRSSFeedIsOpen": "RSS Feed is Open",
@ -313,6 +315,7 @@
"MessageOldServerConnectionWarning": "Server connection config is using an old user ID. Please delete and re-add this server connection.",
"MessageOldServerConnectionWarningHelp": "You originally set up the connection to this server prior to the database migration in 2.3.0, released June 2023. A future server update will remove the ability to sign in with this old connection. Please delete the existing server connection and connect again (using the same server address and credentials). If you have any downloaded media on this device, the media will need to be downloaded again to sync with the server.",
"MessagePodcastSearchField": "Enter search term or RSS feed URL",
"MessageProgressSyncFailed": "The most recent attempt to report your listening progress to the server has failed. Progress sync requests will continue to be attempted every 15 seconds to 1 minute while media is playing.",
"MessageReportBugsAndContribute": "Report bugs, request features, and contribute on",
"MessageSeriesAlreadyDownloaded": "You have already downloaded all books in this series.",
"MessageSeriesDownloadConfirm": "Download missing {0} book(s) with {1} file(s), totaling {2} to folder {3}?",