From dc8b7ecb34a34184bac5a41875387525d2ca93e8 Mon Sep 17 00:00:00 2001 From: jelveh Date: Mon, 4 Aug 2025 13:09:50 -0700 Subject: [PATCH] update app count when a new app is created --- src/dev-center/index.html | 1 + src/dev-center/js/apps.js | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/dev-center/index.html b/src/dev-center/index.html index a5a91224..1af4219d 100644 --- a/src/dev-center/index.html +++ b/src/dev-center/index.html @@ -333,6 +333,7 @@ + diff --git a/src/dev-center/js/apps.js b/src/dev-center/js/apps.js index a0da5760..f107e151 100644 --- a/src/dev-center/js/apps.js +++ b/src/dev-center/js/apps.js @@ -259,6 +259,11 @@ async function create_app(title, source_path = null, items = null) { appUID: app.uid, } ) + //---------------------------------------------------- + // Increment app count + //---------------------------------------------------- + $('.app-count').html(parseInt($('.app-count').html() ?? 0) + 1); + }).catch(async (err) => { $('#create-app-error').show(); $('#create-app-error').html(err.message); @@ -1308,7 +1313,7 @@ function count_apps() { $('.app-card').each(function () { count++; }) - $('.app-count').html(count); + $('.app-count').html(count ? count : ''); return count; }