diff --git a/app/javascript/controllers/sharing_modal_controller.js b/app/javascript/controllers/sharing_modal_controller.js index aabf3280..eb6e9ade 100644 --- a/app/javascript/controllers/sharing_modal_controller.js +++ b/app/javascript/controllers/sharing_modal_controller.js @@ -34,7 +34,7 @@ export default class extends Controller { const formData = new FormData() formData.append('enabled', this.enableToggleTarget.checked ? '1' : '0') - + if (this.enableToggleTarget.checked && this.hasExpirationSelectTarget) { formData.append('expiration', this.expirationSelectTarget.value || '1h') } else if (this.enableToggleTarget.checked) { @@ -55,13 +55,13 @@ export default class extends Controller { .then(response => response.json()) .then(data => { this.hideLoadingState() - + if (data.success) { // Update sharing link if provided if (data.sharing_url) { this.sharingLinkTarget.value = data.sharing_url } - + // Show a subtle notification for auto-save this.showNotification("✓ Auto-saved", "success") } else { @@ -128,4 +128,4 @@ export default class extends Controller { toast.remove() }, 3000) } -} \ No newline at end of file +} diff --git a/app/views/stats/public_month.html.erb b/app/views/stats/public_month.html.erb index 2044e337..dec15c15 100644 --- a/app/views/stats/public_month.html.erb +++ b/app/views/stats/public_month.html.erb @@ -19,9 +19,11 @@ - - - + + <% if @self_hosted %> + + + <% end %>