mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-29 18:46:20 -05:00
Remove app flag
This commit is contained in:
parent
d8df31587e
commit
3146ee8b83
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,24 +28,22 @@ const ExtensionRequirements = props => (
|
||||||
/>
|
/>
|
||||||
macOS 10.13+
|
macOS 10.13+
|
||||||
</span>
|
</span>
|
||||||
{CHROME_APP_RELEASED && (
|
<React.Fragment>
|
||||||
<React.Fragment>
|
<span>
|
||||||
<span>
|
<img
|
||||||
<img
|
alt=""
|
||||||
alt=""
|
src="/svgs/extensions/chromeos.svg"
|
||||||
src="/svgs/extensions/chromeos.svg"
|
/>
|
||||||
/>
|
ChromeOS
|
||||||
ChromeOS
|
</span>
|
||||||
</span>
|
<span>
|
||||||
<span>
|
<img
|
||||||
<img
|
alt=""
|
||||||
alt=""
|
src="/svgs/extensions/android.svg"
|
||||||
src="/svgs/extensions/android.svg"
|
/>
|
||||||
/>
|
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,28 +33,24 @@ const OSChooser = props => (
|
||||||
<img src="/svgs/extensions/mac.svg" />
|
<img src="/svgs/extensions/mac.svg" />
|
||||||
macOS
|
macOS
|
||||||
</Button>
|
</Button>
|
||||||
{CHROME_APP_RELEASED && (
|
<Button
|
||||||
<React.Fragment>
|
className={classNames({active: props.currentOS === OS_ENUM.CHROMEOS})}
|
||||||
<Button
|
onClick={() => // eslint-disable-line react/jsx-no-bind
|
||||||
className={classNames({active: props.currentOS === OS_ENUM.CHROMEOS})}
|
props.handleSetOS(OS_ENUM.CHROMEOS)
|
||||||
onClick={() => // eslint-disable-line react/jsx-no-bind
|
}
|
||||||
props.handleSetOS(OS_ENUM.CHROMEOS)
|
>
|
||||||
}
|
<img src="/svgs/extensions/chromeos.svg" />
|
||||||
>
|
ChromeOS
|
||||||
<img src="/svgs/extensions/chromeos.svg" />
|
</Button>
|
||||||
ChromeOS
|
<Button
|
||||||
</Button>
|
className={classNames({active: props.currentOS === OS_ENUM.ANDROID})}
|
||||||
<Button
|
onClick={() => // eslint-disable-line react/jsx-no-bind
|
||||||
className={classNames({active: props.currentOS === OS_ENUM.ANDROID})}
|
props.handleSetOS(OS_ENUM.ANDROID)
|
||||||
onClick={() => // eslint-disable-line react/jsx-no-bind
|
}
|
||||||
props.handleSetOS(OS_ENUM.ANDROID)
|
>
|
||||||
}
|
<img src="/svgs/extensions/android.svg" />
|
||||||
>
|
Android
|
||||||
<img src="/svgs/extensions/android.svg" />
|
</Button>
|
||||||
Android
|
|
||||||
</Button>
|
|
||||||
</React.Fragment>
|
|
||||||
)}
|
|
||||||
</FlexRow>
|
</FlexRow>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
|
@ -140,10 +140,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,5 +8,4 @@ const flagInUrl = flag => {
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
CHROME_APP_RELEASED: true
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -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,24 +79,20 @@ class Download extends React.Component {
|
||||||
/>
|
/>
|
||||||
macOS 10.13+
|
macOS 10.13+
|
||||||
</span>
|
</span>
|
||||||
{CHROME_APP_RELEASED && (
|
<span>
|
||||||
<React.Fragment>
|
<img
|
||||||
<span>
|
alt=""
|
||||||
<img
|
src="/svgs/extensions/chromeos.svg"
|
||||||
alt=""
|
/>
|
||||||
src="/svgs/extensions/chromeos.svg"
|
|
||||||
/>
|
|
||||||
ChromeOS
|
ChromeOS
|
||||||
</span>
|
</span>
|
||||||
<span>
|
<span>
|
||||||
<img
|
<img
|
||||||
alt=""
|
alt=""
|
||||||
src="/svgs/extensions/android.svg"
|
src="/svgs/extensions/android.svg"
|
||||||
/>
|
/>
|
||||||
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