Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing documentation urls #1192

Merged
merged 2 commits into from
Oct 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions RELEASENOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
- Fixed exporting schemas to Java and Kotlin. The @Required annotation was incorrectly applied to lists of non-primitives. ([#1181](https://github.com/realm/realm-studio/pull/1181), since v1.8.0)
- On Windows, ensure there'll be no unnecessary local path collisions when browsing multiple Realm Cloud instances. The effect would have been that Realms with the same name that resided on different servers would need to be redownloaded every time you switched servers. ([#1184](https://github.com/realm/realm-studio/pull/1184), since v3.7.0)
- Fixed displaying fatal errors in the Realm Browser. ([#1189](https://github.com/realm/realm-studio/pull/1189), since v1.0.0-rc.2)
- Fixed URLs of the "getting started" call-to-action buttons on the server administration window. ([#1192](https://github.com/realm/realm-studio/pull/1192))

### Internals

Expand Down
12 changes: 11 additions & 1 deletion src/ui/ServerAdministration/GettingStarted/GettingStarted.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@
import * as React from 'react';
import { Button, Input } from 'reactstrap';

import { Platform } from '.';

import './GettingStarted.scss';

interface IGettingStartedProps {
onShowTutorial: (name: 'ios' | 'android' | 'react-native') => void;
onShowTutorial: (name: Platform) => void;
serverUrl: string;
}

Expand Down Expand Up @@ -71,6 +73,14 @@ export const GettingStarted = ({
>
Start with Android
</Button>
<Button
className="GettingStarted__Button"
onClick={() => {
onShowTutorial('xamarin');
}}
>
Start with Xamarin
</Button>
<Button
className="GettingStarted__Button"
onClick={() => {
Expand Down
14 changes: 9 additions & 5 deletions src/ui/ServerAdministration/GettingStarted/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import * as React from 'react';

import { GettingStarted } from './GettingStarted';

export type Platform = 'android' | 'apple' | 'javascript' | 'xamarin';
export type Platform = 'ios' | 'android' | 'react-native' | 'xamarin';

interface IGettingStartedContainerProps {
serverUrl: string;
Expand Down Expand Up @@ -49,18 +49,22 @@ class GettingStartedContainer extends React.Component<
return url;
};

public onShowTutorial = (name: 'ios' | 'android' | 'react-native') => {
public onShowTutorial = (name: Platform) => {
if (name === 'ios') {
electron.shell.openExternal(
'https://docs.realm.io/platform/getting-started-1/ios-quick-start',
'https://docs.realm.io/sync/getting-started-1/step-1-my-first-realm-app',
);
} else if (name === 'android') {
electron.shell.openExternal(
'https://docs.realm.io/platform/getting-started-1/android-quick-start',
'https://docs.realm.io/sync/getting-started-1/step-1-my-first-realm-app-1',
);
} else if (name === 'xamarin') {
electron.shell.openExternal(
'https://docs.realm.io/sync/getting-started-1/step-1-my-first-realm-app-2',
);
} else if (name === 'react-native') {
electron.shell.openExternal(
'https://docs.realm.io/platform/getting-started-1/react-native-quick-start',
'https://docs.realm.io/sync/getting-started-1/step-1-my-first-realm-app-2',
);
}
};
Expand Down