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
26 changes: 25 additions & 1 deletion src/components/Header/Header.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
}

.burgerMenu,
.closeButton {
.closeButton,
.mobileUserProfile {
display: none;
}

Expand Down Expand Up @@ -133,6 +134,19 @@
}
}

& .mobileUserProfile {
display: block;
position: absolute;
right: 16px;
top: 50%;
transform: translateY(-50%);
opacity: 1;
visibility: visible;
transition:
opacity 0.3s,
visibility 0.3s;
}

& .closeButton {
display: block;
position: absolute;
Expand Down Expand Up @@ -165,6 +179,11 @@
}

.header.openedSidebar {
& .mobileUserProfile {
opacity: 0;
visibility: hidden;
}

& .closeButton {
right: 1rem;
}
Expand Down Expand Up @@ -350,6 +369,11 @@
}

.header.openedSidebar {
& .mobileUserProfile {
opacity: 0;
visibility: hidden;
}

& .closeButton {
right: 1rem;
}
Expand Down
35 changes: 26 additions & 9 deletions src/components/Header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,21 @@ const Header: FC = () => {
<div />
<div />
</div>
{isSmallScreen && (
<div className={styles.mobileUserProfile}>
<UserProfile
setAccountData={setAccountData}
isLoggedIn={!!accountData}
isDarkTheme={isDarkTheme}
username={accountData?.username}
setOpenLoginModal={setOpenLogin}
userImage={accountData?.picture}
handleOpenSettings={handleOpenSettings}
hideDropdown={isOpenedSidebar}
hideUsername
/>
</div>
)}
<div>
<Navbar
handleToggleSidebar={handleToggleSidebar}
Expand Down Expand Up @@ -213,15 +228,17 @@ const Header: FC = () => {
</Link>
)}
</div>
<UserProfile
setAccountData={setAccountData}
isLoggedIn={!!accountData}
isDarkTheme={isDarkTheme}
username={accountData?.username}
setOpenLoginModal={setOpenLogin}
userImage={accountData?.picture}
handleOpenSettings={handleOpenSettings}
/>
{!isSmallScreen && (
<UserProfile
setAccountData={setAccountData}
isLoggedIn={!!accountData}
isDarkTheme={isDarkTheme}
username={accountData?.username}
setOpenLoginModal={setOpenLogin}
userImage={accountData?.picture}
handleOpenSettings={handleOpenSettings}
/>
)}
</div>
</div>
<div className={styles.closeButton} onClick={handleToggleSidebar} />
Expand Down
6 changes: 6 additions & 0 deletions src/components/UserProfile/UserProfile.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,9 @@
}
}
}

@media (max-width: 1110px) {
.userContainer {
padding-right: 0;
}
}
14 changes: 12 additions & 2 deletions src/components/UserProfile/UserProfile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ type UserProfileProps = {
userImage?: string;
isLoggedIn?: boolean;
isDarkTheme?: boolean;
hideDropdown?: boolean;
hideUsername?: boolean;
setAccountData?: (updater: (prev: boolean) => boolean) => void;
setOpenLoginModal?: (openModal: boolean) => void;
handleOpenSettings?: () => void;
Expand All @@ -30,6 +32,8 @@ const UserProfile: FC<UserProfileProps> = ({
userImage,
isLoggedIn,
isDarkTheme,
hideDropdown,
hideUsername,
setAccountData,
setOpenLoginModal,
handleOpenSettings,
Expand Down Expand Up @@ -58,6 +62,10 @@ const UserProfile: FC<UserProfileProps> = ({
handleOpenSettings?.();
}, [handleOpenSettings]);

useEffect(() => {
if (hideDropdown) setIsDropdownOpen(false);
}, [hideDropdown]);

useEffect(() => {
if (!isDropdownOpen) return;
const handleClickOutside = () => setIsDropdownOpen(false);
Expand Down Expand Up @@ -110,7 +118,9 @@ const UserProfile: FC<UserProfileProps> = ({
height={32}
className={styles.image}
/>
<span className={styles.userName}>{renderUserName()}</span>
{!hideUsername && (
<span className={styles.userName}>{renderUserName()}</span>
)}
</div>
) : (
<div className={styles.user} onClick={() => setOpenLoginModal(true)}>
Expand All @@ -121,7 +131,7 @@ const UserProfile: FC<UserProfileProps> = ({
height={32}
className={styles.image}
/>
<span className={styles.userName}>Log In</span>
{!hideUsername && <span className={styles.userName}>Log In</span>}
</div>
)}
{isDropdownOpen && isAccessTokenExist && (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
border: 1px solid var(--border);
width: 644px;
max-width: 100%;
min-height: 650px;
max-height: 85vh;
display: flex;
flex-direction: column;
Expand All @@ -46,6 +47,7 @@

@media (max-width: 1023px) {
width: 100%;
min-height: unset;
max-height: 100%;
border: none;
}
Expand Down
2 changes: 1 addition & 1 deletion src/constants/tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export const TOOL_CONFIG: Record<number, ToolConfig> = {
hoverColor: '#A4B465',
darkHoverColor: '#D3DEAC',
darkIconFill: '#D3DEAC',
isBlank: true,
isBlank: false,
},
9: {
Icon: FriendlyTomIcon,
Expand Down
1 change: 1 addition & 0 deletions src/pages/tools/vibesuite/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const VibeSuitePage: FC<VibeSuitePageProps> = ({ vibesuite }) => {
}, []);

const seoContent = vibesuite?.pageSeo;

return (
<>
<SeoGenerator
Expand Down
Loading
Loading