diff --git a/frontend/squeak-node-frontend/src/components/SqueakDetailItem/SqueakDetailItem.js b/frontend/squeak-node-frontend/src/components/SqueakDetailItem/SqueakDetailItem.js
index 7b30e22d..5ccf34c1 100644
--- a/frontend/squeak-node-frontend/src/components/SqueakDetailItem/SqueakDetailItem.js
+++ b/frontend/squeak-node-frontend/src/components/SqueakDetailItem/SqueakDetailItem.js
@@ -14,6 +14,8 @@ import { MoreVert as MoreIcon } from "@material-ui/icons";
import {useHistory} from "react-router-dom";
import classnames from "classnames";
+import LockIcon from '@material-ui/icons/Lock';
+
import ReplyIcon from '@material-ui/icons/Reply';
import RepeatIcon from '@material-ui/icons/Repeat';
import FavoriteIcon from '@material-ui/icons/Favorite';
@@ -65,11 +67,54 @@ export default function SqueakDetailItem({
}
}
+ function SqueakUnlockedContent() {
+ return (
+ {squeak.getContentStr()}
+
+ )
+ }
+
+ function SqueakLockedContent() {
+ return (
+ <>
+
+ >
+ )
+ }
+
+ function SqueakContent() {
+ return (
+ <>
+ {squeak.getIsUnlocked()
+ ? SqueakUnlockedContent()
+ : SqueakLockedContent()
+ }
+ >
+ )
+ }
+
+ function SqueakLockedBackgroundColor() {
+ return {backgroundColor: 'lightgray'};
+ }
+
+ function SqueakUnlockedBackgroundColor() {
+ return {backgroundColor: 'white'};
+ }
+
+ function SqueakBackgroundColor() {
+ return squeak.getIsUnlocked()
+ ? SqueakUnlockedBackgroundColor()
+ : SqueakLockedBackgroundColor()
+ }
+
return (
- {squeak.getIsUnlocked()
- ? squeak.getContentStr()
- : "Content is locked."
- }
-
+ {SqueakContent()}
{
@@ -49,11 +47,54 @@ export default function SqueakThreadItem({
}
}
+ function SqueakUnlockedContent() {
+ return (
+ {squeak.getContentStr()}
+
+ )
+ }
+
+ function SqueakLockedContent() {
+ return (
+ <>
+
+ >
+ )
+ }
+
+ function SqueakContent() {
+ return (
+ <>
+ {squeak.getIsUnlocked()
+ ? SqueakUnlockedContent()
+ : SqueakLockedContent()
+ }
+ >
+ )
+ }
+
+ function SqueakLockedBackgroundColor() {
+ return {backgroundColor: 'lightgray'};
+ }
+
+ function SqueakUnlockedBackgroundColor() {
+ return {backgroundColor: 'white'};
+ }
+
+ function SqueakBackgroundColor() {
+ return squeak.getIsUnlocked()
+ ? SqueakUnlockedBackgroundColor()
+ : SqueakLockedBackgroundColor()
+ }
+
return (
- {squeak.getIsUnlocked()
- ? squeak.getContentStr()
- : "Content is locked."
- }
-
+ {SqueakContent()}
-
+
{new Date(squeak.getBlockTime()*1000).toString()} (Block # {squeak.getBlockHeight()})