+
close
diff --git a/components/stats/YearInReview.vue b/components/stats/YearInReview.vue
new file mode 100644
index 00000000..4e04ec07
--- /dev/null
+++ b/components/stats/YearInReview.vue
@@ -0,0 +1,283 @@
+
+
+
+
+
+
![]()
+
+
+
+
\ No newline at end of file
diff --git a/components/stats/YearInReviewBanner.vue b/components/stats/YearInReviewBanner.vue
new file mode 100644
index 00000000..dee1e155
--- /dev/null
+++ b/components/stats/YearInReviewBanner.vue
@@ -0,0 +1,134 @@
+
+
+
+
+ close
+
+
+
+
+
{{ yearInReviewYear }} Year in Review
+
+
{{ showYearInReview ? 'Hide Year in Review' : `See ${yearInReviewYear} Year in Review` }}
+
+
+
+
+
+
+
+
+
+ chevron_left
+ Previous
+
+
+
Share
+
+
+
Your Year in Review ({{ yearInReviewVariant + 1 }})
+
{{ yearInReviewVariant + 1 }}
+
+
+
+
+ Refresh
+ refresh
+
+
+
+ Next
+ chevron_right
+
+
+
+
+
+
+
+ Share
+
+
+
+
+
+
+
+
+ chevron_left
+ Previous
+
+
+
Share
+
+
+
Server Year in Review ({{ yearInReviewServerVariant + 1 }})
+
{{ yearInReviewServerVariant + 1 }}
+
+
+
+
+ Refresh
+ refresh
+
+
+
+ Next
+ chevron_right
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/components/stats/YearInReviewServer.vue b/components/stats/YearInReviewServer.vue
new file mode 100644
index 00000000..e6d443d0
--- /dev/null
+++ b/components/stats/YearInReviewServer.vue
@@ -0,0 +1,262 @@
+
+
+
+
+
+
![]()
+
+
+
+
\ No newline at end of file
diff --git a/components/stats/YearInReviewShort.vue b/components/stats/YearInReviewShort.vue
new file mode 100644
index 00000000..ae77e987
--- /dev/null
+++ b/components/stats/YearInReviewShort.vue
@@ -0,0 +1,192 @@
+
+
+
+
+
+
![]()
+
+
+
+
\ No newline at end of file
diff --git a/components/ui/Btn.vue b/components/ui/Btn.vue
index 12ccf24c..630ed540 100644
--- a/components/ui/Btn.vue
+++ b/components/ui/Btn.vue
@@ -30,6 +30,7 @@ export default {
default: ''
},
paddingX: Number,
+ paddingY: Number,
small: Boolean,
loading: Boolean,
disabled: Boolean
@@ -48,14 +49,17 @@ export default {
if (this.small) {
list.push('text-sm')
if (this.paddingX === undefined) list.push('px-4')
- list.push('py-1')
+ if (this.paddingY === undefined) list.push('py-1')
} else {
if (this.paddingX === undefined) list.push('px-8')
- list.push('py-2')
+ if (this.paddingY === undefined) list.push('py-2')
}
if (this.paddingX !== undefined) {
list.push(`px-${this.paddingX}`)
}
+ if (this.paddingY !== undefined) {
+ list.push(`py-${this.paddingY}`)
+ }
if (this.disabled) {
list.push('cursor-not-allowed')
}
diff --git a/ios/App/Podfile b/ios/App/Podfile
index 531fb33f..b29cd4cb 100644
--- a/ios/App/Podfile
+++ b/ios/App/Podfile
@@ -11,6 +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 'CapacitorApp', :path => '../../node_modules/@capacitor/app'
pod 'CapacitorBrowser', :path => '../../node_modules/@capacitor/browser'
pod 'CapacitorClipboard', :path => '../../node_modules/@capacitor/clipboard'
diff --git a/ios/App/Podfile.lock b/ios/App/Podfile.lock
index d07dbd1b..f26f837f 100644
--- a/ios/App/Podfile.lock
+++ b/ios/App/Podfile.lock
@@ -1,5 +1,7 @@
PODS:
- Alamofire (5.6.4)
+ - ByteowlsCapacitorFilesharer (5.0.0):
+ - Capacitor
- Capacitor (5.4.0):
- CapacitorCordova
- CapacitorApp (5.0.6):
@@ -29,6 +31,7 @@ PODS:
DEPENDENCIES:
- Alamofire (~> 5.5)
+ - "ByteowlsCapacitorFilesharer (from `../../node_modules/@byteowls/capacitor-filesharer`)"
- "Capacitor (from `../../node_modules/@capacitor/ios`)"
- "CapacitorApp (from `../../node_modules/@capacitor/app`)"
- "CapacitorBrowser (from `../../node_modules/@capacitor/browser`)"
@@ -49,6 +52,8 @@ SPEC REPOS:
- RealmSwift
EXTERNAL SOURCES:
+ ByteowlsCapacitorFilesharer:
+ :path: "../../node_modules/@byteowls/capacitor-filesharer"
Capacitor:
:path: "../../node_modules/@capacitor/ios"
CapacitorApp:
@@ -74,6 +79,7 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
Alamofire: 4e95d97098eacb88856099c4fc79b526a299e48c
+ ByteowlsCapacitorFilesharer: f6a773825632d65d5404a34764c4a3fd857bb176
Capacitor: a5cd803e02b471591c81165f400ace01f40b11d3
CapacitorApp: 024e1b1bea5f883d79f6330d309bc441c88ad04a
CapacitorBrowser: 7a0fb6a1011abfaaf2dfedfd8248f942a8eda3d6
@@ -88,6 +94,6 @@ SPEC CHECKSUMS:
Realm: 3fd136cb4c83a927482a7f1612496d37beed3cf5
RealmSwift: 513d4dcbf5bfc4d573454088b592685fc48dd716
-PODFILE CHECKSUM: 7a8fc177ef0646dd60a1ee8aa387964975fcc1e3
+PODFILE CHECKSUM: 02e6ffe2f51a453ce222ee9af0e55e9448d8514c
COCOAPODS: 1.12.1
diff --git a/ios/App/Shared/player/AudioPlayer.swift b/ios/App/Shared/player/AudioPlayer.swift
index 3ebe001b..400f6826 100644
--- a/ios/App/Shared/player/AudioPlayer.swift
+++ b/ios/App/Shared/player/AudioPlayer.swift
@@ -589,12 +589,34 @@ class AudioPlayer: NSObject {
commandCenter.playCommand.isEnabled = true
commandCenter.playCommand.addTarget { [weak self] event in
- self?.play(allowSeekBack: true)
+ guard let strongSelf = self else { return .commandFailed }
+ if strongSelf.isPlaying() {
+ strongSelf.pause()
+ } else {
+ strongSelf.play(allowSeekBack: true)
+ }
return .success
}
+
commandCenter.pauseCommand.isEnabled = true
commandCenter.pauseCommand.addTarget { [weak self] event in
- self?.pause()
+ guard let strongSelf = self else { return .commandFailed }
+ if strongSelf.isPlaying() {
+ strongSelf.pause()
+ } else {
+ strongSelf.play(allowSeekBack: true)
+ }
+ return .success
+ }
+
+ commandCenter.togglePlayPauseCommand.isEnabled = true
+ commandCenter.togglePlayPauseCommand.addTarget { [weak self] event in
+ guard let strongSelf = self else { return .commandFailed }
+ if strongSelf.isPlaying() {
+ strongSelf.pause()
+ } else {
+ strongSelf.play(allowSeekBack: true)
+ }
return .success
}
diff --git a/package-lock.json b/package-lock.json
index 953ab15d..62dbdb29 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -8,6 +8,7 @@
"name": "audiobookshelf-app",
"version": "0.9.70-beta",
"dependencies": {
+ "@byteowls/capacitor-filesharer": "^5.0.0",
"@capacitor/android": "^5.0.0",
"@capacitor/app": "^5.0.6",
"@capacitor/browser": "^5.1.0",
@@ -1939,6 +1940,17 @@
"node": ">=6.9.0"
}
},
+ "node_modules/@byteowls/capacitor-filesharer": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/@byteowls/capacitor-filesharer/-/capacitor-filesharer-5.0.0.tgz",
+ "integrity": "sha512-LtIMd8Ge94Kj9BQWF+A646drHAkRVC6ulTPZ1InkQtNH4VIy3WfYilN20VZM5KkOvrQ1lslXFIJwquwKptLgmw==",
+ "dependencies": {
+ "file-saver": "2.0.5"
+ },
+ "peerDependencies": {
+ "@capacitor/core": ">=5"
+ }
+ },
"node_modules/@capacitor/android": {
"version": "5.4.0",
"resolved": "https://registry.npmjs.org/@capacitor/android/-/android-5.4.0.tgz",
@@ -9195,6 +9207,11 @@
"node": ">=8.9.0"
}
},
+ "node_modules/file-saver": {
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/file-saver/-/file-saver-2.0.5.tgz",
+ "integrity": "sha512-P9bmyZ3h/PRG+Nzga+rbdI4OEpNDzAVyy74uVO9ATgzLK6VtAsYybF/+TOCvrc0MO793d6+42lLyZTw7/ArVzA=="
+ },
"node_modules/file-uri-to-path": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
@@ -21078,6 +21095,14 @@
"to-fast-properties": "^2.0.0"
}
},
+ "@byteowls/capacitor-filesharer": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/@byteowls/capacitor-filesharer/-/capacitor-filesharer-5.0.0.tgz",
+ "integrity": "sha512-LtIMd8Ge94Kj9BQWF+A646drHAkRVC6ulTPZ1InkQtNH4VIy3WfYilN20VZM5KkOvrQ1lslXFIJwquwKptLgmw==",
+ "requires": {
+ "file-saver": "2.0.5"
+ }
+ },
"@capacitor/android": {
"version": "5.4.0",
"resolved": "https://registry.npmjs.org/@capacitor/android/-/android-5.4.0.tgz",
@@ -26353,6 +26378,11 @@
}
}
},
+ "file-saver": {
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/file-saver/-/file-saver-2.0.5.tgz",
+ "integrity": "sha512-P9bmyZ3h/PRG+Nzga+rbdI4OEpNDzAVyy74uVO9ATgzLK6VtAsYybF/+TOCvrc0MO793d6+42lLyZTw7/ArVzA=="
+ },
"file-uri-to-path": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
@@ -34083,4 +34113,4 @@
"integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q=="
}
}
-}
\ No newline at end of file
+}
diff --git a/package.json b/package.json
index 69ed6623..63387bc5 100644
--- a/package.json
+++ b/package.json
@@ -13,6 +13,7 @@
"ionic:serve": "npm run start"
},
"dependencies": {
+ "@byteowls/capacitor-filesharer": "^5.0.0",
"@capacitor/android": "^5.0.0",
"@capacitor/app": "^5.0.6",
"@capacitor/browser": "^5.1.0",
@@ -47,4 +48,4 @@
"postcss": "^8.3.5",
"tailwindcss": "^3.3.2"
}
-}
\ No newline at end of file
+}
diff --git a/pages/item/_id/index.vue b/pages/item/_id/index.vue
index f9a290ba..dec4128d 100644
--- a/pages/item/_id/index.vue
+++ b/pages/item/_id/index.vue
@@ -54,7 +54,7 @@
{{ $strings.ButtonRead }} {{ ebookFormat }}
- {{ (downloadItem || startingDownload) ? 'downloading' : 'download' }}
+ {{ downloadItem || startingDownload ? 'downloading' : 'download' }}
more_vert
@@ -79,8 +79,8 @@
{{ podcastAuthor }}
- {{ author.name }}
- ,
+ {{ author.name }},
@@ -90,8 +90,8 @@
{{ $strings.LabelSeries }}
- {{ series.text }}
- ,
+ {{ series.text }},
@@ -101,16 +101,16 @@
{{ $strings.LabelNarrators }}
- {{ narrator }}
- ,
+ {{ narrator }},
{{ $strings.LabelGenres }}
- {{ genre }}
- ,
+ {{ genre }},
diff --git a/pages/stats.vue b/pages/stats.vue
index e9ff08dd..5c704b0b 100644
--- a/pages/stats.vue
+++ b/pages/stats.vue
@@ -1,5 +1,8 @@
+
+
+
{{ $strings.HeaderYourStats }}
@@ -50,6 +53,9 @@