Merge pull request #1378 from paulkaplan/update-asset-icons
Update sprite, backdrop and extension buttons
No files matched your search
@@ -0,0 +1,21 @@
|
||||
@import "../../css/colors.css";
|
||||
|
||||
.container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
background: $motion-primary;
|
||||
border-radius: 100%;
|
||||
width: 2.75rem;
|
||||
height: 2.75rem;
|
||||
outline: none;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.icon {
|
||||
width: 1.75rem;
|
||||
height: 1.75rem;
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
import PropTypes from 'prop-types';
|
||||
import React from 'react';
|
||||
import classNames from 'classnames';
|
||||
import styles from './asset-button.css';
|
||||
|
||||
const AssetButton = ({
|
||||
img,
|
||||
className,
|
||||
title,
|
||||
onClick
|
||||
}) => (
|
||||
<button
|
||||
className={classNames(styles.container, className)}
|
||||
title={title}
|
||||
onClick={onClick}
|
||||
>
|
||||
<img
|
||||
className={styles.icon}
|
||||
src={img}
|
||||
/>
|
||||
</button>
|
||||
);
|
||||
|
||||
AssetButton.propTypes = {
|
||||
className: PropTypes.string,
|
||||
img: PropTypes.string,
|
||||
onClick: PropTypes.func.isRequired,
|
||||
title: PropTypes.node.isRequired
|
||||
};
|
||||
|
||||
export default AssetButton;
|
||||
@@ -1,31 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg width="29px" height="25px" viewBox="0 0 29 25" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- Generator: Sketch 43.2 (39069) - http://www.bohemiancoding.com/sketch -->
|
||||
<title>add-bg</title>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="20px" height="20px" viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- Generator: Sketch 48.2 (47327) - http://www.bohemiancoding.com/sketch -->
|
||||
<title>backdrop-library</title>
|
||||
<desc>Created with Sketch.</desc>
|
||||
<defs>
|
||||
<circle id="path-1" cx="21" cy="5" r="5"></circle>
|
||||
<path d="M16.8970588,3.98529412 L17.5588235,3.98529412 C17.9243061,3.98529412 18.2205882,4.28157627 18.2205882,4.64705882 C18.2205882,5.01254138 17.9243061,5.30882353 17.5588235,5.30882353 L16.8970588,5.30882353 L16.8970588,5.97058824 C16.8970588,6.33607079 16.6007767,6.63235294 16.2352941,6.63235294 C15.8698116,6.63235294 15.5735294,6.33607079 15.5735294,5.97058824 L15.5735294,5.30882353 L14.9117647,5.30882353 C14.5462822,5.30882353 14.25,5.01254138 14.25,4.64705882 C14.25,4.28157627 14.5462822,3.98529412 14.9117647,3.98529412 L15.5735294,3.98529412 L15.5735294,3.32352941 C15.5735294,2.95804686 15.8698116,2.66176471 16.2352941,2.66176471 C16.6007767,2.66176471 16.8970588,2.95804686 16.8970588,3.32352941 L16.8970588,3.98529412 Z" id="path-1"></path>
|
||||
</defs>
|
||||
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round">
|
||||
<g id="Desktop---1280x720" transform="translate(-1224.000000, -668.000000)">
|
||||
<g id="Stage-Area" transform="translate(1200.000000, 460.000000)">
|
||||
<g id="Backdrop-Area" transform="translate(0.000000, 43.000000)">
|
||||
<g id="backdrop-tile">
|
||||
<g id="add-bg" transform="translate(10.000000, 167.000000)">
|
||||
<g transform="translate(15.000000, 0.000000)">
|
||||
<path d="M19,22 L2,22 C0.9,22 0,20.9731544 0,19.7181208 L0,7.28187919 C0,6.02684564 0.9,5 2,5 L19,5 C20.1,5 21,6.02684564 21,7.28187919 L21,19.7181208 C21,20.9731544 20.1,22 19,22 Z" id="Shape" stroke="#4C97FF" stroke-width="2"></path>
|
||||
<path d="M21,17.5 L16.8,13.3 C16.2,12.7 15.2,12.6 14.5,13.2 L9.3,17.3 C8.5,17.9 7.4,17.8 6.8,17 L6.3,16.4 C5.7,15.6 4.5,15.5 3.8,16.1 L0,19.2 L0,20.1 C0,21.1 0.8,21.9 1.8,21.9 L19.3,21.9 C20.3,21.9 21.1,21.1 21.1,20.1 L21.1,17.5 L21,17.5 Z" id="Shape" stroke="#4C97FF" stroke-width="2" fill="#4C97FF"></path>
|
||||
<g id="Oval" fill-rule="nonzero">
|
||||
<use fill="#4C97FF" fill-rule="evenodd" xlink:href="#path-1"></use>
|
||||
<circle stroke="#FFFFFF" stroke-width="2" cx="21" cy="5" r="6"></circle>
|
||||
</g>
|
||||
<path d="M21,3 L21,7" id="Shape" stroke="#FFFFFF" stroke-width="2"></path>
|
||||
<path d="M23,5 L19,5" id="Shape" stroke="#FFFFFF" stroke-width="2"></path>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="backdrop-library">
|
||||
<g id="backdrop-lib-icon" transform="translate(3.850000, 4.650000)" stroke="#FFFFFF" stroke-linecap="round" stroke-width="1.5">
|
||||
<path d="M12.2943964,8.13062054 L9.83551715,5.59754978 C9.48424868,5.23568253 8.89880123,5.17537132 8.48898801,5.53723857 L5.44466128,8.00999813 C4.97630332,8.37186538 4.33231112,8.31155417 3.98104265,7.8290645 L3.68831893,7.46719725 C3.33705046,6.98470758 2.63451352,6.92439637 2.22470031,7.28626362 L0,9.15591109 L0,9.15591109 C4.82683843e-16,10.0078757 0.690653747,10.6985294 1.54261832,10.6985294 L10.3529412,10.6985294 C11.4575107,10.6985294 12.3529412,9.80309891 12.3529412,8.69852941 L12.3529412,8.13062054 L12.2943964,8.13062054 Z" id="Shape" fill="#FFFFFF" stroke-linejoin="round"></path>
|
||||
<path d="M12.3529412,3.52941176 L12.3529412,8.82352941 C12.3529412,9.79814956 11.5628554,10.5882353 10.5882353,10.5882353 L1.76470588,10.5882353 C0.790085736,10.5882353 1.19356544e-16,9.79814956 0,8.82352941 L0,1.76470588 C-1.19356544e-16,0.790085736 0.790085736,4.61992691e-15 1.76470588,4.4408921e-15 L8.82352941,4.4408921e-15" id="Rectangle"></path>
|
||||
</g>
|
||||
<g id="Combined-Shape">
|
||||
<use fill="#FFFFFF" fill-rule="evenodd" xlink:href="#path-1"></use>
|
||||
<path stroke="#FFFFFF" stroke-width="0.1" d="M16.9470588,3.93529412 L17.5588235,3.93529412 C17.9519203,3.93529412 18.2705882,4.25396203 18.2705882,4.64705882 C18.2705882,5.04015562 17.9519203,5.35882353 17.5588235,5.35882353 L16.9470588,5.30882353 L16.9470588,5.97058824 C16.9470588,6.36368503 16.6283909,6.68235294 16.2352941,6.68235294 C15.8421973,6.68235294 15.5235294,6.36368503 15.5235294,5.97058824 L15.5735294,5.35882353 L14.9117647,5.35882353 C14.5186679,5.35882353 14.2,5.04015562 14.2,4.64705882 C14.2,4.25396203 14.5186679,3.93529412 14.9117647,3.93529412 L15.5235294,3.98529412 L15.5235294,3.32352941 C15.5235294,2.93043262 15.8421973,2.61176471 16.2352941,2.61176471 C16.6283909,2.61176471 16.9470588,2.93043262 16.9470588,3.32352941 L16.9470588,3.93529412 Z"></path>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 3.3 KiB |
@@ -1,18 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg width="28px" height="28px" viewBox="0 0 28 28" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- Generator: Sketch 43.2 (39069) - http://www.bohemiancoding.com/sketch -->
|
||||
<title>add sprite</title>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="20px" height="20px" viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- Generator: Sketch 48.2 (47327) - http://www.bohemiancoding.com/sketch -->
|
||||
<title>paint</title>
|
||||
<desc>Created with Sketch.</desc>
|
||||
<defs></defs>
|
||||
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round">
|
||||
<g id="add-sprite" stroke="#4C97FF">
|
||||
<g transform="translate(5.000000, 6.000000)" id="+" stroke-width="2">
|
||||
<g>
|
||||
<path d="M2.41866659,0 L2.41866659,4.83733317" id="Shape"></path>
|
||||
<path d="M4.83733317,2.41866659 L0,2.41866659" id="Shape"></path>
|
||||
</g>
|
||||
</g>
|
||||
<path d="M17.5172226,17.2144537 C16.1470881,18.5731703 15.1375154,19.2704065 14.3442797,19.5385743 C14.1099146,18.8234602 13.7132967,18.1619798 13.1544261,17.6077664 C12.5775274,17.053553 11.9104883,16.6602403 11.1893649,16.4099504 C11.4778142,15.623325 12.1809095,14.6221654 13.5330159,13.2813266 C16.7780711,10.0454357 22.5470581,6.0944307 23.6467713,7.18497958 C24.7464844,8.27552846 20.7622778,13.9964406 17.5172226,17.2144537 Z M11.5351095,23.1670148 C10.9986076,23.6810598 10.306347,23.9463734 9.61408638,23.9795375 L9.61408638,23.9961196 L9.44102123,23.9961196 C4.80287524,24.1619406 2.778013,18.955162 4.37021237,19.5023712 C6.46430067,20.2154014 7.31405055,19.1873114 7.34693293,19.1541472 C8.50646943,18.0597287 10.375573,18.0597287 11.5351095,19.1541472 C12.694646,20.2651477 12.694646,22.0725963 11.5351095,23.1670148 Z" id="bursh-icon" stroke-width="0.5" fill="#4C97FF"></path>
|
||||
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="paint" fill="#FFFFFF">
|
||||
<path d="M16.1998226,6.58685277 C15.5417294,7.94213763 14.5662678,9.50539101 13.6457617,10.6638734 C12.8750097,11.639511 12.2567593,12.2117734 11.6659868,12.4909258 C11.5972923,12.5341944 11.5299717,12.5481521 11.4461644,12.5481521 C11.3912089,12.5481521 11.3362533,12.5341944 11.2675588,12.5048834 C11.1439087,12.4644063 11.0339976,12.366703 10.979042,12.2410844 C10.8141752,11.8628329 10.580614,11.5432035 10.2659932,11.2905705 C9.94862474,11.053291 9.59141344,10.871842 9.18062043,10.7741386 C9.05559648,10.7462234 8.93194641,10.6638734 8.86325193,10.5368591 C8.79455745,10.4251981 8.76845354,10.2856219 8.79455745,10.1474415 C8.9594242,9.50539101 9.38532999,8.75167956 10.1272304,7.81651905 C11.5849273,5.94480227 14.4975733,3.16863175 15.9113058,3.01370218 C16.2959949,2.9578717 16.5158172,3.08349028 16.6532062,3.19515123 C17.0117914,3.50221886 17.3690027,4.17358036 16.1998226,6.58685277 Z M10.2654437,13.9990466 C10.3478771,14.6969276 10.1692714,15.3808509 9.74199174,15.9251981 C9.37241543,16.412319 8.85033737,16.7486977 8.25956482,16.8882738 C8.23208703,16.9022315 8.19087034,16.9161891 8.16339255,16.9161891 L8.0246297,16.9301467 C7.76496455,16.9720196 7.51766442,16.9999348 7.2689904,16.9999348 C5.29196321,16.9999348 3.90296079,15.6586076 3.35477883,14.7806733 C3.14732149,14.4317328 2.83270076,13.7896823 3.10747869,13.3849114 C3.17617317,13.287208 3.36714383,13.0778437 3.77931072,13.1615894 C5.08450588,13.4407418 5.55162835,12.8545218 5.63543562,12.7428609 C6.51472499,11.5843784 8.14965365,11.3750141 9.27486926,12.2403866 C9.82579901,12.6730728 10.1816364,13.3011656 10.2654437,13.9990466 Z" id="Fill-4"></path>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 2.1 KiB |
@@ -1,30 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg width="28px" height="25px" viewBox="0 0 28 25" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- Generator: Sketch 43.2 (39069) - http://www.bohemiancoding.com/sketch -->
|
||||
<title>add-sprite</title>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="20px" height="20px" viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- Generator: Sketch 48.2 (47327) - http://www.bohemiancoding.com/sketch -->
|
||||
<title>sprite-library</title>
|
||||
<desc>Created with Sketch.</desc>
|
||||
<defs></defs>
|
||||
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round">
|
||||
<g id="Desktop---1280x720" transform="translate(-1144.000000, -669.000000)" stroke="#4C97FF">
|
||||
<g id="Sprite-Area" transform="translate(792.000000, 460.000000)">
|
||||
<g id="Sprite-List" transform="translate(0.000000, 78.000000)">
|
||||
<g id="add-sprite" transform="translate(345.000000, 132.000000)">
|
||||
<g transform="translate(8.000000, 0.000000)">
|
||||
<path d="M21,16 C21,21 16.9,23.2 11.7,23.2 C6.5,23.2 2.5,21 2.5,16 C2.5,11 5.3,6.7 11.8,6.7 C18.3,6.7 21,11 21,16 Z M11.7,23 C20.1,23 21.6,17 19.5,14.9 C17.1,12.4 14,16 11.7,16 C9.4,16 6.3,12.4 3.9,14.9 C1.8,17 3.4,23 11.7,23 Z" id="Combined-Shape" fill="#4C97FF" fill-rule="nonzero"></path>
|
||||
<path d="M3.7,11.1 L3,5.8 C3,5.4 3.4,5.2 3.7,5.3 L8.3,7.8" id="Shape" fill="#4C97FF" fill-rule="nonzero"></path>
|
||||
<path d="M19.9,11.1 L20.6,5.7 C20.6,5.3 20.2,5.1 19.9,5.2 L15.3,7.7" id="Shape" fill="#4C97FF" fill-rule="nonzero"></path>
|
||||
<path d="M7,17.75 L0,17.75" id="Shape" stroke-width="1.5" fill="#FFFFFF" fill-rule="nonzero"></path>
|
||||
<path d="M2,22 L7,20" id="Shape" stroke-width="1.5" fill="#FFFFFF" fill-rule="nonzero"></path>
|
||||
<path d="M16,17.75 L23,17.75" id="Shape" stroke-width="1.5" fill="#FFFFFF" fill-rule="nonzero"></path>
|
||||
<path d="M22,22 L16,20" id="Shape" stroke-width="1.5" fill="#FFFFFF" fill-rule="nonzero"></path>
|
||||
<g id="+" transform="translate(22.000000, 0.000000)" stroke-width="2">
|
||||
<path d="M2,0 L2,4" id="Shape"></path>
|
||||
<path d="M4,2 L0,2" id="Shape"></path>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="sprite-library" fill="#FFFFFF">
|
||||
<path d="M18.5,2.5 L19.25,2.5 C19.6642136,2.5 20,2.83578644 20,3.25 C20,3.66421356 19.6642136,4 19.25,4 L18.5,4 L18.5,4.75 C18.5,5.16421356 18.1642136,5.5 17.75,5.5 C17.3357864,5.5 17,5.16421356 17,4.75 L17,4 L16.25,4 C15.8357864,4 15.5,3.66421356 15.5,3.25 C15.5,2.83578644 15.8357864,2.5 16.25,2.5 L17,2.5 L17,1.75 C17,1.33578644 17.3357864,1 17.75,1 C18.1642136,1 18.5,1.33578644 18.5,1.75 L18.5,2.5 Z M15.9214311,12.3870691 C15.9214311,15.6404905 13.2729235,17 10.0195022,17 C6.767318,17 4.13241787,15.6404905 4.13241787,12.3870691 C4.13241787,11.5829915 4.26725548,10.9026183 4.52827141,10.3335788 L4.42930802,5.63281784 C4.4169376,5.11326006 4.99834749,4.81636989 5.41894188,5.12563048 L7.93013778,7.01830528 C8.51154766,6.70904469 9.22903221,6.57297003 10.0195022,6.57297003 C10.8124464,6.57297003 11.5423013,6.70904469 12.1237112,7.01830528 L14.6349071,5.12563048 C15.0431311,4.81636989 15.624541,5.11326006 15.624541,5.63281784 L15.5255776,10.3335788 C15.7853565,10.9026183 15.9214311,11.5829915 15.9214311,12.3870691 Z M12.5062047,14.4154474 C12.6806277,14.2311281 12.6546498,13.9330009 12.4579601,13.759815 C12.2724037,13.5989995 11.9742765,13.6237403 11.8023276,13.8229041 C11.6650159,13.9824826 11.4670892,14.0690756 11.256792,14.0690756 C10.8609384,14.0690756 10.526937,13.7474445 10.526937,13.3392206 L10.526937,12.6588473 C11.2444215,12.4609205 11.7887202,11.8560068 11.7887202,11.4589162 C11.7887202,10.9640993 11.0093835,10.9640993 10.0692313,10.9640993 C9.11794581,10.9640993 8.35097957,10.9640993 8.35097957,11.4589162 C8.35097957,11.8560068 8.87053734,12.4609205 9.59915527,12.6464769 L9.59915527,13.3392206 C9.59915527,13.7474445 9.27876131,14.0690756 8.88167073,14.0690756 C8.66024015,14.0690756 8.46107634,13.9824826 8.32500168,13.8229041 C8.16418618,13.6237403 7.86729603,13.5989995 7.66936926,13.759815 C7.47267953,13.9330009 7.45907206,14.2311281 7.62112461,14.4154474 C7.93038519,14.7865601 8.3868538,14.9968573 8.88167073,14.9968573 C9.33937638,14.9968573 9.75997077,14.8001676 10.0692313,14.490907 C10.3673585,14.8001676 10.7867159,14.9968573 11.256792,14.9968573 C11.7404755,14.9968573 12.1969441,14.7865601 12.5062047,14.4154474 Z" id="Combined-Shape"></path>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.7 KiB |
@@ -1,26 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg width="20px" height="19px" viewBox="0 0 20 19" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- Generator: Sketch 43.2 (39069) - http://www.bohemiancoding.com/sketch -->
|
||||
<title>sound icon</title>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="20px" height="20px" viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- Generator: Sketch 48.2 (47327) - http://www.bohemiancoding.com/sketch -->
|
||||
<title>sound-library</title>
|
||||
<desc>Created with Sketch.</desc>
|
||||
<defs></defs>
|
||||
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="Desktop---1280x720" transform="translate(-51.000000, -666.000000)">
|
||||
<g id="v1-Sound-Editor" transform="translate(-1.000000, 92.000000)">
|
||||
<g id="Sounds-List">
|
||||
<g id="add-sound" transform="translate(41.000000, 575.000000)">
|
||||
<g id="sound-icon" transform="translate(11.000000, 0.000000)">
|
||||
<path d="M8.75662105,3.8617617 L8.75662105,16.5654444 C8.75662105,16.8473164 8.60383377,17.1000293 8.35555444,17.2263858 C8.10727511,17.3430225 7.81124975,17.3138633 7.59161803,17.1389082 L3.93713725,14.1413445 C3.7251449,13.9673614 3.46158684,13.8730801 3.18943449,13.8730801 L1.90888609,13.8730801 C0.858473536,13.8730801 0,12.9983047 0,11.9301067 L0,8.08887079 C0,7.02067284 0.858473536,6.14589745 1.90888609,6.14589745 L3.25914369,6.14589745 C3.50551318,6.14589745 3.74710807,6.06813964 3.9485963,5.92234374 L7.62981485,3.26885838 C7.75395452,3.18138084 7.8971926,3.1327822 8.04043067,3.1327822 C8.15502113,3.1327822 8.26961159,3.16194138 8.37465285,3.22025974 C8.61338298,3.33689646 8.75662105,3.58960935 8.75662105,3.8617617" id="Fill-1" fill="#4C97FF"></path>
|
||||
<path d="M10.9556526,7.161175 C11.1074421,7.161175 11.2592316,7.224925 11.3690211,7.349425 C12.0513368,8.130925 12.4271263,9.138175 12.4271263,10.185175 C12.4271263,11.265925 12.0292316,12.297175 11.3071263,13.088425 C11.0978632,13.316425 10.7493368,13.329925 10.5253368,13.117675 C10.3020737,12.906925 10.2895474,12.550675 10.4966,12.323425 C11.0293368,11.739925 11.3218632,10.980925 11.3218632,10.185175 C11.3218632,9.414175 11.0448105,8.672425 10.5422842,8.097925 C10.3396526,7.865425 10.3602842,7.509925 10.5887053,7.302925 C10.6940737,7.207675 10.8244947,7.161175 10.9556526,7.161175" id="Fill-4" fill="#4C97FF"></path>
|
||||
<path d="M12.8186105,4.7512 C12.9652421,4.7512 13.1118737,4.81045 13.2216632,4.9282 C14.5406105,6.3577 15.2671368,8.22445 15.2671368,10.18495 C15.2671368,12.1792 14.5185053,14.0692 13.1582947,15.5062 C12.9453474,15.73045 12.5953474,15.7357 12.3765053,15.5212 C12.1576632,15.30595 12.1510316,14.9497 12.3625053,14.72545 C13.5230316,13.49995 14.1618737,11.8867 14.1618737,10.18495 C14.1618737,8.5117 13.5414526,6.9187 12.4155579,5.6992 C12.2070316,5.4727 12.2180842,5.11645 12.4398737,4.9042 C12.5467158,4.80145 12.6822947,4.7512 12.8186105,4.7512" id="Fill-6" fill="#4C97FF"></path>
|
||||
<g id="+" transform="translate(15.000000, 0.000000)" stroke="#4C97FF" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="M2,0 L2,4" id="Shape"></path>
|
||||
<path d="M4,2 L0,2" id="Shape"></path>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g id="sound-library" fill="#FFFFFF">
|
||||
<path d="M17.75,3.25 L18.5,3.25 C18.9142136,3.25 19.25,3.58578644 19.25,4 C19.25,4.41421356 18.9142136,4.75 18.5,4.75 L17.75,4.75 L17.75,5.5 C17.75,5.91421356 17.4142136,6.25 17,6.25 C16.5857864,6.25 16.25,5.91421356 16.25,5.5 L16.25,4.75 L15.5,4.75 C15.0857864,4.75 14.75,4.41421356 14.75,4 C14.75,3.58578644 15.0857864,3.25 15.5,3.25 L16.25,3.25 L16.25,2.5 C16.25,2.08578644 16.5857864,1.75 17,1.75 C17.4142136,1.75 17.75,2.08578644 17.75,2.5 L17.75,3.25 Z M12.6307801,13.637142 C12.480284,13.637142 12.3255684,13.5975477 12.1849178,13.5141169 C11.7671856,13.2652385 11.6279416,12.7236452 11.8754866,12.303663 C12.346666,11.5004646 12.346666,10.5049512 11.8754866,9.70316691 C11.6279416,9.28177059 11.7671856,8.74017733 12.1849178,8.49129896 C12.6068695,8.24524876 13.1441547,8.38382876 13.3888867,8.80239692 C14.1863754,10.1599153 14.1863754,11.8455006 13.3888867,13.2030189 C13.225732,13.4830071 12.9317723,13.637142 12.6307801,13.637142 Z M15.2566363,15.0553244 C15.1061402,15.0553244 14.950018,15.0157301 14.810774,14.9322993 C14.3930418,14.683421 14.2537977,14.1418277 14.5013427,13.7218455 C15.4873032,12.0447447 15.4873032,9.96038836 14.5013427,8.28470164 C14.2537977,7.8647194 14.3930418,7.32171206 14.810774,7.07283369 C15.2299126,6.82819757 15.7671978,6.96536349 16.0147428,7.38393165 C17.3284191,9.61535244 17.3284191,12.3897806 16.0147428,14.6212014 C15.8501816,14.9011895 15.5576285,15.0553244 15.2566363,15.0553244 Z M10.3785286,6.67858774 L10.3785286,15.3200405 C10.3785286,16.3438356 9.17174676,16.8797725 8.41926624,16.1897007 L6.79475223,14.6978446 C6.21949142,14.1703921 5.46982391,13.8776773 4.69061978,13.8776773 L4.40650564,13.8776773 C3.63011453,13.8776773 3,13.2455828 3,12.4635956 L3,9.5505875 C3,8.77001445 3.63011453,8.13650589 4.40650564,8.13650589 L4.67514822,8.13650589 C5.45435235,8.13650589 6.20401986,7.84379099 6.77928066,7.31633855 L8.41926624,5.81034163 C9.17174676,5.1202698 10.3785286,5.65620673 10.3785286,6.67858774 Z" id="Combined-Shape"></path>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 2.5 KiB |
@@ -1,25 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg width="18px" height="23px" viewBox="0 0 18 23" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- Generator: Sketch 43.2 (39069) - http://www.bohemiancoding.com/sketch -->
|
||||
<title>record icon</title>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="20px" height="20px" viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- Generator: Sketch 48.2 (47327) - http://www.bohemiancoding.com/sketch -->
|
||||
<title>record</title>
|
||||
<desc>Created with Sketch.</desc>
|
||||
<defs></defs>
|
||||
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="Desktop---1280x720" transform="translate(-53.000000, -609.000000)">
|
||||
<g id="v1-Sound-Editor" transform="translate(-1.000000, 92.000000)">
|
||||
<g id="Sounds-List">
|
||||
<g id="record-sound" transform="translate(34.000000, 518.000000)">
|
||||
<g id="record-icon" transform="translate(20.000000, 0.000000)">
|
||||
<path d="M10.9805,3.7742 L10.9805,10.8442 C10.9805,12.8742 9.2805,14.5142 7.2195,14.4042 C5.2995,14.3042 3.8495,12.5742 3.8495,10.6442 L3.8495,4.5742 C3.8495,2.5342 5.5495,0.9042 7.6095,1.0042 C9.5405,1.1142 10.9805,2.8442 10.9805,4.7742" id="Fill-1" fill="#4C97FF"></path>
|
||||
<path d="M8.4199,17.9842 L8.4199,19.7242 L10.0799,19.7242 C10.6409,19.7242 11.0799,20.1742 11.0799,20.7242 C11.0799,21.2842 10.6409,21.7242 10.0799,21.7242 L4.7499,21.7242 C4.1999,21.7242 3.7499,21.2842 3.7499,20.7242 C3.7499,20.1742 4.1999,19.7242 4.7499,19.7242 L6.4199,19.7242 L6.4199,17.9842 C2.7999,17.5042 -0.0001,14.3942 -0.0001,10.6442 C-0.0001,10.0942 0.4499,9.6442 0.9999,9.6442 C1.5499,9.6442 1.9999,10.0942 1.9999,10.6442 C1.9999,13.6342 4.4299,16.0642 7.4199,16.0642 C10.3999,16.0642 12.8299,13.6342 12.8299,10.6442 C12.8299,10.0942 13.2799,9.6442 13.8299,9.6442 C14.3909,9.6442 14.8299,10.0942 14.8299,10.6442 C14.8299,14.3942 12.0399,17.5042 8.4199,17.9842" id="Fill-4" fill="#4C97FF"></path>
|
||||
<g id="+" transform="translate(13.000000, 0.000000)" stroke="#4C97FF" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="M2,0 L2,4" id="Shape"></path>
|
||||
<path d="M4,2 L0,2" id="Shape"></path>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g id="record" fill="#FFFFFF">
|
||||
<path d="M15.9365006,11.148381 C15.0369707,13.3332285 13.0518011,14.8264697 10.771958,15.1093996 L10.771958,17.2140836 C10.771958,17.6557686 10.430757,18 9.99650116,18 C9.56224533,18 9.22104432,17.6557686 9.22104432,17.2140836 L9.22104432,15.1093996 C6.95671033,14.8264697 4.97309171,13.347375 4.05650172,11.1798177 C3.90141035,10.7868595 4.07356177,10.3153097 4.47524842,10.1581264 C4.86297684,9.98522477 5.32825095,10.1581264 5.48334232,10.5668029 C6.25879916,12.3901289 8.02684077,13.5847218 9.99650116,13.5847218 C11.9661616,13.5847218 13.7497123,12.3901289 14.50966,10.5337944 C14.6802605,10.1408362 15.1455346,9.95378812 15.533263,10.1266897 C15.9209915,10.2995913 16.1071011,10.7554228 15.9365006,11.148381 Z M7.28224711,8.64692982 L7.28224711,4.68640351 C7.28224711,3.19736842 8.47003548,2 9.91342388,2 C11.3718476,2 12.5446007,3.19736842 12.5446007,4.68640351 L12.5446007,8.64692982 C12.5446007,10.120614 11.3718476,11.3333333 9.91342388,11.3333333 C8.47003548,11.3333333 7.28224711,10.120614 7.28224711,8.64692982 Z" id="record-icon"></path>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 1.5 KiB |
@@ -15,30 +15,13 @@
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: space-around;
|
||||
margin: 1.25rem 0;
|
||||
margin: 0.75rem 0;
|
||||
color: $motion-primary;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.new-button {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
font-size: 0.75rem;
|
||||
cursor: pointer;
|
||||
transition: 0.2s;
|
||||
}
|
||||
|
||||
.new-button:hover {
|
||||
transform: scale(1.2);
|
||||
}
|
||||
|
||||
.new-button + .new-button {
|
||||
margin-top: 1.25rem;
|
||||
}
|
||||
|
||||
.new-button-icon + .new-button-label {
|
||||
margin-top: 0.5rem;
|
||||
.new-buttons > button + button {
|
||||
margin-top: 0.75rem;
|
||||
}
|
||||
|
||||
.list-area {
|
||||
|
||||
@@ -4,7 +4,7 @@ import React from 'react';
|
||||
import SpriteSelectorItem from '../../containers/sprite-selector-item.jsx';
|
||||
|
||||
import Box from '../box/box.jsx';
|
||||
import IconButton from '../icon-button/icon-button.jsx';
|
||||
import AssetButton from '../asset-button/asset-button.jsx';
|
||||
import styles from './selector.css';
|
||||
|
||||
const Selector = props => {
|
||||
@@ -35,7 +35,7 @@ const Selector = props => {
|
||||
</Box>
|
||||
<Box className={styles.newButtons}>
|
||||
{buttons.map(({message, img, onClick}, index) => (
|
||||
<IconButton
|
||||
<AssetButton
|
||||
img={img}
|
||||
key={index}
|
||||
title={message}
|
||||
@@ -49,7 +49,7 @@ const Selector = props => {
|
||||
|
||||
Selector.propTypes = {
|
||||
buttons: PropTypes.arrayOf(PropTypes.shape({
|
||||
message: PropTypes.node.isRequired,
|
||||
message: PropTypes.string.isRequired,
|
||||
img: PropTypes.string.isRequired,
|
||||
onClick: PropTypes.func.isRequired
|
||||
})),
|
||||
|
||||
@@ -150,16 +150,26 @@
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
z-index: 50; /** Force extension button above the ScratchBlocks flyout. */
|
||||
background: white;
|
||||
background: $motion-primary;
|
||||
|
||||
border: 1px solid #ddd;
|
||||
border: 1px solid $motion-primary;
|
||||
box-sizing: content-box; /* To match scratch-block vertical toolbox borders */
|
||||
}
|
||||
|
||||
.extension-button {
|
||||
font-size: 0.55rem;
|
||||
font-weight: bold;
|
||||
background: none;
|
||||
border: none;
|
||||
outline: none;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.extension-button-icon {
|
||||
width: 1.75rem;
|
||||
height: 1.75rem;
|
||||
}
|
||||
|
||||
.extension-button > div {
|
||||
margin-top: 0;
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
import classNames from 'classnames';
|
||||
import PropTypes from 'prop-types';
|
||||
import React from 'react';
|
||||
import {defineMessages, injectIntl, intlShape} from 'react-intl';
|
||||
import {Tab, Tabs, TabList, TabPanel} from 'react-tabs';
|
||||
import MediaQuery from 'react-responsive';
|
||||
import {FormattedMessage} from 'react-intl';
|
||||
import tabStyles from 'react-tabs/style/react-tabs.css';
|
||||
import VM from 'scratch-vm';
|
||||
import Renderer from 'scratch-render';
|
||||
@@ -17,7 +17,6 @@ import Stage from '../../containers/stage.jsx';
|
||||
|
||||
import Box from '../box/box.jsx';
|
||||
import FeedbackForm from '../feedback-form/feedback-form.jsx';
|
||||
import IconButton from '../icon-button/icon-button.jsx';
|
||||
import MenuBar from '../menu-bar/menu-bar.jsx';
|
||||
import PreviewModal from '../../containers/preview-modal.jsx';
|
||||
import WebGlModal from '../../containers/webgl-modal.jsx';
|
||||
@@ -26,19 +25,20 @@ import layout from '../../lib/layout-constants.js';
|
||||
import styles from './gui.css';
|
||||
import addExtensionIcon from './icon--extensions.svg';
|
||||
|
||||
const addExtensionMessage = (
|
||||
<FormattedMessage
|
||||
defaultMessage="Extensions"
|
||||
description="Button to add an extension in the target pane"
|
||||
id="gui.gui.addExtension"
|
||||
/>
|
||||
);
|
||||
const messages = defineMessages({
|
||||
addExtension: {
|
||||
id: 'gui.gui.addExtension',
|
||||
description: 'Button to add an extension in the target pane',
|
||||
defaultMessage: 'Add Extension'
|
||||
}
|
||||
});
|
||||
|
||||
const GUIComponent = props => {
|
||||
const {
|
||||
basePath,
|
||||
children,
|
||||
enableExtensions,
|
||||
intl,
|
||||
feedbackFormVisible,
|
||||
vm,
|
||||
previewInfoVisible,
|
||||
@@ -108,14 +108,18 @@ const GUIComponent = props => {
|
||||
/>
|
||||
</Box>
|
||||
<Box className={styles.extensionButtonContainer}>
|
||||
<IconButton
|
||||
<button
|
||||
className={classNames(styles.extensionButton, {
|
||||
[styles.hidden]: !enableExtensions
|
||||
})}
|
||||
img={addExtensionIcon}
|
||||
title={addExtensionMessage}
|
||||
title={intl.formatMessage(messages.addExtension)}
|
||||
onClick={onExtensionButtonClick}
|
||||
/>
|
||||
>
|
||||
<img
|
||||
className={styles.extensionButtonIcon}
|
||||
src={addExtensionIcon}
|
||||
/>
|
||||
</button>
|
||||
</Box>
|
||||
</TabPanel>
|
||||
<TabPanel className={tabClassNames.tabPanel}>
|
||||
@@ -161,6 +165,7 @@ GUIComponent.propTypes = {
|
||||
children: PropTypes.node,
|
||||
enableExtensions: PropTypes.bool,
|
||||
feedbackFormVisible: PropTypes.bool,
|
||||
intl: intlShape.isRequired,
|
||||
onExtensionButtonClick: PropTypes.func,
|
||||
onTabSelect: PropTypes.func,
|
||||
previewInfoVisible: PropTypes.bool,
|
||||
@@ -170,4 +175,4 @@ GUIComponent.propTypes = {
|
||||
GUIComponent.defaultProps = {
|
||||
basePath: './'
|
||||
};
|
||||
export default GUIComponent;
|
||||
export default injectIntl(GUIComponent);
|
||||
@@ -7,8 +7,8 @@
|
||||
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="add-extension">
|
||||
<g transform="translate(4.000000, 5.000000)">
|
||||
<path d="M18,15.51 C18,15.786 17.776,16.01 17.5,16.01 L7.197,16.01 C7.064,16.01 6.937,16.062 6.844,16.156 L6.146,16.854 C6.053,16.947 5.926,17 5.793,17 L3.207,17 C3.074,17 2.947,16.947 2.854,16.854 L2.156,16.156 C2.062,16.062 1.936,16.01 1.803,16.01 L0.5,16.01 C0.224,16.01 0,15.786 0,15.51 L0,11.5 C0,11.224 0.224,11 0.5,11 L1.793,11 C1.926,11 2.053,11.053 2.146,11.146 L2.854,11.854 C2.947,11.947 3.074,12 3.207,12 L5.793,12 C5.926,12 6.053,11.947 6.146,11.854 L6.854,11.146 C6.947,11.053 7.074,11 7.207,11 L17.5,11 C17.776,11 18,11.224 18,11.5 L18,15.51 Z M12.9961,8.51 C12.9961,8.786 12.7721,9.01 12.4961,9.01 L7.1971,9.01 C7.0641,9.01 6.9371,9.062 6.8441,9.156 L6.1461,9.854 C6.0531,9.947 5.9261,10 5.7931,10 L3.2071,10 C3.0741,10 2.9471,9.947 2.8531,9.854 L2.1561,9.156 C2.0621,9.062 1.9351,9.01 1.8031,9.01 L0.5001,9.01 C0.2241,9.01 0.0001,8.786 0.0001,8.51 L0.0001,4.5 C0.0001,4.224 0.2241,4 0.5001,4 L1.7931,4 C1.9261,4 2.0531,4.053 2.1461,4.146 L2.8531,4.854 C2.9471,4.947 3.0741,5 3.2071,5 L5.7931,5 C5.9261,5 6.0531,4.947 6.1461,4.854 L6.8531,4.146 C6.9471,4.053 7.0741,4 7.2071,4 L12.4961,4 C12.7721,4 12.9961,4.224 12.9961,4.5 L12.9961,8.51 Z" id="Combined-Shape" fill="#4C97FF"></path>
|
||||
<g id="+" transform="translate(16.000000, 0.000000)" stroke="#4C97FF" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="M18,15.51 C18,15.786 17.776,16.01 17.5,16.01 L7.197,16.01 C7.064,16.01 6.937,16.062 6.844,16.156 L6.146,16.854 C6.053,16.947 5.926,17 5.793,17 L3.207,17 C3.074,17 2.947,16.947 2.854,16.854 L2.156,16.156 C2.062,16.062 1.936,16.01 1.803,16.01 L0.5,16.01 C0.224,16.01 0,15.786 0,15.51 L0,11.5 C0,11.224 0.224,11 0.5,11 L1.793,11 C1.926,11 2.053,11.053 2.146,11.146 L2.854,11.854 C2.947,11.947 3.074,12 3.207,12 L5.793,12 C5.926,12 6.053,11.947 6.146,11.854 L6.854,11.146 C6.947,11.053 7.074,11 7.207,11 L17.5,11 C17.776,11 18,11.224 18,11.5 L18,15.51 Z M12.9961,8.51 C12.9961,8.786 12.7721,9.01 12.4961,9.01 L7.1971,9.01 C7.0641,9.01 6.9371,9.062 6.8441,9.156 L6.1461,9.854 C6.0531,9.947 5.9261,10 5.7931,10 L3.2071,10 C3.0741,10 2.9471,9.947 2.8531,9.854 L2.1561,9.156 C2.0621,9.062 1.9351,9.01 1.8031,9.01 L0.5001,9.01 C0.2241,9.01 0.0001,8.786 0.0001,8.51 L0.0001,4.5 C0.0001,4.224 0.2241,4 0.5001,4 L1.7931,4 C1.9261,4 2.0531,4.053 2.1461,4.146 L2.8531,4.854 C2.9471,4.947 3.0741,5 3.2071,5 L5.7931,5 C5.9261,5 6.0531,4.947 6.1461,4.854 L6.8531,4.146 C6.9471,4.053 7.0741,4 7.2071,4 L12.4961,4 C12.7721,4 12.9961,4.224 12.9961,4.5 L12.9961,8.51 Z" id="Combined-Shape" fill="#FFFFFF"></path>
|
||||
<g id="+" transform="translate(16.000000, 0.000000)" stroke="#FFFFFF" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="M2,0 L2,4" id="Shape"></path>
|
||||
<path d="M4,2 L0,2" id="Shape"></path>
|
||||
</g>
|
||||
|
||||
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
@@ -1,30 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg width="28px" height="25px" viewBox="0 0 28 25" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- Generator: Sketch 43.2 (39069) - http://www.bohemiancoding.com/sketch -->
|
||||
<title>add-sprite</title>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="20px" height="20px" viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- Generator: Sketch 48.2 (47327) - http://www.bohemiancoding.com/sketch -->
|
||||
<title>sprite-library</title>
|
||||
<desc>Created with Sketch.</desc>
|
||||
<defs></defs>
|
||||
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round">
|
||||
<g id="Desktop---1280x720" transform="translate(-1144.000000, -669.000000)" stroke="#4C97FF">
|
||||
<g id="Sprite-Area" transform="translate(792.000000, 460.000000)">
|
||||
<g id="Sprite-List" transform="translate(0.000000, 78.000000)">
|
||||
<g id="add-sprite" transform="translate(345.000000, 132.000000)">
|
||||
<g transform="translate(8.000000, 0.000000)">
|
||||
<path d="M21,16 C21,21 16.9,23.2 11.7,23.2 C6.5,23.2 2.5,21 2.5,16 C2.5,11 5.3,6.7 11.8,6.7 C18.3,6.7 21,11 21,16 Z M11.7,23 C20.1,23 21.6,17 19.5,14.9 C17.1,12.4 14,16 11.7,16 C9.4,16 6.3,12.4 3.9,14.9 C1.8,17 3.4,23 11.7,23 Z" id="Combined-Shape" fill="#4C97FF" fill-rule="nonzero"></path>
|
||||
<path d="M3.7,11.1 L3,5.8 C3,5.4 3.4,5.2 3.7,5.3 L8.3,7.8" id="Shape" fill="#4C97FF" fill-rule="nonzero"></path>
|
||||
<path d="M19.9,11.1 L20.6,5.7 C20.6,5.3 20.2,5.1 19.9,5.2 L15.3,7.7" id="Shape" fill="#4C97FF" fill-rule="nonzero"></path>
|
||||
<path d="M7,17.75 L0,17.75" id="Shape" stroke-width="1.5" fill="#FFFFFF" fill-rule="nonzero"></path>
|
||||
<path d="M2,22 L7,20" id="Shape" stroke-width="1.5" fill="#FFFFFF" fill-rule="nonzero"></path>
|
||||
<path d="M16,17.75 L23,17.75" id="Shape" stroke-width="1.5" fill="#FFFFFF" fill-rule="nonzero"></path>
|
||||
<path d="M22,22 L16,20" id="Shape" stroke-width="1.5" fill="#FFFFFF" fill-rule="nonzero"></path>
|
||||
<g id="+" transform="translate(22.000000, 0.000000)" stroke-width="2">
|
||||
<path d="M2,0 L2,4" id="Shape"></path>
|
||||
<path d="M4,2 L0,2" id="Shape"></path>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="sprite-library" fill="#FFFFFF">
|
||||
<path d="M18.5,2.5 L19.25,2.5 C19.6642136,2.5 20,2.83578644 20,3.25 C20,3.66421356 19.6642136,4 19.25,4 L18.5,4 L18.5,4.75 C18.5,5.16421356 18.1642136,5.5 17.75,5.5 C17.3357864,5.5 17,5.16421356 17,4.75 L17,4 L16.25,4 C15.8357864,4 15.5,3.66421356 15.5,3.25 C15.5,2.83578644 15.8357864,2.5 16.25,2.5 L17,2.5 L17,1.75 C17,1.33578644 17.3357864,1 17.75,1 C18.1642136,1 18.5,1.33578644 18.5,1.75 L18.5,2.5 Z M15.9214311,12.3870691 C15.9214311,15.6404905 13.2729235,17 10.0195022,17 C6.767318,17 4.13241787,15.6404905 4.13241787,12.3870691 C4.13241787,11.5829915 4.26725548,10.9026183 4.52827141,10.3335788 L4.42930802,5.63281784 C4.4169376,5.11326006 4.99834749,4.81636989 5.41894188,5.12563048 L7.93013778,7.01830528 C8.51154766,6.70904469 9.22903221,6.57297003 10.0195022,6.57297003 C10.8124464,6.57297003 11.5423013,6.70904469 12.1237112,7.01830528 L14.6349071,5.12563048 C15.0431311,4.81636989 15.624541,5.11326006 15.624541,5.63281784 L15.5255776,10.3335788 C15.7853565,10.9026183 15.9214311,11.5829915 15.9214311,12.3870691 Z M12.5062047,14.4154474 C12.6806277,14.2311281 12.6546498,13.9330009 12.4579601,13.759815 C12.2724037,13.5989995 11.9742765,13.6237403 11.8023276,13.8229041 C11.6650159,13.9824826 11.4670892,14.0690756 11.256792,14.0690756 C10.8609384,14.0690756 10.526937,13.7474445 10.526937,13.3392206 L10.526937,12.6588473 C11.2444215,12.4609205 11.7887202,11.8560068 11.7887202,11.4589162 C11.7887202,10.9640993 11.0093835,10.9640993 10.0692313,10.9640993 C9.11794581,10.9640993 8.35097957,10.9640993 8.35097957,11.4589162 C8.35097957,11.8560068 8.87053734,12.4609205 9.59915527,12.6464769 L9.59915527,13.3392206 C9.59915527,13.7474445 9.27876131,14.0690756 8.88167073,14.0690756 C8.66024015,14.0690756 8.46107634,13.9824826 8.32500168,13.8229041 C8.16418618,13.6237403 7.86729603,13.5989995 7.66936926,13.759815 C7.47267953,13.9330009 7.45907206,14.2311281 7.62112461,14.4154474 C7.93038519,14.7865601 8.3868538,14.9968573 8.88167073,14.9968573 C9.33937638,14.9968573 9.75997077,14.8001676 10.0692313,14.490907 C10.3673585,14.8001676 10.7867159,14.9968573 11.256792,14.9968573 C11.7404755,14.9968573 12.1969441,14.7865601 12.5062047,14.4154474 Z" id="Combined-Shape"></path>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.7 KiB |
@@ -61,8 +61,6 @@
|
||||
}
|
||||
|
||||
.add-button {
|
||||
font-size: 0.55rem;
|
||||
font-weight: bold;
|
||||
position: absolute;
|
||||
bottom: 0.75rem;
|
||||
right: 1rem;
|
||||
|
||||
@@ -1,25 +1,26 @@
|
||||
import PropTypes from 'prop-types';
|
||||
import React from 'react';
|
||||
import {FormattedMessage} from 'react-intl';
|
||||
import {defineMessages, injectIntl, intlShape} from 'react-intl';
|
||||
|
||||
import Box from '../box/box.jsx';
|
||||
import SpriteInfo from '../../containers/sprite-info.jsx';
|
||||
import SpriteSelectorItem from '../../containers/sprite-selector-item.jsx';
|
||||
import IconButton from '../icon-button/icon-button.jsx';
|
||||
import AssetButton from '../asset-button/asset-button.jsx';
|
||||
|
||||
import styles from './sprite-selector.css';
|
||||
import spriteIcon from './icon--sprite.svg';
|
||||
|
||||
const addSpriteMessage = (
|
||||
<FormattedMessage
|
||||
defaultMessage="Add Sprite"
|
||||
description="Button to add a sprite in the target pane"
|
||||
id="gui.spriteSelector.addSprite"
|
||||
/>
|
||||
);
|
||||
const messages = defineMessages({
|
||||
addSprite: {
|
||||
id: 'gui.spriteSelector.addSprite',
|
||||
description: 'Button to add a sprite in the target pane',
|
||||
defaultMessage: 'Add Sprite'
|
||||
}
|
||||
});
|
||||
|
||||
const SpriteSelectorComponent = function (props) {
|
||||
const {
|
||||
intl,
|
||||
onChangeSpriteDirection,
|
||||
onChangeSpriteName,
|
||||
onChangeSpriteSize,
|
||||
@@ -84,10 +85,10 @@ const SpriteSelectorComponent = function (props) {
|
||||
}
|
||||
</Box>
|
||||
</Box>
|
||||
<IconButton
|
||||
<AssetButton
|
||||
className={styles.addButton}
|
||||
img={spriteIcon}
|
||||
title={addSpriteMessage}
|
||||
title={intl.formatMessage(messages.addSprite)}
|
||||
onClick={onNewSpriteClick}
|
||||
/>
|
||||
</Box>
|
||||
@@ -95,6 +96,7 @@ const SpriteSelectorComponent = function (props) {
|
||||
};
|
||||
|
||||
SpriteSelectorComponent.propTypes = {
|
||||
intl: intlShape.isRequired,
|
||||
onChangeSpriteDirection: PropTypes.func,
|
||||
onChangeSpriteName: PropTypes.func,
|
||||
onChangeSpriteSize: PropTypes.func,
|
||||
@@ -121,4 +123,4 @@ SpriteSelectorComponent.propTypes = {
|
||||
})
|
||||
};
|
||||
|
||||
export default SpriteSelectorComponent;
|
||||
export default injectIntl(SpriteSelectorComponent);
|
||||
@@ -1,30 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg width="29px" height="25px" viewBox="0 0 29 25" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- Generator: Sketch 43.2 (39069) - http://www.bohemiancoding.com/sketch -->
|
||||
<title>add-bg</title>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="20px" height="20px" viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- Generator: Sketch 48.2 (47327) - http://www.bohemiancoding.com/sketch -->
|
||||
<title>backdrop-library</title>
|
||||
<desc>Created with Sketch.</desc>
|
||||
<defs>
|
||||
<circle id="path-1" cx="21" cy="5" r="5"></circle>
|
||||
<path d="M16.8970588,3.98529412 L17.5588235,3.98529412 C17.9243061,3.98529412 18.2205882,4.28157627 18.2205882,4.64705882 C18.2205882,5.01254138 17.9243061,5.30882353 17.5588235,5.30882353 L16.8970588,5.30882353 L16.8970588,5.97058824 C16.8970588,6.33607079 16.6007767,6.63235294 16.2352941,6.63235294 C15.8698116,6.63235294 15.5735294,6.33607079 15.5735294,5.97058824 L15.5735294,5.30882353 L14.9117647,5.30882353 C14.5462822,5.30882353 14.25,5.01254138 14.25,4.64705882 C14.25,4.28157627 14.5462822,3.98529412 14.9117647,3.98529412 L15.5735294,3.98529412 L15.5735294,3.32352941 C15.5735294,2.95804686 15.8698116,2.66176471 16.2352941,2.66176471 C16.6007767,2.66176471 16.8970588,2.95804686 16.8970588,3.32352941 L16.8970588,3.98529412 Z" id="path-1"></path>
|
||||
</defs>
|
||||
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round">
|
||||
<g id="Desktop---1280x720" transform="translate(-1224.000000, -668.000000)">
|
||||
<g id="Stage-Area" transform="translate(1200.000000, 460.000000)">
|
||||
<g id="Backdrop-Area" transform="translate(0.000000, 43.000000)">
|
||||
<g id="backdrop-tile">
|
||||
<g id="add-bg" transform="translate(10.000000, 167.000000)">
|
||||
<g transform="translate(15.000000, 0.000000)">
|
||||
<path d="M19,22 L2,22 C0.9,22 0,20.9731544 0,19.7181208 L0,7.28187919 C0,6.02684564 0.9,5 2,5 L19,5 C20.1,5 21,6.02684564 21,7.28187919 L21,19.7181208 C21,20.9731544 20.1,22 19,22 Z" id="Shape" stroke="#4C97FF" stroke-width="2"></path>
|
||||
<path d="M21,17.5 L16.8,13.3 C16.2,12.7 15.2,12.6 14.5,13.2 L9.3,17.3 C8.5,17.9 7.4,17.8 6.8,17 L6.3,16.4 C5.7,15.6 4.5,15.5 3.8,16.1 L0,19.2 L0,20.1 C0,21.1 0.8,21.9 1.8,21.9 L19.3,21.9 C20.3,21.9 21.1,21.1 21.1,20.1 L21.1,17.5 L21,17.5 Z" id="Shape" stroke="#4C97FF" stroke-width="2" fill="#4C97FF"></path>
|
||||
<g id="Oval" fill-rule="nonzero">
|
||||
<use fill="#4C97FF" fill-rule="evenodd" xlink:href="#path-1"></use>
|
||||
<circle stroke="#FFFFFF" stroke-width="2" cx="21" cy="5" r="6"></circle>
|
||||
</g>
|
||||
<path d="M21,3 L21,7" id="Shape" stroke="#FFFFFF" stroke-width="2"></path>
|
||||
<path d="M23,5 L19,5" id="Shape" stroke="#FFFFFF" stroke-width="2"></path>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="backdrop-library">
|
||||
<g id="backdrop-lib-icon" transform="translate(3.850000, 4.650000)" stroke="#FFFFFF" stroke-linecap="round" stroke-width="1.5">
|
||||
<path d="M12.2943964,8.13062054 L9.83551715,5.59754978 C9.48424868,5.23568253 8.89880123,5.17537132 8.48898801,5.53723857 L5.44466128,8.00999813 C4.97630332,8.37186538 4.33231112,8.31155417 3.98104265,7.8290645 L3.68831893,7.46719725 C3.33705046,6.98470758 2.63451352,6.92439637 2.22470031,7.28626362 L0,9.15591109 L0,9.15591109 C4.82683843e-16,10.0078757 0.690653747,10.6985294 1.54261832,10.6985294 L10.3529412,10.6985294 C11.4575107,10.6985294 12.3529412,9.80309891 12.3529412,8.69852941 L12.3529412,8.13062054 L12.2943964,8.13062054 Z" id="Shape" fill="#FFFFFF" stroke-linejoin="round"></path>
|
||||
<path d="M12.3529412,3.52941176 L12.3529412,8.82352941 C12.3529412,9.79814956 11.5628554,10.5882353 10.5882353,10.5882353 L1.76470588,10.5882353 C0.790085736,10.5882353 1.19356544e-16,9.79814956 0,8.82352941 L0,1.76470588 C-1.19356544e-16,0.790085736 0.790085736,4.61992691e-15 1.76470588,4.4408921e-15 L8.82352941,4.4408921e-15" id="Rectangle"></path>
|
||||
</g>
|
||||
<g id="Combined-Shape">
|
||||
<use fill="#FFFFFF" fill-rule="evenodd" xlink:href="#path-1"></use>
|
||||
<path stroke="#FFFFFF" stroke-width="0.1" d="M16.9470588,3.93529412 L17.5588235,3.93529412 C17.9519203,3.93529412 18.2705882,4.25396203 18.2705882,4.64705882 C18.2705882,5.04015562 17.9519203,5.35882353 17.5588235,5.35882353 L16.9470588,5.30882353 L16.9470588,5.97058824 C16.9470588,6.36368503 16.6283909,6.68235294 16.2352941,6.68235294 C15.8421973,6.68235294 15.5235294,6.36368503 15.5235294,5.97058824 L15.5735294,5.35882353 L14.9117647,5.35882353 C14.5186679,5.35882353 14.2,5.04015562 14.2,4.64705882 C14.2,4.25396203 14.5186679,3.93529412 14.9117647,3.93529412 L15.5235294,3.98529412 L15.5235294,3.32352941 C15.5235294,2.93043262 15.8421973,2.61176471 16.2352941,2.61176471 C16.6283909,2.61176471 16.9470588,2.93043262 16.9470588,3.32352941 L16.9470588,3.93529412 Z"></path>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
|
||||
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 3.3 KiB |
@@ -76,10 +76,6 @@ $header-height: calc($stage-menu-height - 2px);
|
||||
}
|
||||
|
||||
.add-button {
|
||||
font-size: 0.55rem;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
position: absolute;
|
||||
bottom: 0.75rem;
|
||||
left: 0.25rem;
|
||||
}
|
||||
@@ -1,25 +1,26 @@
|
||||
import classNames from 'classnames';
|
||||
import PropTypes from 'prop-types';
|
||||
import React from 'react';
|
||||
import {FormattedMessage} from 'react-intl';
|
||||
import {defineMessages, intlShape, injectIntl, FormattedMessage} from 'react-intl';
|
||||
|
||||
import Box from '../box/box.jsx';
|
||||
import IconButton from '../icon-button/icon-button.jsx';
|
||||
import AssetButton from '../asset-button/asset-button.jsx';
|
||||
import CostumeCanvas from '../costume-canvas/costume-canvas.jsx';
|
||||
import styles from './stage-selector.css';
|
||||
import backdropIcon from './icon--backdrop.svg';
|
||||
|
||||
const addBackdropMessage = (
|
||||
<FormattedMessage
|
||||
defaultMessage="Add Backdrop"
|
||||
description="Button to add a backdrop in the target pane"
|
||||
id="gui.stageSelector.targetPaneAddBackdrop"
|
||||
/>
|
||||
);
|
||||
const messages = defineMessages({
|
||||
addBackdrop: {
|
||||
id: 'gui.stageSelector.targetPaneAddBackdrop',
|
||||
description: 'Button to add a backdrop in the target pane',
|
||||
defaultMessage: 'Add Backdrop'
|
||||
}
|
||||
});
|
||||
|
||||
const StageSelector = props => {
|
||||
const {
|
||||
backdropCount,
|
||||
intl,
|
||||
selected,
|
||||
url,
|
||||
onClick,
|
||||
@@ -53,10 +54,10 @@ const StageSelector = props => {
|
||||
/>
|
||||
</div>
|
||||
<div className={styles.count}>{backdropCount}</div>
|
||||
<IconButton
|
||||
<AssetButton
|
||||
className={styles.addButton}
|
||||
img={backdropIcon}
|
||||
title={addBackdropMessage}
|
||||
title={intl.formatMessage(messages.addBackdrop)}
|
||||
onClick={onNewBackdropClick}
|
||||
/>
|
||||
</Box>
|
||||
@@ -65,9 +66,10 @@ const StageSelector = props => {
|
||||
|
||||
StageSelector.propTypes = {
|
||||
backdropCount: PropTypes.number.isRequired,
|
||||
intl: intlShape.isRequired,
|
||||
onClick: PropTypes.func,
|
||||
onNewBackdropClick: PropTypes.func,
|
||||
selected: PropTypes.bool.isRequired,
|
||||
url: PropTypes.string
|
||||
};
|
||||
export default StageSelector;
|
||||
export default injectIntl(StageSelector);
|
||||
@@ -1,7 +1,7 @@
|
||||
import PropTypes from 'prop-types';
|
||||
import React from 'react';
|
||||
import bindAll from 'lodash.bindall';
|
||||
import {FormattedMessage} from 'react-intl';
|
||||
import {defineMessages, intlShape, injectIntl} from 'react-intl';
|
||||
import VM from 'scratch-vm';
|
||||
|
||||
import AssetPanel from '../components/asset-panel/asset-panel.jsx';
|
||||
@@ -22,36 +22,28 @@ import addLibraryBackdropIcon from '../components/asset-panel/icon--add-backdrop
|
||||
import addLibraryCostumeIcon from '../components/asset-panel/icon--add-costume-lib.svg';
|
||||
import costumeLibraryContent from '../lib/libraries/costumes.json';
|
||||
|
||||
const messages = {
|
||||
addLibraryBackdropMsg: (
|
||||
<FormattedMessage
|
||||
defaultMessage="Add Backdrop From Library"
|
||||
description="Button to add a backdrop in the editor tab"
|
||||
id="gui.costumeTab.addBackdrop"
|
||||
/>
|
||||
),
|
||||
addLibraryCostumeMsg: (
|
||||
<FormattedMessage
|
||||
defaultMessage="Add Costume From Library"
|
||||
description="Button to add a costume in the editor tab"
|
||||
id="gui.costumeTab.addCostume"
|
||||
/>
|
||||
),
|
||||
addBlankBackdropMsg: (
|
||||
<FormattedMessage
|
||||
defaultMessage="Add Blank Backdrop"
|
||||
description="Button to add a blank backdrop in the editor tab"
|
||||
id="gui.costumeTab.addBlankBackdrop"
|
||||
/>
|
||||
),
|
||||
addBlankCostumeMsg: (
|
||||
<FormattedMessage
|
||||
defaultMessage="Add Blank Costume"
|
||||
description="Button to add a blank costume in the editor tab"
|
||||
id="gui.costumeTab.addBlankCostume"
|
||||
/>
|
||||
)
|
||||
};
|
||||
const messages = defineMessages({
|
||||
addLibraryBackdropMsg: {
|
||||
defaultMessage: 'Add Backdrop From Library',
|
||||
description: 'Button to add a backdrop in the editor tab',
|
||||
id: 'gui.costumeTab.addBackdrop'
|
||||
},
|
||||
addLibraryCostumeMsg: {
|
||||
defaultMessage: 'Add Costume From Library',
|
||||
description: 'Button to add a costume in the editor tab',
|
||||
id: 'gui.costumeTab.addCostume'
|
||||
},
|
||||
addBlankBackdropMsg: {
|
||||
defaultMessage: 'Add Blank Backdrop',
|
||||
description: 'Button to add a blank backdrop in the editor tab',
|
||||
id: 'gui.costumeTab.addBlankBackdrop'
|
||||
},
|
||||
addBlankCostumeMsg: {
|
||||
defaultMessage: 'Add Blank Costume',
|
||||
description: 'Button to add a blank costume in the editor tab',
|
||||
id: 'gui.costumeTab.addBlankCostume'
|
||||
}
|
||||
});
|
||||
|
||||
class CostumeTab extends React.Component {
|
||||
constructor (props) {
|
||||
@@ -108,6 +100,7 @@ class CostumeTab extends React.Component {
|
||||
render () {
|
||||
// For paint wrapper
|
||||
const {
|
||||
intl,
|
||||
onNewLibraryBackdropClick,
|
||||
onNewLibraryCostumeClick,
|
||||
costumeLibraryVisible,
|
||||
@@ -139,12 +132,12 @@ class CostumeTab extends React.Component {
|
||||
<AssetPanel
|
||||
buttons={[
|
||||
{
|
||||
message: addBlankMessage,
|
||||
message: intl.formatMessage(addBlankMessage),
|
||||
img: addBlankCostumeIcon,
|
||||
onClick: this.handleNewBlankCostume
|
||||
},
|
||||
{
|
||||
message: addLibraryMessage,
|
||||
message: intl.formatMessage(addLibraryMessage),
|
||||
img: addLibraryIcon,
|
||||
onClick: addLibraryFunc
|
||||
}
|
||||
@@ -184,6 +177,7 @@ CostumeTab.propTypes = {
|
||||
backdropLibraryVisible: PropTypes.bool,
|
||||
costumeLibraryVisible: PropTypes.bool,
|
||||
editingTarget: PropTypes.string,
|
||||
intl: intlShape,
|
||||
onNewLibraryBackdropClick: PropTypes.func.isRequired,
|
||||
onNewLibraryCostumeClick: PropTypes.func.isRequired,
|
||||
onRequestCloseBackdropLibrary: PropTypes.func.isRequired,
|
||||
@@ -229,7 +223,7 @@ const mapDispatchToProps = dispatch => ({
|
||||
}
|
||||
});
|
||||
|
||||
export default connect(
|
||||
export default injectIntl(connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps
|
||||
)(CostumeTab);
|
||||
)(CostumeTab));
|
||||
@@ -1,7 +1,7 @@
|
||||
import PropTypes from 'prop-types';
|
||||
import React from 'react';
|
||||
import bindAll from 'lodash.bindall';
|
||||
import {FormattedMessage} from 'react-intl';
|
||||
import {defineMessages, intlShape, injectIntl} from 'react-intl';
|
||||
import VM from 'scratch-vm';
|
||||
|
||||
import AssetPanel from '../components/asset-panel/asset-panel.jsx';
|
||||
@@ -64,6 +64,7 @@ class SoundTab extends React.Component {
|
||||
|
||||
render () {
|
||||
const {
|
||||
intl,
|
||||
vm,
|
||||
onNewSoundFromLibraryClick,
|
||||
onNewSoundFromRecordingClick
|
||||
@@ -82,29 +83,27 @@ class SoundTab extends React.Component {
|
||||
}
|
||||
)) : [];
|
||||
|
||||
const recordSoundMsg = (
|
||||
<FormattedMessage
|
||||
defaultMessage="Record Sound"
|
||||
description="Button to record a sound in the editor tab"
|
||||
id="gui.soundTab.recordSound"
|
||||
/>
|
||||
);
|
||||
const addSoundMsg = (
|
||||
<FormattedMessage
|
||||
defaultMessage="Add Sound"
|
||||
description="Button to add a sound in the editor tab"
|
||||
id="gui.soundTab.addSound"
|
||||
/>
|
||||
);
|
||||
const messages = defineMessages({
|
||||
recordSound: {
|
||||
defaultMessage: 'Record Sound',
|
||||
description: 'Button to record a sound in the editor tab',
|
||||
id: 'gui.soundTab.recordSound'
|
||||
},
|
||||
addSound: {
|
||||
defaultMessage: 'Add Sound',
|
||||
description: 'Button to add a sound in the editor tab',
|
||||
id: 'gui.soundTab.addSound'
|
||||
}
|
||||
});
|
||||
|
||||
return (
|
||||
<AssetPanel
|
||||
buttons={[{
|
||||
message: recordSoundMsg,
|
||||
message: intl.formatMessage(messages.recordSound),
|
||||
img: addSoundFromRecordingIcon,
|
||||
onClick: onNewSoundFromRecordingClick
|
||||
}, {
|
||||
message: addSoundMsg,
|
||||
message: intl.formatMessage(messages.addSound),
|
||||
img: addSoundFromLibraryIcon,
|
||||
onClick: onNewSoundFromLibraryClick
|
||||
}]}
|
||||
@@ -138,6 +137,7 @@ class SoundTab extends React.Component {
|
||||
|
||||
SoundTab.propTypes = {
|
||||
editingTarget: PropTypes.string,
|
||||
intl: intlShape,
|
||||
onNewSoundFromLibraryClick: PropTypes.func.isRequired,
|
||||
onNewSoundFromRecordingClick: PropTypes.func.isRequired,
|
||||
onRequestCloseSoundLibrary: PropTypes.func.isRequired,
|
||||
@@ -179,7 +179,7 @@ const mapDispatchToProps = dispatch => ({
|
||||
}
|
||||
});
|
||||
|
||||
export default connect(
|
||||
export default injectIntl(connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps
|
||||
)(SoundTab);
|
||||
)(SoundTab));
|
||||
@@ -27,7 +27,7 @@ describe('Working with costumes', () => {
|
||||
await loadUri(uri);
|
||||
await clickXpath('//button[@title="tryit"]');
|
||||
await clickText('Costumes');
|
||||
await clickText('Add Costume');
|
||||
await clickXpath('//button[@title="Add Costume"]');
|
||||
const el = await findByXpath("//input[@placeholder='what are you looking for?']");
|
||||
await el.sendKeys('abb');
|
||||
await clickText('Abby-a'); // Should close the modal, then click the costumes in the selector
|
||||
@@ -39,7 +39,7 @@ describe('Working with costumes', () => {
|
||||
test('Adding a backdrop', async () => {
|
||||
await loadUri(uri);
|
||||
await clickXpath('//button[@title="tryit"]');
|
||||
await clickText('Add Backdrop');
|
||||
await clickXpath('//button[@title="Add Backdrop"]');
|
||||
const el = await findByXpath("//input[@placeholder='what are you looking for?']");
|
||||
await el.sendKeys('blue');
|
||||
await clickText('Blue Sky'); // Should close the modal
|
||||
|
||||
@@ -30,7 +30,7 @@ describe('Localization', () => {
|
||||
await loadUri(uri);
|
||||
await clickXpath('//button[@title="tryit"]');
|
||||
await clickText('Blocks');
|
||||
await clickText('Extensions');
|
||||
await clickXpath('//button[@title="Add Extension"]');
|
||||
await clickText('Pen', scope.modal); // Modal closes
|
||||
await new Promise(resolve => setTimeout(resolve, 1000)); // Wait for scroll animation
|
||||
await clickText('English');
|
||||
|
||||
@@ -37,13 +37,13 @@ describe('Working with sounds', () => {
|
||||
.accept();
|
||||
|
||||
// Add it back
|
||||
await clickText('Add Sound');
|
||||
await clickXpath('//button[@title="Add Sound"]');
|
||||
let el = await findByXpath("//input[@placeholder='what are you looking for?']");
|
||||
await el.sendKeys('meow');
|
||||
await clickText('Meow', scope.modal); // Should close the modal
|
||||
|
||||
// Add a new sound
|
||||
await clickText('Add Sound');
|
||||
await clickXpath('//button[@title="Add Sound"]');
|
||||
el = await findByXpath("//input[@placeholder='what are you looking for?']");
|
||||
await el.sendKeys('chom');
|
||||
await clickText('Chomp'); // Should close the modal, then click the sounds in the selector
|
||||
@@ -70,11 +70,11 @@ describe('Working with sounds', () => {
|
||||
|
||||
// Add a sound so this sprite has 2 sounds.
|
||||
await clickText('Sounds');
|
||||
await clickText('Add Sound');
|
||||
await clickXpath('//button[@title="Add Sound"]');
|
||||
await clickText('A Bass'); // Closes the modal
|
||||
|
||||
// Now add a sprite with only one sound.
|
||||
await clickText('Add Sprite');
|
||||
await clickXpath('//button[@title="Add Sprite"]');
|
||||
await clickText('Abby'); // Doing this used to crash the editor.
|
||||
|
||||
await new Promise(resolve => setTimeout(resolve, 1000)); // Wait for error
|
||||
|
||||