diff --git a/phone/src/apps/twitter/components/MediaDisplay.js b/phone/src/apps/twitter/components/MediaDisplay.js
index 6b9e112..fea449f 100644
--- a/phone/src/apps/twitter/components/MediaDisplay.js
+++ b/phone/src/apps/twitter/components/MediaDisplay.js
@@ -1,32 +1,76 @@
-import React from "react";
+import React, { useCallback } from "react";
+import { IconButton } from "@material-ui/core";
import { makeStyles } from "@material-ui/core/styles";
+import CloseIcon from "@material-ui/icons/Close";
import types from "../types";
const useStyles = makeStyles((theme) => ({
root: {
margin: "2px 15px",
},
+ mediaImage: {
+ // catch the close button here so it doesn't go all the way up to the modal
+ position: "relative",
+ display: "inline-block",
+ },
+ imgButton: {
+ position: "absolute", // show the close button in the top right of the image
+ top: "2px",
+ right: "5px",
+ backgroundColor: "#000",
+ opacity: 0.7,
+ "&:hover": {
+ // fixes a bug where when the user closes one image material-ui puts
+ // the hover status on the previous image
+ backgroundColor: "#000",
+ },
+ },
img: {
- maxHeight: "125px",
+ maxHeight: "125px", // constrain images so we don't overwhelm the UI
+ maxWidth: "500px",
+ padding: "0px 3px 3px 0px",
},
}));
-export const Media = ({ mediaType, mediaLink }) => {
+export const MediaImage = ({ mediaLink, handleClick }) => {
const classes = useStyles();
+ return (
+
);
};
diff --git a/phone/yarn.lock b/phone/yarn.lock
index b127ba9..19465f2 100644
--- a/phone/yarn.lock
+++ b/phone/yarn.lock
@@ -11415,6 +11415,11 @@ uuid@^3.3.2, uuid@^3.4.0:
resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee"
integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==
+uuid@^8.3.0:
+ version "8.3.0"
+ resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.0.tgz#ab738085ca22dc9a8c92725e459b1d507df5d6ea"
+ integrity sha512-fX6Z5o4m6XsXBdli9g7DtWgAx+osMsRRZFKma1mIUsLCz6vRvv+pz5VNbyu9UEDzpMWulZfvpgb/cmDXVulYFQ==
+
v8-compile-cache@^2.0.3, v8-compile-cache@^2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.1.1.tgz#54bc3cdd43317bca91e35dcaf305b1a7237de745"
diff --git a/resources/config.lua b/resources/config.lua
index 923f3ad..218ddb5 100644
--- a/resources/config.lua
+++ b/resources/config.lua
@@ -9,5 +9,4 @@ Config.PhoneAsItem = false
Config.twitter = {}
Config.twitter.characterLimit = 240
Config.twitter.renderImages = true -- whether or not links to images are automatically rendered on the UI
-Config.twitter.renderGifs = true -- whether or not links to gifs are automatically rendered on the UI
-Config.twitter.renderVideos = true -- whether or not links to videos are automatically rendered on the UI
+Config.twitter.maxImages = 3 -- max amount of images that can be attached to a single tweet