mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-19 11:06:25 +08:00
feat(core): build config for ios android (#8555)
This commit is contained in:
@@ -50,8 +50,9 @@ function OAuthProvider({ provider }: { provider: OAuthProviderType }) {
|
||||
|
||||
const onClick = useCallback(() => {
|
||||
let oauthUrl =
|
||||
(BUILD_CONFIG.isElectron ? BUILD_CONFIG.serverUrlPrefix : '') +
|
||||
`/oauth/login?provider=${provider}`;
|
||||
(BUILD_CONFIG.isElectron || BUILD_CONFIG.isIOS || BUILD_CONFIG.isAndroid
|
||||
? BUILD_CONFIG.serverUrlPrefix
|
||||
: '') + `/oauth/login?provider=${provider}`;
|
||||
|
||||
if (BUILD_CONFIG.isElectron) {
|
||||
oauthUrl += `&client=${appInfo?.schema}`;
|
||||
|
||||
@@ -5,7 +5,7 @@ import { fromPromise, Service } from '@toeverything/infra';
|
||||
import { BackendError, NetworkError } from '../error';
|
||||
|
||||
export function getAffineCloudBaseUrl(): string {
|
||||
if (BUILD_CONFIG.isElectron) {
|
||||
if (BUILD_CONFIG.isElectron || BUILD_CONFIG.isIOS || BUILD_CONFIG.isAndroid) {
|
||||
return BUILD_CONFIG.serverUrlPrefix;
|
||||
}
|
||||
const { protocol, hostname, port } = window.location;
|
||||
|
||||
@@ -3,9 +3,10 @@ import { apis } from '@affine/electron-api';
|
||||
|
||||
const logger = new DebugLogger('popup');
|
||||
|
||||
const origin = BUILD_CONFIG.isElectron
|
||||
? BUILD_CONFIG.serverUrlPrefix
|
||||
: location.origin;
|
||||
const origin =
|
||||
BUILD_CONFIG.isElectron || BUILD_CONFIG.isIOS || BUILD_CONFIG.isAndroid
|
||||
? BUILD_CONFIG.serverUrlPrefix
|
||||
: location.origin;
|
||||
|
||||
/**
|
||||
* @deprecated need to be refactored as [UrlService] dependencies on [ServerConfigService]
|
||||
|
||||
Reference in New Issue
Block a user