mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-22 23:27:54 -05:00
commit
8d385afa44
8 changed files with 57 additions and 100 deletions
|
@ -4,8 +4,6 @@ const React = require('react');
|
||||||
|
|
||||||
const FlexRow = require('../../components/flex-row/flex-row.jsx');
|
const FlexRow = require('../../components/flex-row/flex-row.jsx');
|
||||||
|
|
||||||
const {CHROME_APP_RELEASED} = require('../../lib/feature-flags.js');
|
|
||||||
|
|
||||||
require('./extension-landing.scss');
|
require('./extension-landing.scss');
|
||||||
|
|
||||||
const ExtensionRequirements = props => (
|
const ExtensionRequirements = props => (
|
||||||
|
@ -30,7 +28,6 @@ const ExtensionRequirements = props => (
|
||||||
/>
|
/>
|
||||||
macOS 10.13+
|
macOS 10.13+
|
||||||
</span>
|
</span>
|
||||||
{CHROME_APP_RELEASED && (
|
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
<span>
|
<span>
|
||||||
<img
|
<img
|
||||||
|
@ -47,7 +44,6 @@ const ExtensionRequirements = props => (
|
||||||
Android 6.0+
|
Android 6.0+
|
||||||
</span>
|
</span>
|
||||||
</React.Fragment>
|
</React.Fragment>
|
||||||
)}
|
|
||||||
<span>
|
<span>
|
||||||
<img src="/svgs/extensions/bluetooth.svg" />
|
<img src="/svgs/extensions/bluetooth.svg" />
|
||||||
Bluetooth
|
Bluetooth
|
||||||
|
|
|
@ -3,7 +3,6 @@ const FormattedMessage = require('react-intl').FormattedMessage;
|
||||||
const React = require('react');
|
const React = require('react');
|
||||||
|
|
||||||
const OS_ENUM = require('../../lib/os-enum.js');
|
const OS_ENUM = require('../../lib/os-enum.js');
|
||||||
const {CHROME_APP_RELEASED} = require('../../lib/feature-flags.js');
|
|
||||||
|
|
||||||
const {isDownloaded, isFromGooglePlay} = require('./install-util.js');
|
const {isDownloaded, isFromGooglePlay} = require('./install-util.js');
|
||||||
|
|
||||||
|
@ -27,24 +26,10 @@ const InstallScratch = ({
|
||||||
<div className="blue install-scratch">
|
<div className="blue install-scratch">
|
||||||
<FlexRow className="inner column">
|
<FlexRow className="inner column">
|
||||||
<h2 className="title">
|
<h2 className="title">
|
||||||
{CHROME_APP_RELEASED ? (
|
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
id="installScratch.appHeaderTitle"
|
id="installScratch.appHeaderTitle"
|
||||||
values={{operatingsystem: currentOS}}
|
values={{operatingsystem: currentOS}}
|
||||||
/>
|
/>
|
||||||
) : (
|
|
||||||
<React.Fragment>
|
|
||||||
{isDownloaded(currentOS) && (
|
|
||||||
<FormattedMessage id="installScratch.desktopHeaderTitle" />
|
|
||||||
)}
|
|
||||||
{isFromGooglePlay(currentOS) && (
|
|
||||||
<FormattedMessage
|
|
||||||
id="installScratch.appHeaderTitle"
|
|
||||||
values={{operatingsystem: currentOS}}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
</React.Fragment>
|
|
||||||
)}
|
|
||||||
</h2>
|
</h2>
|
||||||
<Steps>
|
<Steps>
|
||||||
<div className="step">
|
<div className="step">
|
||||||
|
@ -56,14 +41,12 @@ const InstallScratch = ({
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
{currentOS === OS_ENUM.WINDOWS && (
|
{currentOS === OS_ENUM.WINDOWS && (
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
id={CHROME_APP_RELEASED ? 'installScratch.getScratchAppWindows' :
|
id="installScratch.getScratchAppWindows"
|
||||||
'installScratch.downloadScratchDesktop'}
|
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{currentOS === OS_ENUM.MACOS && (
|
{currentOS === OS_ENUM.MACOS && (
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
id={CHROME_APP_RELEASED ? 'installScratch.getScratchAppMacOs' :
|
id="installScratch.getScratchAppMacOs"
|
||||||
'installScratch.downloadScratchDesktop'}
|
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{isFromGooglePlay(currentOS) && (
|
{isFromGooglePlay(currentOS) && (
|
||||||
|
|
|
@ -4,8 +4,6 @@ const FormattedMessage = require('react-intl').FormattedMessage;
|
||||||
const PropTypes = require('prop-types');
|
const PropTypes = require('prop-types');
|
||||||
const React = require('react');
|
const React = require('react');
|
||||||
|
|
||||||
const {CHROME_APP_RELEASED} = require('../../lib/feature-flags.js');
|
|
||||||
|
|
||||||
const FlexRow = require('../../components/flex-row/flex-row.jsx');
|
const FlexRow = require('../../components/flex-row/flex-row.jsx');
|
||||||
const Button = require('../../components/forms/button.jsx');
|
const Button = require('../../components/forms/button.jsx');
|
||||||
|
|
||||||
|
@ -35,8 +33,6 @@ const OSChooser = props => (
|
||||||
<img src="/svgs/extensions/mac.svg" />
|
<img src="/svgs/extensions/mac.svg" />
|
||||||
macOS
|
macOS
|
||||||
</Button>
|
</Button>
|
||||||
{CHROME_APP_RELEASED && (
|
|
||||||
<React.Fragment>
|
|
||||||
<Button
|
<Button
|
||||||
className={classNames({active: props.currentOS === OS_ENUM.CHROMEOS})}
|
className={classNames({active: props.currentOS === OS_ENUM.CHROMEOS})}
|
||||||
onClick={() => // eslint-disable-line react/jsx-no-bind
|
onClick={() => // eslint-disable-line react/jsx-no-bind
|
||||||
|
@ -55,8 +51,6 @@ const OSChooser = props => (
|
||||||
<img src="/svgs/extensions/android.svg" />
|
<img src="/svgs/extensions/android.svg" />
|
||||||
Android
|
Android
|
||||||
</Button>
|
</Button>
|
||||||
</React.Fragment>
|
|
||||||
)}
|
|
||||||
</FlexRow>
|
</FlexRow>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
|
@ -141,10 +141,7 @@
|
||||||
|
|
||||||
"installScratch.or": "or",
|
"installScratch.or": "or",
|
||||||
"installScratch.directDownload": "Direct download",
|
"installScratch.directDownload": "Direct download",
|
||||||
"installScratch.desktopHeaderTitle": "Install Scratch Desktop",
|
|
||||||
"installScratch.appHeaderTitle": "Install the Scratch app for {operatingsystem}",
|
"installScratch.appHeaderTitle": "Install the Scratch app for {operatingsystem}",
|
||||||
"installScratch.downloadScratchDesktop": "Download Scratch Desktop",
|
|
||||||
"installScratch.downloadScratchAppGeneric": "Download Scratch for {operatingsystem}",
|
|
||||||
"installScratch.getScratchAppPlay": "Get the Scratch app on the Google Play Store",
|
"installScratch.getScratchAppPlay": "Get the Scratch app on the Google Play Store",
|
||||||
"installScratch.getScratchAppMacOs": "Get the Scratch app on the Mac App Store",
|
"installScratch.getScratchAppMacOs": "Get the Scratch app on the Mac App Store",
|
||||||
"installScratch.getScratchAppWindows": "Get the Scratch app on the Microsoft Store",
|
"installScratch.getScratchAppWindows": "Get the Scratch app on the Microsoft Store",
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import bowser from 'bowser';
|
import bowser from 'bowser';
|
||||||
import OS_ENUM from './os-enum.js';
|
import OS_ENUM from './os-enum.js';
|
||||||
import {CHROME_APP_RELEASED} from './feature-flags.js';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Helper function to the current Operating System.
|
* Helper function to the current Operating System.
|
||||||
|
@ -9,10 +8,8 @@ import {CHROME_APP_RELEASED} from './feature-flags.js';
|
||||||
export default function () {
|
export default function () {
|
||||||
// matching OS strings from https://github.com/lancedikson/bowser/blob/master/src/constants.js
|
// matching OS strings from https://github.com/lancedikson/bowser/blob/master/src/constants.js
|
||||||
if (bowser.osname === 'macOS') return OS_ENUM.MACOS;
|
if (bowser.osname === 'macOS') return OS_ENUM.MACOS;
|
||||||
if (CHROME_APP_RELEASED) {
|
|
||||||
if (bowser.osname === 'Chrome OS') return OS_ENUM.CHROMEOS;
|
if (bowser.osname === 'Chrome OS') return OS_ENUM.CHROMEOS;
|
||||||
if (bowser.osname === 'Android') return OS_ENUM.ANDROID;
|
if (bowser.osname === 'Android') return OS_ENUM.ANDROID;
|
||||||
}
|
|
||||||
// if (bowser.osname === 'iOS') return OS_ENUM.IOS; // @todo
|
// if (bowser.osname === 'iOS') return OS_ENUM.IOS; // @todo
|
||||||
return OS_ENUM.WINDOWS;
|
return OS_ENUM.WINDOWS;
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,6 +8,5 @@ const flagInUrl = flag => {
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
CHROME_APP_RELEASED: true,
|
|
||||||
CONTACT_US_POPUP: isStaging() && flagInUrl('CONTACT_US_POPUP')
|
CONTACT_US_POPUP: isStaging() && flagInUrl('CONTACT_US_POPUP')
|
||||||
};
|
};
|
||||||
|
|
|
@ -10,7 +10,6 @@ const Page = require('../../components/page/www/page.jsx');
|
||||||
const render = require('../../lib/render.jsx');
|
const render = require('../../lib/render.jsx');
|
||||||
const detectOS = require('../../lib/detect-os.js').default;
|
const detectOS = require('../../lib/detect-os.js').default;
|
||||||
const OS_ENUM = require('../../lib/os-enum.js');
|
const OS_ENUM = require('../../lib/os-enum.js');
|
||||||
const {CHROME_APP_RELEASED} = require('../../lib/feature-flags.js');
|
|
||||||
const OSChooser = require('../../components/os-chooser/os-chooser.jsx');
|
const OSChooser = require('../../components/os-chooser/os-chooser.jsx');
|
||||||
const InstallScratch = require('../../components/install-scratch/install-scratch.jsx');
|
const InstallScratch = require('../../components/install-scratch/install-scratch.jsx');
|
||||||
const {isDownloaded, isFromGooglePlay} = require('../../components/install-scratch/install-util.js');
|
const {isDownloaded, isFromGooglePlay} = require('../../components/install-scratch/install-util.js');
|
||||||
|
@ -52,14 +51,12 @@ class Download extends React.Component {
|
||||||
width="40"
|
width="40"
|
||||||
/>
|
/>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
id={CHROME_APP_RELEASED ? 'download.appTitle' :
|
id="download.appTitle"
|
||||||
'download.title'}
|
|
||||||
/>
|
/>
|
||||||
</h1>
|
</h1>
|
||||||
<span className="download-description">
|
<span className="download-description">
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
id={CHROME_APP_RELEASED ? 'download.appIntro' :
|
id="download.appIntro"
|
||||||
'download.intro'}
|
|
||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
</FlexRow>
|
</FlexRow>
|
||||||
|
@ -82,8 +79,6 @@ class Download extends React.Component {
|
||||||
/>
|
/>
|
||||||
macOS 10.13+
|
macOS 10.13+
|
||||||
</span>
|
</span>
|
||||||
{CHROME_APP_RELEASED && (
|
|
||||||
<React.Fragment>
|
|
||||||
<span>
|
<span>
|
||||||
<img
|
<img
|
||||||
alt=""
|
alt=""
|
||||||
|
@ -98,8 +93,6 @@ class Download extends React.Component {
|
||||||
/>
|
/>
|
||||||
Android 6.0+
|
Android 6.0+
|
||||||
</span>
|
</span>
|
||||||
</React.Fragment>
|
|
||||||
)}
|
|
||||||
</FlexRow>
|
</FlexRow>
|
||||||
</FlexRow>
|
</FlexRow>
|
||||||
</FlexRow>
|
</FlexRow>
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
{
|
{
|
||||||
"download.title": "Scratch Desktop",
|
|
||||||
"download.intro": "You can install the Scratch Desktop editor to work on projects without an internet connection. This version will work on Windows and MacOS.",
|
|
||||||
"download.appTitle": "Download the Scratch App",
|
"download.appTitle": "Download the Scratch App",
|
||||||
"download.appIntro": "Would you like to create and save Scratch projects without an internet connection? Download the free Scratch app.",
|
"download.appIntro": "Would you like to create and save Scratch projects without an internet connection? Download the free Scratch app.",
|
||||||
"download.requirements": "Requirements",
|
"download.requirements": "Requirements",
|
||||||
|
@ -23,7 +21,7 @@
|
||||||
"download.macMoveToApplications" : "Open the .dmg file. Move Scratch Desktop into Applications.",
|
"download.macMoveToApplications" : "Open the .dmg file. Move Scratch Desktop into Applications.",
|
||||||
"download.winMoveToApplications" : "Run the .exe file.",
|
"download.winMoveToApplications" : "Run the .exe file.",
|
||||||
"download.doIHaveToDownload" : "Do I have to download an app to use Scratch?",
|
"download.doIHaveToDownload" : "Do I have to download an app to use Scratch?",
|
||||||
"download.doIHaveToDownloadAnswer" : "No. You can also use the Scratch project editor in any web browser on any device by going to scratch.mit.edu and clicking \"Create\".",
|
"download.doIHaveToDownloadAnswer" : "No. You can also use the Scratch project editor in most web browsers on most devices by going to scratch.mit.edu and clicking \"Create\".",
|
||||||
"download.canIUseScratchLink" : "Can I use Scratch Link to connect to extensions?",
|
"download.canIUseScratchLink" : "Can I use Scratch Link to connect to extensions?",
|
||||||
"download.canIUseScratchLinkAnswer" : "Yes. However, you will need an Internet connection to use Scratch Link.",
|
"download.canIUseScratchLinkAnswer" : "Yes. However, you will need an Internet connection to use Scratch Link.",
|
||||||
"download.canIUseExtensions" : "Can I connect to hardware extensions?",
|
"download.canIUseExtensions" : "Can I connect to hardware extensions?",
|
||||||
|
|
Loading…
Reference in a new issue