Skip to content

Privacy-first password manager with built-in email aliasing. Fully encrypted and self-hostable.

Update todos (#541)

Leendert de Borst351548df7ceb
diff --git a/browser-extensions/chrome/src/utils/SqliteClient.tsx b/browser-extensions/chrome/src/utils/SqliteClient.tsx
index 1a6df0190..3a6d32cc2 100644
--- a/browser-extensions/chrome/src/utils/SqliteClient.tsx
+++ b/browser-extensions/chrome/src/utils/SqliteClient.tsx
@@ -19,17 +19,14 @@ class SqliteClient {
bytes[i] = binaryString.charCodeAt(i);
}
- /**
- * Initialize SQL.js
- * TODO: is this needed, can we not load it from the local file system?
- */
+ // Initialize SQL.js with the WASM file from the local file system.
const SQL = await initSqlJs({
/**
- * Locates SQL.js files from the CDN
+ * Locates SQL.js files from the local file system.
* @param file - The name of the file to locate
* @returns The complete URL path to the file
*/
- locateFile: (file: string) => `https://sql.js.org/dist/${file}`
+ locateFile: (file: string) => `src/${file}`
});
// Create database from the binary data
diff --git a/browser-extensions/chrome/vite.config.js b/browser-extensions/chrome/vite.config.js
index 0cb2d9eeb..9a3b61baf 100644
--- a/browser-extensions/chrome/vite.config.js
+++ b/browser-extensions/chrome/vite.config.js
@@ -17,10 +17,16 @@ export default defineConfig({
src: 'assets/*',
dest: 'assets'
},
+ // Copy Argon2 WASM file loaded separately by the Argon2 library.
{
src: 'node_modules/argon2-browser/dist/argon2.wasm',
dest: 'src'
},
+ // Copy SQL.js WASM file loaded separately by the SqliteClient.
+ {
+ src: 'node_modules/sql.js/dist/sql-wasm.wasm',
+ dest: 'src'
+ },
{
src: 'src/styles/contentScript.css',
dest: '.'