about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch
diff options
context:
space:
mode:
authorpluralcafe-docker <git@plural.cafe>2019-01-16 19:42:22 +0000
committerpluralcafe-docker <git@plural.cafe>2019-01-16 19:42:22 +0000
commitfb7ec403227690f897a9a693f2461b94bf7e2582 (patch)
tree043d220748575a444b8628d8c4bf2e5225a92a00 /app/javascript/flavours/glitch
parentae24ef877b82466cab026a76ea6ed8598ddaae18 (diff)
parent530d29148ca0c5bf29f6fa516b1ef4f91d95894b (diff)
Merge branch 'glitch'
Diffstat (limited to 'app/javascript/flavours/glitch')
-rw-r--r--app/javascript/flavours/glitch/components/hashtag.js6
-rw-r--r--app/javascript/flavours/glitch/features/ui/index.js1
-rw-r--r--app/javascript/flavours/glitch/packs/public.js6
-rw-r--r--app/javascript/flavours/glitch/styles/about.scss3
-rw-r--r--app/javascript/flavours/glitch/styles/admin.scss10
5 files changed, 17 insertions, 9 deletions
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 }) => (
   <div className='trends__item'>
     <div className='trends__item__name'>
-      <Link to={`/timelines/tag/${hashtag.get('name')}`}>
+      <Permalink href={hashtag.get('url')} to={`/timelines/tag/${hashtag.get('name')}`}>
         #<span>{hashtag.get('name')}</span>
-      </Link>
+      </Permalink>
 
       <FormattedMessage id='trends.count_by_accounts' defaultMessage='{count} {rawCount, plural, one {person} other {people}} talking' values={{ rawCount: hashtag.getIn(['history', 0, 'accounts']), count: <strong>{shortNumberFormat(hashtag.getIn(['history', 0, 'accounts']))}</strong> }} />
     </div>
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));
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(<MediaContainer locale={locale} components={reactComponents} />, content);
diff --git a/app/javascript/flavours/glitch/styles/about.scss b/app/javascript/flavours/glitch/styles/about.scss
index f676a8c77..c8d144e5b 100644
--- a/app/javascript/flavours/glitch/styles/about.scss
+++ b/app/javascript/flavours/glitch/styles/about.scss
@@ -1270,8 +1270,7 @@ $small-breakpoint: 960px;
       }
 
       #mastodon-timeline {
-        display: block;
-        width: 100vw;
+        display: flex;
         height: 100vh;
         border-radius: 0;
       }
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;