mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2025-08-03 01:24:37 +02:00
Remove app update package
This commit is contained in:
parent
aecb6a8dd2
commit
e8b6602fe5
9 changed files with 18768 additions and 131 deletions
|
@ -12,8 +12,6 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { AppUpdate } from '@robingenz/capacitor-app-update'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
@ -79,36 +77,6 @@ export default {
|
|||
this.$refs.streamContainer.streamOpen(stream)
|
||||
}
|
||||
},
|
||||
async clickUpdateToast() {
|
||||
var immediateUpdateAllowed = this.$store.state.appUpdateInfo.immediateUpdateAllowed
|
||||
if (immediateUpdateAllowed) {
|
||||
await AppUpdate.performImmediateUpdate()
|
||||
} else {
|
||||
await AppUpdate.openAppStore()
|
||||
}
|
||||
},
|
||||
async checkForUpdate() {
|
||||
if (this.$platform == 'web') return
|
||||
console.log('Checking for app update')
|
||||
const result = await AppUpdate.getAppUpdateInfo()
|
||||
if (!result) {
|
||||
console.error('Invalid version check')
|
||||
return
|
||||
}
|
||||
console.log('App Update Info', JSON.stringify(result))
|
||||
this.$store.commit('setAppUpdateInfo', result)
|
||||
if (result.updateAvailability === 2) {
|
||||
setTimeout(() => {
|
||||
this.$toast.info(`Update is available! Click to update.`, {
|
||||
draggable: false,
|
||||
hideProgressBar: false,
|
||||
timeout: 20000,
|
||||
closeButton: true,
|
||||
onClick: this.clickUpdateToast
|
||||
})
|
||||
}, 5000)
|
||||
}
|
||||
},
|
||||
async loadSavedSettings() {
|
||||
var userSavedServerSettings = await this.$localStore.getServerSettings()
|
||||
if (userSavedServerSettings) {
|
||||
|
@ -255,7 +223,6 @@ export default {
|
|||
console.log(`[default] finished connection attempt or already connected ${!!this.user}`)
|
||||
await this.syncLocalMediaProgress()
|
||||
this.$store.dispatch('globals/loadLocalMediaProgress')
|
||||
this.checkForUpdate()
|
||||
this.loadSavedSettings()
|
||||
this.hasMounted = true
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue