mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-25 06:18:45 +08:00
chore: unify version (#1123)
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import { displayFlex, keyframes, styled } from '@affine/component';
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
import spring, { toString } from 'css-spring';
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { displayFlex, keyframes, styled } from '@affine/component';
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
import spring, { toString } from 'css-spring';
|
||||
import { CSSProperties } from 'react';
|
||||
|
||||
@@ -2,12 +2,10 @@ import { cloneElement, FC, PropsWithChildren, ReactNode } from 'react';
|
||||
|
||||
export const ProviderComposer: FC<
|
||||
PropsWithChildren<{
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
contexts: any;
|
||||
}>
|
||||
> = ({ contexts, children }) =>
|
||||
contexts.reduceRight(
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
(kids: ReactNode, parent: any) =>
|
||||
cloneElement(parent, {
|
||||
children: kids,
|
||||
|
||||
@@ -52,22 +52,18 @@ export const WorkspaceDelete = ({
|
||||
<StyledTextContent>
|
||||
<Trans i18nKey="Delete Workspace Description">
|
||||
Deleting (
|
||||
<StyledWorkspaceName>
|
||||
{{ workspace: workspace.name }}
|
||||
</StyledWorkspaceName>
|
||||
) cannot be undone, please proceed with caution. along with all
|
||||
its content.
|
||||
<StyledWorkspaceName>{workspace.name}</StyledWorkspaceName>)
|
||||
cannot be undone, please proceed with caution. along with all its
|
||||
content.
|
||||
</Trans>
|
||||
</StyledTextContent>
|
||||
) : (
|
||||
<StyledTextContent>
|
||||
<Trans i18nKey="Delete Workspace Description2">
|
||||
Deleting (
|
||||
<StyledWorkspaceName>
|
||||
{{ workspace: workspace.name }}
|
||||
</StyledWorkspaceName>
|
||||
) will delete both local and cloud data, this operation cannot be
|
||||
undone, please proceed with caution.
|
||||
<StyledWorkspaceName>{workspace.name}</StyledWorkspaceName>) will
|
||||
delete both local and cloud data, this operation cannot be undone,
|
||||
please proceed with caution.
|
||||
</Trans>
|
||||
</StyledTextContent>
|
||||
)}
|
||||
|
||||
@@ -15,17 +15,16 @@ interface LoginModalProps {
|
||||
workspaceId: string;
|
||||
onInviteSuccess: () => void;
|
||||
}
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
|
||||
export const debounce = <T extends (...args: any) => any>(
|
||||
fn: T,
|
||||
time?: number,
|
||||
immediate?: boolean
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
): ((...args: any) => any) => {
|
||||
let timeoutId: null | number;
|
||||
let defaultImmediate = immediate || false;
|
||||
const delay = time || 300;
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
|
||||
return (...args: any) => {
|
||||
if (defaultImmediate) {
|
||||
fn.apply(this, args);
|
||||
@@ -35,7 +34,7 @@ export const debounce = <T extends (...args: any) => any>(
|
||||
if (timeoutId) {
|
||||
clearTimeout(timeoutId);
|
||||
}
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
|
||||
// @ts-ignore
|
||||
timeoutId = setTimeout(() => {
|
||||
fn.apply(this, args);
|
||||
|
||||
@@ -102,7 +102,7 @@ export const MembersPage = ({ workspace }: { workspace: WorkspaceUnit }) => {
|
||||
<MenuItem
|
||||
onClick={async () => {
|
||||
// FIXME: remove ignore
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
|
||||
// @ts-ignore
|
||||
await removeMember(member.id);
|
||||
toast(
|
||||
|
||||
@@ -119,7 +119,7 @@ export const usePageHelper = (): EditorHandlers => {
|
||||
},
|
||||
permanentlyDeletePage: pageId => {
|
||||
// TODO: workspace.meta.removePage or workspace.removePage?
|
||||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
||||
|
||||
currentWorkspace!.blocksuiteWorkspace?.meta.removePage(pageId);
|
||||
},
|
||||
openPage: (pageId, query = {}, newTab = false) => {
|
||||
|
||||
@@ -76,7 +76,6 @@ export const useConfirm: UseBoundStore<Store> = ((
|
||||
) => {
|
||||
const api = useConfirmApi();
|
||||
return useStore(api, selector, equals);
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
}) as any;
|
||||
|
||||
function Records() {
|
||||
|
||||
@@ -30,7 +30,7 @@ import useCurrentPageMeta from '@/hooks/use-current-page-meta';
|
||||
|
||||
export const ThemeContext = createContext<ThemeProviderValue>({
|
||||
mode: 'light',
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
||||
|
||||
changeMode: () => {},
|
||||
theme: getLightTheme('page'),
|
||||
});
|
||||
@@ -124,10 +124,7 @@ export const ThemeProvider = ({
|
||||
<Global
|
||||
styles={css`
|
||||
:root {
|
||||
${
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
globalThemeVariables(mode, themeStyle) as any
|
||||
}
|
||||
${globalThemeVariables(mode, themeStyle) as any}
|
||||
}
|
||||
`}
|
||||
/>
|
||||
|
||||
@@ -118,7 +118,6 @@ export const useModal: UseBoundStore<Store> = ((
|
||||
) => {
|
||||
const api = useModalApi();
|
||||
return useStore(api, selector, equals);
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
}) as any;
|
||||
|
||||
const Modals: React.FC = function Modal() {
|
||||
|
||||
@@ -13,7 +13,6 @@ export function isMobile(userAgent: string) {
|
||||
|
||||
export const getIsMobile = function () {
|
||||
return isMobile(
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
navigator?.userAgent || navigator?.vendor || (window as any)?.opera
|
||||
);
|
||||
};
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
||||
export function debounce(fn: Function, timeout: number) {
|
||||
let timeoutId: any;
|
||||
|
||||
Reference in New Issue
Block a user