From 0c091475df093311916c79104098f67fdfcf4d4c Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Mon, 20 Aug 2018 12:49:49 +0200 Subject: Make non-link ColumnLinks behave as links --- .../flavours/glitch/features/ui/components/column_link.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'app/javascript/flavours') diff --git a/app/javascript/flavours/glitch/features/ui/components/column_link.js b/app/javascript/flavours/glitch/features/ui/components/column_link.js index b058aa963..1b6d7d09e 100644 --- a/app/javascript/flavours/glitch/features/ui/components/column_link.js +++ b/app/javascript/flavours/glitch/features/ui/components/column_link.js @@ -22,8 +22,13 @@ const ColumnLink = ({ icon, text, to, onClick, href, method, badge }) => { ); } else { + const handleOnClick = (e) => { + e.preventDefault(); + e.stopPropagation(); + return onClick(e); + } return ( - + {text} {badgeElement} -- cgit From 24f39c08419093b2559d44e866d14af0151ab7a8 Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Mon, 20 Aug 2018 11:14:02 +0200 Subject: [Glitch] Skip pagination logic entirely for pinned toots --- app/javascript/flavours/glitch/actions/timelines.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/javascript/flavours') diff --git a/app/javascript/flavours/glitch/actions/timelines.js b/app/javascript/flavours/glitch/actions/timelines.js index 9597fe89d..7f1ff8e3b 100644 --- a/app/javascript/flavours/glitch/actions/timelines.js +++ b/app/javascript/flavours/glitch/actions/timelines.js @@ -72,7 +72,7 @@ export function expandTimeline(timelineId, path, params = {}, done = noOp) { return; } - if (!params.max_id && timeline.get('items', ImmutableList()).size > 0) { + if (!params.max_id && !params.pinned && timeline.get('items', ImmutableList()).size > 0) { params.since_id = timeline.getIn(['items', 0]); } -- cgit From b230c04e005d41df056c875be1db70b0762621b0 Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Sun, 19 Aug 2018 17:14:30 +0200 Subject: Make the privacy dropdown button not look strange when using top placement Inspired by 8fe1f8d4cecb9f2f749c1e1e77b2439dd640ddc5 --- .../flavours/glitch/features/composer/options/dropdown/index.js | 1 + app/javascript/flavours/glitch/styles/components/composer.scss | 6 ++++++ 2 files changed, 7 insertions(+) (limited to 'app/javascript/flavours') diff --git a/app/javascript/flavours/glitch/features/composer/options/dropdown/index.js b/app/javascript/flavours/glitch/features/composer/options/dropdown/index.js index b3462e25a..8cfbac1bb 100644 --- a/app/javascript/flavours/glitch/features/composer/options/dropdown/index.js +++ b/app/javascript/flavours/glitch/features/composer/options/dropdown/index.js @@ -168,6 +168,7 @@ export default class ComposerOptionsDropdown extends React.PureComponent { const computedClass = classNames('composer--options--dropdown', { active, open, + top: placement === 'top', }); // The result. diff --git a/app/javascript/flavours/glitch/styles/components/composer.scss b/app/javascript/flavours/glitch/styles/components/composer.scss index fab94d8c3..2267b798c 100644 --- a/app/javascript/flavours/glitch/styles/components/composer.scss +++ b/app/javascript/flavours/glitch/styles/components/composer.scss @@ -406,6 +406,12 @@ background: $ui-highlight-color; transition: none; } + &.top { + & > .value { + border-radius: 0 0 4px 4px; + box-shadow: 0 4px 4px rgba($base-shadow-color, 0.1); + } + } } } -- cgit From c78918162642649ce294d89effbf2e815c2aa327 Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Mon, 20 Aug 2018 11:12:19 +0200 Subject: [Glitch] Add hotkey for follow requests Port 25f6f41052b52a765a74e9e16d7411750ae46221 to glitch-soc --- app/javascript/flavours/glitch/features/ui/index.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'app/javascript/flavours') diff --git a/app/javascript/flavours/glitch/features/ui/index.js b/app/javascript/flavours/glitch/features/ui/index.js index 7024e60da..d58e11b55 100644 --- a/app/javascript/flavours/glitch/features/ui/index.js +++ b/app/javascript/flavours/glitch/features/ui/index.js @@ -92,6 +92,7 @@ const keyMap = { goToProfile: 'g u', goToBlocked: 'g b', goToMuted: 'g m', + goToRequests: 'g r', toggleSpoiler: 'x', }; @@ -369,6 +370,10 @@ export default class UI extends React.Component { this.props.history.push('/mutes'); } + handleHotkeyGoToRequests = () => { + this.props.history.push('/follow_requests'); + } + render () { const { width, draggingOver } = this.state; const { children, layout, isWide, navbarUnder, dropdownMenuIsOpen } = this.props; @@ -408,6 +413,7 @@ export default class UI extends React.Component { goToProfile: this.handleHotkeyGoToProfile, goToBlocked: this.handleHotkeyGoToBlocked, goToMuted: this.handleHotkeyGoToMuted, + goToRequests: this.handleHotkeyGoToRequests, }; return ( -- cgit