From 2ad755016f20faee1aa1c83bf1680ff9fa9ed4f6 Mon Sep 17 00:00:00 2001 From: Aquino Luane Date: Wed, 16 Oct 2024 16:27:53 +0900 Subject: [PATCH 01/16] poc: replace default scratch cat --- .../bcf454acf82e4504149f7ffe07081dbc.svg | 51 ++++--------------- src/lib/default-project/index.js | 6 --- src/lib/default-project/project-data.js | 9 ---- src/lib/libraries/costumes.json | 38 +------------- src/lib/libraries/sprites.json | 48 +---------------- 5 files changed, 11 insertions(+), 141 deletions(-) diff --git a/src/lib/default-project/bcf454acf82e4504149f7ffe07081dbc.svg b/src/lib/default-project/bcf454acf82e4504149f7ffe07081dbc.svg index 03df23e29..e9c5b7578 100644 --- a/src/lib/default-project/bcf454acf82e4504149f7ffe07081dbc.svg +++ b/src/lib/default-project/bcf454acf82e4504149f7ffe07081dbc.svg @@ -1,42 +1,9 @@ - - - - costume1.1 - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + + + + + + + + + diff --git a/src/lib/default-project/index.js b/src/lib/default-project/index.js index 6e733f705..af98632da 100644 --- a/src/lib/default-project/index.js +++ b/src/lib/default-project/index.js @@ -5,7 +5,6 @@ import popWav from '!arraybuffer-loader!./83a9787d4cb6f3b7632b4ddfebf74367.wav'; import meowWav from '!arraybuffer-loader!./83c36d806dc92327b9e7049a565c6bff.wav'; import backdrop from '!raw-loader!./cd21514d0531fdffb22204e0ec5ed84a.svg'; import costume1 from '!raw-loader!./bcf454acf82e4504149f7ffe07081dbc.svg'; -import costume2 from '!raw-loader!./0fb9be3e8397c983338cb71dc84d0b25.svg'; /* eslint-enable import/no-unresolved */ const defaultProject = translator => { @@ -44,11 +43,6 @@ const defaultProject = translator => { assetType: 'ImageVector', dataFormat: 'SVG', data: encoder.encode(costume1) - }, { - id: '0fb9be3e8397c983338cb71dc84d0b25', - assetType: 'ImageVector', - dataFormat: 'SVG', - data: encoder.encode(costume2) }]; }; diff --git a/src/lib/default-project/project-data.js b/src/lib/default-project/project-data.js index 9ee63b237..e6e5dfe0f 100644 --- a/src/lib/default-project/project-data.js +++ b/src/lib/default-project/project-data.js @@ -81,15 +81,6 @@ const projectData = translateFunction => { dataFormat: 'svg', rotationCenterX: 48, rotationCenterY: 50 - }, - { - assetId: '0fb9be3e8397c983338cb71dc84d0b25', - name: translator(messages.costume, {index: 2}), - bitmapResolution: 1, - md5ext: '0fb9be3e8397c983338cb71dc84d0b25.svg', - dataFormat: 'svg', - rotationCenterX: 46, - rotationCenterY: 53 } ], sounds: [ diff --git a/src/lib/libraries/costumes.json b/src/lib/libraries/costumes.json index 6abccd68a..7484b9910 100644 --- a/src/lib/libraries/costumes.json +++ b/src/lib/libraries/costumes.json @@ -1692,42 +1692,6 @@ "rotationCenterX": 44, "rotationCenterY": 46 }, - { - "name": "Cat-a", - "tags": [ - "animals", - "cat", - "kitten", - "kitty", - "mammal", - "orange", - "scratch cat" - ], - "assetId": "bcf454acf82e4504149f7ffe07081dbc", - "bitmapResolution": 1, - "dataFormat": "svg", - "md5ext": "bcf454acf82e4504149f7ffe07081dbc.svg", - "rotationCenterX": 48, - "rotationCenterY": 50 - }, - { - "name": "Cat-b", - "tags": [ - "animals", - "cat", - "kitten", - "kitty", - "mammal", - "orange", - "scratch cat" - ], - "assetId": "0fb9be3e8397c983338cb71dc84d0b25", - "bitmapResolution": 1, - "dataFormat": "svg", - "md5ext": "0fb9be3e8397c983338cb71dc84d0b25.svg", - "rotationCenterX": 46, - "rotationCenterY": 53 - }, { "name": "Catcher-a", "tags": [ @@ -12819,4 +12783,4 @@ "rotationCenterX": 17, "rotationCenterY": 23 } -] \ No newline at end of file +] diff --git a/src/lib/libraries/sprites.json b/src/lib/libraries/sprites.json index be4cb21fa..ea4a1646c 100644 --- a/src/lib/libraries/sprites.json +++ b/src/lib/libraries/sprites.json @@ -2027,52 +2027,6 @@ ], "blocks": {} }, - { - "name": "Cat", - "tags": [ - "animals", - "cat", - "kitten", - "kitty", - "mammal", - "orange", - "scratch cat" - ], - "isStage": false, - "variables": {}, - "costumes": [ - { - "assetId": "bcf454acf82e4504149f7ffe07081dbc", - "name": "cat-a", - "bitmapResolution": 1, - "md5ext": "bcf454acf82e4504149f7ffe07081dbc.svg", - "dataFormat": "svg", - "rotationCenterX": 48, - "rotationCenterY": 50 - }, - { - "assetId": "0fb9be3e8397c983338cb71dc84d0b25", - "name": "cat-b", - "bitmapResolution": 1, - "md5ext": "0fb9be3e8397c983338cb71dc84d0b25.svg", - "dataFormat": "svg", - "rotationCenterX": 46, - "rotationCenterY": 53 - } - ], - "sounds": [ - { - "assetId": "83c36d806dc92327b9e7049a565c6bff", - "name": "Meow", - "dataFormat": "wav", - "format": "", - "rate": 44100, - "sampleCount": 37376, - "md5ext": "83c36d806dc92327b9e7049a565c6bff.wav" - } - ], - "blocks": {} - }, { "name": "Cat 2", "tags": [ @@ -17203,4 +17157,4 @@ ], "blocks": {} } -] \ No newline at end of file +] From 36032a0fa058bfe510ed936b94177b577893db46 Mon Sep 17 00:00:00 2001 From: Aquino Luane Date: Wed, 11 Dec 2024 14:44:59 +0900 Subject: [PATCH 02/16] feat(extension): show extension when loads default project --- src/components/gui/gui.jsx | 23 ++++++++++++++++------- src/containers/gui.jsx | 2 +- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/src/components/gui/gui.jsx b/src/components/gui/gui.jsx index a44604898..d8cc1e220 100644 --- a/src/components/gui/gui.jsx +++ b/src/components/gui/gui.jsx @@ -100,7 +100,7 @@ const GUIComponent = props => { onActivateSoundsTab, onActivateTab, onClickLogo, - onExtensionButtonClick, + showExtension, onProjectTelemetryEvent, onRequestCloseBackdropLibrary, onRequestCloseCostumeLibrary, @@ -112,6 +112,7 @@ const GUIComponent = props => { onTelemetryModalCancel, onTelemetryModalOptIn, onTelemetryModalOptOut, + projectId, showComingSoon, soundsTabVisible, stageSizeMode, @@ -125,6 +126,10 @@ const GUIComponent = props => { return {children}; } + if(projectId === '0'){ + showExtension(); + } + const tabClassNames = { tabs: styles.tabs, tab: classNames(tabStyles.reactTabsTab, styles.tab), @@ -314,7 +319,7 @@ const GUIComponent = props => { - - - - - - - {costumesTabVisible ? : null} - - - {soundsTabVisible ? : null} - - - {backpackVisible ? ( - - ) : null} - + {targetIsStage ? ( + + ) : ( + + )} + + + + + + + + + + + + + + + + + + + {costumesTabVisible ? : null} + + + {soundsTabVisible ? : null} + + + {backpackVisible ? ( + + ) : null} + - - - - + + + + + - - - ); - }}); -}; + ); + }}) + } +} GUIComponent.propTypes = { accountNavOpen: PropTypes.bool,