From 14fc963dd472e5eafb2e8cef8c760f4b83d4d340 Mon Sep 17 00:00:00 2001 From: jelveh Date: Fri, 18 Oct 2024 17:48:14 -0700 Subject: [PATCH] Show approval badges and lock in Dev Center --- src/dev-center/css/style.css | 33 +++++++++++++++++++++++++++++++++ src/dev-center/js/dev-center.js | 31 +++++++++++++++++-------------- 2 files changed, 50 insertions(+), 14 deletions(-) diff --git a/src/dev-center/css/style.css b/src/dev-center/css/style.css index d341071b..f3b4eace 100644 --- a/src/dev-center/css/style.css +++ b/src/dev-center/css/style.css @@ -1049,3 +1049,36 @@ dialog{ .search-clear:hover { opacity: 1; } +.approval-badge{ + float:right; + padding: 4px; + font-size: 12px; + border-radius: 5px; + margin-top: 0; + display: block; + width: 170px; + clear: both; + margin-bottom: 3px; +} + +.approval-badge-lsiting{ + color: green; + background: #c6f6c6; + border:1px solid green; +} + +.approval-badge-incentive{ + color: #0074ce; + background: #d8efff; + border:1px solid #0074ce; +} + +.approval-badge-opening{ + color: #bb00ff; + background: #ffeaff; + border:1px solid #bb00ff; +} + +td .approval-badge:last-child{ + margin-bottom: 0; +} \ No newline at end of file diff --git a/src/dev-center/js/dev-center.js b/src/dev-center/js/dev-center.js index 337aa972..9604c6f2 100644 --- a/src/dev-center/js/dev-center.js +++ b/src/dev-center/js/dev-center.js @@ -1220,9 +1220,9 @@ function generate_app_card(app) { h += ``; // check box h += ``; - h += `
`; - h += ``; - h += `
`; + h += `
`; + h += ``; + h += `
`; h += ``; // App info h += ``; @@ -1231,7 +1231,8 @@ function generate_app_card(app) { // Info h += `
`; // Title - h += `

${html_encode(app.title)}

`; + h += `

${html_encode(app.title)}${app.metadata?.locked ? '' : ''}

`; + // link h += `${html_encode(applink(app))}`; // toolbar @@ -1270,16 +1271,18 @@ function generate_app_card(app) { h += ``; h += ``; - - // "Approved for incentive program" - if (app.approved_for_incentive_program) - h += `✔ Incentive Program`; + h += `
`; + // "Approved for listing" + if(app.approved_for_listing){ + h += `✔ Approved for Listing`; + } + // "Approved for opening items" + if (app.approved_for_opening_items) + h += `✔ Approved for Opening Items`; + // "Approved for incentive program" + if (app.approved_for_incentive_program) + h += `✔ Incentive Program`; + h += `
`; h += ``; h += ``; return h;