Completely rewrote options script.

This commit is contained in:
Mario Basic
2015-06-17 17:48:48 +02:00
parent 2a1801c560
commit a4fe94ac75
15 changed files with 22640 additions and 213 deletions

View File

@@ -375,10 +375,10 @@ var WakaTimeOriginal = require('../core/WakaTime');
var changeExtensionState = require('../helpers/changeExtensionState');
var WakaTime = (function (_React$Component) {
function WakaTime() {
function WakaTime(props) {
_classCallCheck(this, WakaTime);
_get(Object.getPrototypeOf(WakaTime.prototype), 'constructor', this).call(this);
_get(Object.getPrototypeOf(WakaTime.prototype), 'constructor', this).call(this, props);
this.state = {
user: {
@@ -557,7 +557,11 @@ var config = {
// The user is considered idle if there was
// no activity in the browser for x seconds
detectionIntervalInSeconds: 60,
//default logging type
// Default logging style
// Log all except blacklisted sites
// or log only the white listed sites.
loggingStyle: 'blacklist',
// Default logging type
loggingType: 'domain',
// By default logging is enabled
loggingEnabled: true,
@@ -585,7 +589,17 @@ var config = {
// Default theme
theme: 'light',
// Valid extension states
states: ['allGood', 'notLogging', 'notSignedIn', 'blacklisted', 'whitelisted']
states: ['allGood', 'notLogging', 'notSignedIn', 'blacklisted', 'whitelisted'],
alert: {
success: {
type: 'success',
text: 'Options have been saved!'
},
failure: {
type: 'danger',
text: 'There was an error while saving the options!'
}
}
};
exports['default'] = config;