From 278ff1318fd9772f3663e7540b9ece020c73a953 Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Sun, 13 Jan 2019 14:42:50 +0100 Subject: [Glitch] Add attachment list fallback to public pages Port JS changes from 4fb94c758e3bf2e1c0525e9075c2d5dedc14c666 to glitch-soc --- app/javascript/flavours/glitch/packs/public.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'app/javascript/flavours') diff --git a/app/javascript/flavours/glitch/packs/public.js b/app/javascript/flavours/glitch/packs/public.js index 342c5265e..56012ba78 100644 --- a/app/javascript/flavours/glitch/packs/public.js +++ b/app/javascript/flavours/glitch/packs/public.js @@ -61,6 +61,12 @@ function main() { if (reactComponents.length > 0) { import(/* webpackChunkName: "containers/media_container" */ 'flavours/glitch/containers/media_container') .then(({ default: MediaContainer }) => { + [].forEach.call(reactComponents, (component) => { + [].forEach.call(component.children, (child) => { + component.removeChild(child); + }); + }); + const content = document.createElement('div'); ReactDOM.render(, content); -- cgit From 2c5f0f12aca01a91c2e67061c0e676fbd4963139 Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Sun, 13 Jan 2019 20:40:46 +0100 Subject: [Glitch] change height on narrow view to take 100% of screen Port 11832460431bb6b3196daf17656c2cc76e8ae63d to glitch-soc --- app/javascript/flavours/glitch/styles/about.scss | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'app/javascript/flavours') diff --git a/app/javascript/flavours/glitch/styles/about.scss b/app/javascript/flavours/glitch/styles/about.scss index f676a8c77..da50581fb 100644 --- a/app/javascript/flavours/glitch/styles/about.scss +++ b/app/javascript/flavours/glitch/styles/about.scss @@ -1044,6 +1044,10 @@ $small-breakpoint: 960px; .scrollable { height: 400px; + + @media screen and (max-width: $column-breakpoint) { + height: 90vh; + } } p { -- cgit From 4cec7a77c37e23117323a4ed8f609939ab50b4d6 Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Sun, 13 Jan 2019 20:41:38 +0100 Subject: [Glitch] Adjust admin UI right panel size Port 9ee9cb549b58a33a81a9da318cbdc26ed2e47788 to glitch-soc --- app/javascript/flavours/glitch/styles/admin.scss | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'app/javascript/flavours') diff --git a/app/javascript/flavours/glitch/styles/admin.scss b/app/javascript/flavours/glitch/styles/admin.scss index e7124a2c0..4e969601b 100644 --- a/app/javascript/flavours/glitch/styles/admin.scss +++ b/app/javascript/flavours/glitch/styles/admin.scss @@ -1,4 +1,6 @@ $no-columns-breakpoint: 600px; +$sidebar-width: 240px; +$content-width: 840px; .admin-wrapper { display: flex; @@ -6,7 +8,7 @@ $no-columns-breakpoint: 600px; height: 100%; .sidebar-wrapper { - flex: 1; + flex: 1 1 $sidebar-width; height: 100%; background: $ui-base-color; display: flex; @@ -14,7 +16,7 @@ $no-columns-breakpoint: 600px; } .sidebar { - width: 240px; + width: $sidebar-width; height: 100%; padding: 0; overflow-y: auto; @@ -95,12 +97,12 @@ $no-columns-breakpoint: 600px; } .content-wrapper { - flex: 2; + flex: 2 1 $content-width; overflow: auto; } .content { - max-width: 700px; + max-width: $content-width; padding: 20px 15px; padding-top: 60px; padding-left: 25px; -- cgit From ad32896a936d8e427e419637ce0243be376a115c Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Wed, 16 Jan 2019 14:24:23 +0100 Subject: [Glitch] Fix hashtag timeline on mobile Port c5b8824a3e5fa43470d12c4ef96eda3e62e10436 to glitch-soc --- app/javascript/flavours/glitch/styles/about.scss | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'app/javascript/flavours') diff --git a/app/javascript/flavours/glitch/styles/about.scss b/app/javascript/flavours/glitch/styles/about.scss index da50581fb..c8d144e5b 100644 --- a/app/javascript/flavours/glitch/styles/about.scss +++ b/app/javascript/flavours/glitch/styles/about.scss @@ -1044,10 +1044,6 @@ $small-breakpoint: 960px; .scrollable { height: 400px; - - @media screen and (max-width: $column-breakpoint) { - height: 90vh; - } } p { @@ -1274,8 +1270,7 @@ $small-breakpoint: 960px; } #mastodon-timeline { - display: block; - width: 100vw; + display: flex; height: 100vh; border-radius: 0; } -- cgit From 92830029cac92a60719bd9f9cabc5392d0cdf968 Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Wed, 16 Jan 2019 14:25:58 +0100 Subject: [Glitch] Make hashtag search results link to the hashtag URL Port 6cfb357940b3855ce53f6d1dfd87b1b32840a302 to glitch-soc --- app/javascript/flavours/glitch/components/hashtag.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'app/javascript/flavours') diff --git a/app/javascript/flavours/glitch/components/hashtag.js b/app/javascript/flavours/glitch/components/hashtag.js index 88689cc6c..d75edd994 100644 --- a/app/javascript/flavours/glitch/components/hashtag.js +++ b/app/javascript/flavours/glitch/components/hashtag.js @@ -1,16 +1,16 @@ import React from 'react'; import { Sparklines, SparklinesCurve } from 'react-sparklines'; -import { Link } from 'react-router-dom'; import { FormattedMessage } from 'react-intl'; import ImmutablePropTypes from 'react-immutable-proptypes'; +import Permalink from './permalink'; import { shortNumberFormat } from 'flavours/glitch/util/numbers'; const Hashtag = ({ hashtag }) => (
- + #{hashtag.get('name')} - + {shortNumberFormat(hashtag.getIn(['history', 0, 'accounts']))} }} />
-- cgit From 5684cd090caec27729d78c204911348a0cf62cbf Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Wed, 16 Jan 2019 14:50:17 +0100 Subject: [Glitch] make draggingOver state off correctly Port d6433b393162bcfd7c6cfaf18abb9d6b6f6aef11 to glitch-soc --- app/javascript/flavours/glitch/features/ui/index.js | 1 + 1 file changed, 1 insertion(+) (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 f043f767e..7928dfe6c 100644 --- a/app/javascript/flavours/glitch/features/ui/index.js +++ b/app/javascript/flavours/glitch/features/ui/index.js @@ -182,6 +182,7 @@ export default class UI extends React.Component { e.preventDefault(); this.setState({ draggingOver: false }); + this.dragTargets = []; if (e.dataTransfer && e.dataTransfer.files.length === 1) { this.props.dispatch(uploadCompose(e.dataTransfer.files)); -- cgit