fix: open in app card style (#8667)

This commit is contained in:
Peng Xiao
2024-11-01 18:42:09 +08:00
committed by GitHub
parent 7e71395c8e
commit ecbf5a95fa
8 changed files with 149 additions and 92 deletions
@@ -44,10 +44,7 @@ export const OpenInAppLinksMenu = () => {
align: 'end',
}}
>
<MenuTrigger
style={{ textTransform: 'capitalize', fontWeight: 600, width: '250px' }}
block={true}
>
<MenuTrigger style={{ fontWeight: 600, width: '250px' }} block={true}>
{options.find(option => option.value === currentOpenInAppMode)?.label}
</MenuTrigger>
</Menu>
@@ -3,7 +3,10 @@ import {
pushGlobalLoadingEventAtom,
resolveGlobalLoadingEventAtom,
} from '@affine/component/global-loading';
import { SidebarSwitch } from '@affine/core/modules/app-sidebar/views';
import {
OpenInAppCard,
SidebarSwitch,
} from '@affine/core/modules/app-sidebar/views';
import { WorkspaceDesktopApiService } from '@affine/core/modules/desktop-api/service';
import { useI18n } from '@affine/i18n';
import { type DocMode, ZipTransformer } from '@blocksuite/affine/blocks';
@@ -205,6 +208,7 @@ const DesktopLayout = ({ children }: PropsWithChildren) => {
const BrowserLayout = ({ children }: PropsWithChildren) => {
return (
<div className={styles.browserAppViewContainer}>
<OpenInAppCard />
<RootAppSidebar />
<MainContainer>{children}</MainContainer>
</div>
@@ -5,11 +5,11 @@ import {
import { useAsyncCallback } from '@affine/core/components/hooks/affine-async-hooks';
import {
AddPageButton,
AppDownloadButton,
AppSidebar,
CategoryDivider,
MenuItem,
MenuLinkItem,
OpenInAppCard,
QuickSearchInput,
SidebarContainer,
SidebarScrollableContainer,
@@ -191,7 +191,7 @@ export const RootAppSidebar = (): ReactElement => {
</div>
</SidebarScrollableContainer>
<SidebarContainer>
{BUILD_CONFIG.isElectron ? <UpdaterButton /> : <OpenInAppCard />}
{BUILD_CONFIG.isElectron ? <UpdaterButton /> : <AppDownloadButton />}
</SidebarContainer>
</AppSidebar>
);