mirror of
https://github.com/4ian/GDevelop.git
synced 2025-10-15 10:19:04 +00:00
Use production Google Drive API keys when not in development
This commit is contained in:
@@ -214,13 +214,18 @@ class MainFrame extends React.Component<Props, State> {
|
||||
|
||||
if (!initialFileMetadataToOpen) return;
|
||||
|
||||
if (!isAfterUserInteraction && storageProviderOperations.doesInitialOpenRequireUserInteraction) {
|
||||
if (
|
||||
!isAfterUserInteraction &&
|
||||
storageProviderOperations.doesInitialOpenRequireUserInteraction
|
||||
) {
|
||||
this._openOpenConfirmDialog(true);
|
||||
return;
|
||||
}
|
||||
|
||||
this.openFromFileMetadata(initialFileMetadataToOpen).then(() => this.openSceneOrProjectManager());
|
||||
}
|
||||
this.openFromFileMetadata(initialFileMetadataToOpen).then(() =>
|
||||
this.openSceneOrProjectManager()
|
||||
);
|
||||
};
|
||||
|
||||
_languageDidChange() {
|
||||
// A change in the language will automatically be applied
|
||||
@@ -1906,12 +1911,15 @@ class MainFrame extends React.Component<Props, State> {
|
||||
/>
|
||||
)}
|
||||
{this.state.openConfirmDialogOpen && (
|
||||
<OpenConfirmDialog onClose={() => {
|
||||
this._openOpenConfirmDialog(false);
|
||||
}} onConfirm={() => {
|
||||
this._openOpenConfirmDialog(false);
|
||||
this._openInitialFileMetadata(/* isAfterUserInteraction= */ true);
|
||||
}} />
|
||||
<OpenConfirmDialog
|
||||
onClose={() => {
|
||||
this._openOpenConfirmDialog(false);
|
||||
}}
|
||||
onConfirm={() => {
|
||||
this._openOpenConfirmDialog(false);
|
||||
this._openInitialFileMetadata(/* isAfterUserInteraction= */ true);
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
<CloseConfirmDialog shouldPrompt={!!this.state.currentProject} />
|
||||
<ChangelogDialogContainer />
|
||||
|
@@ -7,11 +7,15 @@ import GoogleDrive from '../../UI/CustomSvgIcons/GoogleDrive';
|
||||
import GoogleDriveSaveAsDialog from './GoogleDriveSaveAsDialog';
|
||||
import { type MessageDescriptor } from '../../Utils/i18n/MessageDescriptor.flow';
|
||||
import { type AppArguments } from '../../Utils/Window';
|
||||
const isDev = process.env.NODE_ENV === 'development';
|
||||
|
||||
const DEVELOPER_KEY = 'AIzaSyDH3UNpxzIpcTyd6aMCWI5oNFSptG_BhOc';
|
||||
const APP_ID = '28563107180';
|
||||
const CLIENT_ID =
|
||||
'28563107180-bd29h9f3og4h1632m94nv6hat2igrej6.apps.googleusercontent.com';
|
||||
const DEVELOPER_KEY = isDev
|
||||
? 'AIzaSyDH3UNpxzIpcTyd6aMCWI5oNFSptG_BhOc'
|
||||
: 'AIzaSyDJYQmzLCfjXnNImDa1X_cDTWjl2BOrcM4';
|
||||
const CLIENT_ID = isDev
|
||||
? '28563107180-bd29h9f3og4h1632m94nv6hat2igrej6.apps.googleusercontent.com'
|
||||
: '44882707384-3t4tubr3fbht87sbtdp7u5mlo45k5uku.apps.googleusercontent.com';
|
||||
const APP_ID = isDev ? '28563107180' : '44882707384'; // This is the first part of CLIENT_ID.
|
||||
const DISCOVERY_DOCS = [
|
||||
'https://www.googleapis.com/discovery/v1/apis/drive/v3/rest',
|
||||
];
|
||||
|
@@ -12,7 +12,10 @@ import {
|
||||
onSaveProjectAs,
|
||||
onAutoSaveProject,
|
||||
} from './LocalProjectWriter';
|
||||
import { type AppArguments, POSITIONAL_ARGUMENTS_KEY } from '../../Utils/Window';
|
||||
import {
|
||||
type AppArguments,
|
||||
POSITIONAL_ARGUMENTS_KEY,
|
||||
} from '../../Utils/Window';
|
||||
|
||||
/**
|
||||
* Use the Electron APIs to provide access to the native
|
||||
@@ -27,7 +30,7 @@ export default ({
|
||||
|
||||
return {
|
||||
fileIdentifier: appArguments[POSITIONAL_ARGUMENTS_KEY][0],
|
||||
}
|
||||
};
|
||||
},
|
||||
createOperations: () => ({
|
||||
onOpenWithPicker,
|
||||
|
@@ -86,7 +86,8 @@ export default class ProjectStorageProviders extends React.Component<
|
||||
...computeInitialFileMetadataToOpen(
|
||||
this.props.defaultStorageProvider,
|
||||
this.props.storageProviders,
|
||||
this.props.appArguments),
|
||||
this.props.appArguments
|
||||
),
|
||||
renderDialog: null,
|
||||
};
|
||||
|
||||
|
@@ -65,7 +65,7 @@ export type StorageProvider = {|
|
||||
hiddenInSaveDialog?: boolean,
|
||||
disabled?: boolean,
|
||||
renderIcon?: () => React.Node,
|
||||
getFileMetadataFromAppArguments?: (AppArguments) => ?FileMetadata,
|
||||
getFileMetadataFromAppArguments?: AppArguments => ?FileMetadata,
|
||||
createOperations: ({
|
||||
/** Open a dialog (a render function) */
|
||||
setDialog: (() => React.Node) => void,
|
||||
|
Reference in New Issue
Block a user