From d9e7b5b34f28798aa6d1ba7f3c6ab4139957b94d Mon Sep 17 00:00:00 2001 From: floriankirmaier Date: Fri, 8 Mar 2024 14:25:37 +0100 Subject: [PATCH] Fixed session manager in the demo, fixed video exception in the demo --- .../main/resources/one/jpro/platform/mdfx/example/sample.md | 3 +++ .../jpro/platform/session/example/SessionManagerSample.java | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/jpro-mdfx/example/src/main/resources/one/jpro/platform/mdfx/example/sample.md b/jpro-mdfx/example/src/main/resources/one/jpro/platform/mdfx/example/sample.md index 499a2417..22188acc 100644 --- a/jpro-mdfx/example/src/main/resources/one/jpro/platform/mdfx/example/sample.md +++ b/jpro-mdfx/example/src/main/resources/one/jpro/platform/mdfx/example/sample.md @@ -104,7 +104,10 @@ public class HelloWorld { ## Images and extensions CoPilots favorite music: +``` +// doesn't work reliable on desktop, but works very well with JPro. ![alt](youtube:dQw4w9WgXcQ) +``` Some Image: ![alt](https://www.jpro.one/app/default/resourcesencoded/cp:/1/1/one/jpro/img/landing/DUKE-forward.png) diff --git a/jpro-session/example/src/main/java/one/jpro/platform/session/example/SessionManagerSample.java b/jpro-session/example/src/main/java/one/jpro/platform/session/example/SessionManagerSample.java index b438d580..4a2e0fdb 100644 --- a/jpro-session/example/src/main/java/one/jpro/platform/session/example/SessionManagerSample.java +++ b/jpro-session/example/src/main/java/one/jpro/platform/session/example/SessionManagerSample.java @@ -31,7 +31,8 @@ public void start(Stage stage) { } public Parent createRoot(Stage stage) { - ObservableMap session = sm.getSession(WebAPI.getWebAPI(stage)); + ObservableMap session = (WebAPI.isBrowser()) ? sm.getSession(WebAPI.getWebAPI(stage)) + : sm.getSession("user-session"); VBox rootPane = new VBox(); rootPane.setAlignment(Pos.CENTER);