-
diff --git a/packages/app/src/components/PostCard/components/actions/index.less b/packages/app/src/components/PostCard/components/actions/index.less
index eec0677d..8d5e3e7b 100755
--- a/packages/app/src/components/PostCard/components/actions/index.less
+++ b/packages/app/src/components/PostCard/components/actions/index.less
@@ -1,93 +1,47 @@
-.post_actionsIndicator {
+.post_actions_wrapper {
display: flex;
flex-direction: row;
align-items: center;
- justify-content: center;
+ justify-content: flex-start;
- width: 10vw;
- padding: 2px;
-
- margin: auto;
-
- border-radius: 8px 8px 0 0;
- background-color: var(--background-color-primary);
- color: var(--background-color-contrast);
-
- font-size: 18px;
-
- transition: all 0.2s ease-in-out;
-
- svg {
- margin: 0 !important;
- }
-}
-
-.post_actionsWrapper {
- display: flex;
- flex-direction: row;
- align-items: center;
- justify-content: center;
-
- position: absolute;
- bottom: 0;
- left: 0;
-
- opacity: 0;
+ position: relative;
width: 100%;
height: 40px;
- margin-top: 15px;
- padding: 10px;
+ padding: 20px;
- border-radius: 8px;
transition: all 0.2s ease-in-out;
- background-color: var(--background-color-primary);
-
.actions {
display: inline-flex;
flex-direction: row;
- align-items: center;
- justify-content: space-between;
-
- width: 80%;
transition: all 0.2s ease-in-out;
- color: var(--background-color-contrast);
+ width: 100%;
.action {
display: inline-flex;
- flex-direction: column;
+ flex-direction: row;
- transition: all 0.2s ease-in-out;
+ align-items: center;
+ justify-content: center;
- .icon {
- cursor: pointer;
- transition: all 0.2s ease-in-out;
+ transition: all 150ms ease-in-out;
- svg {
- transition: all 0.2s ease-in-out;
- }
+ margin-right: 20px;
+
+
+ &:last-child {
+ margin-right: 0;
}
- .value {
- position: absolute;
- bottom: 0;
-
- font-size: 14px;
- font-family: "DM Mono", monospace;
-
- transform: translate(0, 50%);
- transition: all 0.2s ease-in-out;
- }
- }
-
- .action:hover {
- .icon {
- svg {
- color: var(--primaryColor) !important;
+ &:hover {
+ .icon {
+ svg {
+ color: var(--colorPrimary) !important;
+ }
}
}
}
@@ -95,22 +49,5 @@
svg {
margin: 0 !important;
}
-
- >div {
- display: flex;
- flex-direction: row;
- align-items: center;
- justify-content: center;
-
- border-radius: 360px;
- width: 55px;
- height: 55px;
-
- font-size: 20px;
- padding: 2px;
-
- background-color: var(--background-color-primary);
- transform: translate(0, -15px);
- }
}
}
\ No newline at end of file
diff --git a/packages/app/src/components/PostCard/components/actions/likeButton/index.jsx b/packages/app/src/components/PostCard/components/actions/likeButton/index.jsx
index 79a0146c..cb7cc217 100755
--- a/packages/app/src/components/PostCard/components/actions/likeButton/index.jsx
+++ b/packages/app/src/components/PostCard/components/actions/likeButton/index.jsx
@@ -1,5 +1,6 @@
import React from "react"
import classnames from "classnames"
+import CountUp from "react-countup"
import "./index.less"
@@ -22,27 +23,37 @@ export default (props) => {
setLiked(to)
}
- return
+
+
+
}
\ No newline at end of file
diff --git a/packages/app/src/components/PostCard/components/actions/likeButton/index.less b/packages/app/src/components/PostCard/components/actions/likeButton/index.less
index fa9f9e08..9c44f12e 100755
--- a/packages/app/src/components/PostCard/components/actions/likeButton/index.less
+++ b/packages/app/src/components/PostCard/components/actions/likeButton/index.less
@@ -1,118 +1,161 @@
-@color-heart : #EA442B;
+@color-heart : #EA442B;
@likeAnimationDuration : .5s;
-@likeAnimationEasing : cubic-bezier(.7, 0, .3, 1);
+@likeAnimationEasing : cubic-bezier(.7, 0, .3, 1);
-.likeButton {
- display : flex;
- align-items : center;
- justify-content: center;
+.like_btn_wrapper {
+ display: flex;
+ flex-direction: row;
+ align-items: center;
- .ripple,
- .ripple:before,
- .ripple:after {
- position : relative;
- box-sizing: border-box;
+ font-size: 1rem;
+
+ .count {
+ display: flex;
+ flex-direction: row;
+
+ align-items: center;
+
+ margin-left: 7px;
+ font-size: 0.8rem;
+
+ color: var(--text-color);
}
- font-size : 40px;
- border : none;
- border-radius: 50%;
- width : 1em;
- height : 1em;
- padding : 0;
- margin : 0;
- outline : none;
- z-index : 2;
- transition : transform @likeAnimationDuration @likeAnimationEasing;
- cursor : pointer;
+ //padding: 10px;
+ //border-radius: 8px;
- background-color: transparent;
+ transition: all @likeAnimationDuration @likeAnimationEasing;
- &:before {
- z-index : -1;
- content : '';
- position : absolute;
- top : 0;
- left : 0;
- width : 100%;
- height : 100%;
- border-radius: inherit;
- transition : inherit;
- }
+ &.liked {
+ .like_btn {
+ .heart {
+ >path {
+ stroke: var(--colorPrimary);
+ fill: var(--colorPrimary);
+ }
- &:after {
- content : '';
- position : absolute;
- top : 0;
- left : 0;
- width : 100%;
- height : 100%;
- border-radius: inherit;
- z-index : -1;
- }
-
- .heart {
- position: relative;
-
- >path {
- stroke-width: 2;
- transition : fill @likeAnimationDuration @likeAnimationEasing;
- stroke : currentColor;
- fill : transparent;
- }
-
- &.liked {
- >path {
- stroke: var(--primaryColor);
- fill : var(--primaryColor);
+ filter: drop-shadow(0px 0px 2px var(--colorPrimary));
}
}
- &.clicked {
- animation: heart-bounce @likeAnimationDuration @likeAnimationEasing;
+ //outline: 1px solid var(--colorPrimary);
+ }
- @keyframes heart-bounce {
- 40% {
- transform: scale(0.7);
+ &.clicked {
+ .like_btn {
+ .heart {
+ animation: heart-bounce @likeAnimationDuration @likeAnimationEasing;
+
+ @keyframes heart-bounce {
+ 40% {
+ transform: scale(0.7);
+ }
+
+ 0%,
+ 80%,
+ 100% {
+ transform: scale(1);
+ }
}
+ }
- 0%,
- 80%,
- 100% {
- transform: scale(1);
+ .ripple {
+ &:before {
+ animation: ripple-out @likeAnimationDuration @likeAnimationEasing;
}
}
}
-
- animation: none;
}
- .ripple {
- position : absolute;
- height : 1em;
- width : 1em;
+ .like_btn {
+ display: flex;
+
+ align-items: center;
+ justify-content: center;
+
+ .ripple,
+ .ripple:before,
+ .ripple:after {
+ position: relative;
+ box-sizing: border-box;
+ }
+
+ border: none;
border-radius: 50%;
- overflow : hidden;
- z-index : 1;
+
+ width: 1rem;
+ height: 1rem;
+
+ padding: 0;
+ margin: 0;
+
+ z-index: 2;
+
+ transition: transform @likeAnimationDuration @likeAnimationEasing;
+
+ background-color: transparent;
&:before {
- content : '';
- position : absolute;
- top : 0;
- left : 0;
- width : 100%;
- height : 100%;
- border : .4em solid var(--primaryColor);
+ z-index: -1;
+ content: '';
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 1rem;
+ height: 1rem;
border-radius: inherit;
- transform : scale(0);
+ transition: inherit;
}
- &.clicked {
+ &:after {
+ content: '';
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 1rem;
+ height: 1rem;
+ border-radius: inherit;
+ z-index: -1;
+ }
+
+ .heart {
+ position: relative;
+
+ cursor: pointer;
+
+ >path {
+ stroke-width: 2;
+ transition: fill @likeAnimationDuration @likeAnimationEasing;
+ stroke: currentColor;
+ fill: transparent;
+ }
+
+ animation: none;
+ }
+
+ .ripple {
+ position: absolute;
+
+ height: 1rem;
+ width: 1rem;
+
+ border-radius: 50%;
+ overflow: hidden;
+
+ z-index: 1;
+
&:before {
- animation: ripple-out @likeAnimationDuration @likeAnimationEasing;
+ content: '';
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ border: .4em solid var(--colorPrimary);
+ border-radius: inherit;
+ transform: scale(0);
}
}
-
}
}
diff --git a/packages/app/src/components/PostCard/components/actions/saveButton/index.jsx b/packages/app/src/components/PostCard/components/actions/saveButton/index.jsx
index 05f3161c..e3035ea1 100755
--- a/packages/app/src/components/PostCard/components/actions/saveButton/index.jsx
+++ b/packages/app/src/components/PostCard/components/actions/saveButton/index.jsx
@@ -20,9 +20,9 @@ export default (props) => {
className={classnames("saveButton", {
["active"]: saved
})}
+ type="ghost"
shape="circle"
onClick={onClick}
icon={saved ?
:
}
- size="large"
/>
}
\ No newline at end of file
diff --git a/packages/app/src/components/PostCard/components/actions/saveButton/index.less b/packages/app/src/components/PostCard/components/actions/saveButton/index.less
index 6f1e215f..60b67d71 100755
--- a/packages/app/src/components/PostCard/components/actions/saveButton/index.less
+++ b/packages/app/src/components/PostCard/components/actions/saveButton/index.less
@@ -1,22 +1,21 @@
.saveButton {
- border: 0 !important;
-
transition: all 150ms ease-in-out;
- background: transparent !important;
- background-color: transparent !important;
+ background-color: transparent!important;
+ border: 0!important;
+ box-shadow: none!important;
&.active {
- color: var(--primaryColor);
+ color: var(--colorPrimary);
svg {
- color: var(--primaryColor);
+ color: var(--colorPrimary);
}
}
svg {
- width: 20px;
- height: 20px;
+ width: 1rem;
+ height: 1rem;
transition: all 150ms ease-in-out;
}
diff --git a/packages/app/src/components/PostCard/components/attachments/index.jsx b/packages/app/src/components/PostCard/components/attachments/index.jsx
index df56fda7..3faa708e 100755
--- a/packages/app/src/components/PostCard/components/attachments/index.jsx
+++ b/packages/app/src/components/PostCard/components/attachments/index.jsx
@@ -3,7 +3,6 @@ import { Skeleton } from "antd"
import { Carousel } from "react-responsive-carousel"
import { ImageViewer } from "components"
import Plyr from "plyr-react"
-import ModalImage from "react-modal-image"
import ContentFailed from "../contentFailed"
@@ -43,7 +42,7 @@ const Attachment = React.memo((props) => {
e.preventDefault()
e.stopPropagation()
- app.openFullImageViewer(url)
+ app.controls.openFullImageViewer(url)
}
}
diff --git a/packages/app/src/components/PostCard/components/attachments/index.less b/packages/app/src/components/PostCard/components/attachments/index.less
index 016f7112..4774079a 100755
--- a/packages/app/src/components/PostCard/components/attachments/index.less
+++ b/packages/app/src/components/PostCard/components/attachments/index.less
@@ -88,6 +88,12 @@
}
.attachment {
+ display: flex;
+ flex-direction: column;
+
+ align-items: center;
+ justify-content: center;
+
width: 100%;
height: 100%;
@@ -136,7 +142,7 @@
.plyr__control {
&:hover {
- background-color: var(--primaryColor);
+ background-color: var(--colorPrimary);
}
svg {
@@ -149,7 +155,7 @@
.plyr__progress,
.plyr__volume {
input {
- color: var(--primaryColor);
+ color: var(--colorPrimary);
}
}
}
\ No newline at end of file
diff --git a/packages/app/src/components/PostCard/components/content/index.less b/packages/app/src/components/PostCard/components/content/index.less
index 09557ba8..a5fd5ad0 100755
--- a/packages/app/src/components/PostCard/components/content/index.less
+++ b/packages/app/src/components/PostCard/components/content/index.less
@@ -66,13 +66,13 @@
.message {
width: 100%;
- font-size: 14px;
- font-family: "Poppins", sans-serif;
+ font-size: 0.9rem;
+ font-weight: 400;
+
+ color: var(--background-color-contrast);
word-break: break-all;
user-select: text;
-
- color: var(--background-color-contrast)
}
>div {
diff --git a/packages/app/src/components/PostCard/components/header/index.jsx b/packages/app/src/components/PostCard/components/header/index.jsx
index 0b1ff554..c344a001 100755
--- a/packages/app/src/components/PostCard/components/header/index.jsx
+++ b/packages/app/src/components/PostCard/components/header/index.jsx
@@ -1,5 +1,4 @@
import React from "react"
-import classnames from "classnames"
import { DateTime } from "luxon"
import { Image } from "components"
@@ -11,13 +10,13 @@ export default (props) => {
const [timeAgo, setTimeAgo] = React.useState(0)
const goToProfile = () => {
- window.app.goToAccount(props.postData.user?.username)
+ app.navigation.goToAccount(props.postData.user?.username)
}
const updateTimeAgo = () => {
let createdAt = props.postData.timestamp ?? props.postData.created_at ?? ""
- const timeAgo = DateTime.fromISO(createdAt).toRelative()
+ const timeAgo = DateTime.fromISO(createdAt, { locale: app.cores.settings.get("language") }).toRelative()
setTimeAgo(timeAgo)
}
@@ -43,30 +42,14 @@ export default (props) => {
/>