added button components
This commit is contained in:
parent
f423709cc0
commit
a16adee8be
33 changed files with 687 additions and 284 deletions
22
client/build/components/ButtonPrimary/index.js
Normal file
22
client/build/components/ButtonPrimary/index.js
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
Object.defineProperty(exports, "__esModule", {
|
||||||
|
value: true
|
||||||
|
});
|
||||||
|
exports.default = void 0;
|
||||||
|
|
||||||
|
var _react = _interopRequireDefault(require("react"));
|
||||||
|
|
||||||
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||||
|
|
||||||
|
var ButtonPrimary = function ButtonPrimary(_ref) {
|
||||||
|
var value = _ref.value,
|
||||||
|
onClickHandler = _ref.onClickHandler;
|
||||||
|
return _react.default.createElement("button", {
|
||||||
|
className: 'button button-primary',
|
||||||
|
onClick: onClickHandler
|
||||||
|
}, value);
|
||||||
|
};
|
||||||
|
|
||||||
|
var _default = ButtonPrimary;
|
||||||
|
exports.default = _default;
|
22
client/build/components/ButtonPrimaryJumbo/index.js
Normal file
22
client/build/components/ButtonPrimaryJumbo/index.js
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
Object.defineProperty(exports, "__esModule", {
|
||||||
|
value: true
|
||||||
|
});
|
||||||
|
exports.default = void 0;
|
||||||
|
|
||||||
|
var _react = _interopRequireDefault(require("react"));
|
||||||
|
|
||||||
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||||
|
|
||||||
|
var ButtonPrimaryJumbo = function ButtonPrimaryJumbo(_ref) {
|
||||||
|
var value = _ref.value,
|
||||||
|
onClickHandler = _ref.onClickHandler;
|
||||||
|
return _react.default.createElement("button", {
|
||||||
|
className: 'button button-primary button-primary--jumbo',
|
||||||
|
onClick: onClickHandler
|
||||||
|
}, value);
|
||||||
|
};
|
||||||
|
|
||||||
|
var _default = ButtonPrimaryJumbo;
|
||||||
|
exports.default = _default;
|
22
client/build/components/ButtonSecondary/index.js
Normal file
22
client/build/components/ButtonSecondary/index.js
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
Object.defineProperty(exports, "__esModule", {
|
||||||
|
value: true
|
||||||
|
});
|
||||||
|
exports.default = void 0;
|
||||||
|
|
||||||
|
var _react = _interopRequireDefault(require("react"));
|
||||||
|
|
||||||
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||||
|
|
||||||
|
var ButtonPrimary = function ButtonPrimary(_ref) {
|
||||||
|
var value = _ref.value,
|
||||||
|
onClickHandler = _ref.onClickHandler;
|
||||||
|
return _react.default.createElement("button", {
|
||||||
|
className: 'button button--secondary',
|
||||||
|
onClick: onClickHandler
|
||||||
|
}, value);
|
||||||
|
};
|
||||||
|
|
||||||
|
var _default = ButtonPrimary;
|
||||||
|
exports.default = _default;
|
22
client/build/components/ButtonTertiary/index.js
Normal file
22
client/build/components/ButtonTertiary/index.js
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
Object.defineProperty(exports, "__esModule", {
|
||||||
|
value: true
|
||||||
|
});
|
||||||
|
exports.default = void 0;
|
||||||
|
|
||||||
|
var _react = _interopRequireDefault(require("react"));
|
||||||
|
|
||||||
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||||
|
|
||||||
|
var ButtonTertiary = function ButtonTertiary(_ref) {
|
||||||
|
var value = _ref.value,
|
||||||
|
onClickHandler = _ref.onClickHandler;
|
||||||
|
return _react.default.createElement("button", {
|
||||||
|
className: 'button button--tertiary',
|
||||||
|
onClick: onClickHandler
|
||||||
|
}, value);
|
||||||
|
};
|
||||||
|
|
||||||
|
var _default = ButtonTertiary;
|
||||||
|
exports.default = _default;
|
42
client/build/components/ChannelCreateNameInput/index.js
Normal file
42
client/build/components/ChannelCreateNameInput/index.js
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
Object.defineProperty(exports, "__esModule", {
|
||||||
|
value: true
|
||||||
|
});
|
||||||
|
exports.default = void 0;
|
||||||
|
|
||||||
|
var _react = _interopRequireDefault(require("react"));
|
||||||
|
|
||||||
|
var _Label = _interopRequireDefault(require("@components/Label"));
|
||||||
|
|
||||||
|
var _PublishDetailsRow = _interopRequireDefault(require("@components/PublishDetailsRow"));
|
||||||
|
|
||||||
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||||
|
|
||||||
|
var ChannelCreateNameInput = function ChannelCreateNameInput(_ref) {
|
||||||
|
var value = _ref.value,
|
||||||
|
error = _ref.error,
|
||||||
|
handleNameInput = _ref.handleNameInput;
|
||||||
|
return _react.default.createElement(_PublishDetailsRow.default, {
|
||||||
|
label: _react.default.createElement(_Label.default, {
|
||||||
|
value: 'Name:'
|
||||||
|
}),
|
||||||
|
content: _react.default.createElement("div", {
|
||||||
|
className: "input-area--primary"
|
||||||
|
}, _react.default.createElement("span", null, "@"), _react.default.createElement("input", {
|
||||||
|
type: "text",
|
||||||
|
name: "channel",
|
||||||
|
className: "input-text",
|
||||||
|
placeholder: "exampleChannelName",
|
||||||
|
value: value,
|
||||||
|
onChange: handleNameInput
|
||||||
|
}), value && !error && _react.default.createElement("span", {
|
||||||
|
className: "info-message--success span--absolute"
|
||||||
|
}, "\u2713"), error && _react.default.createElement("span", {
|
||||||
|
className: "info-message--failure span--absolute"
|
||||||
|
}, "\u2716"))
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
var _default = ChannelCreateNameInput;
|
||||||
|
exports.default = _default;
|
37
client/build/components/ChannelCreatePasswordInput/index.js
Normal file
37
client/build/components/ChannelCreatePasswordInput/index.js
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
Object.defineProperty(exports, "__esModule", {
|
||||||
|
value: true
|
||||||
|
});
|
||||||
|
exports.default = void 0;
|
||||||
|
|
||||||
|
var _react = _interopRequireDefault(require("react"));
|
||||||
|
|
||||||
|
var _Label = _interopRequireDefault(require("@components/Label"));
|
||||||
|
|
||||||
|
var _PublishDetailsRow = _interopRequireDefault(require("@components/PublishDetailsRow"));
|
||||||
|
|
||||||
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||||
|
|
||||||
|
var ChannelCreatePasswordInput = function ChannelCreatePasswordInput(_ref) {
|
||||||
|
var value = _ref.value,
|
||||||
|
handlePasswordInput = _ref.handlePasswordInput;
|
||||||
|
return _react.default.createElement(_PublishDetailsRow.default, {
|
||||||
|
label: _react.default.createElement(_Label.default, {
|
||||||
|
value: 'Password:'
|
||||||
|
}),
|
||||||
|
content: _react.default.createElement("div", {
|
||||||
|
className: "input-area--primary"
|
||||||
|
}, _react.default.createElement("input", {
|
||||||
|
type: "password",
|
||||||
|
name: "password",
|
||||||
|
className: "input-text",
|
||||||
|
placeholder: "",
|
||||||
|
value: value,
|
||||||
|
onChange: handlePasswordInput
|
||||||
|
}))
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
var _default = ChannelCreatePasswordInput;
|
||||||
|
exports.default = _default;
|
38
client/build/components/ChannelLoginNameInput/index.js
Normal file
38
client/build/components/ChannelLoginNameInput/index.js
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
Object.defineProperty(exports, "__esModule", {
|
||||||
|
value: true
|
||||||
|
});
|
||||||
|
exports.default = void 0;
|
||||||
|
|
||||||
|
var _react = _interopRequireDefault(require("react"));
|
||||||
|
|
||||||
|
var _PublishDetailsRow = _interopRequireDefault(require("@components/PublishDetailsRow"));
|
||||||
|
|
||||||
|
var _Label = _interopRequireDefault(require("@components/Label"));
|
||||||
|
|
||||||
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||||
|
|
||||||
|
var ChannelLoginNameInput = function ChannelLoginNameInput(_ref) {
|
||||||
|
var channelName = _ref.channelName,
|
||||||
|
handleInput = _ref.handleInput;
|
||||||
|
return _react.default.createElement(_PublishDetailsRow.default, {
|
||||||
|
label: _react.default.createElement(_Label.default, {
|
||||||
|
value: 'Name:'
|
||||||
|
}),
|
||||||
|
content: _react.default.createElement("div", {
|
||||||
|
className: "input-area--primary"
|
||||||
|
}, _react.default.createElement("span", null, "@"), _react.default.createElement("input", {
|
||||||
|
type: "text",
|
||||||
|
id: "channel-login-name-input",
|
||||||
|
className: "input-text",
|
||||||
|
name: "name",
|
||||||
|
placeholder: "Your Channel Name",
|
||||||
|
value: channelName,
|
||||||
|
onChange: handleInput
|
||||||
|
}))
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
var _default = ChannelLoginNameInput;
|
||||||
|
exports.default = _default;
|
38
client/build/components/ChannelLoginPasswordInput/index.js
Normal file
38
client/build/components/ChannelLoginPasswordInput/index.js
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
Object.defineProperty(exports, "__esModule", {
|
||||||
|
value: true
|
||||||
|
});
|
||||||
|
exports.default = void 0;
|
||||||
|
|
||||||
|
var _react = _interopRequireDefault(require("react"));
|
||||||
|
|
||||||
|
var _PublishDetailsRow = _interopRequireDefault(require("@components/PublishDetailsRow"));
|
||||||
|
|
||||||
|
var _Label = _interopRequireDefault(require("@components/Label"));
|
||||||
|
|
||||||
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||||
|
|
||||||
|
var ChannelLoginPasswordInput = function ChannelLoginPasswordInput(_ref) {
|
||||||
|
var channelPassword = _ref.channelPassword,
|
||||||
|
handleInput = _ref.handleInput;
|
||||||
|
return _react.default.createElement(_PublishDetailsRow.default, {
|
||||||
|
label: _react.default.createElement(_Label.default, {
|
||||||
|
value: 'Password:'
|
||||||
|
}),
|
||||||
|
content: _react.default.createElement("div", {
|
||||||
|
className: "input-area--primary"
|
||||||
|
}, _react.default.createElement("input", {
|
||||||
|
type: "password",
|
||||||
|
id: "channel-login-password-input",
|
||||||
|
name: "password",
|
||||||
|
className: "input-text",
|
||||||
|
placeholder: "",
|
||||||
|
value: channelPassword,
|
||||||
|
onChange: handleInput
|
||||||
|
}))
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
var _default = ChannelLoginPasswordInput;
|
||||||
|
exports.default = _default;
|
59
client/build/components/SpaceAround/index.js
Normal file
59
client/build/components/SpaceAround/index.js
Normal file
|
@ -0,0 +1,59 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
Object.defineProperty(exports, "__esModule", {
|
||||||
|
value: true
|
||||||
|
});
|
||||||
|
exports.default = void 0;
|
||||||
|
|
||||||
|
var _react = _interopRequireDefault(require("react"));
|
||||||
|
|
||||||
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||||
|
|
||||||
|
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
||||||
|
|
||||||
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||||
|
|
||||||
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } _setPrototypeOf(subClass.prototype, superClass && superClass.prototype); if (superClass) _setPrototypeOf(subClass, superClass); }
|
||||||
|
|
||||||
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
||||||
|
|
||||||
|
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); } }
|
||||||
|
|
||||||
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
||||||
|
|
||||||
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
||||||
|
|
||||||
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
||||||
|
|
||||||
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.getPrototypeOf || function _getPrototypeOf(o) { return o.__proto__; }; return _getPrototypeOf(o); }
|
||||||
|
|
||||||
|
var SpaceBetween =
|
||||||
|
/*#__PURE__*/
|
||||||
|
function (_React$Component) {
|
||||||
|
function SpaceBetween() {
|
||||||
|
_classCallCheck(this, SpaceBetween);
|
||||||
|
|
||||||
|
return _possibleConstructorReturn(this, _getPrototypeOf(SpaceBetween).apply(this, arguments));
|
||||||
|
}
|
||||||
|
|
||||||
|
_createClass(SpaceBetween, [{
|
||||||
|
key: "shouldComponentUpdate",
|
||||||
|
value: function shouldComponentUpdate() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
key: "render",
|
||||||
|
value: function render() {
|
||||||
|
return _react.default.createElement("div", {
|
||||||
|
className: 'space-around'
|
||||||
|
}, this.props.children);
|
||||||
|
}
|
||||||
|
}]);
|
||||||
|
|
||||||
|
_inherits(SpaceBetween, _React$Component);
|
||||||
|
|
||||||
|
return SpaceBetween;
|
||||||
|
}(_react.default.Component);
|
||||||
|
|
||||||
|
var _default = SpaceBetween;
|
||||||
|
exports.default = _default;
|
|
@ -7,6 +7,14 @@ exports.default = void 0;
|
||||||
|
|
||||||
var _react = _interopRequireDefault(require("react"));
|
var _react = _interopRequireDefault(require("react"));
|
||||||
|
|
||||||
|
var _ChannelCreateNameInput = _interopRequireDefault(require("@components/ChannelCreateNameInput"));
|
||||||
|
|
||||||
|
var _ChannelCreatePasswordInput = _interopRequireDefault(require("@components/ChannelCreatePasswordInput"));
|
||||||
|
|
||||||
|
var _ButtonPrimary = _interopRequireDefault(require("@components/ButtonPrimary"));
|
||||||
|
|
||||||
|
var _ErrorDisplay = _interopRequireDefault(require("@components/ErrorDisplay"));
|
||||||
|
|
||||||
var _ProgressBar = _interopRequireDefault(require("@components/ProgressBar"));
|
var _ProgressBar = _interopRequireDefault(require("@components/ProgressBar"));
|
||||||
|
|
||||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||||
|
@ -114,63 +122,21 @@ function (_React$Component) {
|
||||||
password = _this$props.password,
|
password = _this$props.password,
|
||||||
status = _this$props.status;
|
status = _this$props.status;
|
||||||
var formError = this.returnErrors();
|
var formError = this.returnErrors();
|
||||||
return _react.default.createElement("div", null, !status ? _react.default.createElement("form", {
|
return _react.default.createElement("div", null, !status ? _react.default.createElement("div", null, _react.default.createElement(_ChannelCreateNameInput.default, {
|
||||||
id: "publish-channel-form"
|
|
||||||
}, _react.default.createElement("div", {
|
|
||||||
className: "row row--wide row--short"
|
|
||||||
}, _react.default.createElement("div", {
|
|
||||||
className: "column column--3 column--sml-10"
|
|
||||||
}, _react.default.createElement("label", {
|
|
||||||
className: "label",
|
|
||||||
htmlFor: "new-channel-name"
|
|
||||||
}, "Name:")), _react.default.createElement("div", {
|
|
||||||
className: "column column--6 column--sml-10"
|
|
||||||
}, _react.default.createElement("div", {
|
|
||||||
className: "input-text--primary flex-container--row flex-container--left-bottom span--relative"
|
|
||||||
}, _react.default.createElement("span", null, "@"), _react.default.createElement("input", {
|
|
||||||
type: "text",
|
|
||||||
name: "channel",
|
|
||||||
id: "new-channel-name",
|
|
||||||
className: "input-text",
|
|
||||||
placeholder: "exampleChannelName",
|
|
||||||
value: name.value,
|
value: name.value,
|
||||||
onChange: this.handleNameInput
|
error: name.error,
|
||||||
}), name.value && !name.error && _react.default.createElement("span", {
|
handleNameInput: this.handleNameInput
|
||||||
id: "input-success-channel-name",
|
}), _react.default.createElement(_ChannelCreatePasswordInput.default, {
|
||||||
className: "info-message--success span--absolute"
|
|
||||||
}, "\u2713"), name.error && _react.default.createElement("span", {
|
|
||||||
id: "input-success-channel-name",
|
|
||||||
className: "info-message--failure span--absolute"
|
|
||||||
}, "\u2716")))), _react.default.createElement("div", {
|
|
||||||
className: "row row--wide row--short"
|
|
||||||
}, _react.default.createElement("div", {
|
|
||||||
className: "column column--3 column--sml-10"
|
|
||||||
}, _react.default.createElement("label", {
|
|
||||||
className: "label",
|
|
||||||
htmlFor: "new-channel-password"
|
|
||||||
}, "Password:")), _react.default.createElement("div", {
|
|
||||||
className: "column column--6 column--sml-10"
|
|
||||||
}, _react.default.createElement("div", {
|
|
||||||
className: "input-text--primary"
|
|
||||||
}, _react.default.createElement("input", {
|
|
||||||
type: "password",
|
|
||||||
name: "password",
|
|
||||||
id: "new-channel-password",
|
|
||||||
className: "input-text",
|
|
||||||
placeholder: "",
|
|
||||||
value: password.value,
|
value: password.value,
|
||||||
onChange: this.handlePasswordInput
|
handlePasswordInput: this.handlePasswordInput
|
||||||
})))), formError ? _react.default.createElement("p", {
|
}), _react.default.createElement(_ErrorDisplay.default, {
|
||||||
className: "info-message--failure"
|
errorMessage: formError,
|
||||||
}, formError) : _react.default.createElement("p", {
|
defaultMessage: 'Choose a name and password for your channel'
|
||||||
className: "info-message"
|
}), _react.default.createElement(_ButtonPrimary.default, {
|
||||||
}, "Choose a name and password for your channel"), _react.default.createElement("div", {
|
value: 'Create Channel',
|
||||||
className: "row row--wide"
|
onClickHandler: this.handleSubmit
|
||||||
}, _react.default.createElement("button", {
|
})) : _react.default.createElement("div", null, _react.default.createElement("p", {
|
||||||
className: "button--primary",
|
className: 'fine-print'
|
||||||
onClick: this.handleSubmit
|
|
||||||
}, "Create Channel"))) : _react.default.createElement("div", null, _react.default.createElement("p", {
|
|
||||||
className: "fine-print"
|
|
||||||
}, status), _react.default.createElement(_ProgressBar.default, {
|
}, status), _react.default.createElement(_ProgressBar.default, {
|
||||||
size: 12
|
size: 12
|
||||||
})));
|
})));
|
||||||
|
|
|
@ -11,9 +11,11 @@ var _request = _interopRequireDefault(require("../../utils/request"));
|
||||||
|
|
||||||
var _ErrorDisplay = _interopRequireDefault(require("@components/ErrorDisplay"));
|
var _ErrorDisplay = _interopRequireDefault(require("@components/ErrorDisplay"));
|
||||||
|
|
||||||
var _PublishDetailsRow = _interopRequireDefault(require("@components/PublishDetailsRow"));
|
var _ChannelLoginNameInput = _interopRequireDefault(require("@components/ChannelLoginNameInput"));
|
||||||
|
|
||||||
var _Label = _interopRequireDefault(require("@components/Label"));
|
var _ChannelLoginPasswordInput = _interopRequireDefault(require("@components/ChannelLoginPasswordInput"));
|
||||||
|
|
||||||
|
var _ButtonPrimary = _interopRequireDefault(require("@components/ButtonPrimary"));
|
||||||
|
|
||||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||||
|
|
||||||
|
@ -37,48 +39,6 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.getPrototypeOf || functio
|
||||||
|
|
||||||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
||||||
|
|
||||||
var ChannelLoginNameInput = function ChannelLoginNameInput(_ref) {
|
|
||||||
var channelName = _ref.channelName,
|
|
||||||
handleInput = _ref.handleInput;
|
|
||||||
return _react.default.createElement(_PublishDetailsRow.default, {
|
|
||||||
label: _react.default.createElement(_Label.default, {
|
|
||||||
value: 'Name:'
|
|
||||||
}),
|
|
||||||
content: _react.default.createElement("div", {
|
|
||||||
className: "input-area--primary"
|
|
||||||
}, _react.default.createElement("span", null, "@"), _react.default.createElement("input", {
|
|
||||||
type: "text",
|
|
||||||
id: "channel-login-name-input",
|
|
||||||
className: "input-text",
|
|
||||||
name: "name",
|
|
||||||
placeholder: "Your Channel Name",
|
|
||||||
value: channelName,
|
|
||||||
onChange: handleInput
|
|
||||||
}))
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
var ChannelLoginPasswordInput = function ChannelLoginPasswordInput(_ref2) {
|
|
||||||
var channelPassword = _ref2.channelPassword,
|
|
||||||
handleInput = _ref2.handleInput;
|
|
||||||
return _react.default.createElement(_PublishDetailsRow.default, {
|
|
||||||
label: _react.default.createElement(_Label.default, {
|
|
||||||
value: 'Password:'
|
|
||||||
}),
|
|
||||||
content: _react.default.createElement("div", {
|
|
||||||
className: "input-area--primary"
|
|
||||||
}, _react.default.createElement("input", {
|
|
||||||
type: "password",
|
|
||||||
id: "channel-login-password-input",
|
|
||||||
name: "password",
|
|
||||||
className: "input-text",
|
|
||||||
placeholder: "",
|
|
||||||
value: channelPassword,
|
|
||||||
onChange: handleInput
|
|
||||||
}))
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
var ChannelLoginForm =
|
var ChannelLoginForm =
|
||||||
/*#__PURE__*/
|
/*#__PURE__*/
|
||||||
function (_React$Component) {
|
function (_React$Component) {
|
||||||
|
@ -122,12 +82,12 @@ function (_React$Component) {
|
||||||
}),
|
}),
|
||||||
credentials: 'include'
|
credentials: 'include'
|
||||||
};
|
};
|
||||||
(0, _request.default)('login', params).then(function (_ref3) {
|
(0, _request.default)('login', params).then(function (_ref) {
|
||||||
var success = _ref3.success,
|
var success = _ref.success,
|
||||||
channelName = _ref3.channelName,
|
channelName = _ref.channelName,
|
||||||
shortChannelId = _ref3.shortChannelId,
|
shortChannelId = _ref.shortChannelId,
|
||||||
channelClaimId = _ref3.channelClaimId,
|
channelClaimId = _ref.channelClaimId,
|
||||||
message = _ref3.message;
|
message = _ref.message;
|
||||||
|
|
||||||
if (success) {
|
if (success) {
|
||||||
_this2.props.onChannelLogin(channelName, shortChannelId, channelClaimId);
|
_this2.props.onChannelLogin(channelName, shortChannelId, channelClaimId);
|
||||||
|
@ -153,19 +113,19 @@ function (_React$Component) {
|
||||||
}, {
|
}, {
|
||||||
key: "render",
|
key: "render",
|
||||||
value: function render() {
|
value: function render() {
|
||||||
return _react.default.createElement("div", null, _react.default.createElement(ChannelLoginNameInput, {
|
return _react.default.createElement("div", null, _react.default.createElement(_ChannelLoginNameInput.default, {
|
||||||
channelName: this.state.channelName,
|
channelName: this.state.channelName,
|
||||||
handleInput: this.handleInput
|
handleInput: this.handleInput
|
||||||
}), _react.default.createElement(ChannelLoginPasswordInput, {
|
}), _react.default.createElement(_ChannelLoginPasswordInput.default, {
|
||||||
channelPassword: this.state.channelPassword,
|
channelPassword: this.state.channelPassword,
|
||||||
handleInput: this.handleInput
|
handleInput: this.handleInput
|
||||||
}), _react.default.createElement(_ErrorDisplay.default, {
|
}), _react.default.createElement(_ErrorDisplay.default, {
|
||||||
errorMessage: this.state.error,
|
errorMessage: this.state.error,
|
||||||
defaultMessage: 'Enter the name and password for your channel'
|
defaultMessage: 'Enter the name and password for your channel'
|
||||||
}), _react.default.createElement("button", {
|
}), _react.default.createElement(_ButtonPrimary.default, {
|
||||||
className: "button--primary",
|
value: 'Authenticate',
|
||||||
onClick: this.loginToChannel
|
onClickHandler: this.loginToChannel
|
||||||
}, "Authenticate"));
|
}));
|
||||||
}
|
}
|
||||||
}]);
|
}]);
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,12 @@ var _ChannelSelect = _interopRequireDefault(require("@containers/ChannelSelect")
|
||||||
|
|
||||||
var _Row = _interopRequireDefault(require("@components/Row"));
|
var _Row = _interopRequireDefault(require("@components/Row"));
|
||||||
|
|
||||||
|
var _ButtonPrimaryJumbo = _interopRequireDefault(require("@components/ButtonPrimaryJumbo"));
|
||||||
|
|
||||||
|
var _ButtonTertiary = _interopRequireDefault(require("@components/ButtonTertiary"));
|
||||||
|
|
||||||
|
var _SpaceAround = _interopRequireDefault(require("@components/SpaceAround"));
|
||||||
|
|
||||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||||
|
|
||||||
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
||||||
|
@ -60,14 +66,13 @@ function (_React$Component) {
|
||||||
}, {
|
}, {
|
||||||
key: "render",
|
key: "render",
|
||||||
value: function render() {
|
value: function render() {
|
||||||
return _react.default.createElement("div", null, _react.default.createElement(_Row.default, null, _react.default.createElement(_PublishUrlInput.default, null)), _react.default.createElement(_Row.default, null, _react.default.createElement(_ChannelSelect.default, null)), this.props.file.type === 'video/mp4' && _react.default.createElement(_Row.default, null, _react.default.createElement(_PublishThumbnailInput.default, null)), _react.default.createElement(_Row.default, null, _react.default.createElement(_PublishMetadataInputs.default, null)), _react.default.createElement(_Row.default, null, _react.default.createElement("button", {
|
return _react.default.createElement("div", null, _react.default.createElement(_Row.default, null, _react.default.createElement(_PublishUrlInput.default, null)), _react.default.createElement(_Row.default, null, _react.default.createElement(_ChannelSelect.default, null)), this.props.file.type === 'video/mp4' && _react.default.createElement(_Row.default, null, _react.default.createElement(_PublishThumbnailInput.default, null)), _react.default.createElement(_Row.default, null, _react.default.createElement(_PublishMetadataInputs.default, null)), _react.default.createElement(_Row.default, null, _react.default.createElement(_ButtonPrimaryJumbo.default, {
|
||||||
id: "publish-submit",
|
value: 'Publish',
|
||||||
className: "button--primary button--large",
|
onClickHandler: this.onPublishSubmit
|
||||||
onClick: this.onPublishSubmit
|
})), _react.default.createElement(_Row.default, null, _react.default.createElement(_SpaceAround.default, null, _react.default.createElement(_ButtonTertiary.default, {
|
||||||
}, "Publish")), _react.default.createElement(_Row.default, null, _react.default.createElement("button", {
|
value: 'Cancel',
|
||||||
className: "button--cancel",
|
onClickHandler: this.props.clearFile
|
||||||
onClick: this.props.clearFile
|
}))), _react.default.createElement(_Row.default, null, _react.default.createElement("p", {
|
||||||
}, "Cancel")), _react.default.createElement(_Row.default, null, _react.default.createElement("p", {
|
|
||||||
className: "fine-print"
|
className: "fine-print"
|
||||||
}, "By clicking 'Publish', you affirm that you have the rights to publish this content to the LBRY network, and that you understand the properties of publishing it to a decentralized, user-controlled network. ", _react.default.createElement("a", {
|
}, "By clicking 'Publish', you affirm that you have the rights to publish this content to the LBRY network, and that you understand the properties of publishing it to a decentralized, user-controlled network. ", _react.default.createElement("a", {
|
||||||
className: "link--primary",
|
className: "link--primary",
|
||||||
|
|
|
@ -13,6 +13,8 @@ var _PublishLicenseInput = _interopRequireDefault(require("@components/PublishLi
|
||||||
|
|
||||||
var _PublishNsfwInput = _interopRequireDefault(require("@components/PublishNsfwInput"));
|
var _PublishNsfwInput = _interopRequireDefault(require("@components/PublishNsfwInput"));
|
||||||
|
|
||||||
|
var _ButtonSecondary = _interopRequireDefault(require("@components/ButtonSecondary"));
|
||||||
|
|
||||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||||
|
|
||||||
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
||||||
|
@ -79,10 +81,10 @@ function (_React$Component) {
|
||||||
}), _react.default.createElement(_PublishNsfwInput.default, {
|
}), _react.default.createElement(_PublishNsfwInput.default, {
|
||||||
nsfw: this.props.nsfw,
|
nsfw: this.props.nsfw,
|
||||||
handleInput: this.handleInput
|
handleInput: this.handleInput
|
||||||
})), _react.default.createElement("button", {
|
})), _react.default.createElement(_ButtonSecondary.default, {
|
||||||
className: "button--secondary",
|
value: this.props.showMetadataInputs ? 'less' : 'more',
|
||||||
onClick: this.toggleShowInputs
|
onClickHandler: this.toggleShowInputs
|
||||||
}, this.props.showMetadataInputs ? 'less' : 'more'));
|
}));
|
||||||
}
|
}
|
||||||
}]);
|
}]);
|
||||||
|
|
||||||
|
|
|
@ -1,60 +0,0 @@
|
||||||
button {
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
.button--primary, .button--primary:focus {
|
|
||||||
border: 1px solid black;
|
|
||||||
padding: 0.5em;
|
|
||||||
margin: 0.5em 0.3em 0.5em 0.3em;
|
|
||||||
color: black;
|
|
||||||
background-color: white;
|
|
||||||
outline: 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.button--primary:hover {
|
|
||||||
border: 1px solid #4156C5;
|
|
||||||
color: white;
|
|
||||||
background-color: #4156C5;
|
|
||||||
}
|
|
||||||
|
|
||||||
.button--primary:active{
|
|
||||||
border: 1px solid #ffffff;
|
|
||||||
color: #d0d0d0;
|
|
||||||
background-color: #ffffff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.button--secondary, .button--secondary:focus {
|
|
||||||
border: 0px;
|
|
||||||
border-bottom: 1px solid black;
|
|
||||||
padding: 0.5em;
|
|
||||||
margin: 0.5em 0.3em 0.5em 0.3em;
|
|
||||||
color: black;
|
|
||||||
background-color: white;
|
|
||||||
outline: 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.button--secondary:hover {
|
|
||||||
border-bottom: 1px solid #9b9b9b;
|
|
||||||
color: #4156C5;
|
|
||||||
}
|
|
||||||
|
|
||||||
.button--secondary:active {
|
|
||||||
color: #ffffff;;
|
|
||||||
}
|
|
||||||
|
|
||||||
.button--large{
|
|
||||||
margin: 0px;
|
|
||||||
width: calc(100% - 2px);
|
|
||||||
padding: 2rem;
|
|
||||||
font-size: x-large;
|
|
||||||
}
|
|
||||||
|
|
||||||
.button--cancel{
|
|
||||||
border: 0px;
|
|
||||||
background-color: white;
|
|
||||||
color: #9b9b9b;
|
|
||||||
}
|
|
||||||
|
|
||||||
.button--wide {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
|
@ -10,7 +10,6 @@
|
||||||
@import '_link';
|
@import '_link';
|
||||||
@import '_info-message';
|
@import '_info-message';
|
||||||
@import '_input';
|
@import '_input';
|
||||||
@import '_button';
|
|
||||||
@import '_span';
|
@import '_span';
|
||||||
@import '_video';
|
@import '_video';
|
||||||
@import '_asset';
|
@import '_asset';
|
||||||
|
@ -21,10 +20,15 @@
|
||||||
@import 'components/_page-content';
|
@import 'components/_page-content';
|
||||||
@import 'components/_horizontal-split';
|
@import 'components/_horizontal-split';
|
||||||
@import 'components/_space-between';
|
@import 'components/_space-between';
|
||||||
|
@import 'components/_space-around';
|
||||||
@import 'components/_column';
|
@import 'components/_column';
|
||||||
@import 'components/_row';
|
@import 'components/_row';
|
||||||
@import 'components/_nav-bar';
|
@import 'components/_nav-bar';
|
||||||
@import 'components/_publish-details-row';
|
@import 'components/_publish-details-row';
|
||||||
|
@import 'components/_button';
|
||||||
|
@import 'components/_button-primary';
|
||||||
|
@import 'components/_button-secondary';
|
||||||
|
@import 'components/_button-tertiary';
|
||||||
@import 'containers/_dropzone';
|
@import 'containers/_dropzone';
|
||||||
@import 'containers/_publish-url-input';
|
@import 'containers/_publish-url-input';
|
||||||
@import 'containers/_site-description';
|
@import 'containers/_site-description';
|
||||||
|
|
33
client/scss/components/_button-primary.scss
Normal file
33
client/scss/components/_button-primary.scss
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
|
||||||
|
.button-primary, .button-primary:focus, .button-primary:active {
|
||||||
|
border: $button-border-width $button-border-strength $primary-color;
|
||||||
|
padding: 0.5em;
|
||||||
|
margin: 0.5em 0.3em 0.5em 0.3em;
|
||||||
|
color: $primary-color;
|
||||||
|
background-color: $background-color;
|
||||||
|
outline: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button-primary:focus {
|
||||||
|
border-color: $secondary-color;
|
||||||
|
background-color: $tertiary-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.button-primary:hover {
|
||||||
|
border-color: $interactive-color;
|
||||||
|
color: $background-color;
|
||||||
|
background-color: $interactive-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button-primary:active{
|
||||||
|
border-color: $background-color;
|
||||||
|
color: $secondary-color;
|
||||||
|
background-color: $tertiary-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button-primary--jumbo, .button-primary--jumbo:focus, .button-primary--jumbo:active {
|
||||||
|
width: $button-max-width;
|
||||||
|
padding: $secondary-padding;
|
||||||
|
font-size: x-large;
|
||||||
|
}
|
22
client/scss/components/_button-secondary.scss
Normal file
22
client/scss/components/_button-secondary.scss
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
.button--secondary, .button--secondary:focus {
|
||||||
|
border: 0;
|
||||||
|
border-bottom: 1px solid $primary-color;
|
||||||
|
padding: 0.5em;
|
||||||
|
margin: 0.5em 0.3em 0.5em 0.3em;
|
||||||
|
color: $primary-color;
|
||||||
|
background-color: $background-color;
|
||||||
|
outline: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button--secondary:focus{
|
||||||
|
border-bottom: 1px solid $secondary-color;
|
||||||
|
background-color: $tertiary-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button--secondary:hover {
|
||||||
|
color: $interactive-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button--secondary:active {
|
||||||
|
color: $background-color;
|
||||||
|
}
|
14
client/scss/components/_button-tertiary.scss
Normal file
14
client/scss/components/_button-tertiary.scss
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
.button--tertiary, .button--tertiary:focus, .button--tertiary:active {
|
||||||
|
border: 0;
|
||||||
|
color: $secondary-color;
|
||||||
|
background-color: $background-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button--tertiary:hover {
|
||||||
|
color: $primary-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button--tertiary:active, .button--tertiary:focus {
|
||||||
|
color: $secondary-color;
|
||||||
|
background-color: $tertiary-color;
|
||||||
|
}
|
7
client/scss/components/_button.scss
Normal file
7
client/scss/components/_button.scss
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
button {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
$button-border-width: 1px;
|
||||||
|
$button-border-strength: solid;
|
||||||
|
$button-max-width: calc(100% - 2px);
|
5
client/scss/components/_space-around.scss
Normal file
5
client/scss/components/_space-around.scss
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
.space-around {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-around;
|
||||||
|
align-items: center;
|
||||||
|
}
|
14
client/src/components/ButtonPrimary/index.jsx
Normal file
14
client/src/components/ButtonPrimary/index.jsx
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
import React from 'react';
|
||||||
|
|
||||||
|
const ButtonPrimary = ({ value, onClickHandler }) => {
|
||||||
|
return (
|
||||||
|
<button
|
||||||
|
className={'button button-primary'}
|
||||||
|
onClick={onClickHandler}
|
||||||
|
>
|
||||||
|
{value}
|
||||||
|
</button>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default ButtonPrimary;
|
14
client/src/components/ButtonPrimaryJumbo/index.jsx
Normal file
14
client/src/components/ButtonPrimaryJumbo/index.jsx
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
import React from 'react';
|
||||||
|
|
||||||
|
const ButtonPrimaryJumbo = ({ value, onClickHandler }) => {
|
||||||
|
return (
|
||||||
|
<button
|
||||||
|
className={'button button-primary button-primary--jumbo'}
|
||||||
|
onClick={onClickHandler}
|
||||||
|
>
|
||||||
|
{value}
|
||||||
|
</button>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default ButtonPrimaryJumbo;
|
14
client/src/components/ButtonSecondary/index.jsx
Normal file
14
client/src/components/ButtonSecondary/index.jsx
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
import React from 'react';
|
||||||
|
|
||||||
|
const ButtonPrimary = ({ value, onClickHandler }) => {
|
||||||
|
return (
|
||||||
|
<button
|
||||||
|
className={'button button--secondary'}
|
||||||
|
onClick={onClickHandler}
|
||||||
|
>
|
||||||
|
{value}
|
||||||
|
</button>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default ButtonPrimary;
|
14
client/src/components/ButtonTertiary/index.jsx
Normal file
14
client/src/components/ButtonTertiary/index.jsx
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
import React from 'react';
|
||||||
|
|
||||||
|
const ButtonTertiary = ({ value, onClickHandler }) => {
|
||||||
|
return (
|
||||||
|
<button
|
||||||
|
className={'button button--tertiary'}
|
||||||
|
onClick={onClickHandler}
|
||||||
|
>
|
||||||
|
{value}
|
||||||
|
</button>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default ButtonTertiary;
|
38
client/src/components/ChannelCreateNameInput/index.jsx
Normal file
38
client/src/components/ChannelCreateNameInput/index.jsx
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
import React from 'react';
|
||||||
|
import Label from '@components/Label';
|
||||||
|
import PublishDetailsRow from '@components/PublishDetailsRow';
|
||||||
|
|
||||||
|
const ChannelCreateNameInput = ({ value, error, handleNameInput }) => {
|
||||||
|
return (
|
||||||
|
<PublishDetailsRow
|
||||||
|
label={
|
||||||
|
<Label value={'Name:'} />
|
||||||
|
}
|
||||||
|
content={
|
||||||
|
<div className='input-area--primary'>
|
||||||
|
<span>@</span>
|
||||||
|
<input
|
||||||
|
type='text'
|
||||||
|
name='channel'
|
||||||
|
className='input-text'
|
||||||
|
placeholder='exampleChannelName'
|
||||||
|
value={value}
|
||||||
|
onChange={handleNameInput}
|
||||||
|
/>
|
||||||
|
{ (value && !error) && (
|
||||||
|
<span className='info-message--success span--absolute'>
|
||||||
|
{'\u2713'}
|
||||||
|
</span>
|
||||||
|
)}
|
||||||
|
{ error && (
|
||||||
|
<span className='info-message--failure span--absolute'>
|
||||||
|
{'\u2716'}
|
||||||
|
</span>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default ChannelCreateNameInput;
|
26
client/src/components/ChannelCreatePasswordInput/index.jsx
Normal file
26
client/src/components/ChannelCreatePasswordInput/index.jsx
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
import React from 'react';
|
||||||
|
import Label from '@components/Label';
|
||||||
|
import PublishDetailsRow from '@components/PublishDetailsRow';
|
||||||
|
|
||||||
|
const ChannelCreatePasswordInput = ({ value, handlePasswordInput }) => {
|
||||||
|
return (
|
||||||
|
<PublishDetailsRow
|
||||||
|
label={
|
||||||
|
<Label value={'Password:'} />
|
||||||
|
}
|
||||||
|
content={
|
||||||
|
<div className='input-area--primary'>
|
||||||
|
<input
|
||||||
|
type='password'
|
||||||
|
name='password'
|
||||||
|
className='input-text'
|
||||||
|
placeholder=''
|
||||||
|
value={value}
|
||||||
|
onChange={handlePasswordInput} />
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default ChannelCreatePasswordInput;
|
29
client/src/components/ChannelLoginNameInput/index.jsx
Normal file
29
client/src/components/ChannelLoginNameInput/index.jsx
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
import React from 'react';
|
||||||
|
import PublishDetailsRow from '@components/PublishDetailsRow';
|
||||||
|
import Label from '@components/Label';
|
||||||
|
|
||||||
|
const ChannelLoginNameInput = ({ channelName, handleInput }) => {
|
||||||
|
return (
|
||||||
|
<PublishDetailsRow
|
||||||
|
label={
|
||||||
|
<Label value={'Name:'} />
|
||||||
|
}
|
||||||
|
content={
|
||||||
|
<div className='input-area--primary'>
|
||||||
|
<span>@</span>
|
||||||
|
<input
|
||||||
|
type='text'
|
||||||
|
id='channel-login-name-input'
|
||||||
|
className='input-text'
|
||||||
|
name='name'
|
||||||
|
placeholder='Your Channel Name'
|
||||||
|
value={channelName}
|
||||||
|
onChange={handleInput}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default ChannelLoginNameInput;
|
28
client/src/components/ChannelLoginPasswordInput/index.jsx
Normal file
28
client/src/components/ChannelLoginPasswordInput/index.jsx
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
import React from 'react';
|
||||||
|
import PublishDetailsRow from '@components/PublishDetailsRow';
|
||||||
|
import Label from '@components/Label';
|
||||||
|
|
||||||
|
const ChannelLoginPasswordInput = ({ channelPassword, handleInput }) => {
|
||||||
|
return (
|
||||||
|
<PublishDetailsRow
|
||||||
|
label={
|
||||||
|
<Label value={'Password:'} />
|
||||||
|
}
|
||||||
|
content={
|
||||||
|
<div className='input-area--primary'>
|
||||||
|
<input
|
||||||
|
type='password'
|
||||||
|
id='channel-login-password-input'
|
||||||
|
name='password'
|
||||||
|
className='input-text'
|
||||||
|
placeholder=''
|
||||||
|
value={channelPassword}
|
||||||
|
onChange={handleInput}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default ChannelLoginPasswordInput;
|
16
client/src/components/SpaceAround/index.jsx
Normal file
16
client/src/components/SpaceAround/index.jsx
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
import React from 'react';
|
||||||
|
|
||||||
|
class SpaceBetween extends React.Component {
|
||||||
|
shouldComponentUpdate () {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
render () {
|
||||||
|
return (
|
||||||
|
<div className={'space-around'}>
|
||||||
|
{this.props.children}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default SpaceBetween;
|
|
@ -1,4 +1,8 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import ChannelCreateNameInput from '@components/ChannelCreateNameInput';
|
||||||
|
import ChannelCreatePasswordInput from '@components/ChannelCreatePasswordInput';
|
||||||
|
import ButtonPrimary from '@components/ButtonPrimary';
|
||||||
|
import ErrorDisplay from '@components/ErrorDisplay';
|
||||||
import ProgressBar from '@components/ProgressBar';
|
import ProgressBar from '@components/ProgressBar';
|
||||||
|
|
||||||
class ChannelCreateForm extends React.Component {
|
class ChannelCreateForm extends React.Component {
|
||||||
|
@ -55,40 +59,28 @@ class ChannelCreateForm extends React.Component {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
{ !status ? (
|
{ !status ? (
|
||||||
<form id='publish-channel-form'>
|
<div>
|
||||||
<div className='row row--wide row--short'>
|
<ChannelCreateNameInput
|
||||||
<div className='column column--3 column--sml-10'>
|
value={name.value}
|
||||||
<label className='label' htmlFor='new-channel-name'>Name:</label>
|
error={name.error}
|
||||||
</div><div className='column column--6 column--sml-10'>
|
handleNameInput={this.handleNameInput}
|
||||||
<div className='input-text--primary flex-container--row flex-container--left-bottom span--relative'>
|
/>
|
||||||
<span>@</span>
|
<ChannelCreatePasswordInput
|
||||||
<input type='text' name='channel' id='new-channel-name' className='input-text' placeholder='exampleChannelName' value={name.value} onChange={this.handleNameInput} />
|
value={password.value}
|
||||||
{ (name.value && !name.error) && <span id='input-success-channel-name' className='info-message--success span--absolute'>{'\u2713'}</span> }
|
handlePasswordInput={this.handlePasswordInput}
|
||||||
{ name.error && <span id='input-success-channel-name' className='info-message--failure span--absolute'>{'\u2716'}</span> }
|
/>
|
||||||
|
<ErrorDisplay
|
||||||
|
errorMessage={formError}
|
||||||
|
defaultMessage={'Choose a name and password for your channel'}
|
||||||
|
/>
|
||||||
|
<ButtonPrimary
|
||||||
|
value={'Create Channel'}
|
||||||
|
onClickHandler={this.handleSubmit}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div className='row row--wide row--short'>
|
|
||||||
<div className='column column--3 column--sml-10'>
|
|
||||||
<label className='label' htmlFor='new-channel-password'>Password:</label>
|
|
||||||
</div><div className='column column--6 column--sml-10'>
|
|
||||||
<div className='input-text--primary'>
|
|
||||||
<input type='password' name='password' id='new-channel-password' className='input-text' placeholder='' value={password.value} onChange={this.handlePasswordInput} />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{formError ? (
|
|
||||||
<p className='info-message--failure'>{formError}</p>
|
|
||||||
) : (
|
|
||||||
<p className='info-message'>Choose a name and password for your channel</p>
|
|
||||||
)}
|
|
||||||
<div className='row row--wide'>
|
|
||||||
<button className='button--primary' onClick={this.handleSubmit}>Create Channel</button>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
) : (
|
) : (
|
||||||
<div>
|
<div>
|
||||||
<p className='fine-print'>{status}</p>
|
<p className={'fine-print'}>{status}</p>
|
||||||
<ProgressBar size={12} />
|
<ProgressBar size={12} />
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
|
@ -1,55 +1,9 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import request from '../../utils/request';
|
import request from '../../utils/request';
|
||||||
import ErrorDisplay from '@components/ErrorDisplay';
|
import ErrorDisplay from '@components/ErrorDisplay';
|
||||||
import PublishDetailsRow from '@components/PublishDetailsRow';
|
import ChannelLoginNameInput from '@components/ChannelLoginNameInput';
|
||||||
import Label from '@components/Label';
|
import ChannelLoginPasswordInput from '@components/ChannelLoginPasswordInput';
|
||||||
|
import ButtonPrimary from '@components/ButtonPrimary';
|
||||||
const ChannelLoginNameInput = ({ channelName, handleInput }) => {
|
|
||||||
return (
|
|
||||||
<PublishDetailsRow
|
|
||||||
label={
|
|
||||||
<Label value={'Name:'} />
|
|
||||||
}
|
|
||||||
content={
|
|
||||||
<div className='input-area--primary'>
|
|
||||||
<span>@</span>
|
|
||||||
<input
|
|
||||||
type='text'
|
|
||||||
id='channel-login-name-input'
|
|
||||||
className='input-text'
|
|
||||||
name='name'
|
|
||||||
placeholder='Your Channel Name'
|
|
||||||
value={channelName}
|
|
||||||
onChange={handleInput}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
const ChannelLoginPasswordInput = ({ channelPassword, handleInput }) => {
|
|
||||||
return (
|
|
||||||
<PublishDetailsRow
|
|
||||||
label={
|
|
||||||
<Label value={'Password:'} />
|
|
||||||
}
|
|
||||||
content={
|
|
||||||
<div className='input-area--primary'>
|
|
||||||
<input
|
|
||||||
type='password'
|
|
||||||
id='channel-login-password-input'
|
|
||||||
name='password'
|
|
||||||
className='input-text'
|
|
||||||
placeholder=''
|
|
||||||
value={channelPassword}
|
|
||||||
onChange={handleInput}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
class ChannelLoginForm extends React.Component {
|
class ChannelLoginForm extends React.Component {
|
||||||
constructor (props) {
|
constructor (props) {
|
||||||
|
@ -108,7 +62,10 @@ class ChannelLoginForm extends React.Component {
|
||||||
errorMessage={this.state.error}
|
errorMessage={this.state.error}
|
||||||
defaultMessage={'Enter the name and password for your channel'}
|
defaultMessage={'Enter the name and password for your channel'}
|
||||||
/>
|
/>
|
||||||
<button className='button--primary' onClick={this.loginToChannel}>Authenticate</button>
|
<ButtonPrimary
|
||||||
|
value={'Authenticate'}
|
||||||
|
onClickHandler={this.loginToChannel}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,9 @@ import PublishThumbnailInput from '@containers/PublishThumbnailInput';
|
||||||
import PublishMetadataInputs from '@containers/PublishMetadataInputs';
|
import PublishMetadataInputs from '@containers/PublishMetadataInputs';
|
||||||
import ChannelSelect from '@containers/ChannelSelect';
|
import ChannelSelect from '@containers/ChannelSelect';
|
||||||
import Row from '@components/Row';
|
import Row from '@components/Row';
|
||||||
|
import ButtonPrimaryJumbo from '@components/ButtonPrimaryJumbo';
|
||||||
|
import ButtonTertiary from '@components/ButtonTertiary';
|
||||||
|
import SpaceAround from '@components/SpaceAround';
|
||||||
|
|
||||||
class PublishDetails extends React.Component {
|
class PublishDetails extends React.Component {
|
||||||
constructor (props) {
|
constructor (props) {
|
||||||
|
@ -36,23 +39,24 @@ class PublishDetails extends React.Component {
|
||||||
</Row>
|
</Row>
|
||||||
|
|
||||||
<Row>
|
<Row>
|
||||||
<button
|
<ButtonPrimaryJumbo
|
||||||
id='publish-submit'
|
value={'Publish'}
|
||||||
className='button--primary button--large'
|
onClickHandler={this.onPublishSubmit}
|
||||||
onClick={this.onPublishSubmit}
|
/>
|
||||||
>
|
|
||||||
Publish
|
|
||||||
</button>
|
|
||||||
</Row>
|
</Row>
|
||||||
|
|
||||||
<Row>
|
<Row>
|
||||||
<button className='button--cancel' onClick={this.props.clearFile}>Cancel</button>
|
<SpaceAround>
|
||||||
|
<ButtonTertiary
|
||||||
|
value={'Cancel'}
|
||||||
|
onClickHandler={this.props.clearFile}
|
||||||
|
/>
|
||||||
|
</SpaceAround>
|
||||||
</Row>
|
</Row>
|
||||||
|
|
||||||
<Row>
|
<Row>
|
||||||
<p className='fine-print'>By clicking 'Publish', you affirm that you have the rights to publish this content to the LBRY network, and that you understand the properties of publishing it to a decentralized, user-controlled network. <a className='link--primary' target='_blank' href='https://lbry.io/learn'>Read more.</a></p>
|
<p className='fine-print'>By clicking 'Publish', you affirm that you have the rights to publish this content to the LBRY network, and that you understand the properties of publishing it to a decentralized, user-controlled network. <a className='link--primary' target='_blank' href='https://lbry.io/learn'>Read more.</a></p>
|
||||||
</Row>
|
</Row>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,7 @@ import React from 'react';
|
||||||
import PublishDescriptionInput from '@components/PublishDescriptionInput';
|
import PublishDescriptionInput from '@components/PublishDescriptionInput';
|
||||||
import PublishLicenseInput from '@components/PublishLicenseInput';
|
import PublishLicenseInput from '@components/PublishLicenseInput';
|
||||||
import PublishNsfwInput from '@components/PublishNsfwInput';
|
import PublishNsfwInput from '@components/PublishNsfwInput';
|
||||||
|
import ButtonSecondary from '@components/ButtonSecondary';
|
||||||
|
|
||||||
class PublishMetadataInputs extends React.Component {
|
class PublishMetadataInputs extends React.Component {
|
||||||
constructor (props) {
|
constructor (props) {
|
||||||
|
@ -33,23 +34,19 @@ class PublishMetadataInputs extends React.Component {
|
||||||
description={this.props.description}
|
description={this.props.description}
|
||||||
handleInput={this.handleInput}
|
handleInput={this.handleInput}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<PublishLicenseInput
|
<PublishLicenseInput
|
||||||
handleSelect={this.handleSelect}
|
handleSelect={this.handleSelect}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<PublishNsfwInput
|
<PublishNsfwInput
|
||||||
nsfw={this.props.nsfw}
|
nsfw={this.props.nsfw}
|
||||||
handleInput={this.handleInput}
|
handleInput={this.handleInput}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
<button
|
<ButtonSecondary
|
||||||
className='button--secondary'
|
value={this.props.showMetadataInputs ? 'less' : 'more'}
|
||||||
onClick={this.toggleShowInputs}
|
onClickHandler={this.toggleShowInputs}
|
||||||
>
|
/>
|
||||||
{this.props.showMetadataInputs ? 'less' : 'more'}
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue