Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

electron-react-titlebar

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

electron-react-titlebar - npm Package Compare versions

Comparing version 0.1.0 to 0.2.0

21

lib/menu.js

@@ -199,4 +199,21 @@ 'use strict';

this.onButtonClick = i => {
if (this.lock) {
this.lock = false;
return;
}
console.log('click', i);
this.setState({
clicked: !(this.state.focusing === i && this.state.clicked),
clicked: !(this.state.focusing === i && this.state.clicked)
});
};
this.onTouchStart = i => {
if (i !== this.state.focusing) {
this.lock = true;
}
};
this.onMouseMove = i => {
if (i === this.state.focusing) return;
this.setState({
focusing: i

@@ -251,2 +268,4 @@ });

onClick: e => this.onButtonClick(i),
onTouchStart: e => this.onTouchStart(i),
onMouseMove: e => this.onMouseMove(i),
ref: ref => this.setRefs(ref, i),

@@ -253,0 +272,0 @@ className: (0, _classnames2.default)('toolbar-dropdown', {

2

package.json
{
"name": "electron-react-titlebar",
"version": "0.1.0",
"version": "0.2.0",
"description": "A github desktop style title bar component for electron.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -160,4 +160,19 @@ import React, { PureComponent } from 'react'

onButtonClick = (i) => {
if (this.lock) {
this.lock = false
return
}
console.log('click', i)
this.setState({
clicked: !(this.state.focusing === i && this.state.clicked),
})
}
onTouchStart = (i) => {
if (i !== this.state.focusing) {
this.lock = true
}
}
onMouseMove = (i) => {
if (i === this.state.focusing) return
this.setState({
focusing: i,

@@ -200,2 +215,4 @@ })

onClick={e => this.onButtonClick(i)}
onTouchStart={e => this.onTouchStart(i)}
onMouseMove={e => this.onMouseMove(i)}
ref={ref => this.setRefs(ref, i)}

@@ -202,0 +219,0 @@ className={classnames('toolbar-dropdown', {

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc