diff --git a/src/gui/src/UI/Dashboard/TabApps.js b/src/gui/src/UI/Dashboard/TabApps.js
index 13d32e714..1d33a85d9 100644
--- a/src/gui/src/UI/Dashboard/TabApps.js
+++ b/src/gui/src/UI/Dashboard/TabApps.js
@@ -17,83 +17,89 @@
* along with this program. If not, see .
*/
-function buildAppsSection () {
- let apps_str = '';
- if ( window.launch_apps?.recommended?.length > 0 ) {
- apps_str += '
';
- for ( let index = 0; index < window.launch_apps.recommended.length; index++ ) {
- const app_info = window.launch_apps.recommended[index];
- apps_str += `
`;
- apps_str += `
`;
- apps_str += `
})
`;
- apps_str += `
${html_encode(app_info.title)}`;
- apps_str += '
';
- apps_str += '
';
- }
- apps_str += '
';
+function buildAppsGrid (apps) {
+ if ( !apps || apps.length === 0 ) {
+ let h = '';
+ h += '
';
+ h += '
No apps installed yet
';
+ h += '
';
+ return h;
}
- // No apps message
- if ( (!window.launch_apps?.recent || window.launch_apps.recent.length === 0) &&
- (!window.launch_apps?.recommended || window.launch_apps.recommended.length === 0) ) {
- apps_str += 'No apps available yet.
';
- }
+ let h = '';
+ for ( const app of apps ) {
+ const title = (app.title || app.name || '').trim();
+ const iconUrl = app.iconUrl || window.icons['app.svg'];
- return apps_str;
+ h += `
`;
+ h += '
';
+ h += `
})
`;
+ h += '
';
+ h += `
${html_encode(title)}`;
+ h += '
';
+ }
+ h += '
';
+ return h;
}
const TabApps = {
id: 'apps',
- label: 'My Apps',
- icon: ``,
+ label: 'Apps',
+ icon: '',
+
+ _apps: null,
html () {
- return '';
+ let h = '';
+ h += '
';
+ h += '
Loading apps...
';
+ h += '
';
+ h += '
';
+ return h;
},
init ($el_window) {
- // Load apps initially
this.loadApps($el_window);
- // Handle app clicks - open in new browser tab
- $el_window.on('click', '.dashboard-apps-container .start-app', function (e) {
+ // Handle app tile clicks
+ $el_window.on('click', '.myapps-tile', function (e) {
e.preventDefault();
e.stopPropagation();
-
const appName = $(this).attr('data-app-name');
if ( appName ) {
- const appUrl = `/app/${appName}`;
- window.open(appUrl, '_blank');
+ window.open(`/app/${appName}`, '_blank');
}
});
},
async loadApps ($el_window) {
- // If launch_apps is not populated yet, fetch from server
- if ( !window.launch_apps || !window.launch_apps.recent || window.launch_apps.recent.length === 0 ) {
- try {
- window.launch_apps = await $.ajax({
- url: `${window.api_origin}/get-launch-apps?icon_size=64`,
- type: 'GET',
- async: true,
- contentType: 'application/json',
+ const $container = $el_window.find('.myapps-container');
+
+ try {
+ const res = await fetch(
+ `${window.api_origin}/installedApps?orderBy=name&limit=100`,
+ {
headers: {
- 'Authorization': `Bearer ${window.auth_token}`,
+ 'Authorization': `Bearer ${puter.authToken}`,
},
- });
- } catch (e) {
- console.error('Failed to load launch apps:', e);
- }
+ method: 'GET',
+ },
+ );
+ const apps = await res.json();
+ this._apps = apps;
+ $container.html(buildAppsGrid(apps));
+ } catch (e) {
+ console.error('Failed to load installed apps:', e);
+ $container.html('');
}
- // Populate the apps container
- $el_window.find('.dashboard-apps-container').html(buildAppsSection());
},
onActivate ($el_window) {
- // Refresh apps when navigating to apps section
this.loadApps($el_window);
},
};
export default TabApps;
-
diff --git a/src/gui/src/UI/Dashboard/UIDashboard.js b/src/gui/src/UI/Dashboard/UIDashboard.js
index d1911564a..e179b1b72 100644
--- a/src/gui/src/UI/Dashboard/UIDashboard.js
+++ b/src/gui/src/UI/Dashboard/UIDashboard.js
@@ -54,7 +54,7 @@ import TabSecurity from './TabSecurity.js';
// Registry of built-in tabs
const builtinTabs = [
TabHome,
- // TabApps,
+ TabApps,
TabFiles,
TabUsage,
TabAccount,
@@ -95,7 +95,7 @@ async function UIDashboard (options) {
for ( let i = 0; i < tabs.length; i++ ) {
const tab = tabs[i];
const isActive = i === 0 ? ' active' : '';
- const isBeta = tab.label === 'Files';
+ const isBeta = tab.label === 'Apps';
h += `