Skip to content

Commit

Permalink
Debug: mobile dark mode debug (#373)
Browse files Browse the repository at this point in the history
* feat: dark mode & new messages on welcome modal

* fix: dark mode on sign in modal & user login icon
  • Loading branch information
YHhaoareyou authored Apr 1, 2022
1 parent bc8ecd7 commit 67b4a97
Show file tree
Hide file tree
Showing 20 changed files with 398 additions and 331 deletions.
2 changes: 1 addition & 1 deletion root/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
"@bit/wasedatime.core.ts.ui.loading-spinner": "0.1.2",
"@bit/wasedatime.core.ts.ui.logo": "0.0.9",
"@bit/wasedatime.core.ts.ui.modal": "0.0.8",
"@bit/wasedatime.core.ts.ui.sign-in-modal": "0.1.4",
"@bit/wasedatime.core.ts.ui.sign-in-modal": "0.1.6",
"@bit/wasedatime.core.ts.utils.i18n": "0.0.4",
"@bit/wasedatime.core.ts.utils.responsive-utils": "0.0.1",
"@bit/wasedatime.core.ts.utils.user": "0.0.4",
Expand Down
26 changes: 21 additions & 5 deletions root/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file removed root/src/assets/img/home/reviews-example.png
Binary file not shown.
Binary file added root/src/assets/img/home/theme-toggle-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added root/src/assets/img/home/theme-toggle-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed root/src/assets/img/home/timetable-example-1.png
Binary file not shown.
Binary file removed root/src/assets/img/home/timetable-example-2.png
Binary file not shown.
4 changes: 2 additions & 2 deletions root/src/components/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import styled from "styled-components";
import homeBackgroundDark from "@app/assets/img/home/home_background-dark.png";
import homeBackgroundLight from "@app/assets/img/home/home_background-light.jpg";
import { TitleLogo } from "@app/assets/img/home/TitleLogo";
import WelcomeModal from "@app/components/WelcomeModal";
import HomeModal from "@app/components/home/HomeModal";
import { gaAppendActionWithLng, gaChangeLanguage } from "@app/ga/eventActions";
import { gaLanguage } from "@app/ga/eventCategories";
import { ThemeContext } from "@app/utils/theme-context";
Expand Down Expand Up @@ -129,7 +129,7 @@ const Home = ({ isFirstAccess, t, i18n }: Props) => {
</button>
</Introduction>

<WelcomeModal
<HomeModal
isModalOpen={modalOpen}
closeModal={closeModal}
isFirstAccess={isFirstAccess}
Expand Down
261 changes: 0 additions & 261 deletions root/src/components/WelcomeModal.tsx

This file was deleted.

4 changes: 2 additions & 2 deletions root/src/components/frame/MobileNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,12 @@ const MobileNav = ({ navItems, openSignInModal }: Props) => {
) : (
<FontAwesomeIcon
icon={faUserCircle}
className="text-white"
className="text-light-text2 dark:text-dark-text2"
style={{ fontSize: "20px" }}
/>
)}
{!userAttr && (
<div className="text-white" style={{ fontSize: "12px" }}>
<div className="text-light-text2 dark:text-dark-text2" style={{ fontSize: "12px" }}>
{t("user.Sign in")}
</div>
)}
Expand Down
13 changes: 1 addition & 12 deletions root/src/components/frame/Nav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,6 @@ export interface NavItemsProps {
iconHovered?: ReactNode;
}

const SignInModalContainer = ({ isModalOpen, closeModal }) => {
const { theme } = useContext(ThemeContext);
return (
<SignInModal
isModalOpen={isModalOpen}
closeModal={closeModal}
theme={theme}
/>
)
}

const Nav = () => {
if (
localStorage.getItem("isFirstAccess") === null ||
Expand Down Expand Up @@ -120,7 +109,7 @@ const Nav = () => {
)
}
</MediaQuery>
<SignInModalContainer
<SignInModal
isModalOpen={isSignInModalOpen}
closeModal={() => setSignInModalOpen(false)}
/>
Expand Down
Loading

0 comments on commit 67b4a97

Please sign in to comment.