-
-
Notifications
You must be signed in to change notification settings - Fork 11.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
♻️ refactor(layout): Refactor ssc layout
- Loading branch information
1 parent
b3d7108
commit 26e1c41
Showing
55 changed files
with
438 additions
and
424 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { PropsWithChildren, memo } from 'react'; | ||
import { Flexbox } from 'react-layout-kit'; | ||
|
||
import AppLayoutDesktop from '@/layout/AppLayout.desktop'; | ||
|
||
import ResponsiveSessionList from './features/SessionList'; | ||
|
||
export default memo(({ children }: PropsWithChildren) => ( | ||
<AppLayoutDesktop> | ||
<ResponsiveSessionList /> | ||
<Flexbox | ||
flex={1} | ||
height={'100vh'} | ||
id={'lobe-conversion-container'} | ||
style={{ position: 'relative' }} | ||
> | ||
{children} | ||
</Flexbox> | ||
</AppLayoutDesktop> | ||
)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
'use client'; | ||
|
||
import { PropsWithChildren, memo } from 'react'; | ||
|
||
import ResponsiveLayout from '@/components/ResponsiveLayout'; | ||
import { useIsMobile } from '@/hooks/useIsMobile'; | ||
|
||
import Mobile from '../(mobile)/layout.mobile'; | ||
import Desktop from './layout.desktop'; | ||
|
||
export default memo(({ children }: PropsWithChildren) => ( | ||
<ResponsiveLayout Desktop={Desktop} Mobile={Mobile} isMobile={useIsMobile}> | ||
{children} | ||
</ResponsiveLayout> | ||
)); |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { PropsWithChildren, memo } from 'react'; | ||
|
||
import SessionHeader from '@/app/chat/(mobile)/features/SessionHeader'; | ||
import AppLayoutMobile from '@/layout/AppLayout.mobile'; | ||
|
||
export default memo(({ children }: PropsWithChildren) => ( | ||
<AppLayoutMobile navBar={<SessionHeader />} showTabBar> | ||
{children} | ||
</AppLayoutMobile> | ||
)); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { PropsWithChildren } from 'react'; | ||
|
||
import AppLayoutMobile from '@/layout/AppLayout.mobile'; | ||
|
||
import Header from '../../components/ChatHeader/Mobile'; | ||
|
||
export default ({ children }: PropsWithChildren) => ( | ||
<AppLayoutMobile navBar={<Header />}>{children}</AppLayoutMobile> | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
129 changes: 58 additions & 71 deletions
129
src/app/chat/components/ChatHeader/ShareButton/style.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,84 +1,71 @@ | ||
import { createStyles } from 'antd-style'; | ||
import { rgba } from 'polished'; | ||
|
||
export const useStyles = createStyles( | ||
({ css, token, stylish, cx, isDarkMode }, withBackground: boolean) => ({ | ||
background: css` | ||
padding: 24px; | ||
export const useStyles = createStyles(({ css, token, stylish, cx }, withBackground: boolean) => ({ | ||
background: css` | ||
padding: 24px; | ||
background-color: ${token.colorBgLayout}; | ||
background-image: url('/images/screenshot_background.webp'); | ||
background-position: center; | ||
background-size: 120% 120%; | ||
`, | ||
container: cx( | ||
withBackground && | ||
css` | ||
overflow: hidden; | ||
border: 1px solid ${rgba(token.colorText, 0.15)}; | ||
border-radius: ${token.borderRadiusLG}px; | ||
`, | ||
isDarkMode | ||
? css` | ||
box-shadow: | ||
0 8px 16px -4px rgba(0, 0, 0, 75%), | ||
0 8px 24px -4px rgba(0, 0, 0, 75%); | ||
` | ||
: css` | ||
box-shadow: | ||
0 8px 16px -4px rgba(0, 0, 0, 25%), | ||
0 8px 24px -4px rgba(0, 0, 0, 25%); | ||
`, | ||
background-color: ${token.colorBgLayout}; | ||
background-image: url('/images/screenshot_background.webp'); | ||
background-position: center; | ||
background-size: 120% 120%; | ||
`, | ||
container: cx( | ||
withBackground && | ||
css` | ||
background: ${token.colorBgLayout}; | ||
overflow: hidden; | ||
border: 2px solid ${token.colorBorder}; | ||
border-radius: ${token.borderRadiusLG}px; | ||
`, | ||
), | ||
footer: css` | ||
padding: 16px; | ||
border-top: 1px solid ${token.colorBorder}; | ||
`, | ||
header: css` | ||
margin-bottom: -24px; | ||
padding: 16px; | ||
background: ${token.colorBgContainer}; | ||
border-bottom: 1px solid ${token.colorBorder}; | ||
|
||
css` | ||
background: ${token.colorBgLayout}; | ||
`, | ||
preview: cx( | ||
stylish.noScrollbar, | ||
css` | ||
overflow-x: hidden; | ||
overflow-y: scroll; | ||
), | ||
footer: css` | ||
padding: 16px; | ||
border-top: 1px solid ${token.colorBorder}; | ||
`, | ||
header: css` | ||
margin-bottom: -24px; | ||
padding: 16px; | ||
background: ${token.colorBgContainer}; | ||
border-bottom: 1px solid ${token.colorBorder}; | ||
`, | ||
preview: cx( | ||
stylish.noScrollbar, | ||
css` | ||
overflow-x: hidden; | ||
overflow-y: scroll; | ||
width: 100%; | ||
max-height: 40vh; | ||
width: 100%; | ||
max-height: 40vh; | ||
background: ${token.colorBgLayout}; | ||
border: 1px solid ${token.colorBorder}; | ||
border-radius: ${token.borderRadiusLG}px; | ||
background: ${token.colorBgLayout}; | ||
border: 1px solid ${token.colorBorder}; | ||
border-radius: ${token.borderRadiusLG}px; | ||
* { | ||
pointer-events: none; | ||
overflow: hidden; | ||
* { | ||
pointer-events: none; | ||
overflow: hidden; | ||
::-webkit-scrollbar { | ||
width: 0 !important; | ||
height: 0 !important; | ||
} | ||
::-webkit-scrollbar { | ||
width: 0 !important; | ||
height: 0 !important; | ||
} | ||
`, | ||
), | ||
role: css` | ||
margin-top: 12px; | ||
padding-top: 12px; | ||
opacity: 0.75; | ||
border-top: 1px dashed ${token.colorBorderSecondary}; | ||
* { | ||
font-size: 12px !important; | ||
} | ||
`, | ||
url: css` | ||
color: ${token.colorTextDescription}; | ||
`, | ||
}), | ||
); | ||
), | ||
role: css` | ||
margin-top: 12px; | ||
padding-top: 12px; | ||
opacity: 0.75; | ||
border-top: 1px dashed ${token.colorBorderSecondary}; | ||
* { | ||
font-size: 12px !important; | ||
} | ||
`, | ||
url: css` | ||
color: ${token.colorTextDescription}; | ||
`, | ||
})); |
Oops, something went wrong.