@@ -315,13 +315,18 @@ async function create_app(title, source_path = null, items = null) {
315315 // Update the app with the new hostname
316316 // ----------------------------------------------------
317317 puter . apps . update ( app . name , {
318- title : title ,
319- indexURL : source_path ? protocol + `://${ subdomain } .` + static_hosting_domain : 'https://dev-center.puter.com/coming-soon.html' ,
320- icon : icon ,
321- description : ' ' ,
322- maximizeOnStart : false ,
323- background : false ,
324- } ) . then ( async ( app ) => {
318+ title : title ,
319+ indexURL : source_path ? protocol + `://${ subdomain } .` + static_hosting_domain : 'https://dev-center.puter.com/coming-soon.html' ,
320+ icon : icon ,
321+ description : ' ' ,
322+ maximizeOnStart : false ,
323+ background : false ,
324+ metadata : {
325+ category : null , // default category on creation
326+ window_resizable : true ,
327+ fullpage_on_landing : true ,
328+ }
329+ } ) . then ( async ( app ) => {
325330 // refresh app list
326331 puter . apps . list ( { icon_size : 64 } ) . then ( async ( resp ) => {
327332 apps = resp ;
@@ -330,6 +335,8 @@ async function create_app(title, source_path = null, items = null) {
330335 setTimeout ( ( ) => {
331336 // open edit app section
332337 edit_app_section ( app . name ) ;
338+ refresh_app_list ( ) ; // ✅ Refreshes main app list
339+
333340 // set drop area if source_path was provided or items were dropped
334341 if ( source_path || items ) {
335342 $ ( '.drop-area' ) . removeClass ( 'drop-area-hover' ) ;
@@ -1381,6 +1388,8 @@ $(document).on('click', '.edit-app-save-btn', async function (e) {
13811388 } ,
13821389 filetypeAssociations : filetype_associations ,
13831390 } ) . then ( async ( app ) => {
1391+ refresh_app_list ( ) ;
1392+
13841393 currently_editing_app = app ;
13851394 trackOriginalValues ( ) ; // Update original values after save
13861395 toggleSaveButton ( ) ; //Disable Save Button after succesful save
@@ -1654,53 +1663,103 @@ async function getBase64ImageFromUrl(imageUrl) {
16541663 */
16551664function generate_app_card ( app ) {
16561665 let h = `` ;
1657- h += `<tr class="app-card" data-uid="${ html_encode ( app . uid ) } " data-title="${ html_encode ( app . title ) } " data-name="${ html_encode ( app . name ) } ">` ;
1666+ h += `<tr class="app-card" data-uid="${ html_encode ( app . uid ) } " data-title="${ html_encode ( app . title ) } " data-name="${ html_encode ( app . name ) } " style="height: 86px; ">` ;
16581667 // check box
1659- h += `<td style="height: 60px; width: 20px;">` ;
1668+ h += `<td style="height: 60px; width: 20px; display: flex ; align-items: center; ">` ;
16601669 h += `<div style="width: 20px; height: 20px; margin-top: 20px; margin-right: 10px; flex-shrink:0;">` ;
16611670 h += `<input type="checkbox" class="app-checkbox" data-app-uid="${ html_encode ( app . uid ) } " data-app-name="${ html_encode ( app . name ) } " style="width: 20px; height: 20px;">` ;
16621671 h += `</div>` ;
16631672 h += `</td>` ;
1664- // App info
1665- h += `<td style="height: 60px; width: 450px; display: flex; flex-direction: row; overflow:hidden;">` ;
1673+ // App info (title, category, toolbar)
1674+ h += `<td style="height: 72px; width: 450px;">` ;
1675+
1676+ // Wrapper for icon + content side by side
1677+ h += `<div style="display: flex; flex-direction: row; align-items: center; height: 86px; overflow: hidden;">` ;
1678+
16661679 // Icon
1667- h += `<div class="got-to-edit-app" data-app-name="${ html_encode ( app . name ) } " data-app-title="${ html_encode ( app . title ) } " data-app-locked="${ html_encode ( app . metadata ?. locked ) } " data-app-uid="${ html_encode ( app . uid ) } " style="background-position: center; background-repeat: no-repeat; background-size: 92%; background-image:url(${ app . icon === null ? './img/app.svg' : app . icon } ); width: 60px; height: 60px; float:left; margin-bottom: -14px; color: #414b56; cursor: pointer; background-color: white; border-radius: 3px; flex-shrink:0;"></div>` ;
1668- // Info
1669- h += `<div style="float:left; padding-left: 10px;">` ;
1670- // Title
1671- h += `<h3 class="got-to-edit-app app-card-title" data-app-name="${ html_encode ( app . name ) } " data-app-title="${ html_encode ( app . title ) } " data-app-uid="${ html_encode ( app . uid ) } ">${ html_encode ( app . title ) } ${ app . metadata ?. locked ? lock_svg_tippy : '' } </h3>` ;
1672- // // Category
1673- // if (app.metadata?.category) {
1674- // const category = APP_CATEGORIES.find(c => c.id === app.metadata.category);
1675- // if (category) {
1676- // h += `<div class="app-categories">`;
1677- // h += `<span class="app-category">${category.label}</span>`;
1678- // h += `</div>`;
1679- // }
1680- // }
1681-
1682- // link
1683- h += `<a class="app-card-link" href="${ html_encode ( applink ( app ) ) } " target="_blank">${ html_encode ( applink ( app ) ) } </a>` ;
1684-
1685- // toolbar
1686- h += `<div style="" class="app-row-toolbar disable-user-select">` ;
1687-
1688- // Open
1689- h += `<span title="Open app" class="open-app-btn" data-app-uid="${ html_encode ( app . uid ) } " data-app-name="${ html_encode ( app . name ) } " style="">Open</span>` ;
1690- h += `<span style="margin-right: 10px; margin-left: 10px; color: #CCC; cursor:default;">•</span>` ;
1691-
1692- // Settings
1693- h += `<span title="Edit app" class="edit-app" data-app-name="${ html_encode ( app . name ) } " data-app-title="${ html_encode ( app . title ) } " data-app-uid="${ html_encode ( app . uid ) } ">Settings</span>` ;
1694- h += `<span style="margin-right: 10px; margin-left: 10px; color: #CCC; cursor:default;">•</span>` ;
1695-
1696- // add to desktop
1697- h += `<span class="add-app-to-desktop" data-app-uid="${ html_encode ( app . uid ) } " data-app-title="${ html_encode ( app . title ) } ">Add Shortcut to Desktop</span>`
1698- h += `<span style="margin-right: 10px; margin-left: 10px; color: #CCC; cursor:default;">•</span>` ;
1699-
1700- // Delete
1701- h += `<span title="Delete app" class="delete-app" data-app-name="${ html_encode ( app . name ) } " data-app-title="${ html_encode ( app . title ) } " data-app-uid="${ html_encode ( app . uid ) } ">Delete</span>` ;
1702- h += `</div>` ;
1703- h += `</td>` ;
1680+ h += `<div class="got-to-edit-app" data-app-name="${ html_encode ( app . name ) } " data-app-title="${ html_encode ( app . title ) } " data-app-locked="${ html_encode ( app . metadata ?. locked ) } " data-app-uid="${ html_encode ( app . uid ) } " style="
1681+ background-position: center;
1682+ background-repeat: no-repeat;
1683+ background-size: 92%;
1684+ background-image: url(${ app . icon === null ? './img/app.svg' : app . icon } );
1685+ width: 60px;
1686+ height: 60px;
1687+ margin-right: 10px;
1688+ color: #414b56;
1689+ cursor: pointer;
1690+ background-color: white;
1691+ border-radius: 3px;
1692+ flex-shrink: 0;
1693+ "></div>` ;
1694+
1695+ // App info content
1696+ h += `<div style="display: flex; flex-direction: column; justify-content: space-between; height: 100%; overflow: visible;">` ;
1697+
1698+ // Info block with fixed layout
1699+ h += `<div style="display: flex; flex-direction: column; justify-content: center; padding-left: 10px; flex-grow: 1; overflow: hidden; gap: 1px; height: 100%;">` ;
1700+
1701+ // Title
1702+ h += `<h3 class="got-to-edit-app app-card-title" style="
1703+ margin: 0;
1704+ font-size: 16px;
1705+ line-height: 20px;
1706+ height: 20px;
1707+ white-space: nowrap;
1708+ overflow: hidden;
1709+ text-overflow: ellipsis;
1710+ " data-app-name="${ html_encode ( app . name ) } " data-app-title="${ html_encode ( app . title ) } " data-app-uid="${ html_encode ( app . uid ) } ">
1711+ ${ html_encode ( app . title ) } ${ app . metadata ?. locked ? lock_svg_tippy : '' }
1712+ </h3>` ;
1713+
1714+ // Category (optional)
1715+ if ( app . metadata ?. category ) {
1716+ const category = APP_CATEGORIES . find ( c => c . id === app . metadata . category ) ;
1717+ if ( category ) {
1718+ h += `<span class="app-category" style="
1719+ background-color: #f3f4f6;
1720+ color: #374151;
1721+ padding: 1px 6px;
1722+ border-radius: 4px;
1723+ font-size: 12px;
1724+ font-weight: 500;
1725+ margin: 1px 0 0 0;
1726+ max-width: fit-content;
1727+ white-space: nowrap;
1728+ overflow: hidden;
1729+ text-overflow: ellipsis;
1730+ ">${ html_encode ( category . label ) } </span>` ;
1731+ }
1732+ }
1733+
1734+ // Link
1735+ h += `<a class="app-card-link" href="${ html_encode ( applink ( app ) ) } " target="_blank" style="
1736+ font-size: 13px;
1737+ margin: 2px 0 0 0;
1738+ color: #2563eb;
1739+ white-space: nowrap;
1740+ overflow: hidden;
1741+ text-overflow: ellipsis;
1742+ text-decoration: none;
1743+ ">${ html_encode ( applink ( app ) ) } </a>` ;
1744+
1745+ h += `</div>` ;
1746+
1747+
1748+
1749+ // Toolbar
1750+ h += `<div class="app-toolbar-container" style="height: 16px; overflow: visible;">` ;
1751+ h += `<div class="app-row-toolbar disable-user-select">` ; // remove inline styles
1752+
1753+ h += `<span title="Open app" class="open-app-btn" data-app-uid="${ html_encode ( app . uid ) } " data-app-name="${ html_encode ( app . name ) } ">Open</span>` ;
1754+ h += `<span title="Edit app" class="edit-app" data-app-name="${ html_encode ( app . name ) } " data-app-title="${ html_encode ( app . title ) } " data-app-uid="${ html_encode ( app . uid ) } ">Settings</span>` ;
1755+ h += `<span class="add-app-to-desktop" data-app-uid="${ html_encode ( app . uid ) } " data-app-title="${ html_encode ( app . title ) } ">Add Shortcut to Desktop</span>` ;
1756+ h += `<span title="Delete app" class="delete-app" data-app-name="${ html_encode ( app . name ) } " data-app-title="${ html_encode ( app . title ) } " data-app-uid="${ html_encode ( app . uid ) } ">Delete</span>` ;
1757+ h += `</div>` ;
1758+ h += `</div>` ;
1759+ h += `</div>` ; // end info column
1760+ h += `</div>` ; // end row
1761+ h += `</td>` ;
1762+
17041763
17051764 // users count
17061765 h += `<td style="margin-top:10px; font-size:15px; vertical-align:middle;">` ;
0 commit comments