Skip to content

Commit cb17f67

Browse files
video-recovery: Update database name
1 parent add32fa commit cb17f67

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/stores/video.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ export const useVideoStore = defineStore('video', () => {
1010
const allowedIceIps = useStorage<string[]>('cockpit-allowed-stream-ips', [])
1111

1212
// Offer download of backuped videos
13-
const cockpitVideoDB = localforage.createInstance({
13+
const videoRecoveryDB = localforage.createInstance({
1414
driver: localforage.INDEXEDDB,
15-
name: 'CockpitVideoDB',
16-
storeName: 'cockpit-video-db',
15+
name: 'Cockpit - Video Recovery',
16+
storeName: 'cockpit-video-recovery-db',
1717
version: 1.0,
1818
description: 'Local backups of Cockpit video recordings to be retrieved in case of failure.',
1919
})
2020

21-
cockpitVideoDB.length().then((len) => {
21+
videoRecoveryDB.length().then((len) => {
2222
if (len === 0) return
2323

2424
Swal.fire({
@@ -37,13 +37,13 @@ export const useVideoStore = defineStore('video', () => {
3737
}).then((decision) => {
3838
if (decision.isDismissed) return
3939
if (decision.isDenied) {
40-
cockpitVideoDB.iterate((_, videoName) => cockpitVideoDB.removeItem(videoName))
40+
videoRecoveryDB.iterate((_, videoName) => videoRecoveryDB.removeItem(videoName))
4141
} else if (decision.isConfirmed) {
42-
cockpitVideoDB.iterate((videoFile, videoName) => {
42+
videoRecoveryDB.iterate((videoFile, videoName) => {
4343
const blob = (videoFile as Blob[]).reduce((a, b) => new Blob([a, b], { type: 'video/webm' }))
4444
saveAs(blob, videoName)
4545
})
46-
cockpitVideoDB.iterate((_, videoName) => cockpitVideoDB.removeItem(videoName))
46+
videoRecoveryDB.iterate((_, videoName) => videoRecoveryDB.removeItem(videoName))
4747
}
4848
})
4949
})
@@ -58,7 +58,7 @@ export const useVideoStore = defineStore('video', () => {
5858
if (availableIceIps.value.length >= 1) {
5959
Swal.fire({
6060
html: `
61-
<p>Cockpit detected more than one IP address being used to route the video streaming. This often
61+
<p>Cockpit detected more than one IP address being used to route the video streaming. This often
6262
leads to video stuttering, especially if one of the IPs is from a non-wired connection.</p>
6363
</br>
6464
<p>To prevent issues and achieve an optimal streaming experience, please:</p>

0 commit comments

Comments
 (0)