Compare commits

...

3 Commits

Author SHA1 Message Date
38493829d5 🐛 Fix dark mode account iccon shows wrong 2025-01-04 18:51:35 +08:00
907a87ed9a 💄 Dark mode 2025-01-04 18:50:12 +08:00
af2e87dd84 💄 Loading progress bar 2025-01-04 18:44:15 +08:00
11 changed files with 27 additions and 11 deletions

BIN
bun.lockb

Binary file not shown.

View File

@ -24,6 +24,7 @@
"axios-case-converter": "^1.1.1", "axios-case-converter": "^1.1.1",
"cookies-next": "^5.0.2", "cookies-next": "^5.0.2",
"next": "15.1.3", "next": "15.1.3",
"next-nprogress-bar": "^2.4.3",
"react": "^19.0.0", "react": "^19.0.0",
"react-dom": "^19.0.0", "react-dom": "^19.0.0",
"react-hook-form": "^7.54.2", "react-hook-form": "^7.54.2",

View File

@ -77,7 +77,7 @@ export function CapAppBar() {
<Avatar sx={{ backgroundColor: 'transparent' }} src={getAttachmentUrl(userStore.account.avatar)} /> <Avatar sx={{ backgroundColor: 'transparent' }} src={getAttachmentUrl(userStore.account.avatar)} />
) : ( ) : (
<Avatar sx={{ backgroundColor: 'transparent' }}> <Avatar sx={{ backgroundColor: 'transparent' }}>
<AccountCircle sx={{ color: theme.palette.text.primary }} /> <AccountCircle sx={{ color: theme.palette.text.primary }} className="dark:invert" />
</Avatar> </Avatar>
)} )}
</IconButton> </IconButton>

View File

