mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2026-08-29 22:57:16 +02:00
Merge pull request #1543 from advplyr/capacitor_v7
Update to capacitor v7
This commit is contained in:
@@ -25,7 +25,7 @@ jobs:
|
|||||||
uses: actions/setup-java@v2
|
uses: actions/setup-java@v2
|
||||||
with:
|
with:
|
||||||
distribution: 'temurin'
|
distribution: 'temurin'
|
||||||
java-version: 17
|
java-version: 21
|
||||||
|
|
||||||
- name: install dependencies
|
- name: install dependencies
|
||||||
run: npm ci
|
run: npm ci
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ android {
|
|||||||
|
|
||||||
apply from: "../capacitor-cordova-android-plugins/cordova.variables.gradle"
|
apply from: "../capacitor-cordova-android-plugins/cordova.variables.gradle"
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation project(':byteowls-capacitor-filesharer')
|
implementation project(':webnativellc-capacitor-filesharer')
|
||||||
implementation project(':capacitor-community-keep-awake')
|
implementation project(':capacitor-community-keep-awake')
|
||||||
implementation project(':capacitor-community-volume-buttons')
|
implementation project(':capacitor-community-volume-buttons')
|
||||||
implementation project(':capacitor-app')
|
implementation project(':capacitor-app')
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"pkg": "@byteowls/capacitor-filesharer",
|
"pkg": "@webnativellc/capacitor-filesharer",
|
||||||
"classpath": "com.byteowls.capacitor.filesharer.FileSharerPlugin"
|
"classpath": "com.byteowls.capacitor.filesharer.FileSharerPlugin"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
include ':capacitor-android'
|
include ':capacitor-android'
|
||||||
project(':capacitor-android').projectDir = new File('../node_modules/@capacitor/android/capacitor')
|
project(':capacitor-android').projectDir = new File('../node_modules/@capacitor/android/capacitor')
|
||||||
|
|
||||||
include ':byteowls-capacitor-filesharer'
|
include ':webnativellc-capacitor-filesharer'
|
||||||
project(':byteowls-capacitor-filesharer').projectDir = new File('../node_modules/@byteowls/capacitor-filesharer/android')
|
project(':webnativellc-capacitor-filesharer').projectDir = new File('../node_modules/@webnativellc/capacitor-filesharer/android')
|
||||||
|
|
||||||
include ':capacitor-community-keep-awake'
|
include ':capacitor-community-keep-awake'
|
||||||
project(':capacitor-community-keep-awake').projectDir = new File('../node_modules/@capacitor-community/keep-awake/android')
|
project(':capacitor-community-keep-awake').projectDir = new File('../node_modules/@capacitor-community/keep-awake/android')
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { FileSharer } from '@byteowls/capacitor-filesharer'
|
import { FileSharer } from '@webnativellc/capacitor-filesharer'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { FileSharer } from '@byteowls/capacitor-filesharer'
|
import { FileSharer } from '@webnativellc/capacitor-filesharer'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { FileSharer } from '@byteowls/capacitor-filesharer'
|
import { FileSharer } from '@webnativellc/capacitor-filesharer'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
|
|||||||
+1
-1
@@ -11,7 +11,7 @@ install! 'cocoapods', :disable_input_output_paths => true
|
|||||||
def capacitor_pods
|
def capacitor_pods
|
||||||
pod 'Capacitor', :path => '../../node_modules/@capacitor/ios'
|
pod 'Capacitor', :path => '../../node_modules/@capacitor/ios'
|
||||||
pod 'CapacitorCordova', :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 'CapacitorCommunityKeepAwake', :path => '../../node_modules/@capacitor-community/keep-awake'
|
||||||
pod 'CapacitorCommunityVolumeButtons', :path => '../../node_modules/@capacitor-community/volume-buttons'
|
pod 'CapacitorCommunityVolumeButtons', :path => '../../node_modules/@capacitor-community/volume-buttons'
|
||||||
pod 'CapacitorApp', :path => '../../node_modules/@capacitor/app'
|
pod 'CapacitorApp', :path => '../../node_modules/@capacitor/app'
|
||||||
|
|||||||
+33
-33
@@ -1,41 +1,40 @@
|
|||||||
PODS:
|
PODS:
|
||||||
- Alamofire (5.8.1)
|
- Alamofire (5.8.1)
|
||||||
- ByteowlsCapacitorFilesharer (6.0.0):
|
- Capacitor (7.2.0):
|
||||||
- Capacitor
|
|
||||||
- Capacitor (6.2.0):
|
|
||||||
- CapacitorCordova
|
- CapacitorCordova
|
||||||
- CapacitorApp (6.0.2):
|
- CapacitorApp (7.0.1):
|
||||||
- Capacitor
|
- Capacitor
|
||||||
- CapacitorBrowser (6.0.4):
|
- CapacitorBrowser (7.0.1):
|
||||||
- Capacitor
|
- Capacitor
|
||||||
- CapacitorClipboard (6.0.2):
|
- CapacitorClipboard (7.0.1):
|
||||||
- Capacitor
|
- Capacitor
|
||||||
- CapacitorCommunityKeepAwake (5.0.1):
|
- CapacitorCommunityKeepAwake (7.0.0):
|
||||||
- Capacitor
|
- Capacitor
|
||||||
- CapacitorCommunityVolumeButtons (6.0.1):
|
- CapacitorCommunityVolumeButtons (7.0.0):
|
||||||
- Capacitor
|
- Capacitor
|
||||||
- CapacitorCordova (6.2.0)
|
- CapacitorCordova (7.2.0)
|
||||||
- CapacitorDialog (6.0.2):
|
- CapacitorDialog (7.0.1):
|
||||||
- Capacitor
|
- Capacitor
|
||||||
- CapacitorHaptics (6.0.2):
|
- CapacitorHaptics (7.0.1):
|
||||||
- Capacitor
|
- Capacitor
|
||||||
- CapacitorNetwork (6.0.3):
|
- CapacitorNetwork (7.0.1):
|
||||||
- Capacitor
|
- Capacitor
|
||||||
- CapacitorPreferences (6.0.3):
|
- CapacitorPreferences (7.0.1):
|
||||||
- Capacitor
|
- Capacitor
|
||||||
- CapacitorStatusBar (6.0.2):
|
- CapacitorStatusBar (7.0.1):
|
||||||
- Capacitor
|
- Capacitor
|
||||||
- CordovaPlugins (6.2.0):
|
- CordovaPlugins (6.2.1):
|
||||||
- CapacitorCordova
|
- CapacitorCordova
|
||||||
- Realm (10.47.0):
|
- Realm (10.47.0):
|
||||||
- Realm/Headers (= 10.47.0)
|
- Realm/Headers (= 10.47.0)
|
||||||
- Realm/Headers (10.47.0)
|
- Realm/Headers (10.47.0)
|
||||||
- RealmSwift (10.47.0):
|
- RealmSwift (10.47.0):
|
||||||
- Realm (= 10.47.0)
|
- Realm (= 10.47.0)
|
||||||
|
- WebnativellcCapacitorFilesharer (7.0.4):
|
||||||
|
- Capacitor
|
||||||
|
|
||||||
DEPENDENCIES:
|
DEPENDENCIES:
|
||||||
- Alamofire (~> 5.5)
|
- Alamofire (~> 5.5)
|
||||||
- "ByteowlsCapacitorFilesharer (from `../../node_modules/@byteowls/capacitor-filesharer`)"
|
|
||||||
- "Capacitor (from `../../node_modules/@capacitor/ios`)"
|
- "Capacitor (from `../../node_modules/@capacitor/ios`)"
|
||||||
- "CapacitorApp (from `../../node_modules/@capacitor/app`)"
|
- "CapacitorApp (from `../../node_modules/@capacitor/app`)"
|
||||||
- "CapacitorBrowser (from `../../node_modules/@capacitor/browser`)"
|
- "CapacitorBrowser (from `../../node_modules/@capacitor/browser`)"
|
||||||
@@ -50,6 +49,7 @@ DEPENDENCIES:
|
|||||||
- "CapacitorStatusBar (from `../../node_modules/@capacitor/status-bar`)"
|
- "CapacitorStatusBar (from `../../node_modules/@capacitor/status-bar`)"
|
||||||
- CordovaPlugins (from `../capacitor-cordova-ios-plugins`)
|
- CordovaPlugins (from `../capacitor-cordova-ios-plugins`)
|
||||||
- RealmSwift (~> 10)
|
- RealmSwift (~> 10)
|
||||||
|
- "WebnativellcCapacitorFilesharer (from `../../node_modules/@webnativellc/capacitor-filesharer`)"
|
||||||
|
|
||||||
SPEC REPOS:
|
SPEC REPOS:
|
||||||
trunk:
|
trunk:
|
||||||
@@ -58,8 +58,6 @@ SPEC REPOS:
|
|||||||
- RealmSwift
|
- RealmSwift
|
||||||
|
|
||||||
EXTERNAL SOURCES:
|
EXTERNAL SOURCES:
|
||||||
ByteowlsCapacitorFilesharer:
|
|
||||||
:path: "../../node_modules/@byteowls/capacitor-filesharer"
|
|
||||||
Capacitor:
|
Capacitor:
|
||||||
:path: "../../node_modules/@capacitor/ios"
|
:path: "../../node_modules/@capacitor/ios"
|
||||||
CapacitorApp:
|
CapacitorApp:
|
||||||
@@ -86,26 +84,28 @@ EXTERNAL SOURCES:
|
|||||||
:path: "../../node_modules/@capacitor/status-bar"
|
:path: "../../node_modules/@capacitor/status-bar"
|
||||||
CordovaPlugins:
|
CordovaPlugins:
|
||||||
:path: "../capacitor-cordova-ios-plugins"
|
:path: "../capacitor-cordova-ios-plugins"
|
||||||
|
WebnativellcCapacitorFilesharer:
|
||||||
|
:path: "../../node_modules/@webnativellc/capacitor-filesharer"
|
||||||
|
|
||||||
SPEC CHECKSUMS:
|
SPEC CHECKSUMS:
|
||||||
Alamofire: 3ca42e259043ee0dc5c0cdd76c4bc568b8e42af7
|
Alamofire: 3ca42e259043ee0dc5c0cdd76c4bc568b8e42af7
|
||||||
ByteowlsCapacitorFilesharer: ea14537059851aed44df8c52f0984f61cd34f53b
|
Capacitor: 106e7a4205f4618d582b886a975657c61179138d
|
||||||
Capacitor: 1f3c7b9802d958cd8c4eb63895fff85dff2e1eea
|
CapacitorApp: d63334c052278caf5d81585d80b21905c6f93f39
|
||||||
CapacitorApp: 2a8c3a0b0814322e5e6e15fe595f02c3808f0f8b
|
CapacitorBrowser: 081852cf532acf77b9d2953f3a88fe5b9711fb06
|
||||||
CapacitorBrowser: ef0529d16cd8839281050c350e7bbee4f5c6d65f
|
CapacitorClipboard: b98aead5dc7ec595547fc2c5d75bacd2ae3338bc
|
||||||
CapacitorClipboard: 55e0a514f1e97b1409d533266c119dcbff3e78c3
|
CapacitorCommunityKeepAwake: 00dfd8fa3cca0df003c9a3e2cd7bee678aeec68b
|
||||||
CapacitorCommunityKeepAwake: e2ddd50812e3407f8dc3a2c28e97d66e9b59b2f5
|
CapacitorCommunityVolumeButtons: 8a0443a202ed659688d85f4d44d66f42f62f2b56
|
||||||
CapacitorCommunityVolumeButtons: a7612c5996f1c66320ef7a567522346d84a57e22
|
CapacitorCordova: 5967b9ba03915ef1d585469d6e31f31dc49be96f
|
||||||
CapacitorCordova: b33e7f4aa4ed105dd43283acdd940964374a87d9
|
CapacitorDialog: 9b934329026b2b0ffa56939bb06df3c67541a2ab
|
||||||
CapacitorDialog: e966e2261e1c74a8a502e610dd66b4f97ec6fcca
|
CapacitorHaptics: 70e47470fa1a6bd6338cd102552e3846b7f9a1b3
|
||||||
CapacitorHaptics: b53409aaca1203f79c6d0eb3ed5de40556339518
|
CapacitorNetwork: 07ec4c69c1bb696f41c23e00d31bda1bbb221bba
|
||||||
CapacitorNetwork: da96b5fff8d05b67f4658503aabb22f65bda2c0f
|
CapacitorPreferences: cbf154e5e5519b7f5ab33817a334dda1e98387f9
|
||||||
CapacitorPreferences: 9f9935bce493977183511362131a93f7b260191a
|
CapacitorStatusBar: 275cbf2f4dfc00388f519ef80c7ec22edda342c9
|
||||||
CapacitorStatusBar: 3b9ac7d0684770522c532d1158a1434512ab1477
|
CordovaPlugins: 5a72a85b45469e68556bb172409f1b6d57b27236
|
||||||
CordovaPlugins: 08731213c63ccf137c576da2926bf4b3a8c40f17
|
|
||||||
Realm: e43fb540ae947497e3ea8a662443256920602060
|
Realm: e43fb540ae947497e3ea8a662443256920602060
|
||||||
RealmSwift: 8b06ed06b5d16749ae0c4d91c0cba414a9e28189
|
RealmSwift: 8b06ed06b5d16749ae0c4d91c0cba414a9e28189
|
||||||
|
WebnativellcCapacitorFilesharer: 10b111373d4dc49608935600dcbcc14605258c73
|
||||||
|
|
||||||
PODFILE CHECKSUM: 2d539f15ab32af743f3ef5509f2ec7fbdb48335f
|
PODFILE CHECKSUM: 498821c0cfa2508609567fa95d7244c01cbef538
|
||||||
|
|
||||||
COCOAPODS: 1.12.1
|
COCOAPODS: 1.12.1
|
||||||
|
|||||||
Generated
+308
-3134
File diff suppressed because it is too large
Load Diff
+14
-14
@@ -14,20 +14,20 @@
|
|||||||
"devlive": "ionic cap run -l --external --port=1337"
|
"devlive": "ionic cap run -l --external --port=1337"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@byteowls/capacitor-filesharer": "^6.0.0",
|
"@webnativellc/capacitor-filesharer": "7.0.4",
|
||||||
"@capacitor-community/keep-awake": "^5.0.1",
|
"@capacitor-community/keep-awake": "^7.0.0",
|
||||||
"@capacitor-community/volume-buttons": "^6.0.1",
|
"@capacitor-community/volume-buttons": "^7.0.0",
|
||||||
"@capacitor/android": "^6.0.0",
|
"@capacitor/android": "^7.0.0",
|
||||||
"@capacitor/app": "^6.0.0",
|
"@capacitor/app": "^7.0.0",
|
||||||
"@capacitor/browser": "^6.0.0",
|
"@capacitor/browser": "^7.0.0",
|
||||||
"@capacitor/clipboard": "^6.0.0",
|
"@capacitor/clipboard": "^7.0.0",
|
||||||
"@capacitor/core": "^6.0.0",
|
"@capacitor/core": "^7.0.0",
|
||||||
"@capacitor/dialog": "^6.0.0",
|
"@capacitor/dialog": "^7.0.0",
|
||||||
"@capacitor/haptics": "^6.0.0",
|
"@capacitor/haptics": "^7.0.0",
|
||||||
"@capacitor/ios": "^6.0.0",
|
"@capacitor/ios": "^7.0.0",
|
||||||
"@capacitor/network": "^6.0.0",
|
"@capacitor/network": "^7.0.0",
|
||||||
"@capacitor/preferences": "^6.0.0",
|
"@capacitor/preferences": "^7.0.0",
|
||||||
"@capacitor/status-bar": "^6.0.0",
|
"@capacitor/status-bar": "^7.0.0",
|
||||||
"@nuxtjs/axios": "^5.13.6",
|
"@nuxtjs/axios": "^5.13.6",
|
||||||
"@teckel/vue-pdf": "^4.3.5",
|
"@teckel/vue-pdf": "^4.3.5",
|
||||||
"buffer": "^6.0.3",
|
"buffer": "^6.0.3",
|
||||||
|
|||||||
+13
-11
@@ -16,6 +16,12 @@ if (Capacitor.getPlatform() != 'web') {
|
|||||||
await StatusBar.setStyle({ style: Style.Dark })
|
await StatusBar.setStyle({ style: Style.Dark })
|
||||||
}
|
}
|
||||||
setStatusBarStyleDark()
|
setStatusBarStyleDark()
|
||||||
|
|
||||||
|
const setStatusBarOverlays = async () => {
|
||||||
|
// Defaults to true in capacitor v7
|
||||||
|
await StatusBar.setOverlaysWebView({ overlay: false })
|
||||||
|
}
|
||||||
|
setStatusBarOverlays()
|
||||||
}
|
}
|
||||||
|
|
||||||
Vue.prototype.$showHideStatusBar = async (show) => {
|
Vue.prototype.$showHideStatusBar = async (show) => {
|
||||||
@@ -170,7 +176,6 @@ Vue.prototype.$sanitizeFilename = (input, colonReplacement = ' - ') => {
|
|||||||
.replace(windowsReservedRe, replacement)
|
.replace(windowsReservedRe, replacement)
|
||||||
.replace(windowsTrailingRe, replacement)
|
.replace(windowsTrailingRe, replacement)
|
||||||
|
|
||||||
|
|
||||||
if (sanitized.length > MAX_FILENAME_LEN) {
|
if (sanitized.length > MAX_FILENAME_LEN) {
|
||||||
var lenToRemove = sanitized.length - MAX_FILENAME_LEN
|
var lenToRemove = sanitized.length - MAX_FILENAME_LEN
|
||||||
var ext = Path.extname(sanitized)
|
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)) {
|
for (const res of xml.matchAll(/(?:<(\w*)(?:\s[^>]*)*>)((?:(?!<\1).)*)(?:<\/\1>)|<(\w*)(?:\s*)*\/>/gm)) {
|
||||||
const key = res[1] || res[3]
|
const key = res[1] || res[3]
|
||||||
const value = res[2] && xmlToJson(res[2])
|
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
|
return json
|
||||||
}
|
}
|
||||||
@@ -230,14 +234,15 @@ Vue.prototype.$sanitizeSlug = (str) => {
|
|||||||
str = str.toLowerCase()
|
str = str.toLowerCase()
|
||||||
|
|
||||||
// remove accents, swap ñ for n, etc
|
// remove accents, swap ñ for n, etc
|
||||||
var from = "àáäâèéëêìíïîòóöôùúüûñçěščřžýúůďťň·/,:;"
|
var from = 'àáäâèéëêìíïîòóöôùúüûñçěščřžýúůďťň·/,:;'
|
||||||
var to = "aaaaeeeeiiiioooouuuuncescrzyuudtn-----"
|
var to = 'aaaaeeeeiiiioooouuuuncescrzyuudtn-----'
|
||||||
|
|
||||||
for (var i = 0, l = from.length; i < l; i++) {
|
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(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(/[^a-z0-9 -_]/g, '') // remove invalid chars
|
||||||
.replace(/\s+/g, '-') // collapse whitespace and replace by a dash
|
.replace(/\s+/g, '-') // collapse whitespace and replace by a dash
|
||||||
.replace(/-+/g, '-') // collapse dashes
|
.replace(/-+/g, '-') // collapse dashes
|
||||||
@@ -291,7 +296,7 @@ export default ({ store, app }, inject) => {
|
|||||||
if (!canGoBack) {
|
if (!canGoBack) {
|
||||||
const { value } = await Dialog.confirm({
|
const { value } = await Dialog.confirm({
|
||||||
title: 'Confirm',
|
title: 'Confirm',
|
||||||
message: `Did you want to exit the app?`,
|
message: `Did you want to exit the app?`
|
||||||
})
|
})
|
||||||
if (value) {
|
if (value) {
|
||||||
App.exitApp()
|
App.exitApp()
|
||||||
@@ -310,7 +315,4 @@ export default ({ store, app }, inject) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export {
|
export { encode, decode }
|
||||||
encode,
|
|
||||||
decode
|
|
||||||
}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user