Skip to content
This repository was archived by the owner on Aug 27, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
94 commits
Select commit Hold shift + click to select a range
38356b2
Update translations
GarboMuffin Oct 26, 2024
34a7f18
Update name of "Scratch" font in custom font fallback to match the dr…
GarboMuffin Nov 3, 2024
857dc10
Update font management interfaces for VM update
GarboMuffin Nov 3, 2024
d098664
Do not reconnect to cloud variables on code 4003
GarboMuffin Nov 3, 2024
fdcb42b
build(deps): bump @turbowarp/scratch-svg-renderer (#955)
dependabot[bot] Nov 3, 2024
3123549
Update credits
GarboMuffin Nov 3, 2024
7661996
build(deps): bump scratch-render from `ed45bcd` to `366bfbb` (#960)
dependabot[bot] Nov 3, 2024
e2d042a
build(deps): bump scratch-vm from `179030a` to `9e6993d` (#964)
dependabot[bot] Nov 3, 2024
78e06ca
Update cache epoch to match what production has used since August
GarboMuffin Nov 3, 2024
cc490da
Fix indexedDB error messages
GarboMuffin Nov 3, 2024
11fbd44
Fix some minor eslint errors
GarboMuffin Nov 3, 2024
ac22e7f
Include more context in indexedDB error messages
GarboMuffin Nov 3, 2024
32926b8
build(deps): bump @turbowarp/sb3fix from 0.3.2 to 0.3.3 (#967)
dependabot[bot] Nov 25, 2024
7dc5610
Fix canFetch origin tracking
GarboMuffin Dec 22, 2024
278e3a2
Implement Scratch.canDownload modal
GarboMuffin Dec 23, 2024
df0e93c
Add some more dangerous file extensions
GarboMuffin Dec 23, 2024
c79c64e
Update workflows based on zizmor audit
GarboMuffin Dec 25, 2024
88ac301
build(deps): bump @turbowarp/sb3fix from 0.3.3 to 0.3.4 (#971)
dependabot[bot] Dec 25, 2024
169470d
build(deps): bump scratch-audio from `35cfd5d` to `95056c8` (#972)
dependabot[bot] Dec 25, 2024
500de8a
build(deps): bump scratch-vm from `c3b60f6` to `b900a37` (#973)
dependabot[bot] Dec 25, 2024
5d8cf64
build(deps): bump scratch-render from `366bfbb` to `4be3034` (#975)
dependabot[bot] Dec 25, 2024
1137b21
build(deps): bump scratch-paint from `5951da5` to `6a74816` (#974)
dependabot[bot] Dec 25, 2024
d7fc6a5
build(deps): bump scratch-vm from `b900a37` to `56825e3` (#976)
dependabot[bot] Dec 26, 2024
1b18878
build(deps): bump scratch-vm from `56825e3` to `36c02f3` (#977)
dependabot[bot] Dec 30, 2024
e5862fc
Add a few more executable formats
GarboMuffin Dec 31, 2024
5f4cbcc
Remove sound sample rate indicator
GarboMuffin Jan 8, 2025
afe00d5
Update addons - add event for pause/unpause
GarboMuffin Jan 15, 2025
869f1c6
Add export restore point button
GarboMuffin Jan 18, 2025
cdc451a
build(deps): bump scratch-vm from `36c02f3` to `af3b751` (#980)
dependabot[bot] Jan 20, 2025
28a1ca2
Replace "made using a different platform" with "made for a different …
GarboMuffin Jan 20, 2025
bb99d04
Update translations
GarboMuffin Jan 23, 2025
8eadf41
Treat .hex same as other assets
GarboMuffin Jan 24, 2025
0827f8d
Update extension gallery metadata
GarboMuffin Jan 25, 2025
c7e4a03
Fix disable cloud variables button
GarboMuffin Jan 28, 2025
5c92123
build(deps): bump scratch-render from `4be3034` to `4a913db` (#983)
dependabot[bot] Feb 1, 2025
854135f
build(deps): bump scratch-render from `4a913db` to `8332c29` (#985)
dependabot[bot] Feb 5, 2025
9b1a6e4
Merge branch 'develop' of https://github.com/TurboWarp/scratch-gui in…
CubesterYT Feb 6, 2025
06010a0
build(deps): bump scratch-vm from `2fcaf7c` to `ebe4fa3`
dependabot[bot] Feb 6, 2025
8a4ec8a
build(deps): bump scratch-paint from `206081d` to `4a29c5f`
dependabot[bot] Feb 6, 2025
67e63a2
Merge pull request #46 from Nitro-Bolt/dependabot/npm_and_yarn/scratc…
CubesterYT Feb 6, 2025
9a8b0e9
Merge pull request #45 from Nitro-Bolt/dependabot/npm_and_yarn/scratc…
CubesterYT Feb 6, 2025
646e39b
Open file picker on ctrl+o
GarboMuffin Feb 11, 2025
4db0008
Update scratch-vm
GarboMuffin Feb 11, 2025
aca1371
build(deps): bump @turbowarp/scratch-storage (#995)
dependabot[bot] Feb 20, 2025
a3d82a3
build(deps): bump scratch-audio from `95056c8` to `7f5925e` (#994)
dependabot[bot] Feb 20, 2025
e6c6d81
build(deps): bump @turbowarp/scratch-svg-renderer (#993)
dependabot[bot] Feb 20, 2025
30651b6
build(deps): bump scratch-render from `8332c29` to `3019ecf` (#996)
dependabot[bot] Feb 20, 2025
ac69829
build(deps): bump scratch-paint from `6a74816` to `cbd90fa` (#997)
dependabot[bot] Feb 20, 2025
4d033db
build(deps): bump scratch-vm from `cd63c87` to `709d155` (#998)
dependabot[bot] Feb 20, 2025
e2733e7
Update dependencies
GarboMuffin Feb 20, 2025
a099821
Fix file pickers on Chrome 133 on Android
GarboMuffin Feb 21, 2025
7ee6f06
Fix tests
GarboMuffin Feb 21, 2025
784ca83
Add gist.githubusercontent.com to always trusted sites
GarboMuffin Feb 23, 2025
b561926
Restore Cat 2 to the libraries
GarboMuffin Feb 25, 2025
c7e58e1
Add some more possible mime types for sprite files
GarboMuffin Feb 25, 2025
4e3b202
build(deps): bump scratch-vm from `709d155` to `7ef5e29` (#1004)
dependabot[bot] Mar 10, 2025
716d962
build(deps): bump @turbowarp/sb3fix from 0.3.4 to 0.3.5 (#1003)
dependabot[bot] Mar 10, 2025
7c0b01b
Update translations
GarboMuffin Mar 13, 2025
0dd18bb
Update WebGL error modal
GarboMuffin Mar 13, 2025
093c5b7
Update translations
GarboMuffin Mar 14, 2025
dab56dd
Desktop app renamed hardware acceleration to graphics acceleration
GarboMuffin Mar 14, 2025
c5c1485
Remove unused message values
GarboMuffin Mar 14, 2025
04e40ac
Update translations
GarboMuffin Mar 16, 2025
de8f5ae
Fix onClickAddonSettings not being optional
GarboMuffin Mar 16, 2025
e8bf239
Update addons - replace replaceAll with replace when easy
GarboMuffin Mar 26, 2025
f770be1
build(deps): bump scratch-blocks from `df9e37c` to `66cb4fa` (#1001)
dependabot[bot] Apr 22, 2025
7f7506b
build(deps): bump scratch-vm from `7ef5e29` to `b8520cc` (#1006)
dependabot[bot] Apr 22, 2025
9d17bc8
build(deps): bump scratch-blocks from `66cb4fa` to `26a0738` (#1010)
dependabot[bot] Apr 22, 2025
3f0e780
Merge branch 'develop' of https://github.com/TurboWarp/scratch-gui in…
CubesterYT Apr 29, 2025
da56ba1
build(deps): bump scratch-paint from `4a29c5f` to `98f37e8`
dependabot[bot] Apr 29, 2025
c4f37cf
build(deps): bump scratch-blocks from `c581278` to `460d154`
dependabot[bot] Apr 29, 2025
873bc5c
build(deps): bump scratch-vm from `ebe4fa3` to `bcbbb9d`
dependabot[bot] Apr 29, 2025
91c7a43
Merge pull request #48 from Nitro-Bolt/dependabot/npm_and_yarn/scratc…
CubesterYT Apr 29, 2025
18fe1ae
Merge pull request #50 from Nitro-Bolt/dependabot/npm_and_yarn/scratc…
CubesterYT Apr 29, 2025
2e5f8ae
Merge pull request #49 from Nitro-Bolt/dependabot/npm_and_yarn/scratc…
CubesterYT Apr 29, 2025
ff3cced
Updated Default Sprite!
CubesterYT Apr 30, 2025
cdc6df9
Chad in its true form
CubesterYT Apr 30, 2025
4e3b876
Remove `return` block extension listing (scratch-gui)
CubesterYT May 1, 2025
362f953
First round of rebranding (scratch-gui)
CubesterYT May 1, 2025
171b8fa
Fix some rebranding and add the coloured argument booleans.
yuri-kiss May 1, 2025
e482618
Fix colour secondary
yuri-kiss May 1, 2025
7f13332
Make custom toolbox XML easier for extensions.
yuri-kiss May 1, 2025
016f120
Merge pull request #52 from Nitro-Bolt/colouredweirdblocks
yuri-kiss May 1, 2025
897ff5f
Merge pull request #55 from Nitro-Bolt/develop
yuri-kiss May 1, 2025
3bb6d02
merge upstream
yuri-kiss May 1, 2025
cafea63
Merge pull request #53 from Nitro-Bolt/exposemaketoolbox
CubesterYT May 1, 2025
5fcc17a
fix bug 1
yuri-kiss May 2, 2025
12eca8b
Fix bug 2
yuri-kiss May 3, 2025
28ddada
Merge pull request #56 from Nitro-Bolt/fixcbcolourfields
yuri-kiss May 3, 2025
dc964e0
I hate myself, I left this in during the initial debug over a year ag…
CubesterYT May 4, 2025
3e2547a
build(deps): bump scratch-blocks from `460d154` to `cf86bf1`
dependabot[bot] May 5, 2025
fb26ef6
Merge pull request #57 from Nitro-Bolt/dependabot/npm_and_yarn/scratc…
CubesterYT May 5, 2025
e6eabf7
build(deps): bump scratch-vm from `bcbbb9d` to `510adce`
dependabot[bot] May 5, 2025
5d5085a
Merge pull request #58 from Nitro-Bolt/dependabot/npm_and_yarn/scratc…
CubesterYT May 5, 2025
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
6 changes: 4 additions & 2 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
persist-credentials: false
- name: Install Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af
with:
node-version: 20
cache: npm
Expand Down
23,157 changes: 13,990 additions & 9,167 deletions package-lock.json

Large diffs are not rendered by default.

9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,10 @@
},
"dependencies": {
"@microbit/microbit-universal-hex": "0.2.2",
"@turbowarp/jszip": "^3.11.1",
"@turbowarp/nanolog": "^0.2.0",
"@turbowarp/scratch-l10n": "^3.1001.0-202401241456-994097a5",
"@turbowarp/scratch-storage": "^0.0.202403251715",
"@turbowarp/scratch-storage": "^0.0.202502192258",
"@turbowarp/scratch-svg-renderer": "^1.0.0-202312242305-12c360b",
"@turbowarp/startaudiocontext": "^1.0.0",
"arraybuffer-loader": "^1.0.6",
Expand Down Expand Up @@ -104,8 +105,8 @@
"react-dom": "^16.0.0"
},
"devDependencies": {
"@babel/cli": "7.14.8",
"@babel/core": "7.14.8",
"@babel/cli": "^7.26.4",
"@babel/core": "^7.26.9",
"@babel/plugin-proposal-object-rest-spread": "7.14.7",
"@babel/plugin-syntax-dynamic-import": "7.2.0",
"@babel/plugin-transform-async-to-generator": "7.14.5",
Expand All @@ -126,7 +127,7 @@
"file-loader": "6.2.0",
"gh-pages": "3.2.3",
"html-webpack-plugin": "^4.2.0",
"jest": "21.2.1",
"jest": "^29.7.0",
"jest-junit": "7.0.0",
"mkdirp": "1.0.3",
"raf": "3.4.1",
Expand Down
7 changes: 7 additions & 0 deletions src/addons/addons/debugger/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,13 @@ export const setPaused = (_paused) => {
if (didChange) {
paused = _paused;
eventTarget.dispatchEvent(new CustomEvent("change"));

// TW: events for extensions
if (paused) {
vm.runtime.emit("RUNTIME_PAUSED");
} else {
vm.runtime.emit("RUNTIME_UNPAUSED");
}
}

// Don't check didChange as new threads could've started that we need to pause.
Expand Down
2 changes: 1 addition & 1 deletion src/addons/addons/middle-click-popup/BlockTypeInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ export class BlockInputEnum extends BlockInput {
this.values = [];
for (let i = 0; i < options.length; i++) {
if (typeof options[i][1] === "string" && BlockInputEnum.INVALID_VALUES.indexOf(options[i][1]) === -1) {
this.values.push({ value: options[i][1], string: options[i][0].replaceAll(String.fromCharCode(160), " ") });
this.values.push({ value: options[i][1], string: options[i][0].replace(/\u00a0/g, " ") });
}
}
this.isRound = isRound;
Expand Down
2 changes: 1 addition & 1 deletion src/addons/addons/middle-click-popup/WorkspaceQuerier.js
Original file line number Diff line number Diff line change
Expand Up @@ -1072,7 +1072,7 @@ class QueryInfo {
/** @type {WorkspaceQuerier} */
this.querier = querier;
/** @type {string} The query */
this.str = query.replaceAll(String.fromCharCode(160), " ");
this.str = query.replace(/\u00a0/g, " ");
/** @type {string} A lowercase version of the query. Used for case insensitive comparisons. */
this.lowercase = this.str.toLowerCase();
/** @type {number} A unique identifier for this query */
Expand Down
2 changes: 1 addition & 1 deletion src/addons/addons/reorder-custom-inputs/modified-funcs.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export function modifiedCreateAllInputs(connectionMap) {
}

// remove all traces of %l at the earliest possible time
this.procCode_ = this.procCode_.replaceAll("%l ", "");
this.procCode_ = this.procCode_.replace(/%l /g, "");
}

//https://github.com/scratchfoundation/scratch-blocks/blob/f210e042988b91bcdc2abeca7a2d85e178edadb2/blocks_vertical/procedures.js#L565
Expand Down
2 changes: 1 addition & 1 deletion src/addons/generated/upstream-meta.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"commit":"0d357b5"}
{"commit":"2b49ae3"}
28 changes: 27 additions & 1 deletion src/addons/settings/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,32 @@
"title": "הגדרות תוסף",
"unsupported": "חלק מהתוספות אינן נגישות בדפדפן שלך:"
},
"hu": {
"addonFeedback": "Visszajelzés a kiegészítőkről",
"confirmResetAll": "Biztos szeretnéd az összes kiegészítő-beállítást visszaállítani az alapértelmezett értékére?",
"credits": "Stáblista:",
"dirty": "A beállítások alkalmazásához töltsd újra az oldalakat.",
"dirtyButton": "Újratöltés most",
"enableDangerous": "Ez a kiegészítő veszélyes és szándékosan ELTÁVOLÍTHAT funkciókat. A legtöbb felhasználónak NEM érdemes bekapcsolnia ezt a kiegészítőt. Biztos, hogy bekapcsolod?",
"export": "Beállítások exportálása",
"groupDanger": "Veszélyes ({number})",
"groupNew": "Új ({number})",
"groupOthers": "Többi ({number})",
"import": "Beállítások importálása",
"noCompiler": "Ez a kiegészítő csak akkor működik, amikor a fordítóprogram ki van kapcsolva a Haladó -> Fordítóprogram kikapcsolása menüponttal vagy a \"Fordítóprogram kikapcsolása a szerkesztőben\" kiegészítővel.",
"noResults": "Nincsenek találatok.",
"presets": "Elmentett beállítások",
"reset": "Visszaállítás",
"resetAll": "Összes visszaállítása",
"search": "Keresés",
"tagBeta": "Béta",
"tagDanger": "Veszélyes",
"tagNew": "Új!",
"tagRecommended": "Javasolt",
"tagTheme": "Téma",
"title": "Kiegészítő-beállítások",
"unsupported": "Néhány kiegészítő nem érhető el ebben a böngészőben."
},
"it": {
"addonFeedback": "Feedback sull'Addon",
"confirmResetAll": "Sei sicuro di voler riportare tutte le impostazioni dell'addon al loro stato iniziale?",
Expand Down Expand Up @@ -270,7 +296,7 @@
"tagRecommended": "추천",
"tagTheme": "테마",
"title": "애드온 설정",
"unsupported": "몇몇 애드온은 다음 브라우저에서 사용할 수 없습니다 :"
"unsupported": "몇몇 애드온은 다음의 브라우저에서 사용할 수 없습니다 :"
},
"lt": {
"addonFeedback": "Įskiepių atsiliepimas",
Expand Down
20 changes: 19 additions & 1 deletion src/components/browser-modal/browser-modal.css
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,26 @@
.body {
background: $ui-modal-background;
padding: 1.5rem 2.25rem;
text-align: center;
display: flex;
flex-direction: column;
gap: 0.25rem;
}

.title {
text-align: center;
}

.desktop-settings-outer {
display: flex;
justify-content: center;
}

.desktop-settings-inner {
font: inherit;
font-weight: bold;
padding: 0.75rem 1rem;
border-radius: 0.25rem;
border: 1px solid $ui-black-transparent;
background-color: $looks-secondary;
color: white;
}
94 changes: 51 additions & 43 deletions src/components/browser-modal/browser-modal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,34 @@ import {
isNewFunctionSupported,
findIncompatibleUserscripts
} from '../../lib/tw-environment-support-prober.js';
import {APP_NAME} from '../../lib/brand.js';

import styles from './browser-modal.css';
import unhappyBrowser from './unsupported-browser.svg';

const messages = defineMessages({
label: {
browserNotSupported: {
id: 'gui.unsupportedBrowser.label',
defaultMessage: 'Browser is not supported',
description: ''
},
systemNotSupported: {
id: 'tw.browserModal.desktopTitle',
defaultMessage: 'System is not supported',
description: 'Title of error message in desktop app when system does not support required API, such as WebGL'
}
});

const noop = () => {};

const BrowserModal = ({intl, ...props}) => {
const label = messages.label;
const title = props.onClickDesktopSettings ? messages.systemNotSupported : messages.browserNotSupported;
const incompatibleUserscripts = findIncompatibleUserscripts();
return (
<ReactModal
isOpen
className={styles.modalContent}
contentLabel={intl.formatMessage({...messages.label})}
contentLabel={intl.formatMessage(title)}
overlayClassName={styles.modalOverlay}
onRequestClose={noop}
>
Expand All @@ -42,8 +48,8 @@ const BrowserModal = ({intl, ...props}) => {
</Box>

<Box className={styles.body}>
<h2>
<FormattedMessage {...label} />
<h2 className={styles.title}>
<FormattedMessage {...title} />
</h2>

{/* eslint-disable max-len */}
Expand All @@ -68,49 +74,50 @@ const BrowserModal = ({intl, ...props}) => {
<React.Fragment>
<p>
<FormattedMessage
defaultMessage="Your browser {webGlLink} which is needed for this site to run. Try updating your browser and graphics drivers or restarting your computer."
description="WebGL missing message. {webGLLink} is a link with the text 'does not support WebGL' from Scratch's translations"
id="tw.webglModal.description"
defaultMessage="{APP_NAME} requires WebGL, however your computer does not seem to support it. This is often a temporary error that can be fixed by restarting your computer."
description="Error message when browser does not support WebGL."
id="tw.browserModal.webgl1"
values={{
webGlLink: (
<a href="https://get.webgl.org/">
<FormattedMessage
defaultMessage="does not support WebGL"
description="link part of your browser does not support WebGL message"
id="gui.webglModal.webgllink"
/>
</a>
)
}}
/>
</p>
<p>
<FormattedMessage
defaultMessage="Make sure you're using a recent version of Google Chrome, Mozilla Firefox, Microsoft Edge, or Apple Safari."
description="A message that appears in the browser not supported modal"
id="tw.browserModal.desc"
/>
</p>
<p>
<FormattedMessage
defaultMessage="On Apple devices, you must disable {lockdownMode}."
description="Part of the browser not supported message. Lockdown Mode refers to https://support.apple.com/en-us/HT212650"
id="tw.lockdownMode"
values={{
lockdownMode: (
<a href="https://support.apple.com/en-us/HT212650">
<FormattedMessage
defaultMessage="Lockdown Mode"
description="Links to an Apple support page about Lockdown Mode: https://support.apple.com/en-us/HT212650 Try to translate this the same as Apple."
id="tw.lockdownMode2"
/>
</a>
)
APP_NAME
}}
/>
</p>

{props.onClickDesktopSettings ? (
<React.Fragment>
<p>
<FormattedMessage
defaultMessage={'You can also try toggling the "graphics acceleration" option in desktop settings:'}
description="Error message when browser does not support WebGL (desktop app version). Consider seeing how Chrome translates 'graphics acceleration' into your language."
id="tw.browserModal.webglDesktop"
/>
</p>
<div className={styles.desktopSettingsOuter}>
<button
onClick={props.onClickDesktopSettings}
className={styles.desktopSettingsInner}
>
<FormattedMessage
defaultMessage="Open Desktop Settings"
description="Button in unsupported system modal to open desktop settings"
id="tw.browserModal.desktopSettings"
/>
</button>
</div>
</React.Fragment>
) : (
<p>
<FormattedMessage
defaultMessage={'Use a recent version of Chrome, Firefox, or Safari, and ensure your graphics drivers are up to date. You can also try toggling the "graphics acceleration" or "hardware acceleration" option in your browser\'s settings.'}
description="Error message when browser does not support WebGL (browser version). Chrome calls it graphics acceleration and Firefox calls it hardware acceleration; consider seeing how they actually translate these"
id="tw.browserModal.webglBrowser"
/>
</p>
)}
</React.Fragment>
)}

{/* eslint-enable max-len */}
</Box>
</div>
</ReactModal>
Expand All @@ -119,7 +126,8 @@ const BrowserModal = ({intl, ...props}) => {

BrowserModal.propTypes = {
intl: intlShape.isRequired,
isRtl: PropTypes.bool
isRtl: PropTypes.bool,
onClickDesktopSettings: PropTypes.func
};

const WrappedBrowserModal = injectIntl(BrowserModal);
Expand Down
1 change: 0 additions & 1 deletion src/components/custom-procedures/custom-procedures.css
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@
border-radius: 50%;
width: 35px;
height: 35px;
transition: all 0.2s;
}

.color-picker::-moz-color-swatch {
Expand Down
5 changes: 4 additions & 1 deletion src/components/gui/gui.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,10 @@ const GUIComponent = props => {
/>
) : null}
{isBrowserSupported() ? null : (
<BrowserModal isRtl={isRtl} />
<BrowserModal
isRtl={isRtl}
onClickDesktopSettings={onClickDesktopSettings}
/>
)}
{tipsLibraryVisible ? (
<TipsLibrary />
Expand Down
2 changes: 1 addition & 1 deletion src/components/loader/loader.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class LoaderComponent extends React.Component {
this.messageEl.textContent = this.props.intl.formatMessage(messages.projectData);
} else {
this.barInnerEl.style.width = `${finished / total * 100}%`;
const message = this.props.isRemote ? messages.downloadingAssets : messages.loadingAssets
const message = this.props.isRemote ? messages.downloadingAssets : messages.loadingAssets;
this.messageEl.textContent = this.props.intl.formatMessage(message, {
complete: finished,
total
Expand Down
16 changes: 12 additions & 4 deletions src/components/menu-bar/menu-bar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -337,9 +337,14 @@ class MenuBar extends React.Component {
}
handleKeyPress (event) {
const modifier = bowser.mac ? event.metaKey : event.ctrlKey;
if (modifier && event.key.toLowerCase() === 's') {
this.props.handleSaveProject();
event.preventDefault();
if (modifier) {
if (event.key.toLowerCase() === 's') {
this.props.handleSaveProject();
event.preventDefault();
} else if (event.key.toLowerCase() === 'o') {
event.preventDefault();
this.props.onStartSelectingFileUpload();
}
}
}
getSaveToComputerHandler (downloadProjectCallback) {
Expand Down Expand Up @@ -547,7 +552,10 @@ class MenuBar extends React.Component {
this.handleClickDesktopSettings
}
// eslint-disable-next-line react/jsx-no-bind
onOpenCustomSettings={this.props.onClickAddonSettings.bind(null, 'editor-theme3')}
onOpenCustomSettings={
this.props.onClickAddonSettings &&
this.props.onClickAddonSettings.bind(null, 'editor-theme3')
}
onRequestClose={this.props.onRequestCloseSettings}
onRequestOpen={this.props.onClickSettings}
settingsMenuOpen={this.props.settingsMenuOpen}
Expand Down
Loading