From b0c79122cb321f3299f3b58a8aced479f1e86926 Mon Sep 17 00:00:00 2001 From: Salman Faris Date: Fri, 12 Jun 2026 23:21:16 +0530 Subject: [PATCH 01/16] add screenly_inject.js method --- edge-apps/puzzle-dashboard/index.html | 49 ++++++++++++++ edge-apps/puzzle-dashboard/screenly.yml | 40 ++++++++++++ edge-apps/puzzle-dashboard/screenly_inject.js | 65 +++++++++++++++++++ 3 files changed, 154 insertions(+) create mode 100644 edge-apps/puzzle-dashboard/index.html create mode 100644 edge-apps/puzzle-dashboard/screenly.yml create mode 100644 edge-apps/puzzle-dashboard/screenly_inject.js diff --git a/edge-apps/puzzle-dashboard/index.html b/edge-apps/puzzle-dashboard/index.html new file mode 100644 index 000000000..0fbcd44bf --- /dev/null +++ b/edge-apps/puzzle-dashboard/index.html @@ -0,0 +1,49 @@ + + + + + + Puzzle Dashboard - Screenly Edge App + + + + + + + + + + diff --git a/edge-apps/puzzle-dashboard/screenly.yml b/edge-apps/puzzle-dashboard/screenly.yml new file mode 100644 index 000000000..cd5eb0233 --- /dev/null +++ b/edge-apps/puzzle-dashboard/screenly.yml @@ -0,0 +1,40 @@ +--- +syntax: manifest_v1 +id: +description: Puzzle Dashboard +icon: https://playground.srly.io/edge-apps/puzzle-dashboard/static/img/icon.svg +author: Screenly, Inc. +categories: + - Dashboards +ready_signal: true +settings: + dashboard_url: + type: string + title: Dashboard URL + optional: false + default_value: "" + help_text: + schema_version: 1 + properties: + help_text: The URL of the dashboard to display. + type: url + username: + type: string + title: Username + optional: false + default_value: "" + help_text: + schema_version: 1 + properties: + help_text: The username used to log in to the dashboard. + type: string + password: + type: secret + title: Password + optional: false + default_value: "" + help_text: + schema_version: 1 + properties: + help_text: The password used to log in to the dashboard. + type: string diff --git a/edge-apps/puzzle-dashboard/screenly_inject.js b/edge-apps/puzzle-dashboard/screenly_inject.js new file mode 100644 index 000000000..7e5cefb12 --- /dev/null +++ b/edge-apps/puzzle-dashboard/screenly_inject.js @@ -0,0 +1,65 @@ +(function (settings) { + var username = settings.username; + var password = settings.password; + + function fillAndSubmit() { + var usernameField = + document.querySelector('input[name="username"]') || + document.querySelector('input[type="text"]') || + document.querySelector('input[name="email"]') || + document.querySelector('input[type="email"]'); + + var passwordField = + document.querySelector('input[name="password"]') || + document.querySelector('input[type="password"]'); + + if (!usernameField || !passwordField) { + return false; + } + + usernameField.value = username; + usernameField.dispatchEvent(new Event('input', { bubbles: true })); + usernameField.dispatchEvent(new Event('change', { bubbles: true })); + + passwordField.value = password; + passwordField.dispatchEvent(new Event('input', { bubbles: true })); + passwordField.dispatchEvent(new Event('change', { bubbles: true })); + + var form = passwordField.closest('form') || usernameField.closest('form'); + if (form) { + form.submit(); + } else { + var submitButton = + document.querySelector('button[type="submit"]') || + document.querySelector('input[type="submit"]') || + document.querySelector('button'); + if (submitButton) { + submitButton.click(); + } else { + console.log('[screenly_inject] No submit button found, cannot submit form.'); + } + } + + return true; + } + + function tryFill() { + if (fillAndSubmit()) { + return; + } + + var observer = new MutationObserver(function () { + if (fillAndSubmit()) { + observer.disconnect(); + } + }); + + observer.observe(document.body, { childList: true, subtree: true }); + } + + if (document.readyState === 'loading') { + document.addEventListener('DOMContentLoaded', tryFill); + } else { + tryFill(); + } +})(screenly_settings); From f0688e72f07d29c87680a278f41ea7ae44558390 Mon Sep 17 00:00:00 2001 From: Salman Faris Date: Fri, 12 Jun 2026 23:26:11 +0530 Subject: [PATCH 02/16] fix(puzzle-dashboard): update screenly_inject.js and add README - Remove IIFE wrapper and DOMContentLoaded listener (player runs inject after page load) - Add setValue, setReactValue, and onPath helpers from CLI template - Target Puzzle Auth0 login page with confirmed selectors (#username, #password, button[data-action-button-primary="true"]) - Add minimal README Co-Authored-By: Claude Sonnet 4.6 --- edge-apps/puzzle-dashboard/README.md | 34 ++++++ edge-apps/puzzle-dashboard/screenly_inject.js | 104 ++++++++---------- 2 files changed, 77 insertions(+), 61 deletions(-) create mode 100644 edge-apps/puzzle-dashboard/README.md diff --git a/edge-apps/puzzle-dashboard/README.md b/edge-apps/puzzle-dashboard/README.md new file mode 100644 index 000000000..dbc7b163e --- /dev/null +++ b/edge-apps/puzzle-dashboard/README.md @@ -0,0 +1,34 @@ +# Puzzle Dashboard + +A Screenly Edge App that embeds an external web dashboard in a full-screen iframe and automatically fills the login form using injected credentials. + +## How it works + +1. The player loads `index.html`, which renders a full-screen iframe pointing at the configured `dashboard_url`. +2. On each load the player injects `screenly_inject.js` into the dashboard page and supplies the configured credentials via `screenly_settings`. +3. The inject script locates the username and password fields, fills them, and submits the form — no manual login required on the screen. + +## Settings + +| Key | Type | Description | +|---|---|---| +| `dashboard_url` | string (URL) | The URL of the dashboard to display | +| `username` | string | Login username | +| `password` | secret | Login password (stored encrypted) | + +## Customising the inject script + +`screenly_inject.js` targets common login-form selectors out of the box. If your dashboard uses non-standard field names or a React-controlled form, edit the selectors at the top of the file or switch from `setValue` to `setReactValue`. + +To target a specific login path only (useful when the dashboard redirects to `/login`), wrap the call with the `onPath` helper: + +```js +onPath('/login', fillLoginForm); +``` + +## Deploying + +```shell +screenly edge-app create --name puzzle-dashboard --in-place +screenly edge-app deploy +``` diff --git a/edge-apps/puzzle-dashboard/screenly_inject.js b/edge-apps/puzzle-dashboard/screenly_inject.js index 7e5cefb12..39a0fbbfe 100644 --- a/edge-apps/puzzle-dashboard/screenly_inject.js +++ b/edge-apps/puzzle-dashboard/screenly_inject.js @@ -1,65 +1,47 @@ -(function (settings) { - var username = settings.username; - var password = settings.password; - - function fillAndSubmit() { - var usernameField = - document.querySelector('input[name="username"]') || - document.querySelector('input[type="text"]') || - document.querySelector('input[name="email"]') || - document.querySelector('input[type="email"]'); - - var passwordField = - document.querySelector('input[name="password"]') || - document.querySelector('input[type="password"]'); - - if (!usernameField || !passwordField) { - return false; - } - - usernameField.value = username; - usernameField.dispatchEvent(new Event('input', { bubbles: true })); - usernameField.dispatchEvent(new Event('change', { bubbles: true })); - - passwordField.value = password; - passwordField.dispatchEvent(new Event('input', { bubbles: true })); - passwordField.dispatchEvent(new Event('change', { bubbles: true })); - - var form = passwordField.closest('form') || usernameField.closest('form'); - if (form) { - form.submit(); - } else { - var submitButton = - document.querySelector('button[type="submit"]') || - document.querySelector('input[type="submit"]') || - document.querySelector('button'); - if (submitButton) { - submitButton.click(); - } else { - console.log('[screenly_inject] No submit button found, cannot submit form.'); - } - } - - return true; - } - - function tryFill() { - if (fillAndSubmit()) { - return; - } - - var observer = new MutationObserver(function () { - if (fillAndSubmit()) { - observer.disconnect(); - } - }); - - observer.observe(document.body, { childList: true, subtree: true }); +// Injected by the player into the dashboard page on every load. +// `screenly_settings` is provided by the player — no import needed. +// This script runs AFTER the page has fully loaded; DOMContentLoaded has +// already fired. Manipulate the DOM directly. + +// Set an input's value and notify change listeners. +function setValue(selector, value) { + const el = document.querySelector(selector); + if (!el) return false; + el.value = value; + el.dispatchEvent(new Event('change', { bubbles: true })); + return true; +} + +// Set an input's value through the native setter so React-based dashboards +// pick it up. Use this when setValue doesn't take effect. +function setReactValue(selector, value) { + const el = document.querySelector(selector); + if (!el) return false; + const setter = Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, 'value').set; + setter.call(el, value); + el.dispatchEvent(new Event('input', { bubbles: true })); + return true; +} + +// Run fn only when the current path matches path. +function onPath(path, fn) { + if (location.pathname === path) fn(); +} + +// ---- Puzzle (Auth0 Universal Login) ---------------------------------------- +// Selectors confirmed against https://auth.puzzle.io/u/login + +onPath('/u/login', () => { + if (!setValue('#username', screenly_settings.username) || + !setValue('#password', screenly_settings.password)) { + console.log('[screenly_inject] Login fields not found.'); + return; } - if (document.readyState === 'loading') { - document.addEventListener('DOMContentLoaded', tryFill); + const submitBtn = document.querySelector('button[data-action-button-primary="true"]'); + if (submitBtn) { + submitBtn.click(); } else { - tryFill(); + console.log('[screenly_inject] Submit button not found.'); } -})(screenly_settings); +}); From d8aed9920fd0c212c2479e689114d2a0f831f891 Mon Sep 17 00:00:00 2001 From: Salman Faris Date: Fri, 12 Jun 2026 23:27:07 +0530 Subject: [PATCH 03/16] docs(puzzle-dashboard): update README with Puzzle-specific details - Link to puzzle.io and mention Auth0 Universal Login - Replace generic customisation section with confirmed login page selectors - Clarify username/password field descriptions Co-Authored-By: Claude Sonnet 4.6 --- edge-apps/puzzle-dashboard/README.md | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/edge-apps/puzzle-dashboard/README.md b/edge-apps/puzzle-dashboard/README.md index dbc7b163e..ed633ddd5 100644 --- a/edge-apps/puzzle-dashboard/README.md +++ b/edge-apps/puzzle-dashboard/README.md @@ -1,30 +1,32 @@ # Puzzle Dashboard -A Screenly Edge App that embeds an external web dashboard in a full-screen iframe and automatically fills the login form using injected credentials. +A Screenly Edge App that embeds the [Puzzle](https://www.puzzle.io/) dashboard in a full-screen iframe and automatically logs in using injected credentials. ## How it works 1. The player loads `index.html`, which renders a full-screen iframe pointing at the configured `dashboard_url`. 2. On each load the player injects `screenly_inject.js` into the dashboard page and supplies the configured credentials via `screenly_settings`. -3. The inject script locates the username and password fields, fills them, and submits the form — no manual login required on the screen. +3. The inject script detects the Auth0 Universal Login page (`/u/login`), fills the username and password fields, and clicks the submit button — no manual login required on the screen. ## Settings | Key | Type | Description | |---|---|---| -| `dashboard_url` | string (URL) | The URL of the dashboard to display | -| `username` | string | Login username | -| `password` | secret | Login password (stored encrypted) | +| `dashboard_url` | string (URL) | The URL of the Puzzle dashboard to display | +| `username` | string | Puzzle account email | +| `password` | secret | Puzzle account password (stored encrypted) | -## Customising the inject script +## Login page selectors -`screenly_inject.js` targets common login-form selectors out of the box. If your dashboard uses non-standard field names or a React-controlled form, edit the selectors at the top of the file or switch from `setValue` to `setReactValue`. +The inject script targets the Puzzle Auth0 login page at `https://auth.puzzle.io/u/login`: -To target a specific login path only (useful when the dashboard redirects to `/login`), wrap the call with the `onPath` helper: +| Field | Selector | +|---|---| +| Email | `#username` | +| Password | `#password` | +| Submit | `button[data-action-button-primary="true"]` | -```js -onPath('/login', fillLoginForm); -``` +The `button[data-action-button-primary="true"]` selector is intentional — it targets only the email/password submit button and avoids the Google SSO and Rippling SSO buttons also present on the page. ## Deploying From 1eadf1dc563518366584cd0957c98768d0852d43 Mon Sep 17 00:00:00 2001 From: Nico Miguelino Date: Fri, 12 Jun 2026 11:26:06 -0700 Subject: [PATCH 04/16] style(puzzle-dashboard): fix Prettier formatting errors - Reformat markdown table alignment in README - Remove semicolons and reformat JS in index.html - Use single quotes in screenly.yml - Reformat screenly_inject.js for Prettier compliance --- edge-apps/puzzle-dashboard/README.md | 18 +++---- edge-apps/puzzle-dashboard/index.html | 17 ++++--- edge-apps/puzzle-dashboard/screenly.yml | 6 +-- edge-apps/puzzle-dashboard/screenly_inject.js | 47 +++++++++++-------- 4 files changed, 50 insertions(+), 38 deletions(-) diff --git a/edge-apps/puzzle-dashboard/README.md b/edge-apps/puzzle-dashboard/README.md index ed633ddd5..8c02a3c82 100644 --- a/edge-apps/puzzle-dashboard/README.md +++ b/edge-apps/puzzle-dashboard/README.md @@ -10,21 +10,21 @@ A Screenly Edge App that embeds the [Puzzle](https://www.puzzle.io/) dashboard i ## Settings -| Key | Type | Description | -|---|---|---| +| Key | Type | Description | +| --------------- | ------------ | ------------------------------------------ | | `dashboard_url` | string (URL) | The URL of the Puzzle dashboard to display | -| `username` | string | Puzzle account email | -| `password` | secret | Puzzle account password (stored encrypted) | +| `username` | string | Puzzle account email | +| `password` | secret | Puzzle account password (stored encrypted) | ## Login page selectors The inject script targets the Puzzle Auth0 login page at `https://auth.puzzle.io/u/login`: -| Field | Selector | -|---|---| -| Email | `#username` | -| Password | `#password` | -| Submit | `button[data-action-button-primary="true"]` | +| Field | Selector | +| -------- | ------------------------------------------- | +| Email | `#username` | +| Password | `#password` | +| Submit | `button[data-action-button-primary="true"]` | The `button[data-action-button-primary="true"]` selector is intentional — it targets only the email/password submit button and avoids the Google SSO and Rippling SSO buttons also present on the page. diff --git a/edge-apps/puzzle-dashboard/index.html b/edge-apps/puzzle-dashboard/index.html index 0fbcd44bf..e676da430 100644 --- a/edge-apps/puzzle-dashboard/index.html +++ b/edge-apps/puzzle-dashboard/index.html @@ -30,20 +30,25 @@ - + diff --git a/edge-apps/puzzle-dashboard/screenly.yml b/edge-apps/puzzle-dashboard/screenly.yml index cd5eb0233..718bb5982 100644 --- a/edge-apps/puzzle-dashboard/screenly.yml +++ b/edge-apps/puzzle-dashboard/screenly.yml @@ -12,7 +12,7 @@ settings: type: string title: Dashboard URL optional: false - default_value: "" + default_value: '' help_text: schema_version: 1 properties: @@ -22,7 +22,7 @@ settings: type: string title: Username optional: false - default_value: "" + default_value: '' help_text: schema_version: 1 properties: @@ -32,7 +32,7 @@ settings: type: secret title: Password optional: false - default_value: "" + default_value: '' help_text: schema_version: 1 properties: diff --git a/edge-apps/puzzle-dashboard/screenly_inject.js b/edge-apps/puzzle-dashboard/screenly_inject.js index 39a0fbbfe..66ae6417d 100644 --- a/edge-apps/puzzle-dashboard/screenly_inject.js +++ b/edge-apps/puzzle-dashboard/screenly_inject.js @@ -5,43 +5,50 @@ // Set an input's value and notify change listeners. function setValue(selector, value) { - const el = document.querySelector(selector); - if (!el) return false; - el.value = value; - el.dispatchEvent(new Event('change', { bubbles: true })); - return true; + const el = document.querySelector(selector) + if (!el) return false + el.value = value + el.dispatchEvent(new Event('change', { bubbles: true })) + return true } // Set an input's value through the native setter so React-based dashboards // pick it up. Use this when setValue doesn't take effect. function setReactValue(selector, value) { - const el = document.querySelector(selector); - if (!el) return false; - const setter = Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, 'value').set; - setter.call(el, value); - el.dispatchEvent(new Event('input', { bubbles: true })); - return true; + const el = document.querySelector(selector) + if (!el) return false + const setter = Object.getOwnPropertyDescriptor( + HTMLInputElement.prototype, + 'value', + ).set + setter.call(el, value) + el.dispatchEvent(new Event('input', { bubbles: true })) + return true } // Run fn only when the current path matches path. function onPath(path, fn) { - if (location.pathname === path) fn(); + if (location.pathname === path) fn() } // ---- Puzzle (Auth0 Universal Login) ---------------------------------------- // Selectors confirmed against https://auth.puzzle.io/u/login onPath('/u/login', () => { - if (!setValue('#username', screenly_settings.username) || - !setValue('#password', screenly_settings.password)) { - console.log('[screenly_inject] Login fields not found.'); - return; + if ( + !setValue('#username', screenly_settings.username) || + !setValue('#password', screenly_settings.password) + ) { + console.log('[screenly_inject] Login fields not found.') + return } - const submitBtn = document.querySelector('button[data-action-button-primary="true"]'); + const submitBtn = document.querySelector( + 'button[data-action-button-primary="true"]', + ) if (submitBtn) { - submitBtn.click(); + submitBtn.click() } else { - console.log('[screenly_inject] Submit button not found.'); + console.log('[screenly_inject] Submit button not found.') } -}); +}) From 97199b6d4656006b36179939aa8300dcf608dc02 Mon Sep 17 00:00:00 2001 From: Salman Faris Date: Fri, 12 Jun 2026 23:57:52 +0530 Subject: [PATCH 05/16] lint fixes --- edge-apps/puzzle-dashboard/README.md | 31 ++++----- edge-apps/puzzle-dashboard/index.html | 4 +- edge-apps/puzzle-dashboard/screenly.yml | 4 +- edge-apps/puzzle-dashboard/screenly_inject.js | 65 +++++++++---------- 4 files changed, 50 insertions(+), 54 deletions(-) diff --git a/edge-apps/puzzle-dashboard/README.md b/edge-apps/puzzle-dashboard/README.md index 8c02a3c82..56e0d2973 100644 --- a/edge-apps/puzzle-dashboard/README.md +++ b/edge-apps/puzzle-dashboard/README.md @@ -1,32 +1,33 @@ -# Puzzle Dashboard +# Puzzel Dashboard -A Screenly Edge App that embeds the [Puzzle](https://www.puzzle.io/) dashboard in a full-screen iframe and automatically logs in using injected credentials. +A Screenly Edge App that embeds the [Puzzel](https://www.puzzel.com/) admin dashboard in a full-screen iframe and automatically logs in using injected credentials. ## How it works 1. The player loads `index.html`, which renders a full-screen iframe pointing at the configured `dashboard_url`. 2. On each load the player injects `screenly_inject.js` into the dashboard page and supplies the configured credentials via `screenly_settings`. -3. The inject script detects the Auth0 Universal Login page (`/u/login`), fills the username and password fields, and clicks the submit button — no manual login required on the screen. +3. The inject script detects the Puzzel login pages by their input field IDs and fills them automatically — no manual login required on the screen. ## Settings -| Key | Type | Description | -| --------------- | ------------ | ------------------------------------------ | -| `dashboard_url` | string (URL) | The URL of the Puzzle dashboard to display | -| `username` | string | Puzzle account email | -| `password` | secret | Puzzle account password (stored encrypted) | +| Key | Type | Description | +| --------------- | ------------ | ----------------------------------------------------------------------------------------- | +| `dashboard_url` | string (URL) | The URL of the Puzzel dashboard to display (default: `https://app.puzzel.com/admin/app/dashboard`) | +| `username` | string | Puzzel account email (Puzzel ID) | +| `password` | secret | Puzzel account password (stored encrypted) | ## Login page selectors -The inject script targets the Puzzle Auth0 login page at `https://auth.puzzle.io/u/login`: +The inject script handles Puzzel's two-step login at `https://app.puzzel.com/id/Account/Login`: -| Field | Selector | -| -------- | ------------------------------------------- | -| Email | `#username` | -| Password | `#password` | -| Submit | `button[data-action-button-primary="true"]` | +| Step | Field | Selector | +| ------------ | ----------------- | -------------------------------------------------- | +| 1 – Username | Puzzel ID (email) | `#Input_Username` | +| 1 – Submit | Next button | `button.submit-button[type="submit"]:not(.hidden)` | +| 2 – Password | Password | `#Input_Password` | +| 2 – Submit | Sign-in button | `button.submit-button[type="submit"]:not(.hidden)` | -The `button[data-action-button-primary="true"]` selector is intentional — it targets only the email/password submit button and avoids the Google SSO and Rippling SSO buttons also present on the page. +The script detects which step is active by checking for the presence of `#Input_Username` or `#Input_Password` — no path matching required. ## Deploying diff --git a/edge-apps/puzzle-dashboard/index.html b/edge-apps/puzzle-dashboard/index.html index e676da430..2422d1646 100644 --- a/edge-apps/puzzle-dashboard/index.html +++ b/edge-apps/puzzle-dashboard/index.html @@ -3,7 +3,7 @@ - Puzzle Dashboard - Screenly Edge App + Puzzel Dashboard - Screenly Edge App + @@ -38,17 +16,6 @@ > - + diff --git a/edge-apps/puzzle-dashboard/static/css/style.css b/edge-apps/puzzle-dashboard/static/css/style.css new file mode 100644 index 000000000..918bb9f51 --- /dev/null +++ b/edge-apps/puzzle-dashboard/static/css/style.css @@ -0,0 +1,21 @@ +*, +*::before, +*::after { + box-sizing: border-box; + margin: 0; + padding: 0; +} + +html, +body { + width: 100%; + height: 100%; + overflow: hidden; +} + +iframe { + display: block; + width: 100%; + height: 100%; + border: none; +} diff --git a/edge-apps/puzzle-dashboard/static/js/main.js b/edge-apps/puzzle-dashboard/static/js/main.js new file mode 100644 index 000000000..1dc3b766e --- /dev/null +++ b/edge-apps/puzzle-dashboard/static/js/main.js @@ -0,0 +1,12 @@ +/* global screenly */ + +document.addEventListener('DOMContentLoaded', async () => { + const settings = await screenly.settings + const url = settings.dashboard_url + + if (url) { + document.getElementById('dashboard').src = url + } + + screenly.signalReadyForRendering() +}) From b2947bf87ec45fa528d213f8e056baae5b80b9c5 Mon Sep 17 00:00:00 2001 From: Salman Faris Date: Sat, 13 Jun 2026 00:37:45 +0530 Subject: [PATCH 09/16] rename(puzzel-dashboard): rename directory and references from puzzle to puzzel - Rename edge-apps/puzzle-dashboard to edge-apps/puzzel-dashboard - Update deploy command name in README - Update icon URL in screenly.yml Co-Authored-By: Claude Sonnet 4.6 --- edge-apps/{puzzle-dashboard => puzzel-dashboard}/README.md | 2 +- edge-apps/{puzzle-dashboard => puzzel-dashboard}/index.html | 0 edge-apps/{puzzle-dashboard => puzzel-dashboard}/screenly.yml | 2 +- .../{puzzle-dashboard => puzzel-dashboard}/screenly_inject.js | 0 .../{puzzle-dashboard => puzzel-dashboard}/static/css/style.css | 0 .../{puzzle-dashboard => puzzel-dashboard}/static/js/main.js | 0 6 files changed, 2 insertions(+), 2 deletions(-) rename edge-apps/{puzzle-dashboard => puzzel-dashboard}/README.md (97%) rename edge-apps/{puzzle-dashboard => puzzel-dashboard}/index.html (100%) rename edge-apps/{puzzle-dashboard => puzzel-dashboard}/screenly.yml (93%) rename edge-apps/{puzzle-dashboard => puzzel-dashboard}/screenly_inject.js (100%) rename edge-apps/{puzzle-dashboard => puzzel-dashboard}/static/css/style.css (100%) rename edge-apps/{puzzle-dashboard => puzzel-dashboard}/static/js/main.js (100%) diff --git a/edge-apps/puzzle-dashboard/README.md b/edge-apps/puzzel-dashboard/README.md similarity index 97% rename from edge-apps/puzzle-dashboard/README.md rename to edge-apps/puzzel-dashboard/README.md index a0055b60c..5c3cebb60 100644 --- a/edge-apps/puzzle-dashboard/README.md +++ b/edge-apps/puzzel-dashboard/README.md @@ -32,6 +32,6 @@ The script detects which step is active by checking for the presence of `#Input_ ## Deploying ```shell -screenly edge-app create --name puzzle-dashboard --in-place +screenly edge-app create --name puzzel-dashboard --in-place screenly edge-app deploy ``` diff --git a/edge-apps/puzzle-dashboard/index.html b/edge-apps/puzzel-dashboard/index.html similarity index 100% rename from edge-apps/puzzle-dashboard/index.html rename to edge-apps/puzzel-dashboard/index.html diff --git a/edge-apps/puzzle-dashboard/screenly.yml b/edge-apps/puzzel-dashboard/screenly.yml similarity index 93% rename from edge-apps/puzzle-dashboard/screenly.yml rename to edge-apps/puzzel-dashboard/screenly.yml index c3d274c4f..79b5a0517 100644 --- a/edge-apps/puzzle-dashboard/screenly.yml +++ b/edge-apps/puzzel-dashboard/screenly.yml @@ -2,7 +2,7 @@ syntax: manifest_v1 id: description: Puzzel Dashboard -icon: https://playground.srly.io/edge-apps/puzzle-dashboard/static/img/icon.svg +icon: https://playground.srly.io/edge-apps/puzzel-dashboard/static/img/icon.svg author: Screenly, Inc. categories: - Dashboards diff --git a/edge-apps/puzzle-dashboard/screenly_inject.js b/edge-apps/puzzel-dashboard/screenly_inject.js similarity index 100% rename from edge-apps/puzzle-dashboard/screenly_inject.js rename to edge-apps/puzzel-dashboard/screenly_inject.js diff --git a/edge-apps/puzzle-dashboard/static/css/style.css b/edge-apps/puzzel-dashboard/static/css/style.css similarity index 100% rename from edge-apps/puzzle-dashboard/static/css/style.css rename to edge-apps/puzzel-dashboard/static/css/style.css diff --git a/edge-apps/puzzle-dashboard/static/js/main.js b/edge-apps/puzzel-dashboard/static/js/main.js similarity index 100% rename from edge-apps/puzzle-dashboard/static/js/main.js rename to edge-apps/puzzel-dashboard/static/js/main.js From f3f07c910c2d72014779a34b923193999f3b1d63 Mon Sep 17 00:00:00 2001 From: Salman Faris Date: Sat, 13 Jun 2026 00:41:42 +0530 Subject: [PATCH 10/16] added icon --- edge-apps/puzzel-dashboard/static/img/icon.svg | 1 + 1 file changed, 1 insertion(+) create mode 100644 edge-apps/puzzel-dashboard/static/img/icon.svg diff --git a/edge-apps/puzzel-dashboard/static/img/icon.svg b/edge-apps/puzzel-dashboard/static/img/icon.svg new file mode 100644 index 000000000..0cc6879f4 --- /dev/null +++ b/edge-apps/puzzel-dashboard/static/img/icon.svg @@ -0,0 +1 @@ + \ No newline at end of file From ae9d8ec9c375c99b463c58ab71d6e792f727d62a Mon Sep 17 00:00:00 2001 From: Salman Faris Date: Sat, 13 Jun 2026 00:56:59 +0530 Subject: [PATCH 11/16] Update edge-apps/puzzel-dashboard/screenly.yml Co-authored-by: Nico Miguelino --- edge-apps/puzzel-dashboard/screenly.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/edge-apps/puzzel-dashboard/screenly.yml b/edge-apps/puzzel-dashboard/screenly.yml index 79b5a0517..978cdd10b 100644 --- a/edge-apps/puzzel-dashboard/screenly.yml +++ b/edge-apps/puzzel-dashboard/screenly.yml @@ -18,23 +18,23 @@ settings: properties: help_text: The URL of the dashboard to display. type: url - username: - type: string - title: Puzzel ID + password: + type: secret + title: Password optional: false default_value: '' help_text: schema_version: 1 properties: - help_text: The username used to log in to the dashboard. + help_text: The password used to log in to the dashboard. type: string - password: - type: secret - title: Password + username: + type: string + title: Puzzel ID optional: false default_value: '' help_text: schema_version: 1 properties: - help_text: The password used to log in to the dashboard. + help_text: The username used to log in to the dashboard. type: string From 9f242c65bc92044a1122a624390ba36a1acc8cc6 Mon Sep 17 00:00:00 2001 From: Salman Faris Date: Sat, 13 Jun 2026 00:57:13 +0530 Subject: [PATCH 12/16] Update edge-apps/puzzel-dashboard/static/js/main.js Co-authored-by: Nico Miguelino --- edge-apps/puzzel-dashboard/static/js/main.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/edge-apps/puzzel-dashboard/static/js/main.js b/edge-apps/puzzel-dashboard/static/js/main.js index 1dc3b766e..c339459fe 100644 --- a/edge-apps/puzzel-dashboard/static/js/main.js +++ b/edge-apps/puzzel-dashboard/static/js/main.js @@ -6,7 +6,12 @@ document.addEventListener('DOMContentLoaded', async () => { if (url) { document.getElementById('dashboard').src = url + if (!url) { + console.error('Please specify a dashboard URL') + return } + + document.getElementById('dashboard').src = url screenly.signalReadyForRendering() }) From 31163b52156eca49a258c70bc52dd6823dec8c9a Mon Sep 17 00:00:00 2001 From: Salman Faris Date: Sat, 13 Jun 2026 00:57:30 +0530 Subject: [PATCH 13/16] Update edge-apps/puzzel-dashboard/static/js/main.js Co-authored-by: Nico Miguelino --- edge-apps/puzzel-dashboard/static/js/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/edge-apps/puzzel-dashboard/static/js/main.js b/edge-apps/puzzel-dashboard/static/js/main.js index c339459fe..f289892d2 100644 --- a/edge-apps/puzzel-dashboard/static/js/main.js +++ b/edge-apps/puzzel-dashboard/static/js/main.js @@ -1,7 +1,7 @@ /* global screenly */ document.addEventListener('DOMContentLoaded', async () => { - const settings = await screenly.settings + const settings = screenly.settings const url = settings.dashboard_url if (url) { From bd4ae41fe92bd74c5ccd501b9a37e46a80f47359 Mon Sep 17 00:00:00 2001 From: Salman Faris Date: Sat, 13 Jun 2026 00:58:08 +0530 Subject: [PATCH 14/16] added qc yml --- edge-apps/puzzel-dashboard/screenly_qc.yml | 40 ++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 edge-apps/puzzel-dashboard/screenly_qc.yml diff --git a/edge-apps/puzzel-dashboard/screenly_qc.yml b/edge-apps/puzzel-dashboard/screenly_qc.yml new file mode 100644 index 000000000..978cdd10b --- /dev/null +++ b/edge-apps/puzzel-dashboard/screenly_qc.yml @@ -0,0 +1,40 @@ +--- +syntax: manifest_v1 +id: +description: Puzzel Dashboard +icon: https://playground.srly.io/edge-apps/puzzel-dashboard/static/img/icon.svg +author: Screenly, Inc. +categories: + - Dashboards +ready_signal: true +settings: + dashboard_url: + type: string + title: Dashboard URL + optional: false + default_value: 'https://app.puzzel.com/admin/app/dashboard' + help_text: + schema_version: 1 + properties: + help_text: The URL of the dashboard to display. + type: url + password: + type: secret + title: Password + optional: false + default_value: '' + help_text: + schema_version: 1 + properties: + help_text: The password used to log in to the dashboard. + type: string + username: + type: string + title: Puzzel ID + optional: false + default_value: '' + help_text: + schema_version: 1 + properties: + help_text: The username used to log in to the dashboard. + type: string From e8a7faec869bac543ffa09b82aa442fe612c925c Mon Sep 17 00:00:00 2001 From: Salman Faris Date: Sat, 13 Jun 2026 01:00:40 +0530 Subject: [PATCH 15/16] add missing token --- edge-apps/puzzel-dashboard/static/js/main.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/edge-apps/puzzel-dashboard/static/js/main.js b/edge-apps/puzzel-dashboard/static/js/main.js index f289892d2..307986b04 100644 --- a/edge-apps/puzzel-dashboard/static/js/main.js +++ b/edge-apps/puzzel-dashboard/static/js/main.js @@ -10,8 +10,9 @@ document.addEventListener('DOMContentLoaded', async () => { console.error('Please specify a dashboard URL') return } - + document.getElementById('dashboard').src = url screenly.signalReadyForRendering() +} }) From 86511001662ca8204aa42ba2872cb48b46356b6c Mon Sep 17 00:00:00 2001 From: Nico Miguelino Date: Fri, 12 Jun 2026 15:47:50 -0700 Subject: [PATCH 16/16] fix(puzzel-dashboard): fix broken logic in main.js - Remove misplaced nested if block and duplicate src assignment - Skip ready signal when dashboard URL is not set --- edge-apps/puzzel-dashboard/static/js/main.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/edge-apps/puzzel-dashboard/static/js/main.js b/edge-apps/puzzel-dashboard/static/js/main.js index 307986b04..8a0ff5827 100644 --- a/edge-apps/puzzel-dashboard/static/js/main.js +++ b/edge-apps/puzzel-dashboard/static/js/main.js @@ -4,15 +4,11 @@ document.addEventListener('DOMContentLoaded', async () => { const settings = screenly.settings const url = settings.dashboard_url - if (url) { - document.getElementById('dashboard').src = url if (!url) { console.error('Please specify a dashboard URL') return } document.getElementById('dashboard').src = url - screenly.signalReadyForRendering() -} })