fix: some style issues (#5783)

This commit is contained in:
Kilu.He 2024-07-23 10:21:50 +08:00 committed by GitHub
parent f66821715f
commit 6334255e15
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
16 changed files with 39 additions and 25 deletions

View File

@ -258,10 +258,9 @@ export async function revalidatePublishView<
// rowMapDoc.getMap().set(subdoc.guid, subdoc); // rowMapDoc.getMap().set(subdoc.guid, subdoc);
// }); // });
} }
console.log('rows', rows);
} }
console.log('====', rows);
const state = new Uint8Array(data); const state = new Uint8Array(data);
applyYDoc(collab, state); applyYDoc(collab, state);

View File

@ -15,7 +15,7 @@ function AppTheme({ children }: { children: React.ReactNode }) {
createTheme({ createTheme({
typography: { typography: {
fontFamily: ['inherit'].join(','), fontFamily: ['inherit'].join(','),
fontSize: 12, fontSize: 14,
button: { button: {
textTransform: 'none', textTransform: 'none',
}, },

View File

@ -7,7 +7,6 @@ export function Board() {
const database = useDatabase(); const database = useDatabase();
const groups = useGroupsSelector(); const groups = useGroupsSelector();
console.log('groups', database);
if (!database) { if (!database) {
return ( return (
<div className={'flex w-full flex-1 flex-col items-center justify-center'}> <div className={'flex w-full flex-1 flex-col items-center justify-center'}>

View File

@ -8,7 +8,7 @@ export function Calendar() {
const { dayPropGetter, localizer, formats, events, emptyEvents } = useCalendarSetup(); const { dayPropGetter, localizer, formats, events, emptyEvents } = useCalendarSetup();
return ( return (
<div className={'database-calendar h-full max-h-[960px] pb-6 pt-4 '}> <div className={'database-calendar h-full max-h-[960px] pb-4 pt-4 text-sm'}>
<BigCalendar <BigCalendar
components={{ components={{
toolbar: (props) => <Toolbar {...props} emptyEvents={emptyEvents} />, toolbar: (props) => <Toolbar {...props} emptyEvents={emptyEvents} />,

View File

@ -15,6 +15,7 @@ $today-highlight-bg: transparent;
.rbc-date-cell, .rbc-header { .rbc-date-cell, .rbc-header {
min-width: 97px; min-width: 97px;
font-size: 14px;
} }
.rbc-date-cell.rbc-now { .rbc-date-cell.rbc-now {
@ -78,6 +79,10 @@ $today-highlight-bg: transparent;
height: fit-content; height: fit-content;
table-layout: fixed; table-layout: fixed;
width: 100%; width: 100%;
&:last-child {
margin-bottom: 150px;
}
} }
.event-properties { .event-properties {

View File

@ -71,7 +71,7 @@ export const Column = memo(
return ( return (
<div key={id} className='column flex w-[230px] flex-col gap-4'> <div key={id} className='column flex w-[230px] flex-col gap-4'>
<div className='column-header flex h-[24px] items-center text-xs font-medium'>{header}</div> <div className='column-header flex h-[24px] items-center text-sm font-medium'>{header}</div>
<div className={'w-full flex-1 overflow-hidden'}> <div className={'w-full flex-1 overflow-hidden'}>
<AutoSizer> <AutoSizer>
@ -79,6 +79,7 @@ export const Column = memo(
return ( return (
<VariableSizeList <VariableSizeList
ref={ref} ref={ref}
className={'pb-[150px]'}
height={height} height={height}
itemCount={rowCount} itemCount={rowCount}
itemSize={getItemSize} itemSize={getItemSize}

View File

@ -1,6 +1,7 @@
import { CalendarEvent } from '@/application/database-yjs'; import { CalendarEvent } from '@/application/database-yjs';
import { RichTooltip } from '@/components/_shared/popover'; import { RichTooltip } from '@/components/_shared/popover';
import NoDateRow from '@/components/database/components/calendar/toolbar/NoDateRow'; import NoDateRow from '@/components/database/components/calendar/toolbar/NoDateRow';
import { Button } from '@mui/material';
import React, { useMemo } from 'react'; import React, { useMemo } from 'react';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
@ -29,12 +30,16 @@ function NoDate({ emptyEvents }: { emptyEvents: CalendarEvent[] }) {
setOpen(false); setOpen(false);
}} }}
> >
<span <Button
className={' whitespace-nowrap rounded-md border border-line-divider border-line-divider p-1 px-2'} size={'small'}
variant={'outlined'}
disabled
className={'rounded-md border-line-divider'}
color={'inherit'}
// onClick={() => setOpen(true)} // onClick={() => setOpen(true)}
> >
{`${t('calendar.settings.noDateTitle')} (${emptyEvents.length})`} {`${t('calendar.settings.noDateTitle')} (${emptyEvents.length})`}
</span> </Button>
</RichTooltip> </RichTooltip>
); );
} }

View File

@ -23,7 +23,7 @@ export function Toolbar({
return ( return (
<div className={'flex items-center justify-between overflow-x-auto overflow-y-hidden'}> <div className={'flex items-center justify-between overflow-x-auto overflow-y-hidden'}>
<div className={'whitespace-nowrap text-sm font-medium'}>{dateStr}</div> <div className={'whitespace-nowrap text-base font-medium'}>{dateStr}</div>
<div className={'flex items-center justify-end gap-2'}> <div className={'flex items-center justify-end gap-2'}>
<IconButton size={'small'} onClick={() => onNavigate('PREV')}> <IconButton size={'small'} onClick={() => onNavigate('PREV')}>
<LeftArrow /> <LeftArrow />

View File

@ -10,7 +10,7 @@ export function CheckboxCell({ cell, style }: CellProps<CheckboxCellType>) {
return ( return (
<div style={style} className='relative flex w-full items-center text-lg text-fill-default'> <div style={style} className='relative flex w-full items-center text-lg text-fill-default'>
{checked ? <CheckboxCheckSvg className={'h-4 w-4'} /> : <CheckboxUncheckSvg className={'h-4 w-4'} />} {checked ? <CheckboxCheckSvg className={'h-5 w-5'} /> : <CheckboxUncheckSvg className={'h-5 w-5'} />}
</div> </div>
); );
} }

View File

@ -53,7 +53,7 @@ export function GridCell({ onResize, rowId, fieldId, columnIndex, rowIndex }: Gr
if (!field) return null; if (!field) return null;
return ( return (
<div ref={ref} className={'grid-cell flex min-h-full w-full cursor-text items-center overflow-hidden text-xs'}> <div ref={ref} className={'grid-cell flex min-h-full w-full cursor-text items-center overflow-hidden text-sm'}>
<Component cell={cell} rowId={rowId} fieldId={fieldId} /> <Component cell={cell} rowId={rowId} fieldId={fieldId} />
</div> </div>
); );

View File

@ -26,11 +26,11 @@ export function GridColumn({ column, index }: { column: Column; index: number })
borderLeftWidth: index === 0 ? 0 : 1, borderLeftWidth: index === 0 ? 0 : 1,
}} }}
className={ className={
'flex h-full w-full items-center overflow-hidden whitespace-nowrap border-t border-b border-l border-line-divider px-1.5 text-xs font-medium hover:bg-fill-list-active' 'flex h-full w-full items-center gap-1 overflow-hidden whitespace-nowrap border-t border-b border-l border-line-divider px-2 text-sm font-medium hover:bg-fill-list-active'
} }
> >
<div className={'w-5'}> <div className={'w-5'}>
<FieldTypeIcon type={type} className={'mr-1 h-4 w-4'} /> <FieldTypeIcon type={type} className={'mr-1 h-5 w-5'} />
</div> </div>
<div className={'flex-1'}>{name}</div> <div className={'flex-1'}>{name}</div>
{isAIField && <AIIndicatorSvg className={'text-xl'} />} {isAIField && <AIIndicatorSvg className={'text-xl'} />}

View File

@ -126,7 +126,7 @@ export const GridTable = ({ scrollLeft, columnWidth, columns, onScrollLeft }: Gr
columnCount={columns.length} columnCount={columns.length}
columnWidth={(index) => columnWidth(index, width)} columnWidth={(index) => columnWidth(index, width)}
rowHeight={rowHeight} rowHeight={rowHeight}
className={'grid-table pb-6'} className={'grid-table pb-[150px]'}
overscanRowCount={5} overscanRowCount={5}
overscanColumnCount={5} overscanColumnCount={5}
style={{ style={{

View File

@ -12,7 +12,7 @@ export const ViewTabs = styled((props: TabsProps) => <Tabs {...props} />)({
export const ViewTab = styled((props: TabProps) => <Tab disableRipple {...props} />)({ export const ViewTab = styled((props: TabProps) => <Tab disableRipple {...props} />)({
padding: '0 12px', padding: '0 12px',
minHeight: '24px', minHeight: '24px',
fontSize: '12px', fontSize: '14px',
minWidth: 'unset', minWidth: 'unset',
margin: '4px 0', margin: '4px 0',
borderRadius: 0, borderRadius: 0,

View File

@ -7,17 +7,16 @@ import { useTranslation } from 'react-i18next';
function MentionPage({ pageId }: { pageId: string }) { function MentionPage({ pageId }: { pageId: string }) {
const context = useEditorContext(); const context = useEditorContext();
const { navigateToView, loadViewMeta, loadView } = context; const { navigateToView, loadViewMeta } = context;
const [unPublished, setUnPublished] = useState(false); const [unPublished, setUnPublished] = useState(false);
const [meta, setMeta] = useState<ViewMeta | null>(null); const [meta, setMeta] = useState<ViewMeta | null>(null);
useEffect(() => { useEffect(() => {
void (async () => { void (async () => {
if (loadViewMeta && loadView) { if (loadViewMeta) {
setUnPublished(false); setUnPublished(false);
try { try {
await loadView(pageId); const meta = await loadViewMeta(pageId, setMeta);
const meta = await loadViewMeta(pageId);
setMeta(meta); setMeta(meta);
} catch (e) { } catch (e) {
@ -25,7 +24,7 @@ function MentionPage({ pageId }: { pageId: string }) {
} }
} }
})(); })();
}, [loadViewMeta, pageId, loadView]); }, [loadViewMeta, pageId]);
const icon = useMemo(() => { const icon = useMemo(() => {
return meta?.icon; return meta?.icon;

View File

@ -1,10 +1,16 @@
import { openOrDownload } from '@/components/publish/header/utils';
import { Button, Typography } from '@mui/material'; import { Button, Typography } from '@mui/material';
import React from 'react'; import React, { useCallback, useEffect } from 'react';
import { ReactComponent as Logo } from '@/assets/logo.svg'; import { ReactComponent as Logo } from '@/assets/logo.svg';
import { ReactComponent as AppflowyLogo } from '@/assets/appflowy.svg'; import { ReactComponent as AppflowyLogo } from '@/assets/appflowy.svg';
function AfterPaymentPage() { function AfterPaymentPage() {
const openAppFlowy = useCallback(() => {
window.open(`appflowy-flutter://payment-success/${window.location.search || ''}`, '_self');
}, []);
useEffect(() => {
openAppFlowy();
}, [openAppFlowy]);
return ( return (
<div className={'m-0 flex h-screen w-screen items-center justify-center bg-bg-body p-6'}> <div className={'m-0 flex h-screen w-screen items-center justify-center bg-bg-body p-6'}>
<div className={'flex max-w-[560px] flex-col items-center gap-1 text-center'}> <div className={'flex max-w-[560px] flex-col items-center gap-1 text-center'}>
@ -24,7 +30,7 @@ function AfterPaymentPage() {
</div> </div>
</div> </div>
<Button <Button
onClick={openOrDownload} onClick={openAppFlowy}
variant='contained' variant='contained'
color='primary' color='primary'
className={ className={

View File

@ -2132,7 +2132,7 @@
"many": "Publish {} selected views", "many": "Publish {} selected views",
"other":"Publish {} selected views" "other":"Publish {} selected views"
}, },
"mustSelectPrimaryDatabase": "The primary database must be selected", "mustSelectPrimaryDatabase": "The primary view must be selected",
"noDatabaseSelected": "No database selected, please select at least one database.", "noDatabaseSelected": "No database selected, please select at least one database.",
"unableToDeselectPrimaryDatabase": "Unable to deselect primary database" "unableToDeselectPrimaryDatabase": "Unable to deselect primary database"
}, },