Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return new Promise(resolve => {
// noinspection SpellCheckingInspection
const about = openAboutWindow({
icon_path: icon,
bug_report_url: "https://github.com/GooBox/goobox-community-gui/issues",
copyright: "Goobox",
homepage: "http://goobox.io/",
description: "Goobox community edition sync app for sia and storj 🎉🚀",
license: "GPL-v3",
win_options: {
resizable: false,
fullscreenable: false,
minimizable: false,
maximizable: false,
},
});
about.on("closed", () => {
log.debug("[GUI] Closing the info window");
resolve();
const aboutWindow = () => { /* bringYourOwnWindow impl */
debug('aboutWindow')
const path = require('path'),
root = path.join(__dirname, '..', '..'),
settings = require(path.join(root, 'build', './config.json'))
const foo = require('about-window').default({
product_name: settings.productName,
icon_path: path.join(root, settings.largeIcon),
package_json_dir: path.join(root, 'build'),
use_inner_html: true,
css_path: [path.join(__dirname, '../../content/css/themes/', settings.cssTheme),
path.join(__dirname, 'about.css')],
win_options: { width: 600, height: 600 }
})
// remove the click handler from the title element
foo.webContents.on('did-finish-load', () => {
foo.webContents.executeJavaScript("const t = document.querySelector('.title'), c=t.cloneNode(false); while (t.hasChildNodes()) c.appendChild(t.firstChild); t.parentNode.replaceChild(c, t);")
})
}
beforeEach(() => {
on.mockReset();
openAboutWindow.mockClear();
});
beforeAll(() => {
openAboutWindow.mockReturnValue({
on,
});
});
{ label: 'About', click: () => { openAboutWindow(Object.assign({}, aboutOptions)); }},
{ label: 'Quit', accelerator: 'Command+Q', click: () => { app.quit(); }}
export function showInfoWindow() {
openAboutWindow({
icon_path: path.join(__dirname, "../resources/goobox.svg"),
package_json_dir: path.join(__dirname, ".."),
win_options: {
resizable: false,
fullscreenable: false,
minimizable: false,
maximizable: false
}
});
}
click: (): void => {
openAboutWindow(getAboutWindowInfo());
},
},
click: (): void => {
openAboutWindow(getAboutWindowInfo());
},
},
new Promise(resolve => {
const about = _openAboutWindow({
icon_path: icon,
bug_report_url: "https://github.com/GooBox/file-share-desktop/issues",
copyright: "© Goobox",
homepage: "https://goobox.io/",
license: "GPL-v3",
win_options: {
resizable: false,
fullscreenable: false,
minimizable: false,
maximizable: false,
},
});
about.on("closed", resolve);
});
function startAboutWindow() {
openAboutWindow({
icon_path: join(__dirname, '..', 'resources', 'icon', 'nyaovim-logo.png'),
copyright: 'Copyright (c) 2015 rhysd',
});
}