mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2025-07-09 13:34:44 +02:00
Update to capacitor v7
This commit is contained in:
parent
99c8949861
commit
6e1eee48f0
10 changed files with 343 additions and 3167 deletions
|
@ -9,7 +9,7 @@ android {
|
|||
|
||||
apply from: "../capacitor-cordova-android-plugins/cordova.variables.gradle"
|
||||
dependencies {
|
||||
implementation project(':byteowls-capacitor-filesharer')
|
||||
implementation project(':webnativellc-capacitor-filesharer')
|
||||
implementation project(':capacitor-community-keep-awake')
|
||||
implementation project(':capacitor-community-volume-buttons')
|
||||
implementation project(':capacitor-app')
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[
|
||||
{
|
||||
"pkg": "@byteowls/capacitor-filesharer",
|
||||
"pkg": "@webnativellc/capacitor-filesharer",
|
||||
"classpath": "com.byteowls.capacitor.filesharer.FileSharerPlugin"
|
||||
},
|
||||
{
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
include ':capacitor-android'
|
||||
project(':capacitor-android').projectDir = new File('../node_modules/@capacitor/android/capacitor')
|
||||
|
||||
include ':byteowls-capacitor-filesharer'
|
||||
project(':byteowls-capacitor-filesharer').projectDir = new File('../node_modules/@byteowls/capacitor-filesharer/android')
|
||||
include ':webnativellc-capacitor-filesharer'
|
||||
project(':webnativellc-capacitor-filesharer').projectDir = new File('../node_modules/@webnativellc/capacitor-filesharer/android')
|
||||
|
||||
include ':capacitor-community-keep-awake'
|
||||
project(':capacitor-community-keep-awake').projectDir = new File('../node_modules/@capacitor-community/keep-awake/android')
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { FileSharer } from '@byteowls/capacitor-filesharer'
|
||||
import { FileSharer } from '@webnativellc/capacitor-filesharer'
|
||||
|
||||
export default {
|
||||
props: {
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { FileSharer } from '@byteowls/capacitor-filesharer'
|
||||
import { FileSharer } from '@webnativellc/capacitor-filesharer'
|
||||
|
||||
export default {
|
||||
props: {
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { FileSharer } from '@byteowls/capacitor-filesharer'
|
||||
import { FileSharer } from '@webnativellc/capacitor-filesharer'
|
||||
|
||||
export default {
|
||||
props: {
|
||||
|
|
|
@ -11,7 +11,7 @@ install! 'cocoapods', :disable_input_output_paths => true
|
|||
def capacitor_pods
|
||||
pod 'Capacitor', :path => '../../node_modules/@capacitor/ios'
|
||||
pod 'CapacitorCordova', :path => '../../node_modules/@capacitor/ios'
|
||||
pod 'ByteowlsCapacitorFilesharer', :path => '../../node_modules/@byteowls/capacitor-filesharer'
|
||||
pod 'WebnativellcCapacitorFilesharer', :path => '../../node_modules/@webnativellc/capacitor-filesharer'
|
||||
pod 'CapacitorCommunityKeepAwake', :path => '../../node_modules/@capacitor-community/keep-awake'
|
||||
pod 'CapacitorCommunityVolumeButtons', :path => '../../node_modules/@capacitor-community/volume-buttons'
|
||||
pod 'CapacitorApp', :path => '../../node_modules/@capacitor/app'
|
||||
|
|
3442
package-lock.json
generated
3442
package-lock.json
generated
File diff suppressed because it is too large
Load diff
28
package.json
28
package.json
|
@ -14,20 +14,20 @@
|
|||
"devlive": "ionic cap run -l --external --port=1337"
|
||||
},
|
||||
"dependencies": {
|
||||
"@byteowls/capacitor-filesharer": "^6.0.0",
|
||||
"@capacitor-community/keep-awake": "^5.0.1",
|
||||
"@capacitor-community/volume-buttons": "^6.0.1",
|
||||
"@capacitor/android": "^6.0.0",
|
||||
"@capacitor/app": "^6.0.0",
|
||||
"@capacitor/browser": "^6.0.0",
|
||||
"@capacitor/clipboard": "^6.0.0",
|
||||
"@capacitor/core": "^6.0.0",
|
||||
"@capacitor/dialog": "^6.0.0",
|
||||
"@capacitor/haptics": "^6.0.0",
|
||||
"@capacitor/ios": "^6.0.0",
|
||||
"@capacitor/network": "^6.0.0",
|
||||
"@capacitor/preferences": "^6.0.0",
|
||||
"@capacitor/status-bar": "^6.0.0",
|
||||
"@webnativellc/capacitor-filesharer": "7.0.4",
|
||||
"@capacitor-community/keep-awake": "^7.0.0",
|
||||
"@capacitor-community/volume-buttons": "^7.0.0",
|
||||
"@capacitor/android": "^7.0.0",
|
||||
"@capacitor/app": "^7.0.0",
|
||||
"@capacitor/browser": "^7.0.0",
|
||||
"@capacitor/clipboard": "^7.0.0",
|
||||
"@capacitor/core": "^7.0.0",
|
||||
"@capacitor/dialog": "^7.0.0",
|
||||
"@capacitor/haptics": "^7.0.0",
|
||||
"@capacitor/ios": "^7.0.0",
|
||||
"@capacitor/network": "^7.0.0",
|
||||
"@capacitor/preferences": "^7.0.0",
|
||||
"@capacitor/status-bar": "^7.0.0",
|
||||
"@nuxtjs/axios": "^5.13.6",
|
||||
"@teckel/vue-pdf": "^4.3.5",
|
||||
"buffer": "^6.0.3",
|
||||
|
|
|
@ -16,6 +16,12 @@ if (Capacitor.getPlatform() != 'web') {
|
|||
await StatusBar.setStyle({ style: Style.Dark })
|
||||
}
|
||||
setStatusBarStyleDark()
|
||||
|
||||
const setStatusBarOverlays = async () => {
|
||||
// Defaults to true in capacitor v7
|
||||
await StatusBar.setOverlaysWebView({ overlay: false })
|
||||
}
|
||||
setStatusBarOverlays()
|
||||
}
|
||||
|
||||
Vue.prototype.$showHideStatusBar = async (show) => {
|
||||
|
@ -170,7 +176,6 @@ Vue.prototype.$sanitizeFilename = (input, colonReplacement = ' - ') => {
|
|||
.replace(windowsReservedRe, replacement)
|
||||
.replace(windowsTrailingRe, replacement)
|
||||
|
||||
|
||||
if (sanitized.length > MAX_FILENAME_LEN) {
|
||||
var lenToRemove = sanitized.length - MAX_FILENAME_LEN
|
||||
var ext = Path.extname(sanitized)
|
||||
|
@ -187,8 +192,7 @@ function xmlToJson(xml) {
|
|||
for (const res of xml.matchAll(/(?:<(\w*)(?:\s[^>]*)*>)((?:(?!<\1).)*)(?:<\/\1>)|<(\w*)(?:\s*)*\/>/gm)) {
|
||||
const key = res[1] || res[3]
|
||||
const value = res[2] && xmlToJson(res[2])
|
||||
json[key] = ((value && Object.keys(value).length) ? value : res[2]) || null
|
||||
|
||||
json[key] = (value && Object.keys(value).length ? value : res[2]) || null
|
||||
}
|
||||
return json
|
||||
}
|
||||
|
@ -230,14 +234,15 @@ Vue.prototype.$sanitizeSlug = (str) => {
|
|||
str = str.toLowerCase()
|
||||
|
||||
// remove accents, swap ñ for n, etc
|
||||
var from = "àáäâèéëêìíïîòóöôùúüûñçěščřžýúůďťň·/,:;"
|
||||
var to = "aaaaeeeeiiiioooouuuuncescrzyuudtn-----"
|
||||
var from = 'àáäâèéëêìíïîòóöôùúüûñçěščřžýúůďťň·/,:;'
|
||||
var to = 'aaaaeeeeiiiioooouuuuncescrzyuudtn-----'
|
||||
|
||||
for (var i = 0, l = from.length; i < l; i++) {
|
||||
str = str.replace(new RegExp(from.charAt(i), 'g'), to.charAt(i))
|
||||
}
|
||||
|
||||
str = str.replace('.', '-') // replace a dot by a dash
|
||||
str = str
|
||||
.replace('.', '-') // replace a dot by a dash
|
||||
.replace(/[^a-z0-9 -_]/g, '') // remove invalid chars
|
||||
.replace(/\s+/g, '-') // collapse whitespace and replace by a dash
|
||||
.replace(/-+/g, '-') // collapse dashes
|
||||
|
@ -291,7 +296,7 @@ export default ({ store, app }, inject) => {
|
|||
if (!canGoBack) {
|
||||
const { value } = await Dialog.confirm({
|
||||
title: 'Confirm',
|
||||
message: `Did you want to exit the app?`,
|
||||
message: `Did you want to exit the app?`
|
||||
})
|
||||
if (value) {
|
||||
App.exitApp()
|
||||
|
@ -310,7 +315,4 @@ export default ({ store, app }, inject) => {
|
|||
})
|
||||
}
|
||||
|
||||
export {
|
||||
encode,
|
||||
decode
|
||||
}
|
||||
export { encode, decode }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue