diff --git a/src/dev-center/css/style.css b/src/dev-center/css/style.css
index a5f23f6c8..dc183e996 100644
--- a/src/dev-center/css/style.css
+++ b/src/dev-center/css/style.css
@@ -812,7 +812,7 @@ ol li:before {
position: relative;
display: block;
padding: 10px 15px;
- margin-right: 5px;
+ margin-right: 8px;
line-height: 1.42857143;
border: 1px solid transparent;
border-radius: 4px 4px 0 0;
@@ -1200,3 +1200,16 @@ dialog{
border-radius: 4px;
font-size: 14px;
}
+.stats-cell{
+ width: 100px;
+ display: inline-block;
+ font-size: 14px;
+ opacity: 0.7;
+}
+.stats-cell:hover{
+ cursor: pointer;
+ opacity: 1 !important;
+}
+.stats-cell img{
+ width: 18px; margin-right: 5px; margin-bottom: -4px;
+}
\ 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 65d58faae..ac7175771 100644
--- a/src/dev-center/js/dev-center.js
+++ b/src/dev-center/js/dev-center.js
@@ -505,9 +505,9 @@ function generate_edit_app_section(app) {
@@ -788,7 +788,7 @@ function resetToOriginalValues() {
}
}
-async function edit_app_section(cur_app_name) {
+async function edit_app_section(cur_app_name, tab = 'deploy') {
$('section:not(.sidebar)').hide();
$('.tab-btn').removeClass('active');
$('.tab-btn[data-tab="apps"]').addClass('active');
@@ -809,6 +809,12 @@ async function edit_app_section(cur_app_name) {
$('#analytics-opens .count').html(cur_app.stats.open_count);
render_analytics('today')
+
+ // show the correct tab
+ $('.section-tab').hide();
+ $(`.section-tab[data-tab="${tab}"]`).show();
+ $('.section-tab-buttons .section-tab-btn').removeClass('active');
+ $(`.section-tab-buttons .section-tab-btn[data-tab="${tab}"]`).addClass('active');
const filetype_association_input = document.querySelector('textarea[id=edit-app-filetype-associations]');
let tagify = new Tagify(filetype_association_input, {
@@ -1603,12 +1609,12 @@ function generate_app_card(app) {
// users count
h += `
`;
- h += ` ${number_format((app.stats.referral_count ?? 0) + app.stats.user_count)}`;
+ h += ` ${number_format((app.stats.referral_count ?? 0) + app.stats.user_count)}`;
h += ` | `;
// opens
h += `
`;
- h += ` ${number_format(app.stats.open_count)}`;
+ h += ` ${number_format(app.stats.open_count)}`;
h += ` | `;
// Created
@@ -2932,4 +2938,8 @@ async function render_analytics(period){
});
puter.ui.hideSpinner();
-}
\ No newline at end of file
+}
+
+$(document).on('click', '.stats-cell', function(e) {
+ edit_app_section($(this).attr('data-app-name'), 'analytics');
+})
\ No newline at end of file