Skip to content
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
2 changes: 1 addition & 1 deletion apps/web/app/(all)/[workspaceSlug]/(projects)/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export const WorkspaceDashboardHeader = observer(() => {
className="my-auto mb-0"
>
<Shapes size={16} />
<div className="text-xs font-medium">{t("home.manage_widgets")}</div>
<div className="hidden text-xs font-medium sm:hidden md:block">{t("home.manage_widgets")}</div>
</Button>
<a
onClick={() =>
Expand Down
4 changes: 3 additions & 1 deletion apps/web/core/components/home/root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ export const WorkspaceHomeView = observer(() => {
)}
<>
<HomePeekOverviewsRoot />
<ContentWrapper className={cn("gap-6 bg-custom-background-100 max-w-[750px] mx-auto scrollbar-hide")}>
<ContentWrapper
className={cn("gap-6 bg-custom-background-100 max-w-[800px] mx-auto scrollbar-hide px-page-x lg:px-0")}
>
{currentUser && <UserGreetingsView user={currentUser} />}
<DashboardWidgets />
</ContentWrapper>
Expand Down
8 changes: 4 additions & 4 deletions apps/web/core/components/home/user-greetings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@ export const UserGreetingsView: FC<IUserGreetingsView> = (props) => {

return (
<div className="flex flex-col items-center my-6">
<h3 className="text-xl font-semibold text-center">
<h2 className="text-xl font-semibold text-center">
{t("good")} {t(greeting)}, {user?.first_name} {user?.last_name}
</h3>
<h6 className="flex items-center gap-2 font-medium text-custom-text-400">
</h2>
<h5 className="flex items-center gap-2 font-medium text-custom-text-400">
<div>{greeting === "morning" ? "🌤️" : greeting === "afternoon" ? "🌥️" : "🌙️"}</div>
<div>
{weekDay}, {date} {timeString}
</div>
</h6>
</h5>
</div>
);
};
16 changes: 10 additions & 6 deletions apps/web/core/components/user/user-greetings.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import { FC } from "react";
// plane types
import { useTranslation } from "@plane/i18n";
// hooks
import { IUser } from "@plane/types";
import { useCurrentTime } from "@/hooks/use-current-time";
Expand All @@ -12,6 +14,8 @@ export const UserGreetingsView: FC<IUserGreetingsView> = (props) => {
const { user } = props;
// current time hook
const { currentTime } = useCurrentTime();
// store hooks
const { t } = useTranslation();

const hour = new Intl.DateTimeFormat("en-US", {
hour12: false,
Expand All @@ -37,16 +41,16 @@ export const UserGreetingsView: FC<IUserGreetingsView> = (props) => {
const greeting = parseInt(hour, 10) < 12 ? "morning" : parseInt(hour, 10) < 18 ? "afternoon" : "evening";

return (
<div>
<h3 className="text-xl font-semibold">
Good {greeting}, {user?.first_name} {user?.last_name}
</h3>
<h6 className="flex items-center gap-2 font-medium text-custom-text-400">
<div className="flex flex-col items-center my-6">
<h2 className="text-xl font-semibold text-center">
{t("good")} {t(greeting)}, {user?.first_name} {user?.last_name}
</h2>
<h5 className="flex items-center gap-2 font-medium text-custom-text-400">
<div>{greeting === "morning" ? "🌤️" : greeting === "afternoon" ? "🌥️" : "🌙️"}</div>
<div>
{weekDay}, {date} {timeString}
</div>
</h6>
</h5>
</div>
);
};