mirror of
https://github.com/cryptoadvance/specter-desktop.git
synced 2026-08-13 12:33:29 +02:00
* chore: migrate from altool to notarytool * fix litte things in build-common * add pyenv install in build-osx * add pyinstaller/electron/signing_logs to gitignore * chore: migrate from altool to notarytool * fix little things in build.common * add pyenv install in build osx * add pyinatsller electron signing logs to gitignore * updated build-osx.sh * fix entitlement * heavily refactoring the electron app * polish and improve * further bugfixing and polishing * tiny change to improve support of MacOS * Fix dependency issues --------- Co-authored-by: Manolis <moneymanolis@protonmail.com>
20 lines
718 B
JavaScript
20 lines
718 B
JavaScript
// All of the Node.js APIs are available in the preload process.
|
|
// It has the same sandbox as a Chrome extension.
|
|
|
|
const { contextBridge, ipcRenderer } = require('electron')
|
|
|
|
contextBridge.exposeInMainWorld('api', {
|
|
send: (channel, data) => ipcRenderer.send(channel, data),
|
|
receive: (channel, func) => ipcRenderer.on(channel, (event, ...args) => func(...args)),
|
|
})
|
|
|
|
window.addEventListener('DOMContentLoaded', () => {
|
|
// No idea why this is here
|
|
const replaceText = (selector, text) => {
|
|
const element = document.getElementById(selector)
|
|
if (element) element.innerText = text
|
|
}
|
|
for (const type of ['chrome', 'node', 'electron']) {
|
|
replaceText(`${type}-version`, process.versions[type])
|
|
}
|
|
})
|