fix(core): setting ui regression (#4525)
This commit is contained in:
@@ -12,7 +12,7 @@ import {
|
|||||||
useGeneralSettingList,
|
useGeneralSettingList,
|
||||||
} from './general-setting';
|
} from './general-setting';
|
||||||
import { SettingSidebar } from './setting-sidebar';
|
import { SettingSidebar } from './setting-sidebar';
|
||||||
import { footerIconWrapper, settingContent } from './style.css';
|
import * as style from './style.css';
|
||||||
import { WorkspaceSetting } from './workspace-setting';
|
import { WorkspaceSetting } from './workspace-setting';
|
||||||
|
|
||||||
type ActiveTab = GeneralSettingKeys | 'workspace' | 'account';
|
type ActiveTab = GeneralSettingKeys | 'workspace' | 'account';
|
||||||
@@ -84,9 +84,8 @@ export const SettingModal = ({
|
|||||||
onAccountSettingClick={onAccountSettingClick}
|
onAccountSettingClick={onAccountSettingClick}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<div data-testid="setting-modal-content" className={settingContent}>
|
<div data-testid="setting-modal-content" className={style.wrapper}>
|
||||||
<div className="wrapper">
|
<div className={style.content}>
|
||||||
<div className="content">
|
|
||||||
{activeTab === 'workspace' && workspaceId ? (
|
{activeTab === 'workspace' && workspaceId ? (
|
||||||
<Suspense fallback={<WorkspaceDetailSkeleton />}>
|
<Suspense fallback={<WorkspaceDetailSkeleton />}>
|
||||||
<WorkspaceSetting key={workspaceId} workspaceId={workspaceId} />
|
<WorkspaceSetting key={workspaceId} workspaceId={workspaceId} />
|
||||||
@@ -100,19 +99,19 @@ export const SettingModal = ({
|
|||||||
) : null}
|
) : null}
|
||||||
</div>
|
</div>
|
||||||
<div className="footer">
|
<div className="footer">
|
||||||
<div className={footerIconWrapper}>
|
|
||||||
<ContactWithUsIcon />
|
|
||||||
</div>
|
|
||||||
<a
|
<a
|
||||||
href="https://community.affine.pro/home"
|
href="https://community.affine.pro/home"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noreferrer"
|
rel="noreferrer"
|
||||||
|
className={style.suggestionLink}
|
||||||
>
|
>
|
||||||
|
<span className={style.suggestionLinkIcon}>
|
||||||
|
<ContactWithUsIcon />
|
||||||
|
</span>
|
||||||
{t['com.affine.settings.suggestion']()}
|
{t['com.affine.settings.suggestion']()}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</Modal>
|
</Modal>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,45 +1,38 @@
|
|||||||
import { globalStyle, style } from '@vanilla-extract/css';
|
import { style } from '@vanilla-extract/css';
|
||||||
|
|
||||||
export const settingContent = style({
|
export const wrapper = style({
|
||||||
flexGrow: '1',
|
flexGrow: '1',
|
||||||
height: '100%',
|
height: '100%',
|
||||||
padding: '40px 15px',
|
|
||||||
overflow: 'hidden',
|
|
||||||
});
|
|
||||||
|
|
||||||
globalStyle(`${settingContent} .wrapper`, {
|
|
||||||
padding: '0 15px',
|
|
||||||
height: '100%',
|
|
||||||
maxWidth: '560px',
|
maxWidth: '560px',
|
||||||
margin: '0 auto',
|
margin: '0 auto',
|
||||||
overflowY: 'auto',
|
padding: '40px 15px 20px 15px',
|
||||||
});
|
overflow: 'hidden auto',
|
||||||
|
|
||||||
globalStyle(`${settingContent} .wrapper::-webkit-scrollbar`, {
|
// children
|
||||||
display: 'none',
|
|
||||||
});
|
|
||||||
globalStyle(`${settingContent} .content`, {
|
|
||||||
minHeight: '100%',
|
|
||||||
paddingBottom: '80px',
|
|
||||||
});
|
|
||||||
globalStyle(`${settingContent} .footer`, {
|
|
||||||
cursor: 'pointer',
|
|
||||||
paddingTop: '40px',
|
|
||||||
marginTop: '-80px',
|
|
||||||
fontSize: 'var(--affine-font-sm)',
|
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
minHeight: '100px',
|
flexDirection: 'column',
|
||||||
|
justifyContent: 'space-between',
|
||||||
|
alignItems: 'center',
|
||||||
|
|
||||||
|
'::-webkit-scrollbar': {
|
||||||
|
display: 'none',
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
globalStyle(`${settingContent} .footer a`, {
|
export const content = style({
|
||||||
color: 'var(--affine-text-primary-color)',
|
width: '100%',
|
||||||
lineHeight: 'normal',
|
marginBottom: '24px',
|
||||||
});
|
});
|
||||||
export const footerIconWrapper = style({
|
|
||||||
fontSize: 'var(--affine-font-base)',
|
export const suggestionLink = style({
|
||||||
color: 'var(--affine-icon-color)',
|
fontSize: 'var(--affine-font-sm)',
|
||||||
marginRight: '12px',
|
color: 'var(--affine-text-primary-color)',
|
||||||
height: '19px',
|
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
});
|
});
|
||||||
|
|
||||||
|
export const suggestionLinkIcon = style({
|
||||||
|
color: 'var(--affine-icon-color)',
|
||||||
|
marginRight: '12px',
|
||||||
|
display: 'flex',
|
||||||
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user