From 8d09b03064ecadf0884a2a3b815a064660ee978a Mon Sep 17 00:00:00 2001 From: Sean Yesmunt Date: Fri, 15 Jun 2018 13:06:40 -0400 Subject: [PATCH 1/4] fix: show tip/speech links on videos --- src/renderer/page/file/view.jsx | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/src/renderer/page/file/view.jsx b/src/renderer/page/file/view.jsx index 83d30fb84..5cfe94cee 100644 --- a/src/renderer/page/file/view.jsx +++ b/src/renderer/page/file/view.jsx @@ -195,22 +195,21 @@ class FilePage extends React.Component { )} - {!claimIsMine || - (speechSharable && ( -
- {!claimIsMine && ( -
- ))} + {(!claimIsMine || speechSharable) && ( +
+ {!claimIsMine && ( +
+ )} Date: Fri, 15 Jun 2018 13:18:15 -0400 Subject: [PATCH 2/4] fix no thumbnail style on search page --- src/renderer/scss/component/_card.scss | 12 ++++++------ src/renderer/scss/component/_content.scss | 4 ++++ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/renderer/scss/component/_card.scss b/src/renderer/scss/component/_card.scss index b2c964fc5..a504fc232 100644 --- a/src/renderer/scss/component/_card.scss +++ b/src/renderer/scss/component/_card.scss @@ -27,17 +27,17 @@ padding-top: var(--video-aspect-ratio); } + .card__media-text { + // for the weird padding required for dynamic height + // this lets the text sit in the middle instead of the bottom + margin-top: calc(var(--video-aspect-ratio) * -1); + } + .channel-name { font-size: 12px; } } -.card__media-text { - // for the weird padding required for dynamic height - // this lets the text sit in the middle instead of the bottom - margin-top: calc(var(--video-aspect-ratio) * -1); -} - .card--link { cursor: pointer; } diff --git a/src/renderer/scss/component/_content.scss b/src/renderer/scss/component/_content.scss index 6fe2194ee..4a245129a 100644 --- a/src/renderer/scss/component/_content.scss +++ b/src/renderer/scss/component/_content.scss @@ -90,6 +90,10 @@ &.content__empty--nsfw { background-color: var(--color-nsfw); } + + .card__media-text { + margin-top: calc(var(--video-aspect-ratio) * -1); + } } img { From 1d8d338629890637a972ec83d7cf2158a407bf47 Mon Sep 17 00:00:00 2001 From: Sean Yesmunt Date: Fri, 15 Jun 2018 16:11:02 -0400 Subject: [PATCH 3/4] add toggle style for autoplay --- package.json | 1 + .../common/form-components/form-field.jsx | 5 + src/renderer/component/common/tooltip.jsx | 4 +- src/renderer/page/file/view.jsx | 18 ++- src/renderer/scss/_vars.scss | 1 + src/renderer/scss/all.scss | 1 + src/renderer/scss/component/_toggle.scss | 112 ++++++++++++++++++ src/renderer/scss/component/_tooltip.scss | 6 +- yarn.lock | 6 + 9 files changed, 147 insertions(+), 7 deletions(-) create mode 100644 src/renderer/scss/component/_toggle.scss diff --git a/package.json b/package.json index 70dc93f75..59deb6a5c 100644 --- a/package.json +++ b/package.json @@ -61,6 +61,7 @@ "react-paginate": "^5.2.1", "react-redux": "^5.0.3", "react-simplemde-editor": "^3.6.15", + "react-toggle": "^4.0.2", "react-transition-group": "1.x", "redux": "^3.6.0", "redux-logger": "^3.0.1", diff --git a/src/renderer/component/common/form-components/form-field.jsx b/src/renderer/component/common/form-components/form-field.jsx index 4029cbd1e..3a530ea64 100644 --- a/src/renderer/component/common/form-components/form-field.jsx +++ b/src/renderer/component/common/form-components/form-field.jsx @@ -5,6 +5,7 @@ import classnames from 'classnames'; import MarkdownPreview from 'component/common/markdown-preview'; import SimpleMDE from 'react-simplemde-editor'; import 'simplemde/dist/simplemde.min.css'; +import Toggle from 'react-toggle'; type Props = { name: string, @@ -21,6 +22,7 @@ type Props = { children?: React.Node, stretch?: boolean, affixClass?: string, // class applied to prefix/postfix label + useToggle?: boolean, }; export class FormField extends React.PureComponent { @@ -37,6 +39,7 @@ export class FormField extends React.PureComponent { children, stretch, affixClass, + useToggle, ...inputProps } = this.props; @@ -68,6 +71,8 @@ export class FormField extends React.PureComponent { ); } else if (type === 'textarea') { input =