diff --git a/packages/app/src/components/header/Header.tsx b/packages/app/src/components/header/Header.tsx index 41fced5907..a8a50bfefe 100644 --- a/packages/app/src/components/header/Header.tsx +++ b/packages/app/src/components/header/Header.tsx @@ -44,7 +44,7 @@ const HeaderRightItems: Record = { }; export const Header = ({ - rightItems = ['syncUser'], + rightItems = ['syncUser', 'themeModeSwitch'], children, }: PropsWithChildren<{ rightItems?: HeaderRightItemNames[] }>) => { const [showWarning, setShowWarning] = useState(shouldShowWarning()); diff --git a/packages/app/src/components/workspace-setting/PublishPage.tsx b/packages/app/src/components/workspace-setting/PublishPage.tsx index d8692acbb4..4ff35d776d 100644 --- a/packages/app/src/components/workspace-setting/PublishPage.tsx +++ b/packages/app/src/components/workspace-setting/PublishPage.tsx @@ -4,6 +4,7 @@ import { StyledPublishCopyContainer, StyledPublishExplanation, StyledSettingH2, + StyledStopPublishContainer, } from './style'; import { useState } from 'react'; import { Button } from '@/ui/button'; @@ -42,7 +43,9 @@ export const PublishPage = ({ workspace }: { workspace: WorkspaceUnit }) => { {t('Publishing')} - {t('Share with link')} + + {t('Share with link')} + @@ -54,24 +57,27 @@ export const PublishPage = ({ workspace }: { workspace: WorkspaceUnit }) => { ) : ( - {'Publishing Description'} + {t('Publishing Description')} )} - - {workspace.published ? ( + + {workspace.published ? ( + - ) : ( + + ) : ( + - )} - + + )} ) : ( diff --git a/packages/app/src/components/workspace-setting/SyncPage.tsx b/packages/app/src/components/workspace-setting/SyncPage.tsx index 72f1d08fda..f65a24ab7b 100644 --- a/packages/app/src/components/workspace-setting/SyncPage.tsx +++ b/packages/app/src/components/workspace-setting/SyncPage.tsx @@ -2,6 +2,8 @@ import { StyledPublishContent, StyledPublishCopyContainer, StyledPublishExplanation, + StyledWorkspaceName, + StyledWorkspaceType, } from './style'; import { DownloadIcon } from '@blocksuite/icons'; import { Button } from '@/ui/button'; @@ -9,6 +11,7 @@ import { Menu, MenuItem } from '@/ui/menu'; import { WorkspaceUnit } from '@affine/datacenter'; import { useWorkspaceHelper } from '@/hooks/use-workspace-helper'; import { Trans, useTranslation } from '@affine/i18n'; +import { WorkspaceUnitAvatar } from '@/components/workspace-avatar'; export const SyncPage = ({ workspace }: { workspace: WorkspaceUnit }) => { const { enableWorkspace } = useWorkspaceHelper(); const { t } = useTranslation(); @@ -18,11 +21,20 @@ export const SyncPage = ({ workspace }: { workspace: WorkspaceUnit }) => { {workspace.provider === 'local' ? ( <> - {t('Sync Description', { - workspaceName: workspace.name ?? 'Affine', - })} + + +  {workspace.name}  + + is a Local Workspace. - + + All data is stored on the current device. You can enable AFFiNE + Cloud for this workspace to keep data in sync with the cloud. + diff --git a/packages/app/src/components/workspace-setting/general/General.tsx b/packages/app/src/components/workspace-setting/general/General.tsx index 7d9294f276..2ac37c53c3 100644 --- a/packages/app/src/components/workspace-setting/general/General.tsx +++ b/packages/app/src/components/workspace-setting/general/General.tsx @@ -3,15 +3,17 @@ import { // StyledSettingAvatar, StyledSettingAvatarContent, StyledSettingInputContainer, + StyledDoneButtonContainer, + StyledInput, } from './style'; import { StyledSettingH2 } from '../style'; import { useState } from 'react'; -import { Button, TextButton } from '@/ui/button'; -import Input from '@/ui/input'; +import { Button } from '@/ui/button'; import { useAppState } from '@/providers/app-state-provider'; import { WorkspaceDelete } from './delete'; import { WorkspaceLeave } from './leave'; +import { DoneIcon, CloudUnsyncedIcon } from '@blocksuite/icons'; // import { Upload } from '@/components/file-upload'; import { WorkspaceUnitAvatar } from '@/components/workspace-avatar'; import { WorkspaceUnit } from '@affine/datacenter'; @@ -44,7 +46,7 @@ export const GeneralPage = ({ workspace }: { workspace: WorkspaceUnit }) => { return workspace ? (
- {t('Workspace Icon')} + Workspace Avatar
{ {t('Workspace Name')} - + > {isOwner ? ( - { handleUpdateWorkspaceName(); }} - style={{ marginLeft: '0px' }} > - ✔️ - + + ) : null} {t('Workspace Type')} - {workspace.provider} + + Local workspace {isOwner ? ( @@ -99,6 +102,7 @@ export const GeneralPage = ({ workspace }: { workspace: WorkspaceUnit }) => { - - + {buttonDirection === 'row' ? ( + + + + + ) : ( + + + + + )} ); diff --git a/packages/app/src/ui/confirm/styles.ts b/packages/app/src/ui/confirm/styles.ts index ef2c86155d..3646cdcc38 100644 --- a/packages/app/src/ui/confirm/styles.ts +++ b/packages/app/src/ui/confirm/styles.ts @@ -3,8 +3,10 @@ import { ModalWrapper } from '@/ui/modal'; export const StyledModalWrapper = styled(ModalWrapper)(() => { return { - width: '460px', - padding: '46px 60px 32px', + minWidth: '460px', + maxWidth: '560px', + maxHeight: '292px', + padding: '44px 84px 32px 84px', }; }); @@ -14,6 +16,7 @@ export const StyledConfirmTitle = styled.div(({ theme }) => { fontWeight: 600, textAlign: 'center', color: theme.colors.popoverColor, + lineHeight: '28px', }; }); @@ -23,12 +26,21 @@ export const StyledConfirmContent = styled.div(({ theme }) => { textAlign: 'center', marginTop: '12px', color: theme.colors.textColor, + lineHeight: '26px', }; }); -export const StyledButtonWrapper = styled.div(() => { +export const StyledColumnButtonWrapper = styled.div(() => { return { ...displayFlex('center', 'center'), + flexDirection: 'column', + marginTop: '32px', + }; +}); +export const StyledRowButtonWrapper = styled.div(() => { + return { + ...displayFlex('center', 'center'), + flexDirection: 'row', marginTop: '32px', }; }); diff --git a/packages/app/src/ui/input/Input.tsx b/packages/app/src/ui/input/Input.tsx index c4fe7600ca..1ca8b8684f 100644 --- a/packages/app/src/ui/input/Input.tsx +++ b/packages/app/src/ui/input/Input.tsx @@ -12,6 +12,7 @@ type inputProps = { placeholder?: string; disabled?: boolean; width?: number; + height?: number; maxLength?: number; minLength?: number; onChange?: (value: string) => void; @@ -26,6 +27,7 @@ export const Input = (props: inputProps) => { placeholder, maxLength, minLength, + height, width = 260, onChange, onBlur, @@ -62,6 +64,7 @@ export const Input = (props: inputProps) => { onChange={handleChange} onBlur={handleBlur} onKeyDown={handleKeyDown} + height={height} > ); }; diff --git a/packages/app/src/ui/input/style.ts b/packages/app/src/ui/input/style.ts index fd0e4d21f1..b8cb51c3d2 100644 --- a/packages/app/src/ui/input/style.ts +++ b/packages/app/src/ui/input/style.ts @@ -4,7 +4,8 @@ export const StyledInput = styled('input')<{ disabled?: boolean; value?: string; width: number; -}>(({ theme, width, disabled }) => { + height?: number; +}>(({ theme, width, disabled, height }) => { const fontWeight = 400; const fontSize = '16px'; return { @@ -13,6 +14,7 @@ export const StyledInput = styled('input')<{ padding: '8px 12px', fontWeight, fontSize, + height: height ? `${height}px` : 'auto', color: disabled ? theme.colors.disableColor : theme.colors.inputColor, border: `1px solid`, borderColor: theme.colors.borderColor, // TODO: check out disableColor,