mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 21:05:19 +00:00
fix: message wrong about favourites (#669)
* fix: wrong message * chore: update type
This commit is contained in:
@@ -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 = [
|
||||
{
|
||||
|
||||
@@ -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 />}
|
||||
|
||||
@@ -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={{
|
||||
|
||||
@@ -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={() => {
|
||||
|
||||
@@ -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 = [
|
||||
{
|
||||
|
||||
@@ -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** ',
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user