mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 04:18:54 +00:00
feat: support google cloud login in client (#1822)
Co-authored-by: Himself65 <himself65@outlook.com> Co-authored-by: Peng Xiao <pengxiao@outlook.com>
This commit is contained in:
@@ -31,7 +31,6 @@ export const StyledHeader = styled('div')<{ hasWarning: boolean }>(
|
||||
padding: '0 20px',
|
||||
...displayFlex('space-between', 'center'),
|
||||
background: theme.colors.pageBackground,
|
||||
transition: 'background-color 0.5s',
|
||||
zIndex: 99,
|
||||
position: 'relative',
|
||||
};
|
||||
|
||||
@@ -12,8 +12,8 @@ import { jotaiStore } from '@affine/workspace/atom';
|
||||
import { isValidIPAddress } from '../utils';
|
||||
|
||||
let prefixUrl = '/';
|
||||
if (typeof window === 'undefined') {
|
||||
// SSR
|
||||
if (typeof window === 'undefined' || environment.isDesktop) {
|
||||
// SSR or Desktop
|
||||
const serverAPI = config.serverAPI;
|
||||
if (isValidIPAddress(serverAPI.split(':')[0])) {
|
||||
// This is for Server side rendering support
|
||||
@@ -21,6 +21,7 @@ if (typeof window === 'undefined') {
|
||||
} else {
|
||||
prefixUrl = serverAPI;
|
||||
}
|
||||
prefixUrl = prefixUrl.endsWith('/') ? prefixUrl : prefixUrl + '/';
|
||||
} else {
|
||||
const params = new URLSearchParams(window.location.search);
|
||||
params.get('prefixUrl') && (prefixUrl = params.get('prefixUrl') as string);
|
||||
|
||||
Reference in New Issue
Block a user