pxt-core 8.6.2 → 8.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/built/pxteditor.d.ts +1 -1
- package/built/target.js +1 -1
- package/built/web/main.js +1 -1
- package/built/web/skillmap/js/{main.a715c76c.js → main.2dfa3448.js} +2 -2
- package/package.json +1 -1
- package/react-common/components/share/Share.tsx +3 -3
- package/react-common/components/share/ShareInfo.tsx +18 -6
- package/webapp/public/skillmap.html +1 -1
package/package.json
CHANGED
|
@@ -23,7 +23,7 @@ export interface ShareProps {
|
|
|
23
23
|
hasProjectBeenPersistentShared?: boolean;
|
|
24
24
|
anonymousShareByDefault?: boolean;
|
|
25
25
|
isMultiplayerGame?: boolean; // Arcade: Does the game being shared have multiplayer enabled?
|
|
26
|
-
|
|
26
|
+
kind?: "multiplayer" | "vscode" | "share"; // Arcade: Was the share dialog opened specifically for hosting a multiplayer game?
|
|
27
27
|
setAnonymousSharePreference?: (anonymousByDefault: boolean) => void;
|
|
28
28
|
simRecorder: SimRecorder;
|
|
29
29
|
publishAsync: (name: string, screenshotUri?: string, forceAnonymous?: boolean) => Promise<ShareData>;
|
|
@@ -41,7 +41,7 @@ export const Share = (props: ShareProps) => {
|
|
|
41
41
|
anonymousShareByDefault,
|
|
42
42
|
setAnonymousSharePreference,
|
|
43
43
|
isMultiplayerGame,
|
|
44
|
-
|
|
44
|
+
kind,
|
|
45
45
|
onClose
|
|
46
46
|
} = props;
|
|
47
47
|
|
|
@@ -52,7 +52,7 @@ export const Share = (props: ShareProps) => {
|
|
|
52
52
|
simRecorder={simRecorder}
|
|
53
53
|
publishAsync={publishAsync}
|
|
54
54
|
isMultiplayerGame={isMultiplayerGame}
|
|
55
|
-
|
|
55
|
+
kind={kind}
|
|
56
56
|
hasProjectBeenPersistentShared={hasProjectBeenPersistentShared}
|
|
57
57
|
anonymousShareByDefault={anonymousShareByDefault}
|
|
58
58
|
setAnonymousSharePreference={setAnonymousSharePreference}
|
|
@@ -13,6 +13,7 @@ import { SimRecorder } from "./ThumbnailRecorder";
|
|
|
13
13
|
import { MultiplayerConfirmation } from "./MultiplayerConfirmation";
|
|
14
14
|
import { addGameToKioskAsync } from "./Kiosk";
|
|
15
15
|
import { pushNotificationMessage } from "../Notification";
|
|
16
|
+
import { classList } from "../util";
|
|
16
17
|
|
|
17
18
|
export interface ShareInfoProps {
|
|
18
19
|
projectName: string;
|
|
@@ -23,7 +24,7 @@ export interface ShareInfoProps {
|
|
|
23
24
|
simRecorder: SimRecorder;
|
|
24
25
|
publishAsync: (name: string, screenshotUri?: string, forceAnonymous?: boolean) => Promise<ShareData>;
|
|
25
26
|
isMultiplayerGame?: boolean; // Arcade: Does the game being shared have multiplayer enabled?
|
|
26
|
-
|
|
27
|
+
kind?: "multiplayer" | "vscode" | "share"; // Arcade: Was the share dialog opened specifically for hosting a multiplayer game?
|
|
27
28
|
anonymousShareByDefault?: boolean;
|
|
28
29
|
setAnonymousSharePreference?: (anonymousByDefault: boolean) => void;
|
|
29
30
|
onClose: () => void;
|
|
@@ -41,7 +42,7 @@ export const ShareInfo = (props: ShareInfoProps) => {
|
|
|
41
42
|
anonymousShareByDefault,
|
|
42
43
|
setAnonymousSharePreference,
|
|
43
44
|
isMultiplayerGame,
|
|
44
|
-
|
|
45
|
+
kind,
|
|
45
46
|
onClose,
|
|
46
47
|
} = props;
|
|
47
48
|
const [ name, setName ] = React.useState(projectName);
|
|
@@ -236,7 +237,7 @@ export const ShareInfo = (props: ShareInfoProps) => {
|
|
|
236
237
|
if (!publishedShareData?.error) setShareState("publish");
|
|
237
238
|
else setShareState("share")
|
|
238
239
|
|
|
239
|
-
if (
|
|
240
|
+
if (kind === "multiplayer") {
|
|
240
241
|
// If we're in the "for multiplayer" context, we want to close the share dialog after launching the multiplayer session.
|
|
241
242
|
onClose();
|
|
242
243
|
}
|
|
@@ -350,18 +351,29 @@ export const ShareInfo = (props: ShareInfoProps) => {
|
|
|
350
351
|
<div className="project-share-publish-actions">
|
|
351
352
|
{shareState === "share" &&
|
|
352
353
|
<>
|
|
353
|
-
{pxt.appTarget?.appTheme?.multiplayer && (isMultiplayerGame ||
|
|
354
|
-
<Button className={
|
|
354
|
+
{pxt.appTarget?.appTheme?.multiplayer && (isMultiplayerGame || kind === "multiplayer") &&
|
|
355
|
+
<Button className={
|
|
356
|
+
classList(
|
|
357
|
+
"primary share-host-button",
|
|
358
|
+
kind === "share" && "primary inverted text-only",
|
|
359
|
+
kind === "multiplayer" && "share-publish-button"
|
|
360
|
+
)
|
|
361
|
+
}
|
|
355
362
|
title={lf("Host a multiplayer game")}
|
|
356
363
|
label={lf("Host a multiplayer game")}
|
|
357
364
|
leftIcon={"xicon multiplayer"}
|
|
358
365
|
onClick={handleMultiplayerShareClick} />
|
|
359
366
|
}
|
|
360
|
-
{
|
|
367
|
+
{kind === "share" && <Button className="primary share-publish-button"
|
|
361
368
|
title={lf("Share Project")}
|
|
362
369
|
label={lf("Share Project")}
|
|
363
370
|
onClick={handlePublishClick} />
|
|
364
371
|
}
|
|
372
|
+
{kind === "vscode" && <Button className="primary share-publish-button"
|
|
373
|
+
title={lf("Open in VS Code")}
|
|
374
|
+
label={lf("Open in VS Code")}
|
|
375
|
+
onClick={handlePublishClick} />
|
|
376
|
+
}
|
|
365
377
|
</>
|
|
366
378
|
}
|
|
367
379
|
{ shareState === "publishing" &&
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
<link rel="stylesheet" data-rtl="/blb/rtlsemantic.css" href="/blb/semantic.css">
|
|
8
8
|
<link rel="stylesheet" href="/blb/icons.css">
|
|
9
9
|
<link rel="stylesheet" href="/blb/react-common-skillmap.css">
|
|
10
|
-
<script defer="defer" src="/blb/skillmap/js/main.
|
|
10
|
+
<script defer="defer" src="/blb/skillmap/js/main.2dfa3448.js"></script><link href="/blb/skillmap/css/main.06a18ee8.css" rel="stylesheet"></head>
|
|
11
11
|
<body>
|
|
12
12
|
<noscript>You need to enable JavaScript to run this app.</noscript>
|
|
13
13
|
|