feat: mock login

This commit is contained in:
DiamondThree
2023-01-05 17:32:39 +08:00
parent 4dc61165b2
commit 3d2da085e7
7 changed files with 95 additions and 29 deletions
@@ -76,6 +76,8 @@ export const WorkSpaceSliderBar = () => {
const [showTip, setShowTip] = useState(false);
const [show, setShow] = useLocalStorage('AFFiNE_SLIDE_BAR', false, true);
const [showWorkspaceSetting, setShowWorkspaceSetting] = useState(false);
const paths = {
all: currentWorkspaceId ? `/workspace/${currentWorkspaceId}/all` : '',
favorite: currentWorkspaceId
@@ -150,16 +152,16 @@ export const WorkSpaceSliderBar = () => {
<FavoriteList showList={showSubFavorite} />
<StyledListItem
onClick={() => {
console.log('ttt');
setShowWorkspaceSetting(true);
}}
>
<SettingsIcon /> Setting
</StyledListItem>
<WorkspaceSetting
isShow={true}
isShow={showWorkspaceSetting}
onClose={() => {
console.log(1231231);
setShowWorkspaceSetting(false);
}}
/>
@@ -62,6 +62,7 @@ export const StyledListItem = styled.div<{
color: active ? theme.colors.primaryColor : theme.colors.popoverColor,
paddingLeft: '12px',
borderRadius: '5px',
cursor: 'pointer',
...displayFlex('flex-start', 'center'),
...(disabled
? {