-
Notifications
You must be signed in to change notification settings - Fork 29
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
0 parents
commit 998a9d7
Showing
101 changed files
with
9,048 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"remainingRequest":"/Users/tim/repos/electron-preferences/node_modules/babel-loader/lib/index.js??ref--0-1!/Users/tim/repos/electron-preferences/src/app/components/main/index.js","dependencies":[{"path":"/Users/tim/repos/electron-preferences/src/app/components/main/index.js","mtime":1515006065699},{"path":"/Users/tim/repos/electron-preferences/node_modules/cache-loader/dist/cjs.js","mtime":1510929699000},{"path":"/Users/tim/repos/electron-preferences/node_modules/babel-loader/lib/index.js","mtime":1503096278000}],"contextDependencies":[],"result":["'use strict';\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nrequire('./style.scss');\n\nvar _group = require('./components/group');\n\nvar _group2 = _interopRequireDefault(_group);\n\nvar _lodash = require('lodash');\n\nvar _lodash2 = _interopRequireDefault(_lodash);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Main = function (_React$Component) {\n _inherits(Main, _React$Component);\n\n function Main() {\n _classCallCheck(this, Main);\n\n return _possibleConstructorReturn(this, (Main.__proto__ || Object.getPrototypeOf(Main)).apply(this, arguments));\n }\n\n _createClass(Main, [{\n key: 'render',\n value: function render() {\n var _this2 = this;\n\n var groups = this.form.groups.map(function (group, idx) {\n return _react2.default.createElement(_group2.default, { key: idx, group: group, preferences: _this2.preferences[_this2.section.id], onFieldChange: _this2.onFieldChange.bind(_this2) });\n });\n\n return _react2.default.createElement(\n 'div',\n { className: 'main' },\n groups\n );\n }\n }, {\n key: 'options',\n get: function get() {\n\n return this.props.options;\n }\n }, {\n key: 'form',\n get: function get() {\n\n return this.section.form;\n }\n }, {\n key: 'preferences',\n get: function get() {\n\n return this.props.preferences;\n }\n }, {\n key: 'sections',\n get: function get() {\n\n return this.options.sections;\n }\n }, {\n key: 'activeSection',\n get: function get() {\n\n return this.props.activeSection;\n }\n }, {\n key: 'section',\n get: function get() {\n\n return _lodash2.default.find(this.sections, {\n 'id': this.activeSection\n });\n }\n }, {\n key: 'onFieldChange',\n get: function get() {\n\n return this.props.onFieldChange;\n }\n }]);\n\n return Main;\n}(_react2.default.Component);\n\nmodule.exports = Main;",null]} |
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 @@ | ||
{"remainingRequest":"/Users/tim/repos/electron-preferences/node_modules/style-loader/index.js!/Users/tim/repos/electron-preferences/node_modules/css-loader/index.js!/Users/tim/repos/electron-preferences/node_modules/sass-loader/lib/loader.js??ref--4-3!/Users/tim/repos/electron-preferences/src/app/components/main/style.scss","dependencies":[{"path":"/Users/tim/repos/electron-preferences/node_modules/cache-loader/dist/cjs.js","mtime":1510929699000},{"path":"/Users/tim/repos/electron-preferences/node_modules/style-loader/index.js","mtime":1512435383000},{"path":"/Users/tim/repos/electron-preferences/node_modules/css-loader/index.js","mtime":1495435566000},{"path":"/Users/tim/repos/electron-preferences/node_modules/sass-loader/lib/loader.js","mtime":1497463373000}],"contextDependencies":[],"result":["// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = require(\"!!../../../../node_modules/css-loader/index.js!../../../../node_modules/sass-loader/lib/loader.js??ref--4-3!./style.scss\");\nif(typeof content === 'string') content = [[module.id, content, '']];\n// Prepare cssTransformation\nvar transform;\n\nvar options = {\"hmr\":true}\noptions.transform = transform\n// add the styles to the DOM\nvar update = require(\"!../../../../node_modules/style-loader/lib/addStyles.js\")(content, options);\nif(content.locals) module.exports = content.locals;\n// Hot Module Replacement\nif(module.hot) {\n\t// When the styles change, update the <style> tags\n\tif(!content.locals) {\n\t\tmodule.hot.accept(\"!!../../../../node_modules/css-loader/index.js!../../../../node_modules/sass-loader/lib/loader.js??ref--4-3!./style.scss\", function() {\n\t\t\tvar newContent = require(\"!!../../../../node_modules/css-loader/index.js!../../../../node_modules/sass-loader/lib/loader.js??ref--4-3!./style.scss\");\n\t\t\tif(typeof newContent === 'string') newContent = [[module.id, newContent, '']];\n\t\t\tupdate(newContent);\n\t\t});\n\t}\n\t// When the module is disposed, remove the <style> tags\n\tmodule.hot.dispose(function() { update(); });\n}"]} |
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 @@ | ||
{"remainingRequest":"/Users/tim/repos/electron-preferences/node_modules/babel-loader/lib/index.js??ref--0-1!/Users/tim/repos/electron-preferences/src/app/index.js","dependencies":[{"path":"/Users/tim/repos/electron-preferences/src/app/index.js","mtime":1515007813912},{"path":"/Users/tim/repos/electron-preferences/node_modules/cache-loader/dist/cjs.js","mtime":1510929699000},{"path":"/Users/tim/repos/electron-preferences/node_modules/babel-loader/lib/index.js","mtime":1503096278000}],"contextDependencies":[],"result":["'use strict';\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactDom = require('react-dom');\n\nvar _reactDom2 = _interopRequireDefault(_reactDom);\n\nvar _sidebar = require('./components/sidebar');\n\nvar _sidebar2 = _interopRequireDefault(_sidebar);\n\nvar _main = require('./components/main');\n\nvar _main2 = _interopRequireDefault(_main);\n\nvar _lodash = require('lodash');\n\nvar _lodash2 = _interopRequireDefault(_lodash);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar _window$require = window.require('electron'),\n ipcRenderer = _window$require.ipcRenderer;\n\nvar options = ipcRenderer.sendSync('getPreferenceOptions');\nvar preferences = ipcRenderer.sendSync('getPreferences');\nvar defaults = ipcRenderer.sendSync('getDefaults');\n\noptions.sections = options.sections.filter(function (section) {\n return _lodash2.default.isBoolean(section.enabled) ? section.enabled : true;\n});\n\nconsole.log('prefs', preferences);\n\n// const preferences = options.sections.reduce((preferences, section, idx, src) => {\n// preferences[section.id] = {};\n// section.form.groups.forEach((group) => {\n// group.fields.forEach((field) => {\n// preferences[section.id][field.key] = _.get(prefs, [section.id, field.key]);\n// });\n// });\n// return preferences;\n// }, {});\n\nvar App = function (_React$Component) {\n _inherits(App, _React$Component);\n\n function App() {\n var _ref;\n\n var _temp, _this, _ret;\n\n _classCallCheck(this, App);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = App.__proto__ || Object.getPrototypeOf(App)).call.apply(_ref, [this].concat(args))), _this), _this.state = {\n 'options': options,\n 'activeSection': options.sections[0].id,\n 'preferences': preferences\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n _createClass(App, [{\n key: 'render',\n value: function render() {\n\n return _react2.default.createElement(\n _react2.default.Fragment,\n null,\n _react2.default.createElement(_sidebar2.default, _extends({}, this.state, { onSelectSection: this.onSelectSection.bind(this) })),\n _react2.default.createElement(_main2.default, _extends({}, this.state, { onFieldChange: this.onFieldChange.bind(this) }))\n );\n }\n }, {\n key: 'onSelectSection',\n value: function onSelectSection(sectionId) {\n\n this.setState({\n 'activeSection': sectionId\n });\n }\n }, {\n key: 'onFieldChange',\n value: function onFieldChange(key, value) {\n\n preferences[this.state.activeSection][key] = value;\n\n this.setState({\n 'preferences': preferences\n });\n\n ipcRenderer.send('setPreferences', preferences);\n }\n }]);\n\n return App;\n}(_react2.default.Component);\n\n_reactDom2.default.render(_react2.default.createElement(App, null), document.getElementById('window'));",null]} |
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 @@ | ||
{"remainingRequest":"/Users/tim/repos/electron-preferences/node_modules/style-loader/index.js!/Users/tim/repos/electron-preferences/node_modules/css-loader/index.js!/Users/tim/repos/electron-preferences/node_modules/sass-loader/lib/loader.js??ref--4-3!/Users/tim/repos/electron-preferences/src/app/components/main/components/group/components/fields/dropdown/style.scss","dependencies":[{"path":"/Users/tim/repos/electron-preferences/node_modules/cache-loader/dist/cjs.js","mtime":1510929699000},{"path":"/Users/tim/repos/electron-preferences/node_modules/style-loader/index.js","mtime":1512435383000},{"path":"/Users/tim/repos/electron-preferences/node_modules/css-loader/index.js","mtime":1495435566000},{"path":"/Users/tim/repos/electron-preferences/node_modules/sass-loader/lib/loader.js","mtime":1497463373000}],"contextDependencies":[],"result":["// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = require(\"!!../../../../../../../../../node_modules/css-loader/index.js!../../../../../../../../../node_modules/sass-loader/lib/loader.js??ref--4-3!./style.scss\");\nif(typeof content === 'string') content = [[module.id, content, '']];\n// Prepare cssTransformation\nvar transform;\n\nvar options = {\"hmr\":true}\noptions.transform = transform\n// add the styles to the DOM\nvar update = require(\"!../../../../../../../../../node_modules/style-loader/lib/addStyles.js\")(content, options);\nif(content.locals) module.exports = content.locals;\n// Hot Module Replacement\nif(module.hot) {\n\t// When the styles change, update the <style> tags\n\tif(!content.locals) {\n\t\tmodule.hot.accept(\"!!../../../../../../../../../node_modules/css-loader/index.js!../../../../../../../../../node_modules/sass-loader/lib/loader.js??ref--4-3!./style.scss\", function() {\n\t\t\tvar newContent = require(\"!!../../../../../../../../../node_modules/css-loader/index.js!../../../../../../../../../node_modules/sass-loader/lib/loader.js??ref--4-3!./style.scss\");\n\t\t\tif(typeof newContent === 'string') newContent = [[module.id, newContent, '']];\n\t\t\tupdate(newContent);\n\t\t});\n\t}\n\t// When the module is disposed, remove the <style> tags\n\tmodule.hot.dispose(function() { update(); });\n}"]} |
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 @@ | ||
{"remainingRequest":"/Users/tim/repos/electron-preferences/node_modules/babel-loader/lib/index.js??ref--0-1!/Users/tim/repos/electron-preferences/src/app/components/main/components/group/components/fields/dropdown/index.js","dependencies":[{"path":"/Users/tim/repos/electron-preferences/src/app/components/main/components/group/components/fields/dropdown/index.js","mtime":1515001833080},{"path":"/Users/tim/repos/electron-preferences/node_modules/cache-loader/dist/cjs.js","mtime":1510929699000},{"path":"/Users/tim/repos/electron-preferences/node_modules/babel-loader/lib/index.js","mtime":1503096278000}],"contextDependencies":[],"result":["'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nrequire('./style.scss');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar DropdownField = function (_React$Component) {\n _inherits(DropdownField, _React$Component);\n\n function DropdownField() {\n var _ref;\n\n var _temp, _this, _ret;\n\n _classCallCheck(this, DropdownField);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = DropdownField.__proto__ || Object.getPrototypeOf(DropdownField)).call.apply(_ref, [this].concat(args))), _this), _this.state = {}, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n _createClass(DropdownField, [{\n key: 'render',\n value: function render() {\n\n var options = this.options.map(function (option, idx) {\n return _react2.default.createElement(\n 'option',\n { value: option.value, key: idx },\n option.label\n );\n });\n\n return _react2.default.createElement(\n 'div',\n { className: 'field field-dropdown' },\n _react2.default.createElement(\n 'div',\n { className: 'field-label' },\n this.label\n ),\n _react2.default.createElement(\n 'select',\n { onChange: this.onChange.bind(this), value: this.value },\n _react2.default.createElement(\n 'option',\n { value: '' },\n '-- Select One --'\n ),\n options\n )\n );\n }\n }, {\n key: 'onChange',\n value: function onChange(e) {\n\n return this.props.onChange(e.target.value);\n }\n }, {\n key: 'field',\n get: function get() {\n\n return this.props.field;\n }\n }, {\n key: 'value',\n get: function get() {\n\n return this.props.value || '';\n }\n }, {\n key: 'label',\n get: function get() {\n\n return this.field.label;\n }\n }, {\n key: 'options',\n get: function get() {\n\n return this.field.options || [];\n }\n }]);\n\n return DropdownField;\n}(_react2.default.Component);\n\nexports.default = DropdownField;",null]} |
Oops, something went wrong.