feat: add dark mode UI and SQLite as alternate database backend
Dark mode: CSS custom properties + .dark class toggled via Redux/localStorage, with a theme toggle in the Header and Settings page. Foundation didn't exist yet despite prior assumption, so it was built from scratch. SQLite: new DB_ENGINE=mongo|sqlite env var selects the metadata backend at runtime (Mongo stays default, no behavior change unless opted in). File/thumbnail bytes continue to use the existing fs/S3 storage path. Implemented via a shared DB interface (dbTypes.ts) with parallel mongoDB/ and sqliteDB/ implementations, selected through dbFactory.ts, with JWT/encryption logic extracted into userCrypto.ts so both engines share it.
This commit is contained in:
@@ -19,6 +19,8 @@ const envFileFix = (env) => {
|
||||
env.root = process.env.ROOT;
|
||||
env.url = process.env.URL;
|
||||
env.mongoURL = process.env.MONGODB_URL;
|
||||
env.dbEngine = process.env.DB_ENGINE || "mongo";
|
||||
env.sqliteDBPath = process.env.SQLITE_DB_PATH || "./data/mydrive.db";
|
||||
env.dbType = process.env.DB_TYPE;
|
||||
env.fsDirectory = process.env.FS_DIRECTORY;
|
||||
env.s3ID = process.env.S3_ID;
|
||||
|
||||
Reference in New Issue
Block a user