feat(core): edit and delete pinned collections in all docs (#12296)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added the ability to edit and remove pinned collections directly from the workspace UI. - Improved filter management with clearer handling of temporary filters and editing workflows. - Enhanced synchronization and readiness tracking for collections and pinned collections, resulting in more responsive and reliable updates. - **Style** - Updated pinned collection item styles for better interaction feedback, including new edit and remove button visuals. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -3,7 +3,7 @@ import type {
|
||||
TableSchemaBuilder,
|
||||
} from '@toeverything/infra';
|
||||
import { Entity, LiveData } from '@toeverything/infra';
|
||||
import { map } from 'rxjs';
|
||||
import { distinctUntilChanged, map } from 'rxjs';
|
||||
|
||||
import type { WorkspaceService } from '../../workspace';
|
||||
|
||||
@@ -19,10 +19,23 @@ export class WorkspaceDBTable<
|
||||
super();
|
||||
}
|
||||
|
||||
isReady$ = LiveData.from(
|
||||
this.workspaceService.workspace.engine.doc
|
||||
.docState$(this.props.storageDocId)
|
||||
.pipe(
|
||||
map(docState => docState.ready),
|
||||
distinctUntilChanged()
|
||||
),
|
||||
false
|
||||
);
|
||||
|
||||
isSyncing$ = LiveData.from(
|
||||
this.workspaceService.workspace.engine.doc
|
||||
.docState$(this.props.storageDocId)
|
||||
.pipe(map(docState => docState.syncing)),
|
||||
.pipe(
|
||||
map(docState => docState.syncing),
|
||||
distinctUntilChanged()
|
||||
),
|
||||
false
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user