feat: in-memory fallback for storing user profiles #110

Merged
verbiricha merged 17 commits from dbfix into main 2023-01-27 21:38:42 +00:00
Showing only changes of commit e08855d9c0 - Show all commits

View File

@ -7,7 +7,7 @@ import store from "State/Store";
v0l commented 2023-01-23 13:30:52 +00:00 (Migrated from github.com)
Review

Might as well try to open the SnortDb so we dont have a random "test" db be there forever

Might as well try to open the SnortDb so we dont have a random "test" db be there forever
v0l commented 2023-01-23 13:30:52 +00:00 (Migrated from github.com)
Review

Might as well try to open the SnortDb so we dont have a random "test" db be there forever

Might as well try to open the SnortDb so we dont have a random "test" db be there forever
v0l commented 2023-01-25 10:03:35 +00:00 (Migrated from github.com)
Review

This seems to create an empty database and not store anything inside?

This seems to create an empty database and not store anything inside?
v0l commented 2023-01-25 10:03:35 +00:00 (Migrated from github.com)
Review

This seems to create an empty database and not store anything inside?

This seems to create an empty database and not store anything inside?
verbiricha commented 2023-01-25 16:57:56 +00:00 (Migrated from github.com)
Review

I'll go back to using a dummy test db with version 1 then, wdyt?

I'll go back to using a dummy `test` db with version 1 then, wdyt?
verbiricha commented 2023-01-25 16:57:56 +00:00 (Migrated from github.com)
Review

I'll go back to using a dummy test db with version 1 then, wdyt?

I'll go back to using a dummy `test` db with version 1 then, wdyt?
v0l commented 2023-01-25 17:33:25 +00:00 (Migrated from github.com)
Review

Still doesnt seem to actually use IndexdDb, in logs it says its using indexdb but its not storing anything there

Still doesnt seem to actually use IndexdDb, in logs it says its using indexdb but its not storing anything there
v0l commented 2023-01-25 17:33:25 +00:00 (Migrated from github.com)
Review

Still doesnt seem to actually use IndexdDb, in logs it says its using indexdb but its not storing anything there

Still doesnt seem to actually use IndexdDb, in logs it says its using indexdb but its not storing anything there
verbiricha commented 2023-01-27 09:06:04 +00:00 (Migrated from github.com)
Review

My bad, 59878776d5 should fix it

My bad, https://github.com/v0l/snort/pull/110/commits/59878776d5a377e62937d1120c3b73a011a91c95 should fix it
verbiricha commented 2023-01-27 09:06:04 +00:00 (Migrated from github.com)
Review

My bad, 59878776d5 should fix it

