feat: Introduce multi-platform architecture for Electron and Web clients with shared UI components, Convex backend for messaging, and integrated search functionality.
Some checks failed
Build and Release / build-and-release (push) Has been cancelled
Some checks failed
Build and Release / build-and-release (push) Has been cancelled
This commit is contained in:
@@ -2,6 +2,16 @@
|
||||
* Electron platform implementation.
|
||||
* Delegates to the window.* APIs exposed by preload.cjs.
|
||||
*/
|
||||
import SearchDatabase from '@discord-clone/shared/src/utils/SearchDatabase';
|
||||
|
||||
const searchDB = new SearchDatabase(
|
||||
window.searchStorage,
|
||||
{
|
||||
encryptData: (data, key) => window.cryptoAPI.encryptData(data, key),
|
||||
decryptData: (ct, key, iv, tag) => window.cryptoAPI.decryptData(ct, key, iv, tag),
|
||||
}
|
||||
);
|
||||
|
||||
const electronPlatform = {
|
||||
crypto: {
|
||||
generateKeys: () => window.cryptoAPI.generateKeys(),
|
||||
@@ -46,10 +56,12 @@ const electronPlatform = {
|
||||
updates: {
|
||||
checkUpdate: () => window.updateAPI.checkFlatpakUpdate(),
|
||||
},
|
||||
searchDB,
|
||||
features: {
|
||||
hasWindowControls: true,
|
||||
hasScreenCapture: true,
|
||||
hasNativeUpdates: true,
|
||||
hasSearch: true,
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user