diff --git a/newIDE/app/src/Export/LocalMobileExport.js b/newIDE/app/src/Export/LocalMobileExport.js
new file mode 100644
index 0000000000..6d2420988c
--- /dev/null
+++ b/newIDE/app/src/Export/LocalMobileExport.js
@@ -0,0 +1,32 @@
+import React, { Component } from 'react';
+import FlatButton from 'material-ui/FlatButton';
+import { Column, Line, Spacer } from '../UI/Grid';
+import PlaceholderMessage from '../UI/PlaceholderMessage';
+import optionalRequire from '../Utils/OptionalRequire';
+const electron = optionalRequire('electron');
+const shell = electron ? electron.shell : null;
+
+export default class LocalMobileExport extends Component {
+ openURL = () => {
+ shell.openExternal('https://github.com/4ian/GD');
+ };
+
+ render() {
+ return (
+
+
+
+ This export is not available yet!
+
+
+
+
+
+
+ );
+ }
+}
diff --git a/newIDE/app/src/MainFrame/BetaIntroDialog.js b/newIDE/app/src/MainFrame/BetaIntroDialog.js
new file mode 100644
index 0000000000..75978a3c2d
--- /dev/null
+++ b/newIDE/app/src/MainFrame/BetaIntroDialog.js
@@ -0,0 +1,42 @@
+import React, { Component } from 'react';
+import Dialog from 'material-ui/Dialog';
+import FlatButton from 'material-ui/FlatButton';
+import { Column, Line } from '../UI/Grid';
+import optionalRequire from '../Utils/OptionalRequire';
+const electron = optionalRequire('electron');
+const shell = electron ? electron.shell : null;
+
+export default class BetaIntroDialog extends Component {
+ _onOpenGithub() {
+ shell.openExternal('https://github.com/4ian/GD');
+ }
+
+ render() {
+ const { open, onClose } = this.props;
+ const actions = [
+ ,
+ ,
+ ];
+
+ return (
+
+ );
+ }
+}
diff --git a/newIDE/app/src/MainFrame/Toolbar.js b/newIDE/app/src/MainFrame/Toolbar.js
index c5b2ccfaa4..7269e32072 100644
--- a/newIDE/app/src/MainFrame/Toolbar.js
+++ b/newIDE/app/src/MainFrame/Toolbar.js
@@ -5,6 +5,12 @@ import ToolbarSeparator from '../UI/ToolbarSeparator';
import IconMenu from '../UI/Menu/IconMenu';
import Window from '../Utils/Window';
+const styles = {
+ toolbar: {
+ flexShrink: 0,
+ },
+};
+
export default class MainFrameToolbar extends Component {
constructor() {
super();
@@ -23,7 +29,7 @@ export default class MainFrameToolbar extends Component {
render() {
return (
-
+
{this.props.showProjectIcons &&
{
@@ -319,6 +321,12 @@ export default class MainFrame extends Component {
});
};
+ _openIntroDialog = (open = true) => {
+ this.setState({
+ introDialogOpen: open,
+ });
+ };
+
_onChangeEditorTab = value => {
this.setState({
editorTabs: changeCurrentTab(this.state.editorTabs, value),
@@ -349,7 +357,7 @@ export default class MainFrame extends Component {
const {
currentProject,
} = this.state;
- const { exportDialog, createDialog } = this.props;
+ const { exportDialog, createDialog, introDialog } = this.props;
const showLoader = this.state.loadingProject ||
this.state.previewLoading ||
this.props.loading;
@@ -428,6 +436,11 @@ export default class MainFrame extends Component {
this._openFromFile(filepath);
},
})}
+ {!!introDialog &&
+ React.cloneElement(introDialog, {
+ open: this.state.introDialogOpen,
+ onClose: () => this._openIntroDialog(false),
+ })}
diff --git a/newIDE/app/src/Utils/Analytics/EventSender.js b/newIDE/app/src/Utils/Analytics/EventSender.js
index 5ac16dbfb5..ed05a6ad39 100644
--- a/newIDE/app/src/Utils/Analytics/EventSender.js
+++ b/newIDE/app/src/Utils/Analytics/EventSender.js
@@ -10,64 +10,64 @@ var client = new Keen({
writeKey: 'B917F1DB50EE4C8949DBB374D2962845A22838B425AA43322A37138691A5270EB0358AEE45A4F61AFA7713B9765B4980517A1E276D4973A2E546EA851BF7757523706367ED430C041D2728A63BF61B5D1B2079C75E455DDDFAAC4324128AC2DB',
});
-client.extendEvents(function(){
- return {
- page: {
- title: document.title,
- url: document.location.href
- // info: {} (add-on)
- },
- referrer: {
- url: document.referrer
- // info: {} (add-on)
- },
- tech: {
- browser: Keen.helpers.getBrowserProfile(),
- // info: {} (add-on)
- ip: '${keen.ip}',
- ua: '${keen.user_agent}'
- },
- time: Keen.helpers.getDatetimeIndex(),
- visitor: {
- id: sessionCookie.get('user_id'),
- time_on_page: sessionTimer.value()
- },
- // geo: {} (add-on)
- keen: {
- timestamp: new Date().toISOString(),
- addons: [
- {
- name: 'keen:ip_to_geo',
- input: {
- ip: 'tech.ip'
- },
- output: 'geo'
- },
- {
- name: 'keen:ua_parser',
- input: {
- ua_string: 'tech.ua'
- },
- output: 'tech.info'
- },
- {
- name: 'keen:url_parser',
- input: {
- url: 'page.url'
- },
- output: 'page.info'
- },
- {
- name: 'keen:referrer_parser',
- input: {
- page_url: 'page.url',
- referrer_url: 'referrer.url'
- },
- output: 'referrer.info'
- }
- ]
- }
- };
+client.extendEvents(function() {
+ return {
+ page: {
+ title: document.title,
+ url: document.location.href,
+ // info: {} (add-on)
+ },
+ referrer: {
+ url: document.referrer,
+ // info: {} (add-on)
+ },
+ tech: {
+ browser: Keen.helpers.getBrowserProfile(),
+ // info: {} (add-on)
+ ip: '${keen.ip}', // eslint-disable-line
+ ua: '${keen.user_agent}', // eslint-disable-line
+ },
+ time: Keen.helpers.getDatetimeIndex(),
+ visitor: {
+ id: sessionCookie.get('user_id'),
+ time_on_page: sessionTimer.value(),
+ },
+ // geo: {} (add-on)
+ keen: {
+ timestamp: new Date().toISOString(),
+ addons: [
+ {
+ name: 'keen:ip_to_geo',
+ input: {
+ ip: 'tech.ip',
+ },
+ output: 'geo',
+ },
+ {
+ name: 'keen:ua_parser',
+ input: {
+ ua_string: 'tech.ua',
+ },
+ output: 'tech.info',
+ },
+ {
+ name: 'keen:url_parser',
+ input: {
+ url: 'page.url',
+ },
+ output: 'page.info',
+ },
+ {
+ name: 'keen:referrer_parser',
+ input: {
+ page_url: 'page.url',
+ referrer_url: 'referrer.url',
+ },
+ output: 'referrer.info',
+ },
+ ],
+ },
+ };
});
export const sendProgramOpening = () => {
@@ -76,11 +76,11 @@ export const sendProgramOpening = () => {
client.recordEvent('program_opening');
};
-export const sendNewGameCreated = (templateName) => {
+export const sendNewGameCreated = templateName => {
if (isDev) return;
client.recordEvent('new_game_creation', {
platform: 'GDevelop JS Platform', // Hardcoded here for now
templateName,
});
-};
\ No newline at end of file
+};
diff --git a/newIDE/app/src/index.js b/newIDE/app/src/index.js
index cfe8ccbf18..d419bfa771 100644
--- a/newIDE/app/src/index.js
+++ b/newIDE/app/src/index.js
@@ -1,6 +1,7 @@
import React from 'react';
import ReactDOM from 'react-dom';
import MainFrame from './MainFrame';
+import BetaIntroDialog from './MainFrame/BetaIntroDialog';
import Window from './Utils/Window';
import ExportDialog from './Export/ExportDialog';
import { sendProgramOpening } from './Utils/Analytics/EventSender';
@@ -14,6 +15,7 @@ import optionalRequire from './Utils/OptionalRequire.js';
import LocalPreviewLauncher from './Export/LocalPreviewLauncher';
import LocalExport from './Export/LocalExport';
import LocalS3Export from './Export/LocalS3Export';
+import LocalMobileExport from './Export/LocalMobileExport';
import LocalCreateDialog from './ProjectCreation/LocalCreateDialog';
const electron = optionalRequire('electron');
@@ -47,8 +49,13 @@ if (electron) {
}, {
name: 'Export to a folder',
ExportComponent: LocalExport
+ }, {
+ name: 'Export to iOS/Android app',
+ ExportComponent: LocalMobileExport
}]} />}
- createDialog={}
+ createDialog={
+ }
+ introDialog={}
/>
);
}
diff --git a/newIDE/app/src/stories/index.js b/newIDE/app/src/stories/index.js
index 17eedd66a4..9d0c555600 100644
--- a/newIDE/app/src/stories/index.js
+++ b/newIDE/app/src/stories/index.js
@@ -12,6 +12,7 @@ import LocalCreateDialog from '../ProjectCreation/LocalCreateDialog';
import { Tabs, Tab } from '../UI/Tabs';
import LocalFolderPicker from '../UI/LocalFolderPicker';
import LocalExport from '../Export/LocalExport';
+import LocalMobileExport from '../Export/LocalMobileExport';
import LocalS3Export from '../Export/LocalS3Export';
import Paper from 'material-ui/Paper';
import muiDecorator from './MuiDecorator';
@@ -87,6 +88,14 @@ storiesOf('LocalS3Export', module)
));
+storiesOf('LocalMobileExport', module)
+ .addDecorator(muiDecorator)
+ .add('default', () => (
+
+
+
+ ));
+
storiesOf('LocalFolderPicker', module)
.addDecorator(muiDecorator)
.add('default', () => (
diff --git a/newIDE/electron-app/app/main.js b/newIDE/electron-app/app/main.js
index 4dc459c805..fcbbfaa7b3 100644
--- a/newIDE/electron-app/app/main.js
+++ b/newIDE/electron-app/app/main.js
@@ -52,6 +52,7 @@ app.on('ready', function() {
}
mainWindow = new BrowserWindow(options);
+ if (!isIntegrated) mainWindow.maximize();
//Expose program arguments
global['args'] = args;
@@ -64,7 +65,7 @@ app.on('ready', function() {
} else {
// Production (with npm run build)
mainWindow.loadURL('file://' + __dirname + '/www/index.html');
- if (true || devTools) mainWindow.openDevTools();
+ if (devTools) mainWindow.openDevTools();
}
// Emitted when the window is closed.