Skip to content

Commit

Permalink
Update error icon on audio player cover to show progress sync alert d…
Browse files Browse the repository at this point in the history
…ialog when tapped #1396
  • Loading branch information
advplyr committed Jan 18, 2025
1 parent a35c94c commit d5fa36b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
10 changes: 9 additions & 1 deletion components/app/AudioPlayer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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'
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion components/connection/ServerConnectForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
3 changes: 3 additions & 0 deletions strings/en-us.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"ButtonManageLocalFiles": "Manage Local Files",
"ButtonNewFolder": "New Folder",
"ButtonNextEpisode": "Next Episode",
"ButtonOk": "Ok",
"ButtonOpenFeed": "Open Feed",
"ButtonOverride": "Override",
"ButtonPause": "Pause",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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}?",
Expand Down

0 comments on commit d5fa36b

Please sign in to comment.