mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 21:05:19 +00:00
feat: add affine global channel (#1762)
This commit is contained in:
@@ -3,7 +3,7 @@ import type React from 'react';
|
||||
import { memo } from 'react';
|
||||
|
||||
import { useBlockSuiteWorkspaceAvatarUrl } from '../../../hooks/use-blocksuite-workspace-avatar-url';
|
||||
import type { BlockSuiteWorkspace, RemWorkspace } from '../../../shared';
|
||||
import type { AllWorkspace, BlockSuiteWorkspace } from '../../../shared';
|
||||
import { stringToColour } from '../../../utils';
|
||||
|
||||
interface AvatarProps {
|
||||
@@ -75,7 +75,7 @@ export const Avatar: React.FC<AvatarProps> = memo<AvatarProps>(function Avatar({
|
||||
|
||||
export type WorkspaceUnitAvatarProps = {
|
||||
size?: number;
|
||||
workspace: RemWorkspace | null;
|
||||
workspace: AllWorkspace | null;
|
||||
style?: React.CSSProperties;
|
||||
};
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import type React from 'react';
|
||||
import { useCallback } from 'react';
|
||||
|
||||
import { useBlockSuiteWorkspaceName } from '../../../hooks/use-blocksuite-workspace-name';
|
||||
import type { RemWorkspace } from '../../../shared';
|
||||
import type { AllWorkspace } from '../../../shared';
|
||||
import {
|
||||
CloudWorkspaceIcon,
|
||||
JoinedWorkspaceIcon,
|
||||
@@ -22,7 +22,7 @@ import {
|
||||
StyleWorkspaceTitle,
|
||||
} from './styles';
|
||||
export type WorkspaceTypeProps = {
|
||||
workspace: RemWorkspace;
|
||||
workspace: AllWorkspace;
|
||||
};
|
||||
|
||||
const WorkspaceType: React.FC<WorkspaceTypeProps> = ({ workspace }) => {
|
||||
@@ -58,9 +58,9 @@ const WorkspaceType: React.FC<WorkspaceTypeProps> = ({ workspace }) => {
|
||||
|
||||
export type WorkspaceCardProps = {
|
||||
currentWorkspaceId: string | null;
|
||||
workspace: RemWorkspace;
|
||||
onClick: (workspace: RemWorkspace) => void;
|
||||
onSettingClick: (workspace: RemWorkspace) => void;
|
||||
workspace: AllWorkspace;
|
||||
onClick: (workspace: AllWorkspace) => void;
|
||||
onSettingClick: (workspace: AllWorkspace) => void;
|
||||
};
|
||||
|
||||
export const WorkspaceCard: React.FC<WorkspaceCardProps> = ({
|
||||
|
||||
@@ -8,7 +8,7 @@ import { useTranslation } from '@affine/i18n';
|
||||
import type { AccessTokenMessage } from '@affine/workspace/affine/login';
|
||||
import { HelpIcon, PlusIcon } from '@blocksuite/icons';
|
||||
|
||||
import type { RemWorkspace } from '../../../shared';
|
||||
import type { AllWorkspace } from '../../../shared';
|
||||
import { Footer } from '../footer';
|
||||
import { WorkspaceCard } from '../workspace-card';
|
||||
import { LanguageMenu } from './language-menu';
|
||||
@@ -28,12 +28,12 @@ import {
|
||||
|
||||
interface WorkspaceModalProps {
|
||||
user: AccessTokenMessage | null;
|
||||
workspaces: RemWorkspace[];
|
||||
currentWorkspaceId: RemWorkspace['id'] | null;
|
||||
workspaces: AllWorkspace[];
|
||||
currentWorkspaceId: AllWorkspace['id'] | null;
|
||||
open: boolean;
|
||||
onClose: () => void;
|
||||
onClickWorkspace: (workspace: RemWorkspace) => void;
|
||||
onClickWorkspaceSetting: (workspace: RemWorkspace) => void;
|
||||
onClickWorkspace: (workspace: AllWorkspace) => void;
|
||||
onClickWorkspaceSetting: (workspace: AllWorkspace) => void;
|
||||
onClickLogin: () => void;
|
||||
onClickLogout: () => void;
|
||||
onCreateWorkspace: () => void;
|
||||
|
||||
@@ -5,7 +5,7 @@ import type { PageMeta } from '@blocksuite/store';
|
||||
import type { MouseEvent } from 'react';
|
||||
import { useCallback, useMemo, useState } from 'react';
|
||||
|
||||
import type { RemWorkspace } from '../../../shared';
|
||||
import type { AllWorkspace } from '../../../shared';
|
||||
import type { TreeNode } from '../../affine/pivots';
|
||||
import {
|
||||
PivotRender,
|
||||
@@ -20,7 +20,7 @@ export const PivotInternal = ({
|
||||
openPage,
|
||||
allMetas,
|
||||
}: {
|
||||
currentWorkspace: RemWorkspace;
|
||||
currentWorkspace: AllWorkspace;
|
||||
openPage: (pageId: string) => void;
|
||||
allMetas: PageMeta[];
|
||||
}) => {
|
||||
@@ -68,7 +68,7 @@ export const Pivots = ({
|
||||
openPage,
|
||||
allMetas,
|
||||
}: {
|
||||
currentWorkspace: RemWorkspace;
|
||||
currentWorkspace: AllWorkspace;
|
||||
openPage: (pageId: string) => void;
|
||||
allMetas: PageMeta[];
|
||||
}) => {
|
||||
|
||||
@@ -3,7 +3,7 @@ import type React from 'react';
|
||||
|
||||
import { useCurrentWorkspace } from '../../../../hooks/current/use-current-workspace';
|
||||
import { useBlockSuiteWorkspaceName } from '../../../../hooks/use-blocksuite-workspace-name';
|
||||
import type { RemWorkspace } from '../../../../shared';
|
||||
import type { AllWorkspace } from '../../../../shared';
|
||||
import { WorkspaceAvatar } from '../../workspace-avatar';
|
||||
import {
|
||||
StyledSelectorContainer,
|
||||
@@ -13,7 +13,7 @@ import {
|
||||
} from './styles';
|
||||
|
||||
export type WorkspaceSelectorProps = {
|
||||
currentWorkspace: RemWorkspace | null;
|
||||
currentWorkspace: AllWorkspace | null;
|
||||
onClick: () => void;
|
||||
};
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ import { useCallback } from 'react';
|
||||
|
||||
import { useSidebarStatus } from '../../../hooks/affine/use-sidebar-status';
|
||||
import { usePageMeta } from '../../../hooks/use-page-meta';
|
||||
import type { RemWorkspace } from '../../../shared';
|
||||
import type { AllWorkspace } from '../../../shared';
|
||||
import { SidebarSwitch } from '../../affine/sidebar-switch';
|
||||
import { ChangeLog } from './changeLog';
|
||||
import Favorite from './favorite';
|
||||
@@ -39,7 +39,7 @@ export type WorkSpaceSliderBarProps = {
|
||||
isPublicWorkspace: boolean;
|
||||
onOpenQuickSearchModal: () => void;
|
||||
onOpenWorkspaceListModal: () => void;
|
||||
currentWorkspace: RemWorkspace | null;
|
||||
currentWorkspace: AllWorkspace | null;
|
||||
currentPageId: string | null;
|
||||
openPage: (pageId: string) => void;
|
||||
createPage: () => Page;
|
||||
|
||||
Reference in New Issue
Block a user