forked from AutomaApp/automa
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: migrate logs data from
browser.storage
to indexeddb
- Loading branch information
Showing
19 changed files
with
474 additions
and
388 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { liveQuery } from 'dexie'; | ||
import { useObservable } from '@vueuse/rxjs'; | ||
|
||
export function useLiveQuery(querier) { | ||
return useObservable(liveQuery(querier)); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import Dexie from 'dexie'; | ||
|
||
const dbLogs = new Dexie('logs'); | ||
dbLogs.version(1).stores({ | ||
ctxData: '++id, logId', | ||
logsData: '++id, logId', | ||
histories: '++id, logId', | ||
items: '++id, name, endedAt, workflowId, status, collectionId', | ||
}); | ||
|
||
export const defaultLogItem = { | ||
name: '', | ||
endedAt: 0, | ||
message: '', | ||
startedAt: 0, | ||
parentLog: null, | ||
workflowId: null, | ||
status: 'success', | ||
collectionId: null, | ||
}; | ||
|
||
export default dbLogs; |
Oops, something went wrong.