Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
app.on('window-all-closed', () => {
if (!is.macos) {
app.quit();
}
});
---
${debugInfo()}`;
openNewGitHubIssue({
user: 'sarthology',
repo: 'caligator',
body
});
}
}
];
if (!is.macos) {
helpSubmenu.push(
{
type: 'separator'
},
aboutMenuItem({
icon: path.join(__dirname, 'static', 'icon.png'),
text: 'Created by Sarthak Sharma'
})
);
}
const debugSubmenu = [
{
label: 'Show Settings',
click() {
config.openInEditor();
window.on('close', event => {
if (is.macos && !global.isQuitting && !global.isUpdating) {
event.preventDefault();
window.hide();
}
});
---
${debugInfo()}`;
openNewGitHubIssue({
user: 'sindresorhus',
repo: 'caprine',
body
});
}
}
];
if (!is.macos) {
helpSubmenu.push(
{
type: 'separator'
},
aboutMenuItem({
icon: caprineIconPath,
text: 'Created by Sindre Sorhus'
})
);
}
const debugSubmenu: MenuItemConstructorOptions[] = [
{
label: 'Show Settings',
click() {
config.openInEditor();
}
},
{
label: 'Show Tray Icon',
type: 'checkbox',
enabled: is.linux || is.windows,
checked: config.get('showTrayIcon'),
click() {
config.set('showTrayIcon', !config.get('showTrayIcon'));
sendAction('toggle-tray-icon');
}
},
{
label: 'Launch Minimized',
type: 'checkbox',
visible: !is.macos,
checked: config.get('launchMinimized'),
click() {
config.set('launchMinimized', !config.get('launchMinimized'));
sendAction('toggle-tray-icon');
}
},
{
label: 'Quit on Window Close',
type: 'checkbox',
checked: config.get('quitOnWindowClose'),
click() {
config.set('quitOnWindowClose', !config.get('quitOnWindowClose'));
}
},
{
type: 'separator'
const Toolbar = ({ isFullscreen }) => {
if ( !is.macos || isFullscreen ) return null;
return <div></div>;
};
function getIconPath(hasUnreadMessages: boolean): string {
const icon = is.macos ?
getMacOSIconName(hasUnreadMessages) :
getNonMacOSIconName(hasUnreadMessages);
return path.join(__dirname, '..', `static/${icon}`);
}
__windowAllClosed = () => {
if ( is.macos ) return this.initMenu ();
this.quit ();
}
export function setUpMenuBarMode(window: BrowserWindow): void {
if (is.macos) {
toggleMenuBarMode(window);
} else if (config.get('showTrayIcon') && !config.get('quitOnWindowClose')) {
tray.create(window);
}
}
windowId: {
type: Number,
required: true,
},
},
components: {
'awesome-icon': AwesomeIcon,
'el-button': Button,
'el-tooltip': Tooltip,
},
})
export default class Tabs extends Vue {
sortable: any;
windowId: number;
enableCustomButtons: boolean = !is.macos;
get window(): Lulumi.Store.LulumiBrowserWindowProperty {
return this.$store.getters.windows.find(window => window.id === this.windowId);
}
get currentTabIndex(): number {
return this.$store.getters.currentTabIndexes[this.windowId];
}
get tabs(): Lulumi.Store.TabObject[] {
return this.$store.getters.tabs.filter(tab => tab.windowId === this.windowId);
}
loadButton(id: string): string {
return process.env.NODE_ENV !== 'production'
? `${path.join('static', 'icons', 'icons.svg')}#${id}`
: fixPathForAsarUnpack(`${path.join(__static, 'icons', 'icons.svg')}#${id}`);
}