chore(core): removed obsolete TODO (#7337)
Cleaned up some TODOs that no longer need to be done
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
import { notify } from '@affine/component';
|
||||||
import { updateReadyAtom } from '@affine/core/hooks/use-app-updater';
|
import { updateReadyAtom } from '@affine/core/hooks/use-app-updater';
|
||||||
import { apis } from '@affine/electron-api';
|
import { apis } from '@affine/electron-api';
|
||||||
import type { useI18n } from '@affine/i18n';
|
import type { useI18n } from '@affine/i18n';
|
||||||
@@ -24,7 +25,10 @@ export function registerAffineUpdatesCommands({
|
|||||||
preconditionStrategy: () => !!store.get(updateReadyAtom),
|
preconditionStrategy: () => !!store.get(updateReadyAtom),
|
||||||
run() {
|
run() {
|
||||||
apis?.updater.quitAndInstall().catch(err => {
|
apis?.updater.quitAndInstall().catch(err => {
|
||||||
// TODO(@JimmFly): add error toast here
|
notify.error({
|
||||||
|
title: 'Failed to restart to upgrade',
|
||||||
|
message: 'Please restart the app manually to upgrade.',
|
||||||
|
});
|
||||||
console.error(err);
|
console.error(err);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -81,10 +81,6 @@ export const LabelsPanel = () => {
|
|||||||
condition: workspace.flavour === 'affine-cloud',
|
condition: workspace.flavour === 'affine-cloud',
|
||||||
label: 'syncCloud',
|
label: 'syncCloud',
|
||||||
},
|
},
|
||||||
//TODO(@JimmFly): add these labels
|
|
||||||
// { status==="synced", label: 'availableOffline' }
|
|
||||||
// { workspace.flavour === 'affine-Docker', label: 'syncDocker' }
|
|
||||||
// { workspace.flavour === 'self-hosted', label: 'selfHosted' }
|
|
||||||
];
|
];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -29,7 +29,6 @@ export const descriptionStyle = style({
|
|||||||
});
|
});
|
||||||
export const buttonStyle = style({
|
export const buttonStyle = style({
|
||||||
marginTop: '18px',
|
marginTop: '18px',
|
||||||
// todo(@JimmFly): new color scheme should be used
|
|
||||||
});
|
});
|
||||||
export const actionsStyle = style({
|
export const actionsStyle = style({
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
|
|||||||
@@ -66,7 +66,6 @@ globalStyle(`[data-draggable=true][data-dragging=true] ${dndCell}:before`, {
|
|||||||
opacity: 1,
|
opacity: 1,
|
||||||
});
|
});
|
||||||
|
|
||||||
// TODO(@JimmFly): remove global style
|
|
||||||
globalStyle(`${root} > :first-child`, {
|
globalStyle(`${root} > :first-child`, {
|
||||||
paddingLeft: '16px',
|
paddingLeft: '16px',
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -109,7 +109,6 @@ export const CollectionListItem = (props: CollectionListItemProps) => {
|
|||||||
props.title,
|
props.title,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// TODO(@JimmFly): use getDropItemId
|
|
||||||
const { setNodeRef, attributes, listeners, isDragging } = useDraggable({
|
const { setNodeRef, attributes, listeners, isDragging } = useDraggable({
|
||||||
id: getDNDId('collection-list', 'collection', props.collectionId),
|
id: getDNDId('collection-list', 'collection', props.collectionId),
|
||||||
data: {
|
data: {
|
||||||
|
|||||||
@@ -66,7 +66,6 @@ globalStyle(`[data-draggable=true][data-dragging=true] ${dndCell}:before`, {
|
|||||||
opacity: 1,
|
opacity: 1,
|
||||||
});
|
});
|
||||||
|
|
||||||
// TODO(@JimmFly): remove global style
|
|
||||||
globalStyle(`${root} > :first-child`, {
|
globalStyle(`${root} > :first-child`, {
|
||||||
paddingLeft: '16px',
|
paddingLeft: '16px',
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -167,7 +167,6 @@ export const PageListItem = (props: PageListItemProps) => {
|
|||||||
props.title,
|
props.title,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// TODO(@JimmFly): use getDropItemId
|
|
||||||
const { setNodeRef, attributes, listeners, isDragging } = useDraggable({
|
const { setNodeRef, attributes, listeners, isDragging } = useDraggable({
|
||||||
id: getDNDId('doc-list', 'doc', props.pageId),
|
id: getDNDId('doc-list', 'doc', props.pageId),
|
||||||
data: {
|
data: {
|
||||||
|
|||||||
@@ -65,7 +65,6 @@ globalStyle(`[data-draggable=true][data-dragging=true] ${dndCell}:before`, {
|
|||||||
opacity: 1,
|
opacity: 1,
|
||||||
});
|
});
|
||||||
|
|
||||||
// TODO(@JimmFly): remove global style
|
|
||||||
globalStyle(`${root} > :first-child`, {
|
globalStyle(`${root} > :first-child`, {
|
||||||
paddingLeft: '16px',
|
paddingLeft: '16px',
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -98,7 +98,6 @@ export const TagListItem = (props: TagListItemProps) => {
|
|||||||
);
|
);
|
||||||
}, [props.color, props.onSelectedChange, props.selectable, props.selected]);
|
}, [props.color, props.onSelectedChange, props.selectable, props.selected]);
|
||||||
|
|
||||||
// TODO(@JimmFly): use getDropItemId
|
|
||||||
const { setNodeRef, attributes, listeners, isDragging } = useDraggable({
|
const { setNodeRef, attributes, listeners, isDragging } = useDraggable({
|
||||||
id: getDNDId('tag-list', 'tag', props.tagId),
|
id: getDNDId('tag-list', 'tag', props.tagId),
|
||||||
data: {
|
data: {
|
||||||
|
|||||||
@@ -74,9 +74,7 @@ export type TagListItemProps = {
|
|||||||
export interface ItemListHeaderProps {}
|
export interface ItemListHeaderProps {}
|
||||||
|
|
||||||
// TODO(@JimmFly): a temporary solution. may need to be refactored later
|
// TODO(@JimmFly): a temporary solution. may need to be refactored later
|
||||||
export type ItemGroupByType = 'createDate' | 'updatedDate'; // TODO(@JimmFly): can add more later
|
export type ItemGroupByType = 'createDate' | 'updatedDate';
|
||||||
|
|
||||||
// TODO(@JimmFly): a temporary solution. may need to be refactored later
|
|
||||||
export interface SortBy {
|
export interface SortBy {
|
||||||
key: 'createDate' | 'updatedDate';
|
key: 'createDate' | 'updatedDate';
|
||||||
order: 'asc' | 'desc';
|
order: 'asc' | 'desc';
|
||||||
|
|||||||
@@ -22,7 +22,6 @@ export const affineDocViewport = style({
|
|||||||
flexDirection: 'column',
|
flexDirection: 'column',
|
||||||
userSelect: 'none',
|
userSelect: 'none',
|
||||||
containerName: 'viewport',
|
containerName: 'viewport',
|
||||||
// TODO(@JimmFly): find out what this does in bs
|
|
||||||
containerType: 'inline-size',
|
containerType: 'inline-size',
|
||||||
background: cssVar('backgroundPrimaryColor'),
|
background: cssVar('backgroundPrimaryColor'),
|
||||||
'@media': {
|
'@media': {
|
||||||
|
|||||||
Reference in New Issue
Block a user