mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-18 18:46:19 +08:00
fix: left sidebar style fixes (#3950)
Co-authored-by: Alex Yang <himself65@outlook.com>
This commit is contained in:
-1
@@ -27,7 +27,6 @@ export const StyledTextContent = styled('div')(() => {
|
||||
return {
|
||||
margin: 'auto',
|
||||
width: '425px',
|
||||
fontFamily: 'Avenir Next',
|
||||
fontStyle: 'normal',
|
||||
fontWeight: '400',
|
||||
fontSize: '18px',
|
||||
|
||||
-1
@@ -26,7 +26,6 @@ export const StyledTextContent = styled('div')(() => {
|
||||
return {
|
||||
margin: 'auto',
|
||||
width: '425px',
|
||||
fontFamily: 'Avenir Next',
|
||||
fontStyle: 'normal',
|
||||
fontWeight: '400',
|
||||
fontSize: '18px',
|
||||
|
||||
@@ -29,6 +29,7 @@ const useDBFileSecondaryPath = (workspaceId: string) => {
|
||||
}
|
||||
});
|
||||
}
|
||||
return;
|
||||
}, [workspaceId]);
|
||||
return path;
|
||||
};
|
||||
|
||||
@@ -111,6 +111,7 @@ export const RootAppSidebar = ({
|
||||
if (isDesktop) {
|
||||
return window.events?.applicationMenu.onNewPageAction(onClickNewPage);
|
||||
}
|
||||
return;
|
||||
}, [onClickNewPage]);
|
||||
|
||||
const [sidebarOpen, setSidebarOpen] = useAtom(appSidebarOpenAtom);
|
||||
|
||||
@@ -15,7 +15,7 @@ export const updaterHandlers = {
|
||||
if (res) {
|
||||
const { updateInfo } = res;
|
||||
return {
|
||||
updateInfo,
|
||||
version: updateInfo.version,
|
||||
};
|
||||
}
|
||||
return null;
|
||||
|
||||
@@ -24,7 +24,7 @@ import { type PropsWithChildren, useState } from 'react';
|
||||
import { MemoryRouter } from 'react-router-dom';
|
||||
|
||||
export default {
|
||||
title: 'Components/AppSidebar',
|
||||
title: 'AFFiNE/AppSidebar',
|
||||
component: AppSidebar,
|
||||
} satisfies Meta;
|
||||
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
import {
|
||||
type AddPageButtonPureProps,
|
||||
AppUpdaterButtonPure,
|
||||
} from '@affine/component/app-sidebar';
|
||||
import type { Meta, StoryFn } from '@storybook/react';
|
||||
import type { PropsWithChildren } from 'react';
|
||||
|
||||
export default {
|
||||
title: 'AFFiNE/AppUpdaterButton',
|
||||
component: AppUpdaterButtonPure,
|
||||
parameters: {
|
||||
chromatic: { disableSnapshot: true },
|
||||
},
|
||||
} satisfies Meta<typeof AppUpdaterButtonPure>;
|
||||
|
||||
const Container = ({ children }: PropsWithChildren) => (
|
||||
<main
|
||||
style={{
|
||||
position: 'relative',
|
||||
width: '320px',
|
||||
display: 'flex',
|
||||
flexDirection: 'row',
|
||||
backgroundColor: '#eee',
|
||||
padding: '16px',
|
||||
}}
|
||||
>
|
||||
{children}
|
||||
</main>
|
||||
);
|
||||
|
||||
export const Default: StoryFn<AddPageButtonPureProps> = props => {
|
||||
return (
|
||||
<Container>
|
||||
<AppUpdaterButtonPure {...props} />
|
||||
</Container>
|
||||
);
|
||||
};
|
||||
|
||||
Default.args = {
|
||||
appQuitting: false,
|
||||
updateReady: true,
|
||||
updateAvailable: {
|
||||
version: '1.0.0-beta.1',
|
||||
allowAutoUpdate: true,
|
||||
},
|
||||
downloadProgress: 42,
|
||||
currentChangelogUnread: true,
|
||||
};
|
||||
|
||||
export const Updated: StoryFn<AddPageButtonPureProps> = props => {
|
||||
return (
|
||||
<Container>
|
||||
<AppUpdaterButtonPure {...props} updateAvailable={null} />
|
||||
</Container>
|
||||
);
|
||||
};
|
||||
|
||||
Updated.args = {
|
||||
currentChangelogUnread: true,
|
||||
};
|
||||
Reference in New Issue
Block a user