Merge remote-tracking branch 'origin' into feat/cloud-sync-saika

This commit is contained in:
MingLiang Wang
2023-01-10 12:20:27 +08:00
42 changed files with 234 additions and 201 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
import { NotFoundTitle, PageContainer } from './styles';
import { useTranslation } from 'react-i18next';
import { useTranslation } from '@affine/i18n';
export const NotfoundPage = () => {
const { t } = useTranslation();
return (
@@ -23,7 +23,7 @@ import {
StyledModalFooter,
} from './style';
import bg from '@/components/contact-modal/bg.png';
import { useTranslation } from 'react-i18next';
import { useTranslation } from '@affine/i18n';
const linkList = [
{
icon: <GithubIcon />,
@@ -15,7 +15,7 @@ import { useTheme } from '@/providers/ThemeProvider';
import { EdgelessIcon, PaperIcon } from './Icons';
import useCurrentPageMeta from '@/hooks/use-current-page-meta';
import { usePageHelper } from '@/hooks/use-page-helper';
import { useTranslation } from 'react-i18next';
import { useTranslation } from '@affine/i18n';
const PaperItem = ({ active }: { active?: boolean }) => {
const {
theme: {
@@ -3,7 +3,7 @@ import { IconButton, IconButtonProps } from '@/ui/button';
import { Tooltip } from '@/ui/tooltip';
import { ArrowDownIcon } from '@blocksuite/icons';
import { useModal } from '@/providers/GlobalModalProvider';
import { useTranslation } from 'react-i18next';
import { useTranslation } from '@affine/i18n';
export const QuickSearchButton = ({
onClick,
...props
@@ -16,7 +16,7 @@ import { usePageHelper } from '@/hooks/use-page-helper';
import { useConfirm } from '@/providers/ConfirmProvider';
import useCurrentPageMeta from '@/hooks/use-current-page-meta';
import { toast } from '@/ui/toast';
import { useTranslation } from 'react-i18next';
import { useTranslation } from '@affine/i18n';
const PopoverContent = () => {
const { editor } = useAppState();
const { toggleFavoritePage, toggleDeletePage } = usePageHelper();
@@ -8,7 +8,7 @@ import {
import { CloseIcon, ContactIcon, HelpIcon, KeyboardIcon } from './Icons';
import Grow from '@mui/material/Grow';
import { Tooltip } from '@/ui/tooltip';
import { useTranslation } from 'react-i18next';
import { useTranslation } from '@affine/i18n';
import { useModal } from '@/providers/GlobalModalProvider';
import { useTheme } from '@/providers/ThemeProvider';
import useCurrentPageMeta from '@/hooks/use-current-page-meta';
+1 -1
View File
@@ -6,7 +6,7 @@ import Loading from '@/components/loading';
import { usePageHelper } from '@/hooks/use-page-helper';
import { useAppState } from '@/providers/app-state-provider/context';
import { useEffect, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { useTranslation } from '@affine/i18n';
// import { Tooltip } from '@/ui/tooltip';
type ImportModalProps = {
open: boolean;
@@ -14,7 +14,7 @@ import {
} from '@blocksuite/icons';
import { toast } from '@/ui/toast';
import { usePageHelper } from '@/hooks/use-page-helper';
import { useTranslation } from 'react-i18next';
import { useTranslation } from '@affine/i18n';
export const OperationCell = ({ pageMeta }: { pageMeta: PageMeta }) => {
const { id, favorite } = pageMeta;
const { openPage } = usePageHelper();
@@ -24,7 +24,7 @@ import { useAppState } from '@/providers/app-state-provider/context';
import { toast } from '@/ui/toast';
import { usePageHelper } from '@/hooks/use-page-helper';
import { useTheme } from '@/providers/ThemeProvider';
import { useTranslation } from 'react-i18next';
import { useTranslation } from '@affine/i18n';
const FavoriteTag = ({
pageMeta: { favorite, id },
}: {
@@ -4,7 +4,7 @@ import { StyledModalFooterContent } from './style';
import { useModal } from '@/providers/GlobalModalProvider';
import { Command } from 'cmdk';
import { usePageHelper } from '@/hooks/use-page-helper';
import { useTranslation } from 'react-i18next';
import { useTranslation } from '@affine/i18n';
export const Footer = (props: { query: string }) => {
const { triggerQuickSearchModal } = useModal();
const { openPage, createPage } = usePageHelper();
@@ -7,7 +7,7 @@ import { useAppState } from '@/providers/app-state-provider';
import { useRouter } from 'next/router';
import { useSwitchToConfig } from './config';
import { NoResultSVG } from './NoResultSVG';
import { useTranslation } from 'react-i18next';
import { useTranslation } from '@affine/i18n';
import usePageHelper from '@/hooks/use-page-helper';
import usePageMetaList from '@/hooks/use-page-meta-list';
export const Results = (props: {
@@ -1,5 +1,5 @@
import { AllPagesIcon, FavouritesIcon, TrashIcon } from '@blocksuite/icons';
import { useTranslation } from 'react-i18next';
import { useTranslation } from '@affine/i18n';
export const useSwitchToConfig = (
currentWorkspaceId: string
@@ -1,4 +1,4 @@
import { useTranslation } from 'react-i18next';
import { useTranslation } from '@affine/i18n';
interface ShortcutTip {
[x: string]: string;
}
@@ -13,7 +13,7 @@ export const useMacKeyboardShortcuts = (): ShortcutTip => {
[t('Strikethrough')]: '⌘+⇧+S',
[t('Inline code')]: ' ⌘+E',
[t('Code block')]: '⌘+⌥+C',
[t('Hyperlink(with selected text)')]: '⌘+K',
[t('Link')]: '⌘+K',
[t('Quick search')]: '⌘+K',
[t('Body text')]: '⌘+⌥+0',
[t('Heading', { number: '1' })]: '⌘+⌥+1',
@@ -57,7 +57,7 @@ export const useWindowsKeyboardShortcuts = (): ShortcutTip => {
[t('Strikethrough')]: 'Ctrl+Shift+S',
[t('Inline code')]: ' Ctrl+E',
[t('Code block')]: 'Ctrl+Alt+C',
[t('Hyperlink(with selected text)')]: 'Ctrl+K',
[t('Link')]: 'Ctrl+K',
[t('Quick search')]: 'Ctrl+K',
[t('Body text')]: 'Ctrl+Shift+0',
[t('Heading', { number: '1' })]: 'Ctrl+Shift+1',
@@ -16,7 +16,7 @@ import {
import Slide from '@mui/material/Slide';
import { ModalCloseButton } from '@/ui/modal';
import { getUaHelper } from '@/utils';
import { useTranslation } from 'react-i18next';
import { useTranslation } from '@affine/i18n';
type ModalProps = {
open: boolean;
onClose: () => void;
@@ -30,7 +30,7 @@ import { IconButton } from '@/ui/button';
import useLocalStorage from '@/hooks/use-local-storage';
import usePageMetaList from '@/hooks/use-page-meta-list';
import { usePageHelper } from '@/hooks/use-page-helper';
import { useTranslation } from 'react-i18next';
import { useTranslation } from '@affine/i18n';
const FavoriteList = ({ showList }: { showList: boolean }) => {
const { openPage } = usePageHelper();