2019-03-04 23:46:57 -05:00
|
|
|
const callable = () => {
|
2019-10-29 02:22:28 +05:30
|
|
|
throw new Error('Need to fix this stub');
|
2019-03-04 23:46:57 -05:00
|
|
|
};
|
2020-05-07 14:44:11 -04:00
|
|
|
const { DEFAULT_LANGUAGE } = require('../../config.js');
|
2019-03-04 23:46:57 -05:00
|
|
|
export const remote = {
|
|
|
|
dialog: {
|
|
|
|
showOpenDialog: callable,
|
|
|
|
},
|
|
|
|
getCurrentWindow: callable,
|
|
|
|
app: {
|
|
|
|
getAppPath: callable,
|
2020-05-07 14:44:11 -04:00
|
|
|
getLocale: () => {
|
|
|
|
return DEFAULT_LANGUAGE;
|
|
|
|
},
|
2019-03-04 23:46:57 -05:00
|
|
|
},
|
|
|
|
BrowserWindow: {
|
|
|
|
getFocusedWindow: callable,
|
|
|
|
},
|
|
|
|
Menu: {
|
|
|
|
getApplicationMenu: callable,
|
2019-10-29 00:00:02 -07:00
|
|
|
buildFromTemplate: () => {
|
|
|
|
return {
|
|
|
|
popup: () => {},
|
|
|
|
};
|
|
|
|
},
|
2019-03-04 23:46:57 -05:00
|
|
|
},
|
|
|
|
require: callable,
|
|
|
|
};
|
|
|
|
|
2019-10-29 00:00:02 -07:00
|
|
|
export const clipboard = {
|
|
|
|
readText: () => '',
|
2019-11-02 11:03:21 -04:00
|
|
|
writeText: text => {
|
|
|
|
var dummy = document.createElement('textarea');
|
|
|
|
document.body.appendChild(dummy);
|
|
|
|
dummy.value = text;
|
|
|
|
dummy.select();
|
|
|
|
document.execCommand('copy');
|
|
|
|
document.body.removeChild(dummy);
|
|
|
|
},
|
2019-10-29 00:00:02 -07:00
|
|
|
};
|
2019-08-21 16:54:44 -04:00
|
|
|
export const ipcRenderer = {};
|
|
|
|
|
2019-03-04 23:46:57 -05:00
|
|
|
export const isDev = false;
|