-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ab72cb0
commit e75ccff
Showing
9 changed files
with
81 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/** @jsx React.DOM */ | ||
|
||
module.exports = function (ExternalLink, sm, React) { | ||
return React.createClass({ | ||
displayName: 'Updater', | ||
|
||
getInitialState: function () { | ||
return { | ||
hasUpdate: false | ||
}; | ||
}, | ||
|
||
componentDidMount: function () { | ||
var _this = this; | ||
|
||
sm.checkForUpdates().done(function (hasUpdates) { | ||
_this.setState({hasUpdate: hasUpdates}); | ||
}); | ||
}, | ||
|
||
render: function () { | ||
var classNames = React.addons.classSet({ | ||
notification: true, | ||
active: this.state.hasUpdate | ||
}); | ||
|
||
return ( | ||
<ExternalLink href="http://www.subtitlemaster.com/" className={classNames}> | ||
<div>Atualização disponível! Clique aqui para baixar a versão mais recente.</div> | ||
</ExternalLink> | ||
); | ||
} | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,7 @@ | |
}, | ||
"author": "Wilker Lucio <[email protected]>", | ||
"license": "MIT", | ||
"latestJson": "https://raw.githubusercontent.com/subtitle-master/subtitlemaster/latest/package.json", | ||
"dependencies": { | ||
"subtitle-master": "2.0.0-beta1", | ||
"inject-it": "~1.2.0", | ||
|
@@ -44,6 +45,7 @@ | |
"grunt-contrib-copy": "~0.5.0", | ||
"grunt-json-massager": "~0.1.0", | ||
"grunt-contrib-clean": "~0.5.0", | ||
"load-grunt-tasks": "~0.4.0" | ||
"load-grunt-tasks": "~0.4.0", | ||
"semver": "~2.2.1" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters