Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved stats by review #208

Merged
merged 3 commits into from
Dec 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading