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

This commit is contained in:
Lin Onetwo 2023-01-06 14:04:21 +08:00
commit 614199a981
11 changed files with 32 additions and 43 deletions

2
.github/CODEOWNERS vendored Normal file
View File

@ -0,0 +1,2 @@
**/project.json @darkskygit
**/pnpm-lock.yaml @darkskygit

View File

@ -45,7 +45,7 @@
"@types/react": "18.0.20",
"@types/react-dom": "18.0.6",
"@types/wicg-file-system-access": "^2020.9.5",
"chalk-next": "^6.1.5",
"chalk": "^4.1.2",
"eslint": "8.22.0",
"eslint-config-next": "12.3.1",
"eslint-config-prettier": "^8.5.0",

View File

@ -57,7 +57,10 @@ type TransitionsModalProps = {
onClose: () => void;
};
export const ContactModal = ({ open, onClose }: TransitionsModalProps) => {
export const ContactModal = ({
open,
onClose,
}: TransitionsModalProps): JSX.Element => {
const { t } = useTranslation();
const rightLinkList = [
{

View File

@ -37,12 +37,12 @@ const PopoverContent = () => {
onClick={() => {
toggleFavoritePage(id);
toast(
!favorite ? t('Removed to Favourites') : t('Added to Favourites')
favorite ? t('Removed from Favourites') : t('Added to Favourites')
);
}}
icon={favorite ? <FavouritedIcon /> : <FavouritesIcon />}
>
{favorite ? t('Remove to favourites') : t('Add to favourites')}
{favorite ? t('Remove from favourites') : t('Add to favourites')}
</MenuItem>
<MenuItem
icon={mode === 'page' ? <EdgelessIcon /> : <PaperIcon />}

View File

@ -45,7 +45,7 @@ const FavoriteTag = ({
e.stopPropagation();
toggleFavoritePage(id);
toast(
!favorite ? t('Removed to Favourites') : t('Added to Favourites')
favorite ? t('Removed from Favourites') : t('Added to Favourites')
);
}}
style={{

View File

@ -27,12 +27,12 @@ export const OperationCell = ({ pageMeta }: { pageMeta: PageMeta }) => {
onClick={() => {
toggleFavoritePage(id);
toast(
!favorite ? t('Removed to Favourites') : t('Added to Favourites')
favorite ? t('Removed from Favourites') : t('Added to Favourites')
);
}}
icon={favorite ? <FavouritedIcon /> : <FavouritesIcon />}
>
{favorite ? t('Remove to favourites') : t('Add to favourites')}
{favorite ? t('Remove from favourites') : t('Add to favourites')}
</MenuItem>
<MenuItem
onClick={() => {

View File

@ -1,6 +1,13 @@
import { AllPagesIcon, FavouritesIcon, TrashIcon } from '@blocksuite/icons';
import { useTranslation } from 'react-i18next';
export const useSwitchToConfig = (currentWorkspaceId: string) => {
export const useSwitchToConfig = (
currentWorkspaceId: string
): {
title: string;
href: string;
icon: React.FC<React.SVGProps<SVGSVGElement>>;
}[] => {
const { t } = useTranslation();
const List = [
{

View File

@ -1,5 +1,8 @@
import { useTranslation } from 'react-i18next';
export const useMacKeyboardShortcuts = () => {
interface ShortcutTip {
[x: string]: string;
}
export const useMacKeyboardShortcuts = (): ShortcutTip => {
const { t } = useTranslation();
return {
[t('Undo')]: '⌘+Z',
@ -23,7 +26,7 @@ export const useMacKeyboardShortcuts = () => {
};
};
export const useMacMarkdownShortcuts = () => {
export const useMacMarkdownShortcuts = (): ShortcutTip => {
const { t } = useTranslation();
return {
[t('Bold')]: '**Text** ',
@ -42,7 +45,7 @@ export const useMacMarkdownShortcuts = () => {
};
};
export const useWindowsKeyboardShortcuts = () => {
export const useWindowsKeyboardShortcuts = (): ShortcutTip => {
const { t } = useTranslation();
return {
[t('Undo')]: 'Ctrl+Z',
@ -65,7 +68,7 @@ export const useWindowsKeyboardShortcuts = () => {
[t('Reduce indent')]: 'Shift+Tab',
};
};
export const useWinMarkdownShortcuts = () => {
export const useWinMarkdownShortcuts = (): ShortcutTip => {
const { t } = useTranslation();
return {
[t('Bold')]: '**Text** ',

View File

@ -11,8 +11,8 @@
"Find results": "Find {{number}} results",
"Collapse sidebar": "Collapse sidebar",
"Expand sidebar": "Expand sidebar",
"Removed to Favourites": "Removed to Favourites",
"Remove to favourites": "Remove to favourites",
"Removed from Favourites": "Removed from Favourites",
"Remove from favourites": "Remove from favourites",
"Added to Favourites": "Added to Favourites",
"Add to favourites": "Add to favourites",
"Paper": "Paper",

View File

@ -27,7 +27,7 @@ Let us know what you think of this latest version.
### Playground:
[] Try a horiztaonl line: `---`
[] Try a horizontal line: `---`
[] What about a code block? ```

View File

@ -166,7 +166,7 @@ importers:
'@types/react': 18.0.20
'@types/react-dom': 18.0.6
'@types/wicg-file-system-access': ^2020.9.5
chalk-next: ^6.1.5
chalk: ^4.1.2
cmdk: ^0.1.20
css-spring: ^4.1.0
dayjs: ^1.11.7
@ -223,7 +223,7 @@ importers:
'@types/react': 18.0.20
'@types/react-dom': 18.0.6
'@types/wicg-file-system-access': 2020.9.5
chalk-next: 6.1.5
chalk: 4.1.2
eslint: 8.22.0
eslint-config-next: 12.3.1_76twfck5d7crjqrmw4yltga7zm
eslint-config-prettier: 8.5.0_eslint@8.22.0
@ -5298,18 +5298,6 @@ packages:
/caniuse-lite/1.0.30001419:
resolution: {integrity: sha512-aFO1r+g6R7TW+PNQxKzjITwLOyDhVRLjW0LcwS/HCZGUUKTGNp9+IwLC4xyDSZBygVL/mxaFR3HIV6wEKQuSzw==}
/chalk-next/6.1.5:
resolution: {integrity: sha512-OAx9F3vSk18qpfCohk0849/j3GyaoIpv8eXjmpdbmLZt+5+sWYq8xwt3B5ue25irLcxFcLL2hAbxxHSsBxupbw==}
engines: {node: '>=10'}
dependencies:
ansi-styles: 4.3.0
axios: 0.21.4
fs: 0.0.1-security
supports-color: 7.2.0
transitivePeerDependencies:
- debug
dev: true
/chalk/2.4.2:
resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==}
engines: {node: '>=4'}
@ -7340,16 +7328,6 @@ packages:
resolution: {integrity: sha512-W7cHV7Hrwjid6lWmy0IhsWDFQboWSng25U3VVywpHOTJnnAZNPScog67G+cVpeX9f7yDD21ih0WDrMMT+JoaYg==}
dev: false
/follow-redirects/1.15.2:
resolution: {integrity: sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==}
engines: {node: '>=4.0'}
peerDependencies:
debug: '*'
peerDependenciesMeta:
debug:
optional: true
dev: true
/form-data-encoder/2.1.4:
resolution: {integrity: sha512-yDYSgNMraqvnxiEXO4hi88+YZxaHC6QKzb5N84iRCTDeRO7ZALpir/lVmf/uXUhnwUr2O4HU8s/n6x+yNjQkHw==}
engines: {node: '>= 14.17'}
@ -7414,10 +7392,6 @@ packages:
/fs.realpath/1.0.0:
resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==}
/fs/0.0.1-security:
resolution: {integrity: sha512-3XY9e1pP0CVEUCdj5BmfIZxRBTSDycnbqhIOGec9QYtmVH2fbLpj86CFWkrNOkt/Fvty4KZG5lTglL9j/gJ87w==}
dev: true
/fsevents/2.3.2:
resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==}
engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0}