lbry-desktop/web/stubs/electron.js
jessop e3c2919373 rename lbrytv to web
language and API consts

improve customization
custom homepages
get config from .env.default
custom title and logo

small changes

add pinned item to sidebar

rebase?
2020-05-25 17:21:02 -04:00

44 lines
894 B
JavaScript

const callable = () => {
throw new Error('Need to fix this stub');
};
const { DEFAULT_LANGUAGE } = require('../../config.js');
export const remote = {
dialog: {
showOpenDialog: callable,
},
getCurrentWindow: callable,
app: {
getAppPath: callable,
getLocale: () => {
return DEFAULT_LANGUAGE;
},
},
BrowserWindow: {
getFocusedWindow: callable,
},
Menu: {
getApplicationMenu: callable,
buildFromTemplate: () => {
return {
popup: () => {},
};
},
},
require: callable,
};
export const clipboard = {
readText: () => '',
writeText: text => {
var dummy = document.createElement('textarea');
document.body.appendChild(dummy);
dummy.value = text;
dummy.select();
document.execCommand('copy');
document.body.removeChild(dummy);
},
};
export const ipcRenderer = {};
export const isDev = false;