My bad, https://github.com/v0l/snort/pull/110/commits/59878776d5a377e62937d1120c3b73a011a91c95 should fix it
class IndexedDb implements UsersDb {
isAvailable() {
try {
const req = "indexedDb" in window && window.indexedDB.open('test', 1)
v0l commented 2023-01-23 13:30:52 +00:00 (Migrated from github.com)
Review

Might as well try to open the SnortDb so we dont have a random "test" db be there forever

Might as well try to open the SnortDb so we dont have a random "test" db be there forever
v0l commented 2023-01-25 10:03:35 +00:00 (Migrated from github.com)
Review

This seems to create an empty database and not store anything inside?

This seems to create an empty database and not store anything inside?
verbiricha commented 2023-01-25 16:57:56 +00:00 (Migrated from github.com)
Review

I'll go back to using a dummy test db with version 1 then, wdyt?

I'll go back to using a dummy `test` db with version 1 then, wdyt?
v0l commented 2023-01-25 17:33:25 +00:00 (Migrated from github.com)
Review

Still doesnt seem to actually use IndexdDb, in logs it says its using indexdb but its not storing anything there

Still doesnt seem to actually use IndexdDb, in logs it says its using indexdb but its not storing anything there
verbiricha commented 2023-01-27 09:06:04 +00:00 (Migrated from github.com)
Review

My bad, 59878776d5 should fix it

My bad, https://github.com/v0l/snort/pull/110/commits/59878776d5a377e62937d1120c3b73a011a91c95 should fix it
const req = "indexedDB" in window && window.indexedDB.open('test', 1)
v0l commented 2023-01-23 13:30:52 +00:00 (Migrated from github.com)
Review

Might as well try to open the SnortDb so we dont have a random "test" db be there forever

Might as well try to open the SnortDb so we dont have a random "test" db be there forever
v0l commented 2023-01-25 10:03:35 +00:00 (Migrated from github.com)
Review

This seems to create an empty database and not store anything inside?

This seems to create an empty database and not store anything inside?
verbiricha commented 2023-01-25 16:57:56 +00:00 (Migrated from github.com)
Review

I'll go back to using a dummy test db with version 1 then, wdyt?

I'll go back to using a dummy `test` db with version 1 then, wdyt?
v0l commented 2023-01-25 17:33:25 +00:00 (Migrated from github.com)
Review

Still doesnt seem to actually use IndexdDb, in logs it says its using indexdb but its not storing anything there

Still doesnt seem to actually use IndexdDb, in logs it says its using indexdb but its not storing anything there
verbiricha commented 2023-01-27 09:06:04 +00:00 (Migrated from github.com)
Review

My bad, 59878776d5 should fix it

My bad, https://github.com/v0l/snort/pull/110/commits/59878776d5a377e62937d1120c3b73a011a91c95 should fix it
return Boolean(req)
} catch (error) {
return false

v0l commented 2023-01-23 13:30:52 +00:00 (Migrated from github.com)
Review

Might as well try to open the SnortDb so we dont have a random "test" db be there forever

Might as well try to open the SnortDb so we dont have a random "test" db be there forever
v0l commented 2023-01-23 13:30:52 +00:00 (Migrated from github.com)
Review

Might as well try to open the SnortDb so we dont have a random "test" db be there forever

Might as well try to open the SnortDb so we dont have a random "test" db be there forever
v0l commented 2023-01-25 10:03:35 +00:00 (Migrated from github.com)
Review

This seems to create an empty database and not store anything inside?

This seems to create an empty database and not store anything inside?
v0l commented 2023-01-25 10:03:35 +00:00 (Migrated from github.com)
Review

This seems to create an empty database and not store anything inside?

This seems to create an empty database and not store anything inside?
verbiricha commented 2023-01-25 16:57:56 +00:00 (Migrated from github.com)
Review

I'll go back to using a dummy test db with version 1 then, wdyt?

I'll go back to using a dummy `test` db with version 1 then, wdyt?
verbiricha commented 2023-01-25 16:57:56 +00:00 (Migrated from github.com)
Review

I'll go back to using a dummy test db with version 1 then, wdyt?

I'll go back to using a dummy `test` db with version 1 then, wdyt?
v0l commented 2023-01-25 17:33:25 +00:00 (Migrated from github.com)
Review

Still doesnt seem to actually use IndexdDb, in logs it says its using indexdb but its not storing anything there

Still doesnt seem to actually use IndexdDb, in logs it says its using indexdb but its not storing anything there
v0l commented 2023-01-25 17:33:25 +00:00 (Migrated from github.com)
Review

Still doesnt seem to actually use IndexdDb, in logs it says its using indexdb but its not storing anything there

Still doesnt seem to actually use IndexdDb, in logs it says its using indexdb but its not storing anything there
verbiricha commented 2023-01-27 09:06:04 +00:00 (Migrated from github.com)
Review

My bad, 59878776d5 should fix it

My bad, https://github.com/v0l/snort/pull/110/commits/59878776d5a377e62937d1120c3b73a011a91c95 should fix it
verbiricha commented 2023-01-27 09:06:04 +00:00 (Migrated from github.com)
Review

My bad, 59878776d5 should fix it

My bad, https://github.com/v0l/snort/pull/110/commits/59878776d5a377e62937d1120c3b73a011a91c95 should fix it