Skip to content

Commit

Permalink
Merge pull request #208 from ecency/feature/page-views
Browse files Browse the repository at this point in the history
Improved stats by review
  • Loading branch information
feruzm authored Dec 14, 2024
2 parents 8594e95 + d6862a5 commit b53c190
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export function EntryPageMainInfo({ entry }: Props) {
const reputation = accountReputation(entry.author_reputation ?? 0);

return (
<div className="p-2 md:p-4 md:pb-3 border border-[--border-color] rounded-2xl flex flex-col gap-4 mb-4 md:mb-6 lg:mb-8 mt-2 lg:mt-4">
<div className="flex flex-col gap-4 mb-4 md:mb-6 lg:mb-8 mt-2 lg:mt-4">
<div className="flex items-center gap-4">
<ProfileLink username={entry.author}>
<UserAvatar username={entry.author} size="sLarge" />
Expand Down Expand Up @@ -49,7 +49,7 @@ export function EntryPageMainInfo({ entry }: Props) {
</div>
</div>

<div className="flex items-center justify-between">
<div className="py-2 border-y border-[--border-color] flex items-center justify-between">
<div className="flex items-center text-sm">
<ReadTime entry={entry} toolTip={true} />
<span className="separator circle-separator mx-1 lg:hidden" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import { format, parseISO } from "date-fns";
import { EntryPageStatsItem } from "@/app/(dynamicPages)/entry/[category]/[author]/[permlink]/_components/entry-page-stats-item";
import { EntryPageStatsByCountries } from "./entry-page-stats-by-countries";
import { EntryPageStatsByDevices } from "@/app/(dynamicPages)/entry/[category]/[author]/[permlink]/_components/entry-page-stats-by-devices";
import { Alert } from "@ui/alert";

interface Props {
entry: Entry;
Expand Down Expand Up @@ -85,10 +84,22 @@ export function EntryPageStats({ entry }: Props) {
<EntryPageStatsByDevices cleanedPathname={cleanedPathname} totalViews={totalViews} />
</div>

<Alert className="flex items-center gap-2 text-sm">
<div className="flex flex-col sm:flex-row items-center gap-4 justify-between p-4 rounded-2xl border border-[--border-color]">
<div className="flex flex-col">
<div className="text-xl">{i18next.t("entry.stats.promotion-title")}</div>
<div className="text-sm opacity-50">
{i18next.t("entry.stats.promotion-subtitle")}
</div>
</div>
<Button href="/perks" icon="🔥" size="lg">
{i18next.t("entry.stats.try-now")}
</Button>
</div>

<div className="flex items-center gap-2 text-sm opacity-50">
<UilInfoCircle className="w-5 h-5" />
<div>{i18next.t("entry.stats.warn")}</div>
</Alert>
</div>
</ModalBody>
</Modal>
</>
Expand Down
5 changes: 4 additions & 1 deletion src/features/i18n/locales/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -746,7 +746,10 @@
"reads": "Read time",
"countries": "Countries",
"devices": "Devices",
"warn": "Stats are collecting only in Ecency's applications"
"warn": "Stats are collecting only in Ecency's applications since Dec, 2024",
"promotion-title": "Want more views and reads?",
"promotion-subtitle": "Use Ecency Perks to promote your post and gain wider exposure.",
"try-now": "Try now"
}
},
"edit-history": {
Expand Down

0 comments on commit b53c190

Please sign in to comment.