diff --git a/src/dev-center/css/style.css b/src/dev-center/css/style.css index e823f9f99..4758a145e 100644 --- a/src/dev-center/css/style.css +++ b/src/dev-center/css/style.css @@ -242,6 +242,7 @@ section { background: white; overflow: hidden; position: relative; + } .app-card:hover { @@ -251,8 +252,16 @@ section { background-color: #e8eff6; } -.app-card:hover .app-row-toolbar{ - display: block; + +.app-card:hover .app-row-toolbar { + visibility: visible; + opacity: 1; +} + +.app-toolbar-container { + height: 16px; + overflow: hidden; + position: relative; } .app-card h1 { @@ -717,14 +726,24 @@ th.sorted{ color: #394254; } -.app-row-toolbar{ - margin-top: -7px; - display: none; - width: 350px; +.app-row-toolbar { + visibility: hidden; + opacity: 0; + transition: opacity 0.2s ease; + height: auto; /* allow full content */ + overflow: visible; /* allow overflow */ + display: flex; + align-items: center; + gap: 4px; /* adjust spacing here */ + font-size: 12px; + padding-top: 2px; + margin-top: -4px; + } .app-row-toolbar img { opacity: 0.5; + transition: opacity 0.2s ease; } .app-row-toolbar img:hover { @@ -1212,4 +1231,44 @@ dialog{ } .stats-cell img{ width: 18px; margin-right: 5px; margin-bottom: -4px; -} \ No newline at end of file +} +.category-badge { + display: inline-block; + background-color: #f2f2f2; + color: #555; + font-size: 12px; + font-weight: 500; + padding: 2px 6px; + margin-left: 8px; + border-radius: 6px; + vertical-align: middle; +} +.app-category { + display: inline-block; + background-color: #f3f4f6; + color: #374151; + padding: 1px 6px; + border-radius: 4px; + font-size: 11px; + font-weight: 500; + margin-top: 2px; + max-height: 18px; + line-height: 1.2; + white-space: nowrap; +} + +.app-row-toolbar span { + margin: 0 4px; + font-size: 12px; + line-height: 1; + vertical-align: middle; + padding: 2px 4px; +} + +.app-row-toolbar span:hover { + text-decoration: underline; + cursor: pointer; + color: #000; /* Optional: darken on hover */ +} + + diff --git a/src/dev-center/js/dev-center.js b/src/dev-center/js/dev-center.js index d87ae242a..772d80555 100644 --- a/src/dev-center/js/dev-center.js +++ b/src/dev-center/js/dev-center.js @@ -315,13 +315,18 @@ async function create_app(title, source_path = null, items = null) { // Update the app with the new hostname // ---------------------------------------------------- puter.apps.update(app.name, { - title: title, - indexURL: source_path ? protocol + `://${subdomain}.` + static_hosting_domain : 'https://dev-center.puter.com/coming-soon.html', - icon: icon, - description: ' ', - maximizeOnStart: false, - background: false, - }).then(async (app) => { + title: title, + indexURL: source_path ? protocol + `://${subdomain}.` + static_hosting_domain : 'https://dev-center.puter.com/coming-soon.html', + icon: icon, + description: ' ', + maximizeOnStart: false, + background: false, + metadata: { + category: null, // default category on creation + window_resizable: true, + fullpage_on_landing: true, + } +}).then(async (app) => { // refresh app list puter.apps.list({ icon_size: 64 }).then(async (resp) => { apps = resp; @@ -330,6 +335,8 @@ async function create_app(title, source_path = null, items = null) { setTimeout(() => { // open edit app section edit_app_section(app.name); + refresh_app_list(); // ✅ Refreshes main app list + // set drop area if source_path was provided or items were dropped if (source_path || items) { $('.drop-area').removeClass('drop-area-hover'); @@ -1381,6 +1388,8 @@ $(document).on('click', '.edit-app-save-btn', async function (e) { }, filetypeAssociations: filetype_associations, }).then(async (app) => { + refresh_app_list(); + currently_editing_app = app; trackOriginalValues(); // Update original values after save toggleSaveButton(); //Disable Save Button after succesful save @@ -1654,53 +1663,103 @@ async function getBase64ImageFromUrl(imageUrl) { */ function generate_app_card(app) { let h = ``; - h += `