How to use the electron-better-ipc.callMain function in electron-better-ipc

To help you get started, we’ve selected a few electron-better-ipc examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pacocoursey / Opus / src / intro / intro.js View on Github external
async function transition(increment = 1) {
  const newIndex = index + increment;

  if (newIndex >= content.children.length
      || newIndex >= sections.children.length
      || newIndex < 0) {
    await ipc.callMain('closeIntroWindow');
    return;
  }

  index += increment;

  // Change the button to show "Finish" instead of "Next"
  if (index === content.children.length - 1) {
    button.textContent = 'Finish';
  } else {
    button.textContent = 'Next';
  }

  if (index > 0) {
    back.classList.add('active');
  } else {
    back.classList.remove('active');
github atomiclabs / hyperdex / app / renderer / containers / Login.js View on Github external
const initApi = async seedPhrase => {
	let url = config.get('marketmakerUrl');
	if (url) {
		console.log('Using custom marketmaker URL:', url);
	} else {
		const port = await ipc.callMain('start-marketmaker', seedPhrase);
		url = `http://127.0.0.1:${port}`;
	}

	return new Api({
		endpoint: url,
		rpcPassword: await sha256(seedPhrase),
		concurrency: 10,
	});
};
github WhiteMinds / LiveAutoRecord / src / renderer / pages / record / history.vue View on Github external
async openPlayer ({ row }) {
        let recordLog = row.getModel()
        recordLog.setStatus(RecordLogStatus.ReadyToPlay, true)
        await ipc.callMain(IPCMsg.CreatePlayer, recordLog.file)
        recordLog.setStatus(RecordLogStatus.ReadyToPlay, false)
      },
      openSaveFolder ({ row }) {
github WhiteMinds / LiveAutoRecord / src / renderer / modules / config.js View on Github external
async save () {
      await ipc.callMain(IPCMsg.SetConfig, this.$data)
    }
  }
github WhiteMinds / LiveAutoRecord / src / renderer / modules / config.js View on Github external
async init () {
      let data = await ipc.callMain(IPCMsg.GetConfig)
      this.setData(data)

      ipc.answerMain(IPCMsg.SetConfig, this.setData)
    },
    async setData (data) {
github atomiclabs / hyperdex / app / renderer / containers / App.js View on Github external
async stopMarketmaker() {
		await this.api.stop();
		await ipc.callMain('stop-marketmaker');
	}
}
github pacocoursey / Opus / src / splash / splash.js View on Github external
async function openPath(dataPath) {
  spinner.classList.add('active');
  await ipc.callMain('openProject', dataPath);
}
github pacocoursey / Opus / src / splash / splash.js View on Github external
footer.addEventListener('click', async () => {
    spinner.classList.add('active');
    const res = await ipc.callMain('openProject');
    if (!res) spinner.classList.remove('active');
  });
github singuerinc / overlay / app / components / toolbox / Toolbox.tsx View on Github external
public async showOpenDialogImage(): Promise {
    track('dialog', 'open-file', 'onion');
    return await ipc.callMain('show-open-dialog-image');
  }