Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
109 changes: 76 additions & 33 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "dash-extensions-gallery",
"name": "genesis-ide-extensions-gallery",
"version": "0.0.1",
"private": true,
"type": "module",
Expand Down
25 changes: 9 additions & 16 deletions src/components/ExtensionsGallery.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,21 @@ import internetConnectionIcon from "./internet-connection.svg"
const creditLinkShortcuts = {
"_scratch_": (credit) => `https://scratch.mit.edu/users/${credit.name}`,
"_github_": (credit) => `https://github.com/${credit.name}`,
"_dash_": (credit) => `https://dashblocks.org/user#${credit.name}`
"_penguinmod_": (credit) => `https://penguinmod.com/profile?user=${credit.name}`,
"_dash_": (credit) => `https://dashblocks.org/user#${credit.name}`
};
const creditLink = (credit) => credit.link;

function getBannerUrl (banner) {
if (!banner) return `https://dashblocks.org/extensions/static/images/unknown.svg`;
if (!banner) return `https://genesis-ide.github.io/extensions/static/images/unknown.svg`;
if (banner.startsWith("http://") || banner.startsWith("https://")) return banner;
return `https://dashblocks.org/extensions/static/images/${banner}`;
return `https://genesis-ide.github.io/extensions/static/images/${banner}`;
}

function getCodeUrl (code) {
if (!code) return "#";
if (code.startsWith("http://") || code.startsWith("https://")) return code;
return `https://dashblocks.org/extensions/static/extensions/${code}`;
return `https://genesis-ide.github.io/extensions/static/extensions/${code}`;
}

function getCreatorNode (creator) {
Expand Down Expand Up @@ -71,7 +72,7 @@ export default function ExtensionsGallery () {
return (
<>
<header className="ext-gallery-header">
<h1>Dash Extensions Gallery</h1>
<h1>Genesis IDE Extensions Gallery</h1>
<div className="ext-controls">
<input
className="ext-search"
Expand All @@ -93,8 +94,8 @@ export default function ExtensionsGallery () {
<div className="ext-gallery-root">
<main>
<div className="ext-infobox">
<div className="ext-infobox-title">Some extensions will work only in Dash.</div>
Extensions will likely not work in other mods than Dash if they:
<div className="ext-infobox-title">Some extensions will not work other Scratch Mods.</div>
Extensions will likely not work in other Scratch mods if they:
<ul>
<li>Rely on Arrays or Objects,</li>
<li>Use generator functions (function*) as serializers/deserializers of custom types,</li>
Expand Down Expand Up @@ -149,19 +150,11 @@ export default function ExtensionsGallery () {
<button
className="ext-btn ext-btn-accented"
onClick={() => {
window.open("https://dashblocks.org/editor?extension=" + getCodeUrl(ext.code), "_blank");
window.open("https://genesis-ide.github.io/editor?extension=" + getCodeUrl(ext.code), "_blank");
}}
>
Open Extension
</button>
<button
className="ext-btn"
onClick={() => {
window.open("https://dashblocks.org/scratch-gui/editor?enabletests&extension=" + getCodeUrl(ext.code), "_blank");
}}
>
...in Dev
</button>
<button
className="ext-btn ext-btn-accented"
onClick={() => {
Expand Down
Loading