feat: Add new emoji assets and an UpdateBanner component.
Some checks failed
Build and Release / build-and-release (push) Failing after 3m28s
Some checks failed
Build and Release / build-and-release (push) Failing after 3m28s
This commit is contained in:
56
apps/electron/src/platform/index.js
Normal file
56
apps/electron/src/platform/index.js
Normal file
@@ -0,0 +1,56 @@
|
||||
/**
|
||||
* Electron platform implementation.
|
||||
* Delegates to the window.* APIs exposed by preload.cjs.
|
||||
*/
|
||||
const electronPlatform = {
|
||||
crypto: {
|
||||
generateKeys: () => window.cryptoAPI.generateKeys(),
|
||||
randomBytes: (size) => window.cryptoAPI.randomBytes(size),
|
||||
sha256: (data) => window.cryptoAPI.sha256(data),
|
||||
signMessage: (privateKey, message) => window.cryptoAPI.signMessage(privateKey, message),
|
||||
verifySignature: (publicKey, message, signature) => window.cryptoAPI.verifySignature(publicKey, message, signature),
|
||||
deriveAuthKeys: (password, salt) => window.cryptoAPI.deriveAuthKeys(password, salt),
|
||||
encryptData: (data, key) => window.cryptoAPI.encryptData(data, key),
|
||||
decryptData: (encryptedData, key, iv, tag, options) => window.cryptoAPI.decryptData(encryptedData, key, iv, tag, options),
|
||||
decryptBatch: (items) => window.cryptoAPI.decryptBatch(items),
|
||||
verifyBatch: (items) => window.cryptoAPI.verifyBatch(items),
|
||||
publicEncrypt: (publicKey, data) => window.cryptoAPI.publicEncrypt(publicKey, data),
|
||||
privateDecrypt: (privateKey, encryptedHex) => window.cryptoAPI.privateDecrypt(privateKey, encryptedHex),
|
||||
},
|
||||
session: {
|
||||
save: (data) => window.sessionPersistence.save(data),
|
||||
load: () => window.sessionPersistence.load(),
|
||||
clear: () => window.sessionPersistence.clear(),
|
||||
},
|
||||
settings: {
|
||||
get: (key) => window.appSettings.get(key),
|
||||
set: (key, value) => window.appSettings.set(key, value),
|
||||
},
|
||||
idle: {
|
||||
getSystemIdleTime: () => window.idleAPI.getSystemIdleTime(),
|
||||
onIdleStateChanged: (callback) => window.idleAPI.onIdleStateChanged(callback),
|
||||
removeIdleStateListener: () => window.idleAPI.removeIdleStateListener(),
|
||||
},
|
||||
links: {
|
||||
openExternal: (url) => window.cryptoAPI.openExternal(url),
|
||||
fetchMetadata: (url) => window.cryptoAPI.fetchMetadata(url),
|
||||
},
|
||||
screenCapture: {
|
||||
getScreenSources: () => window.cryptoAPI.getScreenSources(),
|
||||
},
|
||||
windowControls: {
|
||||
minimize: () => window.windowControls.minimize(),
|
||||
maximize: () => window.windowControls.maximize(),
|
||||
close: () => window.windowControls.close(),
|
||||
},
|
||||
updates: {
|
||||
checkUpdate: () => window.updateAPI.checkFlatpakUpdate(),
|
||||
},
|
||||
features: {
|
||||
hasWindowControls: true,
|
||||
hasScreenCapture: true,
|
||||
hasNativeUpdates: true,
|
||||
},
|
||||
};
|
||||
|
||||
export default electronPlatform;
|
||||
Reference in New Issue
Block a user