mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-23 21:06:22 +08:00
Merge branch 'feat/cloud-sync-saika' into feat/poc
This commit is contained in:
@@ -1,5 +1,4 @@
|
|||||||
**/webpack.config.js
|
**/webpack.config.js
|
||||||
**/jest.config.js
|
|
||||||
**/scripts/*.js
|
**/scripts/*.js
|
||||||
**/node_modules/**
|
**/node_modules/**
|
||||||
.github/**
|
.github/**
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ jobs:
|
|||||||
scope: '@toeverything'
|
scope: '@toeverything'
|
||||||
cache: 'pnpm'
|
cache: 'pnpm'
|
||||||
|
|
||||||
- run: node scripts/module-resolve/ci.js
|
- run: node scripts/module-resolve/ci.cjs
|
||||||
|
|
||||||
- name: Restore cache
|
- name: Restore cache
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
|
|||||||
@@ -244,7 +244,7 @@ jobs:
|
|||||||
scope: '@toeverything'
|
scope: '@toeverything'
|
||||||
cache: 'pnpm'
|
cache: 'pnpm'
|
||||||
|
|
||||||
- run: node scripts/module-resolve/ci.js
|
- run: node scripts/module-resolve/ci.cjs
|
||||||
|
|
||||||
- name: Restore cache
|
- name: Restore cache
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ jobs:
|
|||||||
scope: '@toeverything'
|
scope: '@toeverything'
|
||||||
cache: 'pnpm'
|
cache: 'pnpm'
|
||||||
|
|
||||||
- run: node scripts/module-resolve/ci.js
|
- run: node scripts/module-resolve/ci.cjs
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pnpm install --no-frozen-lockfile
|
run: pnpm install --no-frozen-lockfile
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ Thumbs.db
|
|||||||
out/
|
out/
|
||||||
|
|
||||||
module-resolve.js
|
module-resolve.js
|
||||||
|
module-resolve.cjs
|
||||||
/test-results/
|
/test-results/
|
||||||
/playwright-report/
|
/playwright-report/
|
||||||
/playwright/.cache/
|
/playwright/.cache/
|
||||||
|
|||||||
+2
-2
@@ -1,11 +1,11 @@
|
|||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
|
|
||||||
function getCustomize() {
|
function getCustomize() {
|
||||||
const customed = fs.existsSync('./module-resolve.js');
|
const customed = fs.existsSync('./module-resolve.cjs');
|
||||||
if (!customed) {
|
if (!customed) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
const script = require('./module-resolve.js');
|
const script = require('./module-resolve.cjs');
|
||||||
return script && script.resolve;
|
return script && script.resolve;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Vendored
+6
-1
@@ -1,3 +1,8 @@
|
|||||||
{
|
{
|
||||||
"recommendations": ["ms-playwright.playwright", "esbenp.prettier-vscode"]
|
"recommendations": [
|
||||||
|
"ms-playwright.playwright",
|
||||||
|
"esbenp.prettier-vscode",
|
||||||
|
"deepscan.vscode-deepscan",
|
||||||
|
"streetsidesoftware.code-spell-checker"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
"private": true,
|
"private": true,
|
||||||
"author": "toeverything",
|
"author": "toeverything",
|
||||||
"license": "MPL-2.0",
|
"license": "MPL-2.0",
|
||||||
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "pnpm --filter=!@affine/app build && pnpm --filter @affine/app dev",
|
"dev": "pnpm --filter=!@affine/app build && pnpm --filter @affine/app dev",
|
||||||
"dev:ac": "pnpm --filter=!@affine/app build && NODE_API_SERVER=ac pnpm --filter @affine/app dev",
|
"dev:ac": "pnpm --filter=!@affine/app build && NODE_API_SERVER=ac pnpm --filter @affine/app dev",
|
||||||
|
|||||||
@@ -1,5 +0,0 @@
|
|||||||
/** @type {import('ts-jest').JestConfigWithTsJest} */
|
|
||||||
module.exports = {
|
|
||||||
preset: 'ts-jest',
|
|
||||||
testEnvironment: 'node',
|
|
||||||
};
|
|
||||||
@@ -8,7 +8,7 @@ import {
|
|||||||
TelegramIcon,
|
TelegramIcon,
|
||||||
RedditIcon,
|
RedditIcon,
|
||||||
LinkIcon,
|
LinkIcon,
|
||||||
} from './icons';
|
} from './Icons';
|
||||||
import logo from './affine-text-logo.png';
|
import logo from './affine-text-logo.png';
|
||||||
import {
|
import {
|
||||||
StyledBigLink,
|
StyledBigLink,
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import {
|
|||||||
ConnectorIcon,
|
ConnectorIcon,
|
||||||
UndoIcon,
|
UndoIcon,
|
||||||
RedoIcon,
|
RedoIcon,
|
||||||
} from './icons';
|
} from './Icons';
|
||||||
import { Tooltip } from '@/ui/tooltip';
|
import { Tooltip } from '@/ui/tooltip';
|
||||||
import Slide from '@mui/material/Slide';
|
import Slide from '@mui/material/Slide';
|
||||||
import useCurrentPageMeta from '@/hooks/use-current-page-meta';
|
import useCurrentPageMeta from '@/hooks/use-current-page-meta';
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ import type {
|
|||||||
AnimateRadioProps,
|
AnimateRadioProps,
|
||||||
AnimateRadioItemProps,
|
AnimateRadioItemProps,
|
||||||
} from './type';
|
} from './type';
|
||||||
import { useTheme } from '@/providers/themeProvider';
|
import { useTheme } from '@/providers/ThemeProvider';
|
||||||
import { EdgelessIcon, PaperIcon } from './icons';
|
import { EdgelessIcon, PaperIcon } from './Icons';
|
||||||
import useCurrentPageMeta from '@/hooks/use-current-page-meta';
|
import useCurrentPageMeta from '@/hooks/use-current-page-meta';
|
||||||
import { usePageHelper } from '@/hooks/use-page-helper';
|
import { usePageHelper } from '@/hooks/use-page-helper';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
|||||||
+2
-2
@@ -8,8 +8,8 @@ import {
|
|||||||
import { Content } from '@/ui/layout';
|
import { Content } from '@/ui/layout';
|
||||||
import { useAppState } from '@/providers/app-state-provider/context';
|
import { useAppState } from '@/providers/app-state-provider/context';
|
||||||
import EditorModeSwitch from '@/components/editor-mode-switch';
|
import EditorModeSwitch from '@/components/editor-mode-switch';
|
||||||
import QuickSearchButton from './quick-search-button';
|
import QuickSearchButton from './QuickSearchButton';
|
||||||
import Header from './header';
|
import Header from './Header';
|
||||||
import usePropsUpdated from '@/hooks/use-props-updated';
|
import usePropsUpdated from '@/hooks/use-props-updated';
|
||||||
import useCurrentPageMeta from '@/hooks/use-current-page-meta';
|
import useCurrentPageMeta from '@/hooks/use-current-page-meta';
|
||||||
|
|
||||||
+3
-3
@@ -8,10 +8,10 @@ import {
|
|||||||
} from './styles';
|
} from './styles';
|
||||||
import CloseIcon from '@mui/icons-material/Close';
|
import CloseIcon from '@mui/icons-material/Close';
|
||||||
import { getWarningMessage, shouldShowWarning } from './utils';
|
import { getWarningMessage, shouldShowWarning } from './utils';
|
||||||
import EditorOptionMenu from './header-right-items/editor-option-menu';
|
import EditorOptionMenu from './header-right-items/EditorOptionMenu';
|
||||||
import TrashButtonGroup from './header-right-items/trash-button-group';
|
import TrashButtonGroup from './header-right-items/TrashButtonGroup';
|
||||||
import ThemeModeSwitch from './header-right-items/theme-mode-switch';
|
import ThemeModeSwitch from './header-right-items/theme-mode-switch';
|
||||||
import SyncUser from './header-right-items/sync-user';
|
import SyncUser from './header-right-items/SyncUser';
|
||||||
|
|
||||||
const BrowserWarning = ({
|
const BrowserWarning = ({
|
||||||
show,
|
show,
|
||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
import { PropsWithChildren, ReactNode } from 'react';
|
import { PropsWithChildren, ReactNode } from 'react';
|
||||||
import Header from './header';
|
import Header from './Header';
|
||||||
import { StyledPageListTittleWrapper } from './styles';
|
import { StyledPageListTittleWrapper } from './styles';
|
||||||
import QuickSearchButton from './quick-search-button';
|
import QuickSearchButton from './QuickSearchButton';
|
||||||
|
|
||||||
export type PageListHeaderProps = PropsWithChildren<{
|
export type PageListHeaderProps = PropsWithChildren<{
|
||||||
icon?: ReactNode;
|
icon?: ReactNode;
|
||||||
+1
-1
@@ -2,7 +2,7 @@ import React from 'react';
|
|||||||
import { IconButton, IconButtonProps } from '@/ui/button';
|
import { IconButton, IconButtonProps } from '@/ui/button';
|
||||||
import { Tooltip } from '@/ui/tooltip';
|
import { Tooltip } from '@/ui/tooltip';
|
||||||
import { ArrowDownIcon } from '@blocksuite/icons';
|
import { ArrowDownIcon } from '@blocksuite/icons';
|
||||||
import { useModal } from '@/providers/global-modal-provider';
|
import { useModal } from '@/providers/GlobalModalProvider';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
export const QuickSearchButton = ({
|
export const QuickSearchButton = ({
|
||||||
onClick,
|
onClick,
|
||||||
+1
-1
@@ -13,7 +13,7 @@ import {
|
|||||||
} from '@blocksuite/icons';
|
} from '@blocksuite/icons';
|
||||||
import { useAppState } from '@/providers/app-state-provider';
|
import { useAppState } from '@/providers/app-state-provider';
|
||||||
import { usePageHelper } from '@/hooks/use-page-helper';
|
import { usePageHelper } from '@/hooks/use-page-helper';
|
||||||
import { useConfirm } from '@/providers/confirm-provider';
|
import { useConfirm } from '@/providers/ConfirmProvider';
|
||||||
import useCurrentPageMeta from '@/hooks/use-current-page-meta';
|
import useCurrentPageMeta from '@/hooks/use-current-page-meta';
|
||||||
import { toast } from '@/ui/toast';
|
import { toast } from '@/ui/toast';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
import { CloudUnsyncedIcon, CloudInsyncIcon } from '@blocksuite/icons';
|
import { CloudUnsyncedIcon, CloudInsyncIcon } from '@blocksuite/icons';
|
||||||
import { useModal } from '@/providers/global-modal-provider';
|
import { useModal } from '@/providers/GlobalModalProvider';
|
||||||
import { useAppState } from '@/providers/app-state-provider/context';
|
import { useAppState } from '@/providers/app-state-provider/context';
|
||||||
import { IconButton } from '@/ui/button';
|
import { IconButton } from '@/ui/button';
|
||||||
|
|
||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
import { Button } from '@/ui/button';
|
import { Button } from '@/ui/button';
|
||||||
import { usePageHelper } from '@/hooks/use-page-helper';
|
import { usePageHelper } from '@/hooks/use-page-helper';
|
||||||
import { useAppState } from '@/providers/app-state-provider';
|
import { useAppState } from '@/providers/app-state-provider';
|
||||||
import { useConfirm } from '@/providers/confirm-provider';
|
import { useConfirm } from '@/providers/ConfirmProvider';
|
||||||
import { useRouter } from 'next/router';
|
import { useRouter } from 'next/router';
|
||||||
import useCurrentPageMeta from '@/hooks/use-current-page-meta';
|
import useCurrentPageMeta from '@/hooks/use-current-page-meta';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
import { useTheme } from '@/providers/themeProvider';
|
import { useTheme } from '@/providers/ThemeProvider';
|
||||||
import { MoonIcon, SunIcon } from './icons';
|
import { MoonIcon, SunIcon } from './Icons';
|
||||||
import { StyledThemeModeSwitch, StyledSwitchItem } from './style';
|
import { StyledThemeModeSwitch, StyledSwitchItem } from './style';
|
||||||
|
|
||||||
export const ThemeModeSwitch = () => {
|
export const ThemeModeSwitch = () => {
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
export * from './header';
|
export * from './Header';
|
||||||
export * from './editor-header';
|
export * from './EditorHeader';
|
||||||
export * from './page-list-header';
|
export * from './PageListHeader';
|
||||||
|
|||||||
@@ -5,12 +5,12 @@ import {
|
|||||||
StyledIslandWrapper,
|
StyledIslandWrapper,
|
||||||
StyledTransformIcon,
|
StyledTransformIcon,
|
||||||
} from './style';
|
} from './style';
|
||||||
import { CloseIcon, ContactIcon, HelpIcon, KeyboardIcon } from './icons';
|
import { CloseIcon, ContactIcon, HelpIcon, KeyboardIcon } from './Icons';
|
||||||
import Grow from '@mui/material/Grow';
|
import Grow from '@mui/material/Grow';
|
||||||
import { Tooltip } from '@/ui/tooltip';
|
import { Tooltip } from '@/ui/tooltip';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { useModal } from '@/providers/global-modal-provider';
|
import { useModal } from '@/providers/GlobalModalProvider';
|
||||||
import { useTheme } from '@/providers/themeProvider';
|
import { useTheme } from '@/providers/ThemeProvider';
|
||||||
import useCurrentPageMeta from '@/hooks/use-current-page-meta';
|
import useCurrentPageMeta from '@/hooks/use-current-page-meta';
|
||||||
export type IslandItemNames = 'contact' | 'shortcuts';
|
export type IslandItemNames = 'contact' | 'shortcuts';
|
||||||
export const HelpIsland = ({
|
export const HelpIsland = ({
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
import { styled } from '@/styles';
|
import { styled } from '@/styles';
|
||||||
import Loading from './loading';
|
import Loading from './Loading';
|
||||||
|
|
||||||
// Used for the full page loading
|
// Used for the full page loading
|
||||||
const StyledLoadingContainer = styled('div')(() => {
|
const StyledLoadingContainer = styled('div')(() => {
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
import Loading from './loading';
|
import Loading from './Loading';
|
||||||
export * from './page-loading';
|
export * from './PageLoading';
|
||||||
export default Loading;
|
export default Loading;
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import { getDataCenter } from '@affine/datacenter';
|
import { getDataCenter } from '@affine/datacenter';
|
||||||
import { styled } from '@/styles';
|
import { styled } from '@/styles';
|
||||||
import { Button } from '@/ui/button';
|
import { Button } from '@/ui/button';
|
||||||
import { useModal } from '@/providers/global-modal-provider';
|
import { useModal } from '@/providers/GlobalModalProvider';
|
||||||
import { GoogleIcon, StayLogOutIcon } from './icons';
|
import { GoogleIcon, StayLogOutIcon } from './Icons';
|
||||||
|
|
||||||
export const GoogleLoginButton = () => {
|
export const GoogleLoginButton = () => {
|
||||||
const { triggerLoginModal } = useModal();
|
const { triggerLoginModal } = useModal();
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
import { useConfirm } from '@/providers/confirm-provider';
|
import { useConfirm } from '@/providers/ConfirmProvider';
|
||||||
import { PageMeta } from '@/providers/app-state-provider';
|
import { PageMeta } from '@/providers/app-state-provider';
|
||||||
import { Menu, MenuItem } from '@/ui/menu';
|
import { Menu, MenuItem } from '@/ui/menu';
|
||||||
import { Wrapper } from '@/ui/layout';
|
import { Wrapper } from '@/ui/layout';
|
||||||
@@ -12,18 +12,18 @@ import {
|
|||||||
StyledTitleWrapper,
|
StyledTitleWrapper,
|
||||||
} from './styles';
|
} from './styles';
|
||||||
import { Table, TableBody, TableCell, TableHead, TableRow } from '@/ui/table';
|
import { Table, TableBody, TableCell, TableHead, TableRow } from '@/ui/table';
|
||||||
import { OperationCell, TrashOperationCell } from './operation-cell';
|
import { OperationCell, TrashOperationCell } from './OperationCell';
|
||||||
import Empty from './empty';
|
import Empty from './Empty';
|
||||||
import { Content } from '@/ui/layout';
|
import { Content } from '@/ui/layout';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import DateCell from '@/components/page-list/date-cell';
|
import DateCell from '@/components/page-list/DateCell';
|
||||||
import { IconButton } from '@/ui/button';
|
import { IconButton } from '@/ui/button';
|
||||||
import { Tooltip } from '@/ui/tooltip';
|
import { Tooltip } from '@/ui/tooltip';
|
||||||
import { useRouter } from 'next/router';
|
import { useRouter } from 'next/router';
|
||||||
import { useAppState } from '@/providers/app-state-provider/context';
|
import { useAppState } from '@/providers/app-state-provider/context';
|
||||||
import { toast } from '@/ui/toast';
|
import { toast } from '@/ui/toast';
|
||||||
import { usePageHelper } from '@/hooks/use-page-helper';
|
import { usePageHelper } from '@/hooks/use-page-helper';
|
||||||
import { useTheme } from '@/providers/themeProvider';
|
import { useTheme } from '@/providers/ThemeProvider';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
const FavoriteTag = ({
|
const FavoriteTag = ({
|
||||||
pageMeta: { favorite, id },
|
pageMeta: { favorite, id },
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { AddIcon } from '@blocksuite/icons';
|
import { AddIcon } from '@blocksuite/icons';
|
||||||
import { StyledModalFooterContent } from './style';
|
import { StyledModalFooterContent } from './style';
|
||||||
import { useModal } from '@/providers/global-modal-provider';
|
import { useModal } from '@/providers/GlobalModalProvider';
|
||||||
import { Command } from 'cmdk';
|
import { Command } from 'cmdk';
|
||||||
import { usePageHelper } from '@/hooks/use-page-helper';
|
import { usePageHelper } from '@/hooks/use-page-helper';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
import { Command } from 'cmdk';
|
import { Command } from 'cmdk';
|
||||||
import { StyledListItem, StyledNotFound } from './style';
|
import { StyledListItem, StyledNotFound } from './style';
|
||||||
import { useModal } from '@/providers/global-modal-provider';
|
import { useModal } from '@/providers/GlobalModalProvider';
|
||||||
import { PaperIcon, EdgelessIcon } from '@blocksuite/icons';
|
import { PaperIcon, EdgelessIcon } from '@blocksuite/icons';
|
||||||
import { Dispatch, SetStateAction, useEffect, useState } from 'react';
|
import { Dispatch, SetStateAction, useEffect, useState } from 'react';
|
||||||
import { useAppState } from '@/providers/app-state-provider';
|
import { useAppState } from '@/providers/app-state-provider';
|
||||||
import { useRouter } from 'next/router';
|
import { useRouter } from 'next/router';
|
||||||
import { useSwitchToConfig } from './config';
|
import { useSwitchToConfig } from './config';
|
||||||
import { NoResultSVG } from './noResultSVG';
|
import { NoResultSVG } from './NoResultSVG';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import usePageHelper from '@/hooks/use-page-helper';
|
import usePageHelper from '@/hooks/use-page-helper';
|
||||||
import usePageMetaList from '@/hooks/use-page-meta-list';
|
import usePageMetaList from '@/hooks/use-page-meta-list';
|
||||||
@@ -6,12 +6,12 @@ import {
|
|||||||
StyledModalDivider,
|
StyledModalDivider,
|
||||||
StyledShortcut,
|
StyledShortcut,
|
||||||
} from './style';
|
} from './style';
|
||||||
import { Input } from './input';
|
import { Input } from './Input';
|
||||||
import { Results } from './results';
|
import { Results } from './Results';
|
||||||
import { Footer } from './footer';
|
import { Footer } from './Footer';
|
||||||
import { Command } from 'cmdk';
|
import { Command } from 'cmdk';
|
||||||
import { useEffect, useState } from 'react';
|
import { useEffect, useState } from 'react';
|
||||||
import { useModal } from '@/providers/global-modal-provider';
|
import { useModal } from '@/providers/GlobalModalProvider';
|
||||||
import { getUaHelper } from '@/utils';
|
import { getUaHelper } from '@/utils';
|
||||||
import { useAppState } from '@/providers/app-state-provider';
|
import { useAppState } from '@/providers/app-state-provider';
|
||||||
type TransitionsModalProps = {
|
type TransitionsModalProps = {
|
||||||
|
|||||||
@@ -13,7 +13,8 @@ export const useMacKeyboardShortcuts = (): ShortcutTip => {
|
|||||||
[t('Strikethrough')]: '⌘+⇧+S',
|
[t('Strikethrough')]: '⌘+⇧+S',
|
||||||
[t('Inline code')]: ' ⌘+E',
|
[t('Inline code')]: ' ⌘+E',
|
||||||
[t('Code block')]: '⌘+⌥+C',
|
[t('Code block')]: '⌘+⌥+C',
|
||||||
[t('Link')]: '⌘+K',
|
[t('Hyperlink(with selected text)')]: '⌘+K',
|
||||||
|
[t('Quick search')]: '⌘+K',
|
||||||
[t('Body text')]: '⌘+⌥+0',
|
[t('Body text')]: '⌘+⌥+0',
|
||||||
[t('Heading', { number: '1' })]: '⌘+⌥+1',
|
[t('Heading', { number: '1' })]: '⌘+⌥+1',
|
||||||
[t('Heading', { number: '2' })]: '⌘+⌥+2',
|
[t('Heading', { number: '2' })]: '⌘+⌥+2',
|
||||||
@@ -56,7 +57,8 @@ export const useWindowsKeyboardShortcuts = (): ShortcutTip => {
|
|||||||
[t('Strikethrough')]: 'Ctrl+Shift+S',
|
[t('Strikethrough')]: 'Ctrl+Shift+S',
|
||||||
[t('Inline code')]: ' Ctrl+E',
|
[t('Inline code')]: ' Ctrl+E',
|
||||||
[t('Code block')]: 'Ctrl+Alt+C',
|
[t('Code block')]: 'Ctrl+Alt+C',
|
||||||
[t('Link')]: 'Ctrl+K',
|
[t('Hyperlink(with selected text)')]: 'Ctrl+K',
|
||||||
|
[t('Quick search')]: 'Ctrl+K',
|
||||||
[t('Body text')]: 'Ctrl+Shift+0',
|
[t('Body text')]: 'Ctrl+Shift+0',
|
||||||
[t('Heading', { number: '1' })]: 'Ctrl+Shift+1',
|
[t('Heading', { number: '1' })]: 'Ctrl+Shift+1',
|
||||||
[t('Heading', { number: '2' })]: 'Ctrl+Shift+2',
|
[t('Heading', { number: '2' })]: 'Ctrl+Shift+2',
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { createPortal } from 'react-dom';
|
import { createPortal } from 'react-dom';
|
||||||
import { KeyboardIcon } from './icons';
|
import { KeyboardIcon } from './Icons';
|
||||||
import {
|
import {
|
||||||
StyledListItem,
|
StyledListItem,
|
||||||
StyledModalHeader,
|
StyledModalHeader,
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
export * from './delete';
|
export * from './Delete';
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
export * from './general';
|
export * from './General';
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
export * from './leave';
|
export * from './Leave';
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
export * from './workspace-setting';
|
export * from './WorkspaceSetting';
|
||||||
|
|||||||
+1
-1
@@ -13,7 +13,7 @@ import {
|
|||||||
import { WorkspaceSetting } from '@/components/workspace-setting';
|
import { WorkspaceSetting } from '@/components/workspace-setting';
|
||||||
import { useCallback, useEffect, useState } from 'react';
|
import { useCallback, useEffect, useState } from 'react';
|
||||||
import { getDataCenter, WorkspaceType } from '@affine/datacenter';
|
import { getDataCenter, WorkspaceType } from '@affine/datacenter';
|
||||||
import { useModal } from '@/providers/global-modal-provider';
|
import { useModal } from '@/providers/GlobalModalProvider';
|
||||||
|
|
||||||
export type WorkspaceDetails = Record<
|
export type WorkspaceDetails = Record<
|
||||||
string,
|
string,
|
||||||
|
|||||||
+1
-1
@@ -1 +1 @@
|
|||||||
export * from './workspace-create';
|
export * from './WorkspaceCreate';
|
||||||
|
|||||||
+2
-2
@@ -1,6 +1,6 @@
|
|||||||
import { useModal } from '@/providers/global-modal-provider';
|
import { useModal } from '@/providers/GlobalModalProvider';
|
||||||
import { styled } from '@/styles';
|
import { styled } from '@/styles';
|
||||||
import { AffineIcon } from '../../icons/icons';
|
import { AffineIcon } from '../../icons/Icons';
|
||||||
import {
|
import {
|
||||||
WorkspaceItemAvatar,
|
WorkspaceItemAvatar,
|
||||||
LoginItemWrapper,
|
LoginItemWrapper,
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ import {
|
|||||||
} from '@blocksuite/icons';
|
} from '@blocksuite/icons';
|
||||||
import Link from 'next/link';
|
import Link from 'next/link';
|
||||||
import { Tooltip } from '@/ui/tooltip';
|
import { Tooltip } from '@/ui/tooltip';
|
||||||
import { useModal } from '@/providers/global-modal-provider';
|
import { useModal } from '@/providers/GlobalModalProvider';
|
||||||
import { useAppState } from '@/providers/app-state-provider/context';
|
import { useAppState } from '@/providers/app-state-provider/context';
|
||||||
import { IconButton } from '@/ui/button';
|
import { IconButton } from '@/ui/button';
|
||||||
import useLocalStorage from '@/hooks/use-local-storage';
|
import useLocalStorage from '@/hooks/use-local-storage';
|
||||||
|
|||||||
@@ -54,7 +54,7 @@
|
|||||||
"Strikethrough": "Strikethrough",
|
"Strikethrough": "Strikethrough",
|
||||||
"Inline code": "Inline code",
|
"Inline code": "Inline code",
|
||||||
"Code block": "Code block",
|
"Code block": "Code block",
|
||||||
"Link": "Link",
|
"Hyperlink(with selected text)": "Hyperlink(with selected text)",
|
||||||
"Body text": "Body text",
|
"Body text": "Body text",
|
||||||
"Heading": "Heading {{number}}",
|
"Heading": "Heading {{number}}",
|
||||||
"Increase indent": "Increase indent",
|
"Increase indent": "Increase indent",
|
||||||
|
|||||||
@@ -10,18 +10,18 @@ import '../utils/print-build-info';
|
|||||||
import ProviderComposer from '@/components/provider-composer';
|
import ProviderComposer from '@/components/provider-composer';
|
||||||
import type { PropsWithChildren, ReactElement, ReactNode } from 'react';
|
import type { PropsWithChildren, ReactElement, ReactNode } from 'react';
|
||||||
import type { NextPage } from 'next';
|
import type { NextPage } from 'next';
|
||||||
import { AppStateProvider } from '@/providers/app-state-provider/provider';
|
import { AppStateProvider } from '@/providers/app-state-provider/Provider';
|
||||||
import ConfirmProvider from '@/providers/confirm-provider';
|
import ConfirmProvider from '@/providers/ConfirmProvider';
|
||||||
import TemporaryHelperProvider from '@/providers/temporary-helper-provider';
|
import { ModalProvider } from '@/providers/GlobalModalProvider';
|
||||||
import { ModalProvider } from '@/providers/global-modal-provider';
|
|
||||||
import { useRouter } from 'next/router';
|
import { useRouter } from 'next/router';
|
||||||
import { useEffect } from 'react';
|
import { useEffect } from 'react';
|
||||||
import { useAppState } from '@/providers/app-state-provider';
|
import { useAppState } from '@/providers/app-state-provider';
|
||||||
import { PageLoading } from '@/components/loading';
|
import { PageLoading } from '@/components/loading';
|
||||||
import Head from 'next/head';
|
import Head from 'next/head';
|
||||||
import '@/libs/i18n';
|
import '@/libs/i18n';
|
||||||
|
import TemporaryHelperProvider from '@/providers/temporary-helper-provider';
|
||||||
|
|
||||||
const ThemeProvider = dynamic(() => import('@/providers/themeProvider'), {
|
const ThemeProvider = dynamic(() => import('@/providers/ThemeProvider'), {
|
||||||
ssr: false,
|
ssr: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -10,7 +10,7 @@ import type {
|
|||||||
} from './context';
|
} from './context';
|
||||||
import { Page } from '@blocksuite/store';
|
import { Page } from '@blocksuite/store';
|
||||||
import { EditorContainer } from '@blocksuite/editor';
|
import { EditorContainer } from '@blocksuite/editor';
|
||||||
const DynamicBlocksuite = dynamic(() => import('./dynamic-blocksuite'), {
|
const DynamicBlocksuite = dynamic(() => import('./DynamicBlocksuite'), {
|
||||||
ssr: false,
|
ssr: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -13,7 +13,7 @@ Let us know what you think of this latest version.
|
|||||||
5. You can self-host locally with Docker.
|
5. You can self-host locally with Docker.
|
||||||
|
|
||||||
```basic
|
```basic
|
||||||
docker run -d -v [YOUR_PATH]:/app/data -p 3000:3000 ghcr.io/toeverything/affine-self-hosted:alpha-abbey-wood
|
docker run -it --name affine -d -v [YOUR_PATH]:/app/data -p 3000:3000 ghcr.io/toeverything/affine-self-hosted:alpha-abbey-wood
|
||||||
```
|
```
|
||||||
|
|
||||||
**Looking for Markdown syntax or keyboard shortcuts?**
|
**Looking for Markdown syntax or keyboard shortcuts?**
|
||||||
@@ -24,6 +24,9 @@ docker run -d -v [YOUR_PATH]:/app/data -p 3000:3000 ghcr.io/toeverything/affine-
|
|||||||
|
|
||||||
- Manage your pages from the collapsible **sidebar**, which allows you to add **favourites** and restore deleted files from the **trash**
|
- Manage your pages from the collapsible **sidebar**, which allows you to add **favourites** and restore deleted files from the **trash**
|
||||||
- Search through all your content with the quick search - activate with `Ctrl/⌘ + K`
|
- Search through all your content with the quick search - activate with `Ctrl/⌘ + K`
|
||||||
|
- A friendly Reminder:
|
||||||
|
- In the case of unselected text, `Ctrl/⌘ + K` activates quick search;
|
||||||
|
- In the case of selected text, `Ctrl/⌘ + K` will firstly ask to add a hyperlink, and then using `Ctrl/⌘ + K` again activates the quick search
|
||||||
- Quickly format text with the **pop-up toolbar** (highlight any text to give it a try)
|
- Quickly format text with the **pop-up toolbar** (highlight any text to give it a try)
|
||||||
- Copy and paste **images** into your pages, resize them and add captions
|
- Copy and paste **images** into your pages, resize them and add captions
|
||||||
- Add horizontal line dividers to your text with `---` and `***`
|
- Add horizontal line dividers to your text with `---` and `***`
|
||||||
|
|||||||
@@ -10,8 +10,8 @@
|
|||||||
".": "./dist/src/index.js"
|
".": "./dist/src/index.js"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsc --project ./tsconfig.json",
|
"dev": "tsc --project ./tsconfig.json -w",
|
||||||
"test": "playwright test"
|
"build": "tsc --project ./tsconfig.json"
|
||||||
},
|
},
|
||||||
"keywords": [],
|
"keywords": [],
|
||||||
"author": "",
|
"author": "",
|
||||||
@@ -26,8 +26,8 @@
|
|||||||
"typescript": "^4.8.4"
|
"typescript": "^4.8.4"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@blocksuite/blocks": "=0.3.1-20230106060050-1aad55d",
|
"@blocksuite/blocks": "^0.3.1-20230109032243-37ad3ba",
|
||||||
"@blocksuite/store": "=0.3.1-20230106060050-1aad55d",
|
"@blocksuite/store": "^0.3.1-20230109032243-37ad3ba",
|
||||||
"debug": "^4.3.4",
|
"debug": "^4.3.4",
|
||||||
"encoding": "^0.1.13",
|
"encoding": "^0.1.13",
|
||||||
"firebase": "^9.15.0",
|
"firebase": "^9.15.0",
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
|
/**
|
||||||
|
* For unit tests.
|
||||||
|
*/
|
||||||
import type { PlaywrightTestConfig } from '@playwright/test';
|
import type { PlaywrightTestConfig } from '@playwright/test';
|
||||||
|
|
||||||
const config: PlaywrightTestConfig = {
|
const config: PlaywrightTestConfig = {
|
||||||
testDir: './tests',
|
testDir: './packages/',
|
||||||
timeout: 30 * 1000,
|
timeout: 30 * 1000,
|
||||||
expect: {
|
expect: {
|
||||||
/**
|
/**
|
||||||
Generated
+4
-53
@@ -133,8 +133,8 @@ importers:
|
|||||||
|
|
||||||
packages/data-center:
|
packages/data-center:
|
||||||
specifiers:
|
specifiers:
|
||||||
'@blocksuite/blocks': '=0.3.1-20230106060050-1aad55d'
|
'@blocksuite/blocks': ^0.3.1-20230109032243-37ad3ba
|
||||||
'@blocksuite/store': '=0.3.1-20230106060050-1aad55d'
|
'@blocksuite/store': ^0.3.1-20230109032243-37ad3ba
|
||||||
'@playwright/test': ^1.29.1
|
'@playwright/test': ^1.29.1
|
||||||
'@types/debug': ^4.1.7
|
'@types/debug': ^4.1.7
|
||||||
debug: ^4.3.4
|
debug: ^4.3.4
|
||||||
@@ -151,8 +151,8 @@ importers:
|
|||||||
y-protocols: ^1.0.5
|
y-protocols: ^1.0.5
|
||||||
yjs: ^13.5.44
|
yjs: ^13.5.44
|
||||||
dependencies:
|
dependencies:
|
||||||
'@blocksuite/blocks': 0.3.1-20230106060050-1aad55d_yjs@13.5.44
|
'@blocksuite/blocks': 0.3.1-20230109032243-37ad3ba_yjs@13.5.44
|
||||||
'@blocksuite/store': 0.3.1-20230106060050-1aad55d_yjs@13.5.44
|
'@blocksuite/store': 0.3.1-20230109032243-37ad3ba_yjs@13.5.44
|
||||||
debug: 4.3.4
|
debug: 4.3.4
|
||||||
encoding: 0.1.13
|
encoding: 0.1.13
|
||||||
firebase: 9.15.0_encoding@0.1.13
|
firebase: 9.15.0_encoding@0.1.13
|
||||||
@@ -1493,26 +1493,6 @@ packages:
|
|||||||
|
|
||||||
/@blocksuite/blocks/0.3.1-20230106060050-1aad55d_yjs@13.5.44:
|
/@blocksuite/blocks/0.3.1-20230106060050-1aad55d_yjs@13.5.44:
|
||||||
resolution: {integrity: sha512-qRNXmhjw+GAGsV1mI2XXPxYTlHfsFHv9ttTCNQ6IIcxvc5Hh6lWmdwVibxvlpYUkgEc1zv3/GxOEsR/ngpZXzQ==}
|
resolution: {integrity: sha512-qRNXmhjw+GAGsV1mI2XXPxYTlHfsFHv9ttTCNQ6IIcxvc5Hh6lWmdwVibxvlpYUkgEc1zv3/GxOEsR/ngpZXzQ==}
|
||||||
dependencies:
|
|
||||||
'@blocksuite/phasor': 0.3.1_yjs@13.5.44
|
|
||||||
'@blocksuite/store': 0.3.1-20230106060050-1aad55d_yjs@13.5.44
|
|
||||||
'@tldraw/intersect': 1.8.0
|
|
||||||
autosize: 5.0.2
|
|
||||||
highlight.js: 11.7.0
|
|
||||||
hotkeys-js: 3.10.1
|
|
||||||
lit: 2.5.0
|
|
||||||
perfect-freehand: 1.2.0
|
|
||||||
quill: 1.3.7
|
|
||||||
quill-cursors: 4.0.0
|
|
||||||
transitivePeerDependencies:
|
|
||||||
- bufferutil
|
|
||||||
- supports-color
|
|
||||||
- utf-8-validate
|
|
||||||
- yjs
|
|
||||||
dev: false
|
|
||||||
|
|
||||||
/@blocksuite/blocks/0.3.1-20230109032243-37ad3ba_yjs@13.5.44:
|
|
||||||
resolution: {integrity: sha512-UTlbk0Is7TMRBbvUyM2nivbqM/TLwRj1qArMYbOmvDGUNYadWo68cTwv/Ej2WwiKn22q4/4JHryGsv3gTCRz1Q==}
|
|
||||||
dependencies:
|
dependencies:
|
||||||
'@blocksuite/phasor': 0.3.1-20230109032243-37ad3ba_yjs@13.5.44
|
'@blocksuite/phasor': 0.3.1-20230109032243-37ad3ba_yjs@13.5.44
|
||||||
'@blocksuite/store': 0.3.1-20230109032243-37ad3ba_yjs@13.5.44
|
'@blocksuite/store': 0.3.1-20230109032243-37ad3ba_yjs@13.5.44
|
||||||
@@ -1564,35 +1544,6 @@ packages:
|
|||||||
yjs: 13.5.44
|
yjs: 13.5.44
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/@blocksuite/phasor/0.3.1_yjs@13.5.44:
|
|
||||||
resolution: {integrity: sha512-aJmAQn2qoF6HxFZWgq7xa/pWVyzg3MmD6dynIHAKdfN7rBdKk3PNA+lRX919QkD2e270N/zgHEGFFQI1Nj5xrA==}
|
|
||||||
peerDependencies:
|
|
||||||
yjs: ^13
|
|
||||||
dependencies:
|
|
||||||
yjs: 13.5.44
|
|
||||||
dev: false
|
|
||||||
|
|
||||||
/@blocksuite/store/0.3.1-20230106060050-1aad55d_yjs@13.5.44:
|
|
||||||
resolution: {integrity: sha512-dRy+YzlWMwiYq0Im9NogK/NTkV+NKK+lgejYq56m6nH2m16/G9AMODqP0oQy/XeYFevUpL9i9RdV0rHsJ2gc0Q==}
|
|
||||||
peerDependencies:
|
|
||||||
yjs: ^13
|
|
||||||
dependencies:
|
|
||||||
'@types/flexsearch': 0.7.3
|
|
||||||
'@types/quill': 1.3.10
|
|
||||||
buffer: 6.0.3
|
|
||||||
flexsearch: 0.7.21
|
|
||||||
idb-keyval: 6.2.0
|
|
||||||
ky: 0.33.1
|
|
||||||
lib0: 0.2.58
|
|
||||||
y-protocols: 1.0.5
|
|
||||||
y-webrtc: 10.2.3
|
|
||||||
yjs: 13.5.44
|
|
||||||
transitivePeerDependencies:
|
|
||||||
- bufferutil
|
|
||||||
- supports-color
|
|
||||||
- utf-8-validate
|
|
||||||
dev: false
|
|
||||||
|
|
||||||
/@blocksuite/store/0.3.1-20230109032243-37ad3ba_yjs@13.5.44:
|
/@blocksuite/store/0.3.1-20230109032243-37ad3ba_yjs@13.5.44:
|
||||||
resolution: {integrity: sha512-zOUz19jfhuhsUkx9BGEQPZWbPyD/AgX0LB7ShVRdd3YM73x25hD6tPLLz1HEV2b69XokC0P9oSru4aNomm4jkg==}
|
resolution: {integrity: sha512-zOUz19jfhuhsUkx9BGEQPZWbPyD/AgX0LB7ShVRdd3YM73x25hD6tPLLz1HEV2b69XokC0P9oSru4aNomm4jkg==}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
|
|||||||
@@ -2,12 +2,9 @@ const fs = require('fs');
|
|||||||
const path = require('path');
|
const path = require('path');
|
||||||
|
|
||||||
const templatePath = path.resolve(__dirname, 'module-resolve.tmpl.js');
|
const templatePath = path.resolve(__dirname, 'module-resolve.tmpl.js');
|
||||||
const destinationPath = path.resolve(__dirname, '../../module-resolve.js');
|
const destinationPath = path.resolve(__dirname, '../../module-resolve.cjs');
|
||||||
|
|
||||||
console.log('template path', templatePath);
|
console.log('template path', templatePath);
|
||||||
console.log('destination path', destinationPath);
|
console.log('destination path', destinationPath);
|
||||||
|
|
||||||
fs.copyFileSync(
|
fs.copyFileSync(templatePath, destinationPath);
|
||||||
templatePath,
|
|
||||||
destinationPath
|
|
||||||
);
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
import { test, expect } from '@playwright/test';
|
import { test, expect } from '@playwright/test';
|
||||||
import { loadPage } from './libs/load-page';
|
import { loadPage } from './libs/load-page.js';
|
||||||
import { clickPageMoreActions } from './libs/page-logic';
|
import { clickPageMoreActions } from './libs/page-logic.js';
|
||||||
loadPage();
|
loadPage();
|
||||||
|
|
||||||
test.describe('Change page mode(Paper or Edgeless)', () => {
|
test.describe('Change page mode(Paper or Edgeless)', () => {
|
||||||
|
|||||||
@@ -1,11 +1,17 @@
|
|||||||
import { test, expect } from '@playwright/test';
|
import { test, expect } from '@playwright/test';
|
||||||
import { loadPage } from './libs/load-page';
|
import { loadPage } from './libs/load-page.js';
|
||||||
import pkg from './../packages/app/package.json';
|
|
||||||
|
|
||||||
loadPage();
|
loadPage();
|
||||||
|
|
||||||
test.describe('web console', () => {
|
test.describe('web console', () => {
|
||||||
test('editor version', async ({ page }) => {
|
// TODO: playwright need to support json import in esm
|
||||||
|
test.skip('editor version', async ({ page }) => {
|
||||||
|
// TODO: playwright need to support json import in esm
|
||||||
|
// const pkg = await import('./../packages/app/package.json', {
|
||||||
|
// assert: { type: 'json' },
|
||||||
|
// });
|
||||||
|
const pkg = {} as any;
|
||||||
|
|
||||||
// https://playwright.dev/docs/evaluating
|
// https://playwright.dev/docs/evaluating
|
||||||
// https://github.com/microsoft/playwright/issues/13059
|
// https://github.com/microsoft/playwright/issues/13059
|
||||||
// Get the handle to a specific function.
|
// Get the handle to a specific function.
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
import { test, expect } from '@playwright/test';
|
import { test, expect } from '@playwright/test';
|
||||||
import { loadPage } from './libs/load-page';
|
import { loadPage } from './libs/load-page.js';
|
||||||
|
|
||||||
loadPage();
|
loadPage();
|
||||||
|
|
||||||
test.describe('Open contact us', () => {
|
test.describe('Open contact us', () => {
|
||||||
test('Click about us', async ({ page }) => {
|
test.skip('Click about us', async ({ page }) => {
|
||||||
const currentWorkspace = page.getByTestId('current-workspace');
|
const currentWorkspace = page.getByTestId('current-workspace');
|
||||||
await currentWorkspace.click();
|
await currentWorkspace.click();
|
||||||
// await page.waitForTimeout(1000);
|
// await page.waitForTimeout(1000);
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { test, expect } from '@playwright/test';
|
import { test, expect } from '@playwright/test';
|
||||||
import { loadPage } from './libs/load-page';
|
import { loadPage } from './libs/load-page.js';
|
||||||
|
|
||||||
loadPage();
|
loadPage();
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { test, expect } from '@playwright/test';
|
import { test, expect } from '@playwright/test';
|
||||||
import { loadPage } from './libs/load-page';
|
import { loadPage } from './libs/load-page.js';
|
||||||
|
|
||||||
loadPage();
|
loadPage();
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { test, expect } from '@playwright/test';
|
import { test, expect } from '@playwright/test';
|
||||||
import { loadPage } from './libs/load-page';
|
import { loadPage } from './libs/load-page.js';
|
||||||
|
|
||||||
loadPage();
|
loadPage();
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { test, expect } from '@playwright/test';
|
import { test, expect } from '@playwright/test';
|
||||||
import { loadPage } from './libs/load-page';
|
import { loadPage } from './libs/load-page.js';
|
||||||
import { newPage } from './libs/page-logic';
|
import { newPage } from './libs/page-logic.js';
|
||||||
|
|
||||||
loadPage();
|
loadPage();
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { test, expect } from '@playwright/test';
|
import { test, expect } from '@playwright/test';
|
||||||
import { loadPage } from './libs/load-page';
|
import { loadPage } from './libs/load-page.js';
|
||||||
import { newPage, clickPageMoreActions } from './libs/page-logic';
|
import { newPage, clickPageMoreActions } from './libs/page-logic.js';
|
||||||
loadPage();
|
loadPage();
|
||||||
|
|
||||||
test.describe('Local first export page', () => {
|
test.describe('Local first export page', () => {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { test, expect } from '@playwright/test';
|
import { test, expect } from '@playwright/test';
|
||||||
import { loadPage } from './libs/load-page';
|
import { loadPage } from './libs/load-page.js';
|
||||||
import { newPage, clickPageMoreActions } from './libs/page-logic';
|
import { newPage, clickPageMoreActions } from './libs/page-logic.js';
|
||||||
loadPage();
|
loadPage();
|
||||||
|
|
||||||
test.describe('Local first favorite and cancel favorite page', () => {
|
test.describe('Local first favorite and cancel favorite page', () => {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { test, expect } from '@playwright/test';
|
import { test, expect } from '@playwright/test';
|
||||||
import { loadPage } from './libs/load-page';
|
import { loadPage } from './libs/load-page.js';
|
||||||
import { newPage, clickPageMoreActions } from './libs/page-logic';
|
import { newPage, clickPageMoreActions } from './libs/page-logic.js';
|
||||||
loadPage();
|
loadPage();
|
||||||
|
|
||||||
test.describe('Local first favorite items ui', () => {
|
test.describe('Local first favorite items ui', () => {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { test, expect } from '@playwright/test';
|
import { test, expect } from '@playwright/test';
|
||||||
import { loadPage } from './libs/load-page';
|
import { loadPage } from './libs/load-page.js';
|
||||||
import { newPage } from './libs/page-logic';
|
import { newPage } from './libs/page-logic.js';
|
||||||
loadPage();
|
loadPage();
|
||||||
|
|
||||||
test.describe('local first new page', () => {
|
test.describe('local first new page', () => {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { test, expect } from '@playwright/test';
|
import { test, expect } from '@playwright/test';
|
||||||
import { loadPage } from './libs/load-page';
|
import { loadPage } from './libs/load-page.js';
|
||||||
import { newPage } from './libs/page-logic';
|
import { newPage } from './libs/page-logic.js';
|
||||||
loadPage();
|
loadPage();
|
||||||
|
|
||||||
test.describe('local first new page', () => {
|
test.describe('local first new page', () => {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { test, expect } from '@playwright/test';
|
import { test, expect } from '@playwright/test';
|
||||||
import { loadPage } from './libs/load-page';
|
import { loadPage } from './libs/load-page.js';
|
||||||
import { newPage } from './libs/page-logic';
|
import { newPage } from './libs/page-logic.js';
|
||||||
loadPage();
|
loadPage();
|
||||||
|
|
||||||
test.describe('Local first delete page', () => {
|
test.describe('Local first delete page', () => {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { test, expect } from '@playwright/test';
|
import { test, expect } from '@playwright/test';
|
||||||
import { loadPage } from './libs/load-page';
|
import { loadPage } from './libs/load-page.js';
|
||||||
import { newPage, clickPageMoreActions } from './libs/page-logic';
|
import { newPage, clickPageMoreActions } from './libs/page-logic.js';
|
||||||
loadPage();
|
loadPage();
|
||||||
|
|
||||||
test.describe('Local first delete page', () => {
|
test.describe('Local first delete page', () => {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { test, expect } from '@playwright/test';
|
import { test, expect } from '@playwright/test';
|
||||||
import { loadPage } from './libs/load-page';
|
import { loadPage } from './libs/load-page.js';
|
||||||
import { newPage } from './libs/page-logic';
|
import { newPage } from './libs/page-logic.js';
|
||||||
loadPage();
|
loadPage();
|
||||||
|
|
||||||
test.describe('Local first trash page', () => {
|
test.describe('Local first trash page', () => {
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
import { test, expect } from '@playwright/test';
|
import { test, expect } from '@playwright/test';
|
||||||
import { loadPage } from './libs/load-page';
|
import { loadPage } from './libs/load-page.js';
|
||||||
|
|
||||||
loadPage();
|
loadPage();
|
||||||
|
|
||||||
test.describe('Local first default workspace', () => {
|
test.describe('Local first default workspace', () => {
|
||||||
test('Default workspace name', async ({ page }) => {
|
test.skip('Default workspace name', async ({ page }) => {
|
||||||
const workspaceName = page.getByTestId('workspace-name');
|
const workspaceName = page.getByTestId('workspace-name');
|
||||||
expect(await workspaceName.textContent()).toBe('AFFiNE');
|
expect(await workspaceName.textContent()).toBe('AFFiNE');
|
||||||
});
|
});
|
||||||
|
|||||||
+2
-2
@@ -1,10 +1,10 @@
|
|||||||
import { test, expect } from '@playwright/test';
|
import { test, expect } from '@playwright/test';
|
||||||
import { loadPage } from './libs/load-page';
|
import { loadPage } from './libs/load-page.js';
|
||||||
|
|
||||||
loadPage();
|
loadPage();
|
||||||
|
|
||||||
test.describe('Login Flow', () => {
|
test.describe('Login Flow', () => {
|
||||||
test('Open login modal by click current workspace', async ({ page }) => {
|
test.skip('Open login modal by click current workspace', async ({ page }) => {
|
||||||
await page.getByTestId('current-workspace').click();
|
await page.getByTestId('current-workspace').click();
|
||||||
await page.waitForTimeout(800);
|
await page.waitForTimeout(800);
|
||||||
// why don't we use waitForSelector, It seems that waitForSelector not stable?
|
// why don't we use waitForSelector, It seems that waitForSelector not stable?
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { test, expect, type Page } from '@playwright/test';
|
import { test, expect, type Page } from '@playwright/test';
|
||||||
import { loadPage } from './libs/load-page';
|
import { loadPage } from './libs/load-page.js';
|
||||||
import { withCtrlOrMeta } from './libs/keyboard';
|
import { withCtrlOrMeta } from './libs/keyboard.js';
|
||||||
import { newPage } from './libs/page-logic';
|
import { newPage } from './libs/page-logic.js';
|
||||||
loadPage();
|
loadPage();
|
||||||
|
|
||||||
const openQuickSearchByShortcut = async (page: Page) =>
|
const openQuickSearchByShortcut = async (page: Page) =>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { test, expect } from '@playwright/test';
|
import { test, expect } from '@playwright/test';
|
||||||
import { loadPage } from './libs/load-page';
|
import { loadPage } from './libs/load-page.js';
|
||||||
|
|
||||||
loadPage();
|
loadPage();
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
import { test, expect } from '@playwright/test';
|
import { test, expect } from '@playwright/test';
|
||||||
import { loadPage } from './libs/load-page';
|
import { loadPage } from './libs/load-page.js';
|
||||||
|
|
||||||
loadPage();
|
loadPage();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user