diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 724e1cd..df04198 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,5 +31,3 @@ jobs: - run: pnpm install - run: pnpm lint - run: pnpm build - - run: pnpm cypress install - - run: pnpm test diff --git a/README.md b/README.md index 8e0c817..936ef5c 100755 --- a/README.md +++ b/README.md @@ -14,7 +14,9 @@ This dashboard is built with `Typescript` and [React Bootstrap](https://react-bo https://nextjs-dashboard-olive.vercel.app -[Dashboard](https://nextjs-dashboard-olive.vercel.app) +| Light | Dark | +|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| [Dashboard](https://nextjs-dashboard-olive.vercel.app) | [Dashboard](https://nextjs-dashboard-olive.vercel.app) | | Mobile (collapsed) | Mobile (expand) | |----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| @@ -24,7 +26,12 @@ https://nextjs-dashboard-olive.vercel.app https://nextjs-dashboard-olive.vercel.app/pokemons -[Sample page](https://nextjs-dashboard-olive.vercel.app/pokemons) +#### Multilingual + +| English | 日本語 | +|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| [Sample page](https://nextjs-dashboard-olive.vercel.app/pokemons) | [Sample page](https://nextjs-dashboard-olive.vercel.app/pokemons) | + ### Login diff --git a/package.json b/package.json index c629e60..4d0f6b5 100644 --- a/package.json +++ b/package.json @@ -33,6 +33,7 @@ "react-chartjs-2": "^5.2.0", "react-dom": "^18.3.1", "react-paginate": "^8.2.0", + "react-responsive": "^10.0.0", "swr": "^2.2.5", "zod": "^3.23.8", "zod-i18n-map": "^2.27.0" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b267dcf..f00e3cd 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -71,6 +71,9 @@ importers: react-paginate: specifier: ^8.2.0 version: 8.2.0(react@18.3.1) + react-responsive: + specifier: ^10.0.0 + version: 10.0.0(react@18.3.1) swr: specifier: ^2.2.5 version: 2.2.5(react@18.3.1) @@ -792,6 +795,9 @@ packages: resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} engines: {node: '>= 8'} + css-mediaquery@0.1.2: + resolution: {integrity: sha512-COtn4EROW5dBGlE/4PiKnh6rZpAPxDeFLaEEwt4i10jpDMFt2EhQGS79QmmrO+iKCHv0PU/HrOWEhijFd1x99Q==} + csstype@3.1.3: resolution: {integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==} @@ -1371,6 +1377,9 @@ packages: resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==} engines: {node: '>=10.17.0'} + hyphenate-style-name@1.0.4: + resolution: {integrity: sha512-ygGZLjmXfPHj+ZWh6LwbC37l43MhfztxetbFCoYTM2VjkIUpeHgSNn7QIyVFj7YQ1Wl9Cbw5sholVJPzWvC2MQ==} + i18next@23.11.4: resolution: {integrity: sha512-CCUjtd5TfaCl+mLUzAA0uPSN+AVn4fP/kWCYt/hocPUwusTpMVczdrRyOBUwk6N05iH40qiKx6q1DoNJtBIwdg==} @@ -1702,6 +1711,9 @@ packages: map-stream@0.1.0: resolution: {integrity: sha512-CkYQrPYZfWnu/DAmVCpTSX/xHpKZ80eKh2lAkyA6AJTef6bW+6JpbQZN5rofum7da+SyN1bi5ctTm+lTfcCW3g==} + matchmediaquery@0.4.2: + resolution: {integrity: sha512-wrZpoT50ehYOudhDjt/YvUJc6eUzcdFPdmbizfgvswCKNHD1/OBOHYJpHie+HXpu6bSkEGieFMYk6VuutaiRfA==} + media-typer@0.3.0: resolution: {integrity: sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==} engines: {node: '>= 0.6'} @@ -2104,6 +2116,12 @@ packages: peerDependencies: react: ^16 || ^17 || ^18 + react-responsive@10.0.0: + resolution: {integrity: sha512-N6/UiRLGQyGUqrarhBZmrSmHi2FXSD++N5VbSKsBBvWfG0ZV7asvUBluSv5lSzdMyEVjzZ6Y8DL4OHABiztDOg==} + engines: {node: '>=14'} + peerDependencies: + react: '>=16.8.0' + react-transition-group@4.4.5: resolution: {integrity: sha512-pZcd1MCJoiKiBR2NRxeCRg13uCXbydPnmB4EOeRrY7480qNWO8IIgQG6zlDkm6uRMsURXPuKq0GWtiM59a5Q6g==} peerDependencies: @@ -2234,6 +2252,9 @@ packages: setprototypeof@1.2.0: resolution: {integrity: sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==} + shallow-equal@3.1.0: + resolution: {integrity: sha512-pfVOw8QZIXpMbhBWvzBISicvToTiM5WBF1EeAUZDDSb5Dt29yl4AYbyywbJFSEsRUMr7gJaxqCdr4L3tQf9wVg==} + shebang-command@2.0.0: resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} engines: {node: '>=8'} @@ -3298,6 +3319,8 @@ snapshots: shebang-command: 2.0.0 which: 2.0.2 + css-mediaquery@0.1.2: {} + csstype@3.1.3: {} cypress@13.9.0: @@ -4136,6 +4159,8 @@ snapshots: human-signals@2.1.0: {} + hyphenate-style-name@1.0.4: {} + i18next@23.11.4: dependencies: '@babel/runtime': 7.24.5 @@ -4475,6 +4500,10 @@ snapshots: map-stream@0.1.0: {} + matchmediaquery@0.4.2: + dependencies: + css-mediaquery: 0.1.2 + media-typer@0.3.0: {} merge-descriptors@1.0.1: {} @@ -4864,6 +4893,14 @@ snapshots: prop-types: 15.8.1 react: 18.3.1 + react-responsive@10.0.0(react@18.3.1): + dependencies: + hyphenate-style-name: 1.0.4 + matchmediaquery: 0.4.2 + prop-types: 15.8.1 + react: 18.3.1 + shallow-equal: 3.1.0 + react-transition-group@4.4.5(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: '@babel/runtime': 7.24.5 @@ -5027,6 +5064,8 @@ snapshots: setprototypeof@1.2.0: {} + shallow-equal@3.1.0: {} + shebang-command@2.0.0: dependencies: shebang-regex: 3.0.0 diff --git a/src/app/(authentication)/layout.tsx b/src/app/(authentication)/layout.tsx index 1b3cbcd..8b8c049 100644 --- a/src/app/(authentication)/layout.tsx +++ b/src/app/(authentication)/layout.tsx @@ -7,7 +7,7 @@ export default function Layout({ children: React.ReactNode; }) { return ( -
+
{children} diff --git a/src/app/(authentication)/login/page.tsx b/src/app/(authentication)/login/page.tsx index 034ecaf..fe618b5 100644 --- a/src/app/(authentication)/login/page.tsx +++ b/src/app/(authentication)/login/page.tsx @@ -20,10 +20,10 @@ export default async function Page({ searchParams }: { searchParams: SearchParam - +

{dict.login.title}

-

{dict.login.description}

+

{dict.login.description}

diff --git a/src/app/(authentication)/register/page.tsx b/src/app/(authentication)/register/page.tsx index c23ec5b..d892e62 100644 --- a/src/app/(authentication)/register/page.tsx +++ b/src/app/(authentication)/register/page.tsx @@ -13,7 +13,7 @@ export default async function Page() {

{dict.signup.title}

-

{dict.signup.description}

+

{dict.signup.description}

diff --git a/src/app/(dashboard)/layout.tsx b/src/app/(dashboard)/layout.tsx index 544e3a6..2de145f 100644 --- a/src/app/(dashboard)/layout.tsx +++ b/src/app/(dashboard)/layout.tsx @@ -19,7 +19,7 @@ export default function Layout({ -
+
diff --git a/src/app/(dashboard)/page.tsx b/src/app/(dashboard)/page.tsx index 4258e73..52df197 100644 --- a/src/app/(dashboard)/page.tsx +++ b/src/app/(dashboard)/page.tsx @@ -45,7 +45,7 @@ export default async function Page() { const dict = await getDictionary() return ( - <> +
@@ -201,7 +201,7 @@ export default async function Page() {

{dict.dashboard.traffic.title}

-
{dict.dashboard.traffic.duration}
+
{dict.dashboard.traffic.duration}
@@ -263,7 +263,7 @@ export default async function Page() {
-
{dict.dashboard.traffic.category1}
+
{dict.dashboard.traffic.category1}
29.703 {dict.dashboard.traffic.users} @@ -277,7 +277,7 @@ export default async function Page() { />
-
{dict.dashboard.traffic.category2}
+
{dict.dashboard.traffic.category2}
24.093 {dict.dashboard.traffic.users} @@ -291,7 +291,7 @@ export default async function Page() { />
-
{dict.dashboard.traffic.category3}
+
{dict.dashboard.traffic.category3}
78.706 {dict.dashboard.traffic.views} @@ -305,7 +305,7 @@ export default async function Page() { />
-
{dict.dashboard.traffic.category4}
+
{dict.dashboard.traffic.category4}
22.123 {dict.dashboard.traffic.users} @@ -319,7 +319,7 @@ export default async function Page() { />
-
{dict.dashboard.traffic.category5}
+
{dict.dashboard.traffic.category5}
40.15%
89k
-
+
{dict.dashboard.social.facebook.label1}
459
-
+
{dict.dashboard.social.facebook.label2}
@@ -382,14 +382,14 @@ export default async function Page() {
973k
-
+
{dict.dashboard.social.twitter.label1}
1.792
-
+
{dict.dashboard.social.twitter.label2}
@@ -415,14 +415,14 @@ export default async function Page() {
500+
-
+
{dict.dashboard.social.instagram.label1}
292
-
+
{dict.dashboard.social.instagram.label2}
@@ -445,7 +445,7 @@ export default async function Page() {
- + {dict.dashboard.sales.stats.stat1}
9,123
@@ -454,7 +454,7 @@ export default async function Page() {
- + {dict.dashboard.sales.stats.stat2}
22,643
@@ -467,7 +467,7 @@ export default async function Page() {
- + {dict.dashboard.sales.monday}
@@ -487,7 +487,7 @@ export default async function Page() {
- + {dict.dashboard.sales.tuesday}
@@ -507,7 +507,7 @@ export default async function Page() {
- + {dict.dashboard.sales.wednesday}
@@ -527,7 +527,7 @@ export default async function Page() {
- + {dict.dashboard.sales.thursday}
@@ -547,7 +547,7 @@ export default async function Page() {
- + {dict.dashboard.sales.friday}
@@ -567,7 +567,7 @@ export default async function Page() {
- + {dict.dashboard.sales.saturday}
@@ -587,7 +587,7 @@ export default async function Page() {
- + {dict.dashboard.sales.sunday}
@@ -610,7 +610,7 @@ export default async function Page() {
- + {dict.dashboard.sales.stats.stat3}
78,623
@@ -619,7 +619,7 @@ export default async function Page() {
- + {dict.dashboard.sales.stats.stat4}
49,123
@@ -669,7 +669,7 @@ export default async function Page() { {dict.dashboard.sales.organic}
191.235
-
(56%)
+
(56%)
51.223
-
(15%)
+
(15%)
37.564
-
(11%)
+
(11%)
27.319
-
(8%)
+
(8%)
- - + + @@ -762,7 +762,7 @@ export default async function Page() {
{dict.dashboard.listing.items.item1.name}
-
+
{dict.dashboard.listing.user_status.new} {' '} | @@ -779,7 +779,7 @@ export default async function Page() {
50%
- + {dict.dashboard.listing.usage_duration}
@@ -790,7 +790,7 @@ export default async function Page() {
-
{dict.dashboard.listing.last_login}
+
{dict.dashboard.listing.last_login}
{dict.dashboard.listing.items.item1.login_at}
@@ -798,7 +798,7 @@ export default async function Page() { @@ -834,7 +834,7 @@ export default async function Page() {
{dict.dashboard.listing.items.item2.name}
-
+
{dict.dashboard.listing.user_status.recurring} {' '} | @@ -851,7 +851,7 @@ export default async function Page() {
10%
- + {dict.dashboard.listing.usage_duration}
@@ -862,7 +862,7 @@ export default async function Page() {
-
{dict.dashboard.listing.last_login}
+
{dict.dashboard.listing.last_login}
{dict.dashboard.listing.items.item2.login_at}
@@ -870,7 +870,7 @@ export default async function Page() { @@ -906,7 +906,7 @@ export default async function Page() {
{dict.dashboard.listing.items.item3.name}
-
+
{dict.dashboard.listing.user_status.new} {' '} | @@ -923,7 +923,7 @@ export default async function Page() {
74%
- + {dict.dashboard.listing.usage_duration}
@@ -934,7 +934,7 @@ export default async function Page() {
-
{dict.dashboard.listing.last_login}
+
{dict.dashboard.listing.last_login}
{dict.dashboard.listing.items.item3.login_at}
@@ -942,7 +942,7 @@ export default async function Page() { @@ -978,7 +978,7 @@ export default async function Page() {
{dict.dashboard.listing.items.item4.name}
-
+
{dict.dashboard.listing.user_status.new} {' '} | @@ -995,7 +995,7 @@ export default async function Page() {
98%
- + {dict.dashboard.listing.usage_duration}
@@ -1006,7 +1006,7 @@ export default async function Page() {
-
{dict.dashboard.listing.last_login}
+
{dict.dashboard.listing.last_login}
{dict.dashboard.listing.items.item4.login_at}
@@ -1014,7 +1014,7 @@ export default async function Page() { @@ -1050,7 +1050,7 @@ export default async function Page() {
{dict.dashboard.listing.items.item5.name}
-
+
{dict.dashboard.listing.user_status.new} {' '} | @@ -1067,7 +1067,7 @@ export default async function Page() {
22%
- + {dict.dashboard.listing.usage_duration}
@@ -1078,7 +1078,7 @@ export default async function Page() {
-
{dict.dashboard.listing.last_login}
+
{dict.dashboard.listing.last_login}
{dict.dashboard.listing.items.item5.login_at}
@@ -1086,7 +1086,7 @@ export default async function Page() { @@ -1122,7 +1122,7 @@ export default async function Page() {
{dict.dashboard.listing.items.item6.name}
-
+
{dict.dashboard.listing.user_status.new} {' '} | @@ -1139,7 +1139,7 @@ export default async function Page() {
43%
- + {dict.dashboard.listing.usage_duration}
@@ -1150,7 +1150,7 @@ export default async function Page() {
-
{dict.dashboard.listing.last_login}
+
{dict.dashboard.listing.last_login}
{dict.dashboard.listing.items.item6.login_at}
@@ -1158,7 +1158,7 @@ export default async function Page() { @@ -1184,6 +1184,6 @@ export default async function Page() { - + ) } diff --git a/src/app/layout.tsx b/src/app/layout.tsx index c2b6c1b..4783355 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -6,6 +6,7 @@ import '@fortawesome/fontawesome-svg-core/styles.css' import ProgressBar from '@/components/ProgressBar/ProgressBar' import DictionaryProvider from '@/locales/DictionaryProvider' import { getDictionary } from '@/locales/dictionary' +import getTheme from '@/themes/theme' // You change this configuration value to false so that the Font Awesome core SVG library // will not try and insert