@ -51,7 +51,14 @@ export function CapDrawer({ width, open, onClose }: { width: number; open: boole
<Box sx={{ width: width }} role="presentation" onClick={onClose}> <Box sx={{ width: width }} role="presentation" onClick={onClose}>
<Toolbar style={{ padding: 0 }}> <Toolbar style={{ padding: 0 }}>
<Box display="flex" gap={2} sx={{ mx: 2 }}> <Box display="flex" gap={2} sx={{ mx: 2 }}>
<Image src="/logo.png" width={28} height={28} alt="company logo" style={{ objectFit: 'contain' }} /> <Image
src="/logo.png"
width={28}
height={28}
alt="company logo"
style={{ objectFit: 'contain' }}
className="dark:invert"
/>
<Box display="flex" flexDirection="column" justifyContent="center"> <Box display="flex" flexDirection="column" justifyContent="center">
<Typography variant="body2" component="h2" fontWeight="bold" lineHeight={1.4}> <Typography variant="body2" component="h2" fontWeight="bold" lineHeight={1.4}>

View File

@ -3,6 +3,7 @@ import type { AppProps } from 'next/app'
import { Box, createTheme, CssBaseline, ThemeProvider } from '@mui/material' import { Box, createTheme, CssBaseline, ThemeProvider } from '@mui/material'
import { Roboto } from 'next/font/google' import { Roboto } from 'next/font/google'
import { CapAppBar } from '@/components/CapAppBar' import { CapAppBar } from '@/components/CapAppBar'
import { PagesProgressBar as ProgressBar } from 'next-nprogress-bar'
import { useUserStore } from '@/services/user' import { useUserStore } from '@/services/user'
import { useEffect } from 'react' import { useEffect } from 'react'
import Head from 'next/head' import Head from 'next/head'
@ -15,9 +16,9 @@ const fontRoboto = Roboto({
const siteTheme = createTheme({ const siteTheme = createTheme({
cssVariables: true, cssVariables: true,
// colorSchemes: { colorSchemes: {
// dark: true, dark: true,
// }, },
palette: { palette: {
mode: 'light', mode: 'light',
primary: { primary: {
@ -57,6 +58,12 @@ export default function App({ Component, pageProps }: AppProps) {
<ThemeProvider theme={siteTheme}> <ThemeProvider theme={siteTheme}>
<CssBaseline /> <CssBaseline />
<ProgressBar
height="4px"
color={siteTheme.palette.primary.main}
options={{ showSpinner: false }}
shallowRouting
/>
<CapAppBar /> <CapAppBar />
<Box sx={{ minHeight: 'calc(100vh - 64px)' }}> <Box sx={{ minHeight: 'calc(100vh - 64px)' }}>

View File

@ -22,7 +22,7 @@ export default function Home() {
<> <>
<Container sx={{ py: 24, display: 'flex', flexDirection: 'column', gap: 32 }}> <Container sx={{ py: 24, display: 'flex', flexDirection: 'column', gap: 32 }}>
<Box> <Box>
<Image src="/logo.png" width={128} height={128} alt="company logo" className="mb-2" /> <Image src="/logo.png" width={128} height={128} alt="company logo" className="mb-2 dark:invert" />
<Typography variant="h3" component="h1" gutterBottom> <Typography variant="h3" component="h1" gutterBottom>
Welcome to <br /> Welcome to <br />
the Solsynth Capital. the Solsynth Capital.
@ -92,6 +92,7 @@ export default function Home() {
width={256} width={256}
height={80} height={80}
style={{ marginLeft: '-20px' }} style={{ marginLeft: '-20px' }}
className="dark:invert"
/> />
<Typography variant="h4" component="h2" sx={{ my: 2 }}> <Typography variant="h4" component="h2" sx={{ my: 2 }}>
Made by Solsynth Made by Solsynth

View File

@ -199,7 +199,7 @@ export default function Post({ post, attachments }: InferGetServerSidePropsType<
<Divider /> <Divider />
<Box sx={{ mt: 2.5, maxWidth: 'unset' }} className="prose prose-lg"> <Box sx={{ mt: 2.5, maxWidth: 'unset' }} className="prose prose-lg dark:prose-invert">
{post.body.content && <div dangerouslySetInnerHTML={{ __html: post.body.content }} />} {post.body.content && <div dangerouslySetInnerHTML={{ __html: post.body.content }} />}
</Box> </Box>

View File

@ -97,7 +97,7 @@ export default function PostList({ posts, page, pages }: InferGetServerSideProps
<Divider /> <Divider />
<Box sx={{ maxWidth: 'unset' }} className="prose prose-md"> <Box sx={{ maxWidth: 'unset' }} className="prose prose-md dark:prose-invert">
{p.body.content && <div dangerouslySetInnerHTML={{ __html: p.body.content }} />} {p.body.content && <div dangerouslySetInnerHTML={{ __html: p.body.content }} />}
</Box> </Box>
</Box> </Box>

View File

@ -124,7 +124,7 @@ export default function ProductSolarNetwork() {
width={128} width={128}
height={128} height={128}
style={{ objectFit: 'cover' }} style={{ objectFit: 'cover' }}
className="shadow-xl rounded-2xl mx-auto mb-8 border border-1 border-gray-200" className="shadow-xl rounded-2xl mx-auto mb-8 border border-1 border-gray-200 dark:invert"
alt="solar network icon" alt="solar network icon"
/> />
<Box position="relative" width="fit-content" className="animate__animated animate__fadeInUp"> <Box position="relative" width="fit-content" className="animate__animated animate__fadeInUp">

View File

@ -17,7 +17,7 @@ export default function PrivacyPolicy() {
<Divider /> <Divider />
<Box component="article" sx={{ my: 5, maxWidth: 'unset' }} className="prose prose-lg"> <Box component="article" sx={{ my: 5, maxWidth: 'unset' }} className="prose prose-lg dark:prose-invert">
<h2 id="introduction">Introduction</h2> <h2 id="introduction">Introduction</h2>
<p> <p>
We take your privacy seriously. This privacy policy outlines the types of personal information we collect, how We take your privacy seriously. This privacy policy outlines the types of personal information we collect, how

View File

@ -17,7 +17,7 @@ export default function PrivacyPolicy() {
<Divider /> <Divider />
<Box component="article" sx={{ my: 5, maxWidth: 'unset' }} className="prose prose-lg"> <Box component="article" sx={{ my: 5, maxWidth: 'unset' }} className="prose prose-lg dark:prose-invert">
<p> <p>
This Agreement applies to all Solsynth LLC products, including but not limited to Solar Network, Solian, This Agreement applies to all Solsynth LLC products, including but not limited to Solar Network, Solian,
DietaryGuard, AceField. DietaryGuard, AceField.