mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2025-06-24 06:08:43 +02:00
Update:Android download to internal storage option #635
This commit is contained in:
parent
fbcb8620f9
commit
373221703d
12 changed files with 126 additions and 71 deletions
|
@ -2,6 +2,7 @@ import Vue from 'vue'
|
|||
import vClickOutside from 'v-click-outside'
|
||||
import { App } from '@capacitor/app'
|
||||
import { Dialog } from '@capacitor/dialog'
|
||||
import { AbsFileSystem } from '@/plugins/capacitor'
|
||||
import { StatusBar, Style } from '@capacitor/status-bar';
|
||||
import { formatDistance, format, addDays, isDate } from 'date-fns'
|
||||
import { Capacitor } from '@capacitor/core'
|
||||
|
@ -17,6 +18,13 @@ if (Capacitor.getPlatform() != 'web') {
|
|||
|
||||
Vue.prototype.$isDev = process.env.NODE_ENV !== 'production'
|
||||
|
||||
Vue.prototype.$getAndroidSDKVersion = async () => {
|
||||
if (Capacitor.getPlatform() !== 'android') return null
|
||||
const data = await AbsFileSystem.getSDKVersion()
|
||||
if (isNaN(data?.version)) return null
|
||||
return Number(data.version)
|
||||
}
|
||||
|
||||
Vue.prototype.$encodeUriPath = (path) => {
|
||||
return path.replace(/\\/g, '/').replace(/%/g, '%25').replace(/#/g, '%23')
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue