mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-17 10:06:17 +08:00
fix: exhibition of edgeless
This commit is contained in:
@@ -2,7 +2,7 @@ import { styled, displayFlex } from '@/styles';
|
||||
|
||||
export const StyledEdgelessToolbar = styled.div(({ theme }) => ({
|
||||
height: '320px',
|
||||
position: 'fixed',
|
||||
position: 'absolute',
|
||||
left: '12px',
|
||||
top: 0,
|
||||
bottom: 0,
|
||||
|
||||
@@ -18,7 +18,7 @@ export const DateCell = ({
|
||||
<TableCell ellipsis={true}>
|
||||
{pageMeta[dateKey] === undefined
|
||||
? '--'
|
||||
: dayjs(pageMeta[dateKey] as string).format('YYYY-MM-DD HH:MM')}
|
||||
: dayjs(pageMeta[dateKey] as string).format('YYYY-MM-DD HH:mm')}
|
||||
</TableCell>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -1,16 +1,21 @@
|
||||
import { PageMeta, useEditor } from '@/providers/editor-provider';
|
||||
import { FavouritedIcon, FavouritesIcon } from '@blocksuite/icons';
|
||||
import {
|
||||
FavouritedIcon,
|
||||
FavouritesIcon,
|
||||
PaperIcon,
|
||||
EdgelessIcon,
|
||||
} from '@blocksuite/icons';
|
||||
import {
|
||||
StyledFavoriteButton,
|
||||
StyledTableContainer,
|
||||
StyledTableRow,
|
||||
StyledTitleContent,
|
||||
StyledTitleLink,
|
||||
StyledTitleWrapper,
|
||||
} from './styles';
|
||||
import { Table, TableBody, TableCell, TableHead, TableRow } from '@/ui/table';
|
||||
import { OperationCell, TrashOperationCell } from './operation-cell';
|
||||
import Empty from './empty';
|
||||
import Link from 'next/link';
|
||||
import { Content } from '@/ui/layout';
|
||||
import React from 'react';
|
||||
import DateCell from '@/components/page-list/date-cell';
|
||||
const FavoriteTag = ({ pageMeta }: { pageMeta: PageMeta }) => {
|
||||
@@ -50,7 +55,7 @@ export const PageList = ({
|
||||
<TableCell proportion={0.5}>Documents</TableCell>
|
||||
<TableCell proportion={0.2}>Created</TableCell>
|
||||
<TableCell proportion={0.2}>
|
||||
{isTrash ? 'Moved to Trash' : 'Uploaded'}
|
||||
{isTrash ? 'Moved to Trash' : 'Updated'}
|
||||
</TableCell>
|
||||
<TableCell proportion={0.1}></TableCell>
|
||||
</TableRow>
|
||||
@@ -61,13 +66,18 @@ export const PageList = ({
|
||||
<StyledTableRow key={`${pageMeta.id}-${index}`}>
|
||||
<TableCell>
|
||||
<StyledTitleWrapper>
|
||||
<Link
|
||||
<StyledTitleLink
|
||||
href={{ pathname: '/', query: { pageId: pageMeta.id } }}
|
||||
>
|
||||
<StyledTitleContent>
|
||||
{pageMeta.title || pageMeta.id}
|
||||
</StyledTitleContent>
|
||||
</Link>
|
||||
{pageMeta.mode === 'edgeless' ? (
|
||||
<EdgelessIcon />
|
||||
) : (
|
||||
<PaperIcon />
|
||||
)}
|
||||
<Content ellipsis={true} color="inherit">
|
||||
{pageMeta.title || 'Untitled'}
|
||||
</Content>
|
||||
</StyledTitleLink>
|
||||
{showFavoriteTag && <FavoriteTag pageMeta={pageMeta} />}
|
||||
</StyledTitleWrapper>
|
||||
</TableCell>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { displayFlex, styled, textEllipsis } from '@/styles';
|
||||
import { TableRow } from '@/ui/table';
|
||||
import Link from 'next/link';
|
||||
|
||||
export const StyledTableContainer = styled.div(() => {
|
||||
return {
|
||||
@@ -22,11 +23,23 @@ export const StyledTitleWrapper = styled.div(({ theme }) => {
|
||||
},
|
||||
};
|
||||
});
|
||||
export const StyledTitleContent = styled.div(({ theme }) => {
|
||||
export const StyledTitleLink = styled(Link)(({ theme }) => {
|
||||
return {
|
||||
maxWidth: '90%',
|
||||
maxWidth: '80%',
|
||||
marginRight: '18px',
|
||||
...textEllipsis(1),
|
||||
...displayFlex('flex-start', 'center'),
|
||||
color: theme.colors.textColor,
|
||||
'>svg': {
|
||||
fontSize: '24px',
|
||||
marginRight: '12px',
|
||||
color: theme.colors.iconColor,
|
||||
},
|
||||
':hover': {
|
||||
color: theme.colors.textColor,
|
||||
'>svg': {
|
||||
color: theme.colors.primaryColor,
|
||||
},
|
||||
},
|
||||
};
|
||||
});
|
||||
export const StyledFavoriteButton = styled.button<{ favorite: boolean }>(
|
||||
|
||||
Reference in New Issue
Block a user