Skip to content

Commit 98ec67d

Browse files
authored
Merge pull request scratchfoundation#4641 from evhan55/feature/extensions-wifi-icon
Allow for both bluetooth and internet connection icons in extensions
2 parents 1dd3e1d + f29b82b commit 98ec67d

File tree

3 files changed

+15
-7
lines changed

3 files changed

+15
-7
lines changed

src/components/library-item/library-item.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,10 @@
178178
font-weight: bold;
179179
}
180180

181+
.featured-extension-metadata-detail img{
182+
margin-right: 0.25rem;
183+
}
184+
181185
.coming-soon-text {
182186
position: absolute;
183187
background-color: $data-primary;

src/components/library-item/library-item.jsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,12 @@ class LibraryItemComponent extends React.PureComponent {
7272
<div
7373
className={styles.featuredExtensionMetadataDetail}
7474
>
75-
<img
76-
src={this.props.bluetoothRequired ?
77-
bluetoothIconURL :
78-
internetConnectionIconURL
79-
}
80-
/>
75+
{this.props.bluetoothRequired ? (
76+
<img src={bluetoothIconURL} />
77+
) : null}
78+
{this.props.internetConnectionRequired ? (
79+
<img src={internetConnectionIconURL} />
80+
) : null}
8181
</div>
8282
</div>
8383
) : null}

src/lib/libraries/extensions/index.jsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ export default [
163163
featured: true,
164164
disabled: false,
165165
bluetoothRequired: true,
166+
internetConnectionRequired: true,
166167
launchPeripheralConnectionFlow: true,
167168
useAutoScan: false,
168169
peripheralImage: microbitPeripheralImage,
@@ -192,6 +193,7 @@ export default [
192193
featured: true,
193194
disabled: false,
194195
bluetoothRequired: true,
196+
internetConnectionRequired: true,
195197
launchPeripheralConnectionFlow: true,
196198
useAutoScan: false,
197199
peripheralImage: ev3PeripheralImage,
@@ -221,6 +223,7 @@ export default [
221223
featured: true,
222224
disabled: false,
223225
bluetoothRequired: true,
226+
internetConnectionRequired: true,
224227
launchPeripheralConnectionFlow: true,
225228
useAutoScan: true,
226229
peripheralImage: wedoPeripheralImage,
@@ -250,6 +253,7 @@ export default [
250253
),
251254
featured: true,
252255
disabled: true,
253-
bluetoothRequired: true
256+
bluetoothRequired: true,
257+
internetConnectionRequired: true
254258
}
255259
];

0 commit comments

Comments
 (0)