Skip to content

Commit

Permalink
feat: 移除第三方 cookie 检测
Browse files Browse the repository at this point in the history
  • Loading branch information
moshangqi committed Dec 27, 2023
1 parent c01f41f commit 130c48c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 39 deletions.
26 changes: 0 additions & 26 deletions src/components/AccountLayout/index.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
import React, { useState, useCallback, useMemo, useEffect } from 'react';
import { Modal } from 'antd';
import { IUser } from '@/isomorphic/interface';
import { __i18n } from '@/isomorphic/i18n';
import { pageEvent } from '@/core/event/pageEvent';
import { PageEventTypes } from '@/isomorphic/event/pageEvent';
import { storage } from '@/isomorphic/storage';
import { useEffectAsync } from '@/hooks/useAsyncEffect';
import { backgroundBridge } from '@/core/bridge/background';
import { findCookieSettingPage } from '@/core/uitl';
import { STORAGE_KEYS } from '@/config';
import Login from './Login';
import { AccountContext } from './context';
Expand Down Expand Up @@ -43,28 +39,6 @@ function AccountLayout(props: IAccountLayoutProps) {
return;
}
try {
if (!navigator.cookieEnabled) {
new Promise(resolve => {
const pageUrl = findCookieSettingPage();
Modal.info({
content: __i18n('请前往「隐私和安全」打开「允许第三方cookies」,避免登录失败'),
title: __i18n('使用提示'),
closable: true,
icon: null,
okText: pageUrl ? __i18n('打开隐私和安全') : __i18n('确定'),
autoFocusButton: null,
onOk: () => {
if (pageUrl) {
backgroundBridge.tab.create(pageUrl);
}
resolve(true);
},
afterClose: () => {
resolve(true);
},
});
});
}
setUser(info);
} catch (error) {
console.log('init user error:', error);
Expand Down
13 changes: 0 additions & 13 deletions src/core/uitl.ts

This file was deleted.

0 comments on commit 130c48c

Please sign in to comment.